Developer documentation · v1

ExilTrade Enquiry Integration API

Connect your ERP, CRM, accounting system, website or mobile back end to ExilTrade. Enquiries customers send to your business arrive in your system automatically, you can reply from your system, and you can send enquiries to other ExilTrade businesses.

Base URL
https://api.exiltrade.com/api/v1/integration
Authentication
Header X-Api-Key: <your API key>
Format
JSON (UTF-8). All times are UTC, ISO 8601 (2026-11-21T09:30:00Z)
Polling limit
Each list (received / sent) once every 5 minutes per API key
Other calls
60 requests per minute per API key
Contents

Onboarding

  1. Register on ExilTrade (email or Google). Your integration profile and Client ID (exb_cl_…) are created automatically with the account.
  2. Create your API key. In the vendor panel open Integrations and click Generate API key.
    • It is shown once. Copy it into your server's secret store or environment variables straight away.
    • Generating a new key immediately disables the previous one (use this to rotate the key, or if it leaks). Revoke disables it without a replacement.
  3. Test the key with GET /me. A 200 means you are ready.
  4. Start syncing with GET /enquiries/received (and /enquiries/sent if you also send enquiries).
  5. Monitor: the Integrations page lists every call your key made (time, endpoint, result, IP address).
exb_3f9a1c2b7d4e_Xq7mR2vLk9TzW4bHnC8dYp1sGf6jQa3uEo5iNx0e
Prefix · 16 characters, safe to show (the panel displays exb_3f9a1c2b7d4e_••••••••)Secret · 40 characters, shown once, keep private57 characters in totalExample only. Not a working key.

One API key belongs to one ExilTrade account and covers every business that account owns.

How syncing works

The list endpoints return enquiries that changed since your last call: new enquiries, new replies in the conversation and status changes. Each response contains a nextCursor. Save it and send it back on the next call.

text
first run:   GET /enquiries/received                 -> enquiries + nextCursor "A"
5 min later: GET /enquiries/received?cursor=A        -> only what changed since A + nextCursor "B"
5 min later: GET /enquiries/received?cursor=B        -> ...

Rules for a correct sync:

  • Upsert by enquiryId. The same enquiry is returned again every time it changes (new reply, status change). Insert it if new, otherwise replace your copy, including the full conversation list.
  • Save nextCursor only after you have stored the enquiries from that response. If your process crashes before that, the next call with the old cursor returns the same changes again.
  • hasMore: true means more changes are waiting (for example on the first run). Call again immediately with the new nextCursor; continuation calls are not limited by the 5-minute rule. Keep going until hasMore is false, then wait until nextPollAfter.
  • Keep one cursor per list (received and sent) and the same status filter for the whole sync. To download everything again, call without a cursor.
  • When nothing changed, enquiries is empty and nextCursor is the cursor you sent.

Limits

WhatLimitWhen exceeded
GET /enquiries/received1 call per 5 minutes per API key. Continuation pages (using nextCursor after hasMore: true) are exempt.429 POLL_TOO_SOON with a Retry-After header and nextPollAfter
GET /enquiries/sent1 call per 5 minutes per API key, counted separately from receivedSame
All other endpoints60 per minute per API key429 TOO_MANY_REQUESTS
Page size (limit)1–100, default 50400

A rejected call does not reset the 5-minute window, and a call with invalid parameters (400) does not use it up. Always honour the Retry-After header (seconds) instead of retrying in a loop.

Endpoints

All requests need the header X-Api-Key. Request bodies are JSON (Content-Type: application/json). Every response has success and code; errors also have message.

GET/meCheck the key

JSON
{
  "success": true,
  "code": "OK",
  "clientId": "exb_cl_xxxxxxxxxxxxxxxx",
  "userId": 10032,
  "keyPrefix": "exb_xxxxxxxxxxxx_••••••••",
  "limits": { "pollIntervalSeconds": 300, "maxPageSize": 100, "requestsPerMinute": 60 }
}

GET/enquiries/receivedEnquiries sent to your businesses1 per 5 min

GET/enquiries/sentEnquiries you sent to other businesses1 per 5 min

