POST
/
v1
/
orders
/
{id}
/
cancel
curl --request POST \
  --url https://carbon-engine.onrender.com/v1/orders/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "_id": "<string>",
  "orderNumber": "<string>",
  "customer": "<string>",
  "description": "<string>",
  "price_sar_halalas": 123,
  "amount_kg": 123,
  "creditsPurchased": 123,
  "callbackUrl": "<string>",
  "state": "<string>",
  "portfolio": "<string>",
  "certificateUrl": "<string>",
  "projectRecords": [
    {
      "project_id": "<string>",
      "project_category_id": "<string>",
      "credit_batch_id": "<string>",
      "delta": 123,
      "recorded_on": "2023-11-07T05:31:56Z"
    }
  ],
  "invoice": {
    "amountDueSarHalalas": 123,
    "balanceAppliedSarHalalas": 123,
    "receiptUrl": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The order ID

Response

200
application/json

Order cancelled successfully

The response is of type object.

POST
/
v1
/
orders
/
{id}
/
cancel
curl --request POST \
  --url https://carbon-engine.onrender.com/v1/orders/{id}/cancel \
  --header 'Authorization: Bearer <token>'
{
  "_id": "<string>",
  "orderNumber": "<string>",
  "customer": "<string>",
  "description": "<string>",
  "price_sar_halalas": 123,
  "amount_kg": 123,
  "creditsPurchased": 123,
  "callbackUrl": "<string>",
  "state": "<string>",
  "portfolio": "<string>",
  "certificateUrl": "<string>",
  "projectRecords": [
    {
      "project_id": "<string>",
      "project_category_id": "<string>",
      "credit_batch_id": "<string>",
      "delta": 123,
      "recorded_on": "2023-11-07T05:31:56Z"
    }
  ],
  "invoice": {
    "amountDueSarHalalas": 123,
    "balanceAppliedSarHalalas": 123,
    "receiptUrl": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The order ID

Response

200
application/json

Order cancelled successfully

The response is of type object.