Send orders, products and stock from any till, webstore or system into CloudDespatch,
and get tracking back when parcels leave. JSON over HTTPS, one key per system.
Base URL
https://cd.shapeventures.net/api/v1
Authentication
Create a key in Developers, API keys
inside your CloudDespatch account. Send it with every request
in the Authorization
header. Keys start with cd_live_
and carry the company they belong to.
Each key has permissions. Give it only what its system needs: a till key needs inventory:write,
products:read
and orders:read, nothing else.
Permission
Allows
orders:read
List and read orders
orders:write
Create orders and send bulk imports
products:read
Read products and stock levels
products:write
Create and update products
inventory:write
Adjust stock and record till sales
shipments:read
Read tracking and despatch codes
webhooks:manage
Manage webhook endpoints
Errors
Errors use normal HTTP status codes and always have the same shape, with a message you can show to staff.
422 Unprocessable Entity
{
"error": {
"code": "invalid",
"message": "Every item needs a sku and a qty of at least 1"
}
}
Status
code
Meaning
401
unauthorized
Missing, wrong or revoked key
403
forbidden
The key doesn't have the permission this endpoint needs
404
not_found
No order or product with that id or SKU
422
invalid
The request is missing something or would break a rule, such as stock going below zero
Rate limits
600 requests a minute per key. Every response carries x-ratelimit-limit
and x-ratelimit-remaining. For large catalogues, send up to 500 rows at a time to POST /imports.
Sources and duplicates
Tell us where an order came from with source, and send your own order number as external_ref. If the same source and reference arrive twice, for example after a retry,
you get the original order back with "duplicate": true
and nothing new is created.
source
Use it for
pos
Till / POS system
woocommerce
WooCommerce (WordPress)
magento
Magento / Adobe Commerce
prestashop
PrestaShop
opencart
OpenCart
custom
Custom software
csv
File import
Data use rules
Orders from marketplaces carry buyers' personal details. Marketplaces set strict rules on them, and so do we.
Everyone who holds a CloudDespatch API key agrees to these rules when the key is created.
Delete buyer details after 30 daysPersonal details of marketplace buyers (names, addresses, phone numbers, emails) must be deleted or anonymised within 30 days of the order shipping.
Keep logs for 12 monthsKeep request and access logs for 12 months, then delete them.
Use buyer data only to fulfil the orderNever use marketplace buyer data for marketing, profiling or building data sets, and never pass it to anyone who would.
Report breaches within 24 hoursTell us at security@clouddespatch.com within 24 hours of finding any breach or suspected leak of data from CloudDespatch.
Lock accounts downUse multi-factor sign-in on every account that can create keys, and give each key only the permissions its system needs.
CloudDespatch applies the same rules to its own systems: buyer details are anonymised 30 days after shipment,
logs are kept for 12 months, and every account can use multi-factor sign-in.
Try it
This console calls the live API with the demo company's key. Pick an example or write your own request.
Orders you create here appear in the demo company's account.
Account
GET/api/v1/me
Any key
Check a key works and see which company and permissions it has.
Request
curl -X GET https://cd.shapeventures.net/api/v1/me \
-H "Authorization: Bearer YOUR_API_KEY"
Each request has an x-clouddespatch-signature
header: the HMAC-SHA256 of the raw body using the
endpoint's signing secret, as lowercase hex. Reject any request where it doesn't match.
For WooCommerce (WordPress), Magento, PrestaShop and OpenCart you don't need to write code.
Install our plugin, paste your account address and a connection key, and it uses this API for you:
each paid order goes to POST /orders
with the shop's order number as external_ref
stock stays in step through GET /products
and POST /inventory/adjust
orders are marked shipped in the shop with tracking when order.despatched
arrives
Set it up from Developers, Plugins
in your account; it walks you through each step and tests the connection.
Tills and POS
Any till that can make an HTTPS request can share stock with your online channels. Create a till key, then:
send each sale to POST /sales; it takes the items off stock and appears in sales reports
read stock with GET /products
so the till knows what sold out online
If a system can only export a spreadsheet, use Import
in your account. Upload a CSV, match its columns to ours,
check the rows, and import. It uses the same rules as the API, including duplicate checks on order references.