Query parameterTypeDescription
cursorstring, optionalnextCursor from your previous response. Omit it on the first run.
limitint, optionalPage size 1–100 (default 50).
statusint, optionalOnly this status (see status values).

Response 200:

JSON
{
  "success": true,
  "code": "ENQUIRIES_FOUND",
  "direction": "received",
  "count": 1,
  "hasMore": false,
  "nextCursor": "NjM5MDAwMDAwMDAwMDAwMDAwOjMx",
  "nextPollAfter": "2026-11-21T09:35:00Z",
  "pollIntervalSeconds": 300,
  "enquiries": [ { "enquiryId": 31, "direction": "received", "...": "see section 5" } ]
}

Response 429 (called again within 5 minutes):

JSON
{
  "success": false,
  "code": "POLL_TOO_SOON",
  "message": "This list can be fetched once every 5 minutes. Try again after nextPollAfter.",
  "retryAfterSeconds": 212,
  "nextPollAfter": "2026-11-21T09:35:00Z"
}

GET/enquiries/{enquiryId}One enquiry

Any enquiry you sent or received. Use it to refresh a single enquiry, for example after a reply. Not limited by the 5-minute rule. Response: { "success": true, "code": "ENQUIRY_FOUND", "enquiry": { … } }.

POST/enquiriesSend an enquiry to a business

JSON
{
  "businessId": 2,
  "subject": "Bulk order: Dell Latitude 5420",
  "message": "Please quote for 20 units, delivery to Pune.",
  "products": [ { "productId": 30066, "quantity": 20 } ]
}
FieldRules
businessIdRequired. A published ExilTrade business.
subjectOptional, up to 300 characters.
messageRequired, up to 10,000 characters.
productsOptional list. Each productId must be a published product of that business, with no duplicates; quantity must be greater than 0 if given.

Optional header Idempotency-Key (1–100 visible ASCII characters, for example a UUID or your own order number). If the same key is sent again within 24 hours, no second enquiry is created: the first one is returned with code ENQUIRY_ALREADY_CREATED. Use it whenever you might retry after a timeout.

Response 201 (200 for a repeated Idempotency-Key):

JSON
{ "success": true, "code": "ENQUIRY_CREATED", "message": "Enquiry sent.", "enquiryId": 34, "enquiry": { ... } }

POST/enquiries/{enquiryId}/repliesReply in the conversation

JSON
{ "message": "Thank you. 20 units are in stock; price ₹28,500 each, delivery in 5 days." }

Works for enquiries you received (you reply as the vendor and the customer is emailed) and enquiries you sent (you reply as the customer). Not possible on closed or cancelled enquiries (409 ENQUIRY_CLOSED). Response 200 with the updated enquiry.

POST/enquiries/{enquiryId}/cancelCancel a received enquiry

JSON
{ "message": "Sorry, this model is discontinued." }

Only for enquiries your business received. message is optional; the customer is emailed. Response 200 with the updated enquiry.

The enquiry object

JSON
{
  "enquiryId": 31,
  "direction": "received",
  "status": 3,
  "statusName": "responded",
  "subject": "Enquiry about Dell Latitude 5420",
  "message": "Proposed price: ₹30,000. Please confirm availability.",
  "createdAt": "2026-11-18T06:12:40Z",
  "updatedAt": "2026-11-18T07:02:11Z",
  "lastActivityAt": "2026-11-18T07:02:11Z",
  "business": { "businessId": 2, "name": "Sample Traders Pvt Ltd", "slug": "sample-traders" },
  "customer": { "userId": 10042, "name": "Jane Example", "email": "jane.example@example.com", "mobile": "+91 98xxxxxx10" },
  "products": [
    { "productId": 30066, "name": "Dell Latitude 5420", "sku": "LAT-5420", "slug": "dell-latitude-5420-k3x9qa", "quantity": 2 }
  ],
  "conversation": [
    { "responseId": 88, "from": "vendor", "senderName": "Sam Sample", "message": "Available. ₹29,000 each.", "createdAt": "2026-11-18T07:02:11Z" }
  ]
}
FieldDescription
directionreceived (to your business) or sent (by you).
businessThe business the enquiry was sent to.
customerThe person who sent the enquiry.
productsProducts the enquiry is about (may be empty). slug is the product's ExilTrade page identifier.
conversationAll replies, oldest first. from is vendor or customer.
lastActivityAtLatest of created, updated and newest reply; the sync is ordered by this.

