POST
/
v1
/
orders
curl --request POST \
  --url https://carbon-engine.onrender.com/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "portfolioId": "<string>",
  "amount_kg": 123,
  "description": "<string>",
  "customer": "<string>"
}'
[
  {
    "_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.

Body

application/json

Response

201
application/json

Order placed successfully

The response is of type object[].

POST
/
v1
/
orders
curl --request POST \
  --url https://carbon-engine.onrender.com/v1/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "portfolioId": "<string>",
  "amount_kg": 123,
  "description": "<string>",
  "customer": "<string>"
}'
[
  {
    "_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.

Body

application/json

Response

201
application/json

Order placed successfully

The response is of type object[].