Skip to Content
Developers
Lead orders

Place a lead order for one of your buyers

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/account/lead-orders

The same as placing an order on the Lead orders screen: a quantity of leads on a campaign’s tier at the tier’s price, for a buyer that takes form leads. payment: manual_paid records the payment as taken by hand and opens the order at once; pending leaves it pending payment. Send an Idempotency-Key: a retry places one order.

Authorization

key
headerAuthorizationBearer <traki_account_…>

Request Body

application/json
  1. body
campaignId*string
Formatuuid
tierId*string
Formatuuid
buyerId*string
Formatuuid
states?array<>
Itemsitems <= 60
Default[]
quantity*integer
Range1 <= value <= 100000
dailyCap?|
Defaultnull
pacePerHour?integer
Range1 <= value <= 10000
deliveryDays?|
Defaultnull
isTest?boolean
Defaultfalse
payment?string
Default"manual_paid"
Value in"manual_paid""pending"
notes?|
Defaultnull
shelf?string
Default"FRESH"
Value in"FRESH""RECENT""AGED"
agedBucketId?|
Defaultnull

Response Body

Success

application/json
  1. response
id*string
Formatuuid
code*string
status*string
test*boolean
campaign*
tier*
shelf*string
states*array<string>
quantity*integer
Range-9007199254740991 <= value <= 9007199254740991
filled*integer
Range-9007199254740991 <= value <= 9007199254740991
owed*integer
Range-9007199254740991 <= value <= 9007199254740991
replacements*integer
Range-9007199254740991 <= value <= 9007199254740991
dailyCap*|null
pacePerHour*integer
Range-9007199254740991 <= value <= 9007199254740991
deliveryDays*|null
currency*string
price*string
total*string
cash*string
credit*string
discount*string
paymentMethod*string|null
paidAt*string|null
pausedAt*string|null
pauseReason*string|null
holdReason*string|null
cancelReason*string|null
completedAt*string|null
expectedCompletionAt*string|null
lastDeliveryAt*string|null
refunded*
origin*string
createdAt*string
updatedAt*string
version*string
buyer*|null
notes*string|null
Example Request
curl -X POST 'https://api.traki.io/v1/account/lead-orders' \  -H "Authorization: Bearer $TRAKI_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: a-unique-id-for-this-change' \  -d '{  "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf",  "tierId": "fc392c40-3620-4503-8c0d-7df4d7876c3d",  "buyerId": "7925fb6c-1391-458a-9144-275078d9f24b",  "quantity": 1}'
Example Response
{  "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",  "buyer": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "externalId": "string",    "name": "string"  },  "notes": "string"}