Skip to Content
Developers
Orders

Order leads

Needs the orders:write scope. About scopes

Try it with a test key

Sends to https://api.traki.io

Test keys only. The key stays in this page while it is open and is never saved.

/v1/buyer/orders

The same as ordering from Offers in your portal: the account must allow you to order, the tier must be listed, and when the account has order terms you accept them by sending their version id as acceptTermsVersionId. The order is paid from your wallet (credit, then cash, in the account’s order), by card, or both; when a card is due the answer carries the payment to complete. Send an Idempotency-Key: a retry places one order.

Authorization

key
headerAuthorizationBearer <traki_buyer_…>

Request Body

application/json
  1. body
tierId*string
Formatuuid
states?array<>
Itemsitems <= 60
Default[]
quantity*integer
Range1 <= value <= 100000
dailyCap?|
Defaultnull
pacePerHour?integer
Range1 <= value <= 10000
deliveryDays?|
Defaultnull
promoCode?string
Lengthlength <= 40
method?string
Default"wallet_then_card"
Value in"wallet""card""wallet_then_card"
acceptTermsVersionId?|
Defaultnull
shelf?string
Default"FRESH"
Value in"FRESH""RECENT""AGED"
agedBucketId?|
Defaultnull

Response Body

Success

application/json
  1. response
order*
payment*|null
split*
Example Request
curl -X POST 'https://api.traki.io/v1/buyer/orders' \  -H "Authorization: Bearer $TRAKI_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: a-unique-id-for-this-change' \  -d '{  "tierId": "fc392c40-3620-4503-8c0d-7df4d7876c3d",  "quantity": 1}'
Example Response
{  "order": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "code": "string",    "status": "string",    "test": true,    "campaign": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string"    },    "tier": {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string"    },    "shelf": "string",    "states": [      "string"    ],    "quantity": -9007199254740991,    "filled": -9007199254740991,    "owed": -9007199254740991,    "replacements": -9007199254740991,    "dailyCap": -9007199254740991,    "pacePerHour": -9007199254740991,    "deliveryDays": -9007199254740991,    "currency": "string",    "price": "string",    "total": "string",    "cash": "string",    "credit": "string",    "discount": "string",    "paymentMethod": "string",    "paidAt": "string",    "pausedAt": "string",    "pauseReason": "string",    "holdReason": "string",    "cancelReason": "string",    "completedAt": "string",    "expectedCompletionAt": "string",    "lastDeliveryAt": "string",    "refunded": {      "leads": -9007199254740991,      "cash": "string",      "credit": "string",      "at": "string"    },    "origin": "string",    "createdAt": "string",    "updatedAt": "string",    "version": "string"  },  "payment": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "string",    "amount": "string",    "url": "string",    "expiresAt": "string"  },  "split": {    "due": "string",    "discount": "string",    "credit": "string",    "cash": "string",    "card": "string"  }}