Create new retirement_event
POST /obp/dynamic-entity/banks/ogcr/retirement_event
OBPv4.0.0-dynamicEntity_createretirement_event_ogcr Roles: CanCreateDynamicEntityRecord_retirement_event(per bank) _Retirement_event(ogcr)Dynamic-EntityDynamic
Create new retirement_event.
Parsed entity retirement_event. This Dynamic Entity is part of OGCR.
Property List:
- retirement_event_id: Internal identifier for the retirement event
- carbon_credit_batch_id: Batch the retired credits are drawn from
- unit_type: Unit category being retired, must match the batch
- amount: Quantity of CO2e tonnes to retire
- owner_address: Wallet/TBA the credits are retired from
- beneficiary_name: The "entity that uses the certified units" (Annex III(h))
- end_use: Declared end-use of the unit (Recital 42)
- retirement_reason: Free-text claim statement
- status_code: in_progress, failed
- status_message: further explanation of status code
- retirement_date: Date retirement was requested
- certificate_of_compliance_id: Traces the unit back to its certificate
MethodRouting settings example:
<details>
{
"is_bank_id_exact_match":false,
"method_name":"dynamicEntityProcess",
"connector_name":"rest_vMar2019",
"bank_id_pattern":".*",
"parameters":[
{
"key":"entityName",
"value":"retirement_event"
}
{
"key":"url",
"value":"http://mydomain.com/xxx"
}
]
}
</details>
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
Example request body
{
"retirement_event_id": "ret_01JS0347FKH",
"carbon_credit_batch_id": "batch_03OGNWO397234DQ",
"unit_type": "string",
"amount": 1,
"owner_address": "string",
"beneficiary_name": "string",
"end_use": "string",
"retirement_reason": "string",
"status_code": "string",
"status_message": "string",
"retirement_date": "2020-01-01",
"certificate_of_compliance_id": "string"
}Example success response
{
"bank_id": "ogcr",
"retirement_event": {
"retirement_event_id": "ret_01JS0347FKH",
"carbon_credit_batch_id": "batch_03OGNWO397234DQ",
"unit_type": "string",
"amount": 1,
"owner_address": "string",
"beneficiary_name": "string",
"end_use": "string",
"retirement_reason": "string",
"status_code": "string",
"status_message": "string",
"retirement_date": "2020-01-01",
"certificate_of_compliance_id": "string"
}
}Possible errors (4)
- OBP-20001: User not logged in. Authentication is required!
- OBP-20006: User is missing one or more roles:
- OBP-10001: Incorrect json format.
- OBP-50000: Unknown Error.