POST
/
orders
curl --request POST \
--url https://api.cnaught.com/v1/orders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"metadata": "example metadata",
"description": "On behalf of Jane Smith",
"amount_kg": 100.5,
"notification_config": {
"url": "https://www.example.com/callback"
}
}'
{
"id": "Gre28Fc35bt3",
"order_number": "47726-53238-46633-33562-7433",
"amount_kg": 100,
"metadata": "Customer metadata",
"price_usd_cents": 2350
}

Authorizations

Authorization
string
header
required

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

Headers

X-Subaccount-Id
string

If present, scopes the operation to the subaccount with given id. See Subaccounts for more info.

Idempotency-Key
string

If present, a unique identifier that allows you to retry a request multiple times while only performing the action once. See Idempotency for more info.

Body

application/json

Order Parameters

Details for a generic order request that specifies credits amount (in kg of CO₂)

Response

201
application/json

Order Details

The response is of type object.