POST
/
orders
/
ride
curl --request POST \
  --url https://api.cnaught.com/v1/orders/ride \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "metadata": "example metadata",
  "distance_km": 10.5,
  "notification_config": {
    "url": "https://www.example.com/callback"
  }
}'
{
  "id": "XYZ",
  "metadata": "Customer metadata",
  "amount_kg": 15,
  "price_usd_cents": 2350,
  "state": "placed"
}

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 an order request for offsetting a vehicle ride

Response

201
application/json

Order Details

The response is of type object.