Ordering from your own system
Your system can see your products and delivery addresses, ask for new delivery addresses, send orders and see where they are.
It is a REST API: every call is HTTPS and JSON, starts with /v1/, and carries your key.
Quick start
The address for every call is:
https://api.aukhygiene.com
Try your key by asking for your products:
curl https://api.aukhygiene.com/v1/products \ -H "Authorization: Bearer aukt_…"
Then, in order: read your delivery addresses, send a test order to one of them, and ask where it is.
- Send and expect UTF-8 JSON. On a
POST, sendContent-Type: application/json. - Times are UTC, as ISO 8601 (
2027-01-15T09:00:00Z). Dates areYYYY-MM-DD. - Money is in pounds, before VAT, to two decimal places.
- Every answer carries an
X-Request-Idheader. Give it to us if you need to ask about a call. - We may add new fields to an answer. Ignore any field you don't know; we won't remove or rename one within
/v1/.
Your key
Send it on every call as a header. Keep it secret: anyone with it can order on your account. If it gets out, tell us and we'll switch it off at once and give you a new one. Your key works from any internet address.
Authorization: Bearer aukt_…
A key starting aukt_ is a test key. It works exactly like a live key, but its orders and address requests are marked Test: we see them, they are never made in our order system, and nothing is delivered. Build against a test key first.
A key starting aukl_ is a live key: its orders are real.
We send keys only by a one-time secure link, never by plain email. Keep yours in your system's secret store, not in its code.
The calls
/v1/productsYour products and your prices.
/v1/addressesYour delivery addresses, with our address id. An order goes to one of these.
/v1/addressesAsk for a new delivery address. A person checks it.
/v1/address-requests/{request_id}Where an address request is.
/v1/ordersSend an order.
/v1/orders/{reference}Where one order is, by your reference.
/v1/orders?since={time}Your orders that changed since a time.
Your products
GET /v1/products
200 OK
{
"account": "ABC123",
"products": [
{"code": "01-460218", "your_code": "BR-150", "name": "Centrefeed blue roll, 6 x 150 m", "price": 13.90, "vat_rate": 20},
{"code": "06-585", "your_code": null, "name": "Heavy duty bin liners, 200", "price": 7.95, "vat_rate": 20}
]
}
| field | meaning |
|---|---|
code | Our product code. Send this on an order. |
your_code | Your own code for it, where we hold one, or null. |
name | The product's name. |
price | Your price for one, before VAT, today. null if we have no price for you: ask us before ordering it. |
vat_rate | VAT in percent (20), or null if not known. |
Your list is the products with your own prices, your price list, and anything you've ordered from us in the last two years. It changes rarely: reading it once a day is plenty. We refresh it at most every 15 minutes.
Your delivery addresses
GET /v1/addresses
200 OK
{
"account": "ABC123",
"addresses": [
{
"id": 4172,
"name": "Riverside Campus",
"site_code": "RIV-C",
"contract_group": "Universities",
"contact": "Site office",
"address1": "1 River Road",
"address2": "",
"address3": "",
"town": "Exeter",
"county": "Devon",
"postcode": "EX1 1AA",
"instructions": "Goods entrance",
"delivery_method": "Our van",
"budget": {"type": "Spend", "period": "Month", "value": 60.00, "repeat_every": 1,
"start": "2026-01-01", "end": null, "excludes_recharge_products": true},
"test": false
}
]
}
- id is our address id. Keep it against your site: an order is sent to an
address_id. - budget is the site's budget as our website holds it, or
null. It's for your information: we don't refuse an order over budget. - test is
trueonly on an address made for a test key (see Testing). - Text fields we don't hold come back as
"". A newly approved address appears here within 2 minutes.
Asking for a new delivery address
POST /v1/addresses
Content-Type: application/json
{
"name": "Riverside Campus, Block C",
"contact": "Site supervisor",
"address1": "1 River Road",
"address2": "",
"address3": "",
"town": "Exeter",
"county": "Devon",
"postcode": "EX1 1AA",
"phone": "01392 000000",
"email": "site@example.com",
"instructions": "Ring on arrival"
}
202 Accepted
{
"request_id": "9b2f4c1e-0d7a-4e55-a1c3-2f6e8d9b7a10",
"status": "pending",
"address_id": null,
"reason": null,
"test": false,
"received_at": "2027-01-15T09:00:04Z",
"updated_at": "2027-01-15T09:00:04Z"
}
name, address1 and a UK postcode are needed; the rest are optional. Most fields can be up to 100 characters; postcode 15, phone 35, email 255, instructions 400.
A person checks each new address, usually the same working day. Keep the request_id and ask where it is:
GET /v1/address-requests/9b2f4c1e-0d7a-4e55-a1c3-2f6e8d9b7a10
200 OK
{"request_id": "9b2f4c1e-…", "status": "approved", "address_id": 4188, "reason": null, "test": false, …}
| status | meaning |
|---|---|
pending | Waiting for a person. |
approved | It's one of your addresses now: address_id is its id, and it's in GET /v1/addresses. |
refused | We couldn't take it: reason says why. |
Sending an order
POST /v1/orders
Content-Type: application/json
{
"reference": "FM-104233",
"address_id": 4172,
"delivery_date": "2027-06-14",
"instructions": "Deliver to the goods entrance",
"startup": false,
"lines": [
{"product_code": "01-460218", "quantity": 10},
{"product_code": "06-585", "quantity": 3}
]
}
202 Accepted
{
"reference": "FM-104233",
"status": "being_checked",
"sales_order": null,
"delivery_date": "2027-06-14",
"startup": false,
"test": false,
"reason": null,
"despatched_at": null,
"tracking": null,
"received_at": "2027-06-01T08:12:40Z",
"updated_at": "2027-06-01T08:12:40Z"
}
- reference: yours, up to 50 characters of letters, numbers, spaces and
_ . / -, and different for every order. Sending the same reference again is refused (409), so an order is never made twice however often your system retries. If a call times out, send it again with the same reference. - address_id: one of yours from
GET /v1/addresses, as a number. - delivery_date: a weekday that isn't a bank holiday, after today and up to 200 days ahead.
- instructions: up to 250 characters. Optional.
- startup:
truefor a start-up order (a new site or a deep clean), so we plan stock for it and watch it on the day. Optional;falseif left out. - lines: our product codes from
GET /v1/products, each once, with a whole-number quantity from 1 to 99999. At most 200 lines unless we agree otherwise.
Prices are always ours for your account at the time the order is made: you don't send them. Every order is checked at once, and anything wrong is answered straight away with the reason.
Where an order is
GET /v1/orders/FM-104233
200 OK
{
"reference": "FM-104233",
"status": "despatched",
"sales_order": "SO-512345",
"delivery_date": "2027-06-14",
"startup": false,
"test": false,
"reason": null,
"despatched_at": "2027-06-13T15:02:00Z",
"tracking": {"reference": "1234567890", "url": null},
"received_at": "2027-06-01T08:12:40Z",
"updated_at": "2027-06-13T15:05:11Z"
}
If your reference has a / or a space in it, URL-encode it (FM%2F1042).
| status | meaning |
|---|---|
being_checked | We have it. A person is checking it. |
accepted | It's an order in our system: sales_order is our number. |
on_hold | It's held. We'll be in touch. |
despatched | It has left us: despatched_at, with tracking when there is any. |
delivered | It was signed for. |
refused | We couldn't take it: reason says why. |
Keeping up to date
We don't call your system when an order changes (no webhooks yet; we can add them later). Instead, ask for your orders that changed since a time:
GET /v1/orders?since=2027-06-13T15:00:00Z
200 OK
{
"orders": [
{"reference": "FM-104233", "status": "despatched", "sales_order": "SO-512345", …},
{"reference": "FM-104240", "status": "accepted", "sales_order": "SO-512391", …}
]
}
- Each order is in the same shape as
GET /v1/orders/{reference}, oldest change first, at most 500 in one answer. - Ask every 5 minutes or so. One call covers all your orders, so this is all you need however many orders you send.
- For
since, use the time you made your previous call, less a minute. Seeing an order twice is harmless: keep the latest. - If you get 500 orders back, ask again at once with the
updated_atof the last one. - Despatch and delivery come from our order system and can take up to 2 minutes to show.
Testing with a test key
- Read your products and addresses: these are real, from your account.
- Send an order. It comes back
being_checked, marked"test": true. - We see it and mark it accepted as a test, or refuse it, so you can see each answer. An accepted test order gets a made-up number starting
TEST. It never reaches our order system, and is never despatched. - Ask for a new address. If we approve it, it gets a made-up id from 900000001, and it's in your test key's address list only, so you can send test orders to it.
Tell us when you've sent test orders you'd like us to look at. When you're ready, we give you a live key; test orders and test addresses stay with the test key.
Limits
| limit | usually |
|---|---|
| Calls a minute, for each key | 60 |
| Orders a day, for each key | 200 |
| Lines on one order | 200 |
| How far ahead an order can be | 200 days |
| Address requests waiting at once | 50 |
| Size of one call | 512 KB |
We can raise any of these for your key: just ask. Past a limit, the answer is 429.
When something is wrong
Every refused call answers with an HTTP status and the same shape, saying what to fix in plain words:
{"error": {"code": "not_your_product", "message": "Line 2: 12-050R isn't on your product list (GET /v1/products).", "request_id": "3f9a1c2e"}}
Act on code; show or log message. If you need to ask us about a call, give us its request_id.
| status | code | meaning |
|---|---|---|
400 | bad_json | The body isn't a JSON object we can read. |
400 | missing_field, bad_field, too_long | A field is missing, the wrong type, has characters we can't take, or is too long. |
400 | bad_reference | The order reference has characters we can't take. |
400 | bad_address | address_id isn't one of yours. |
400 | bad_date, not_a_delivery_day | delivery_date isn't a date, isn't after today, is too far ahead, or isn't a delivery day. |
400 | no_lines, bad_line, too_many_lines | The lines are missing, not in the right shape, or too many. |
400 | not_your_product, repeated_product, bad_quantity | A product isn't on your list, is on the order twice, or has a quantity that isn't a whole number from 1 to 99999. |
400 | bad_postcode, bad_email | A new address's postcode or email doesn't look right. |
400 | bad_since | since isn't a date and time. |
401 | no_key, bad_key | No key, or a key we don't know. |
403 | key_off, not_allowed | The key is switched off, or can't make this call. |
404 | not_found, no_such_call | No such order or address request for you, or no such call. |
405 | wrong_method | That call doesn't take this method (GET or POST). |
409 | duplicate_reference | You've already sent an order with that reference. Ask where it is instead. |
413 | too_big | The call is bigger than 512 KB. |
415 | send_json | Send Content-Type: application/json. |
429 | too_many, too_many_orders | Too many calls this minute, too many orders today, or too many address requests waiting. Wait and try again. |
500 | our_fault | Something went wrong on our side. Try again shortly. |
503 | try_again | We can't reach our order system just now. Try again in a few minutes. |
When to retry: after 429, 500 or 503, or a call with no answer, wait and send the same call again (a minute, then longer). Don't retry a 400, 401, 403 or 409 unchanged: it will be refused again.