Fields may be added in later versions of v1; ignore fields you do not recognise.

Status values

statusstatusNameMeaning
1openNew, not answered yet
2in_progressBeing handled
3respondedThe vendor has replied
4closedFinished
5cancelledCancelled by the vendor

Errors

JSON
{ "success": false, "code": "INVALID_API_KEY", "message": "The API key is not valid." }
HTTPcodeMeaning and what to do
400INVALID_REQUESTA parameter or body field is wrong; message says which. Fix the request.
400INVALID_PRODUCTSA product is not published under that business, or a quantity is not positive.
401MISSING_API_KEYNo X-Api-Key header.
401INVALID_API_KEYWrong, revoked or replaced key. Generate a new key in the vendor panel.
403API_ACCESS_DISABLEDExilTrade disabled API access for this account. Contact support.
403ACCOUNT_BLOCKED, ACCOUNT_SUSPENDED, ACCOUNT_NOT_ACTIVEThe ExilTrade account cannot be used.
404ENQUIRY_NOT_FOUNDNo such enquiry, or it is not yours.
404BUSINESS_NOT_FOUNDThe business does not exist or is not published.
409ENQUIRY_CLOSEDThe enquiry is closed or cancelled.
409IDEMPOTENCY_IN_PROGRESSThe same Idempotency-Key is still being processed. Retry after a few seconds.
429POLL_TOO_SOONList called within 5 minutes. Wait Retry-After seconds.
429TOO_MANY_REQUESTSMore than 60 calls per minute. Wait and retry.
500SERVER_ERRORTemporary problem. Retry with a delay; for creates, reuse the same Idempotency-Key.

Security checklist

Call the API only from your server. Never put the API key in a browser app, a mobile app or any code users can download. Anyone who has the key can read your enquiries and your customers' contact details. Front ends (React, Angular, mobile) must go through your own back end.

  • Store the key in a secret store or environment variable, never in source control.
  • Always use https://.
  • If the key may have leaked, generate a new one at once (the old one stops working) and check the call log on the Integrations page.
  • Customer names, emails and phone numbers you receive are personal data: use them only to handle the enquiry and protect them in your system.

Code samples

Every sample does the same thing: load the saved cursor, fetch received enquiries, store them, follow hasMore, save the cursor, wait until nextPollAfter, repeat. Replace the storage parts with your own database code.

bash
export EXILTRADE_API_KEY="exb_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
BASE=https://api.exiltrade.com/api/v1/integration

curl -s "$BASE/me" -H "X-Api-Key: $EXILTRADE_API_KEY"

curl -s "$BASE/enquiries/received?limit=100" -H "X-Api-Key: $EXILTRADE_API_KEY"
curl -s "$BASE/enquiries/received?limit=100&cursor=NjM5MDAwMDAwMDAwMDAwMDAwOjMx" -H "X-Api-Key: $EXILTRADE_API_KEY"

curl -s -X POST "$BASE/enquiries/31/replies" \
  -H "X-Api-Key: $EXILTRADE_API_KEY" -H "Content-Type: application/json" \
  -d '{"message":"Available. Price 29,000 each."}'

curl -s -X POST "$BASE/enquiries" \
  -H "X-Api-Key: $EXILTRADE_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: PO-2026-00042" \
  -d '{"businessId":2,"message":"Please quote for 20 units.","products":[{"productId":30066,"quantity":20}]}'

Go-live checklist

  • API key stored as a server-side secret, not in code or a front end.
  • GET /me returns 200 from the production server.
  • Sync stores enquiries before saving nextCursor, and upserts by enquiryId.
  • hasMore handled (continue immediately), 429 handled (Retry-After), errors retried with a delay.
  • Creates send an Idempotency-Key.
  • Customer contact data protected in your system.
  • Someone is responsible for rotating the key if it leaks.