Authentication
All Vendor API endpoints require anX-API-Key header with a vendor key.
Keys begin with ubx_. Create and revoke them under Integrations in the
vendor dashboard.
Create order
POST /api/vendor/v1/orders
Fulfilment types
An unrecognised value is treated as
delivery.
Items
Each item references a product in your UrbnBox catalogue. List your products withGET /api/vendor/v1/products to find their IDs. UrbnBox rejects the order
with 400 when a product:
- does not exist for your vendor account,
- is inactive, or
- does not have enough available stock for the requested
quantity.
Delivery fee
UrbnBox calculatesDeliveryFeeKES when the order is created, using the
delivery coordinates. Send client_lat and client_lng when you have them.
If you send only address and it cannot be geocoded, the order is created
without coordinates; check DeliveryFeeKES in the response.
Idempotency
Whenexternal_reference matches an order you already created, UrbnBox returns
that order instead of creating a duplicate. The response status is 201 in
both cases. Send a stable external_reference for every order so retries are
safe.
Response
201 Created with the order:
Order responses use these capitalised field names (
ID, Status,
TotalKES). Request fields are lowercase with underscores.Order status
List orders
GET /api/vendor/v1/orders
Returns your orders, newest first.
Use cursor pagination to walk through all orders:
?cursor=<next_cursor>. When next_cursor is
empty, you have reached the last page.
Get order
GET /api/vendor/v1/orders/{id}
Returns the order and its items:
404 when the order does not exist for your vendor account.
Cancel order
POST /api/vendor/v1/orders/{id}/cancel
Cancels the order and returns { "status": "cancelled" }.
Create orders in bulk
POST /api/vendor/v1/orders/bulk
Send a JSON array of orders, each with the same fields as
Create order. UrbnBox creates each order independently and
returns one result per array index:
Check a CSV before you send it
Use the CSV tools to validate a spreadsheet of orders. They check the rows; they do not create orders.Step 1: download the template
GET /api/vendor/v1/orders/csv-template
Returns urbnbox-orders-template.csv with the headers and two example rows.
No authentication required.
Step 2: upload for validation
POST /api/vendor/v1/orders/import-csv
Upload the file as multipart/form-data with the field name file. The
response lists every row with its parsed values and an Error, which is empty
for valid rows:
POST /api/vendor/v1/orders/bulk or POST /api/vendor/v1/orders. Those
endpoints take items with product IDs rather than the CSV’s description and
price columns.