Guides for integrators
API changes
On this page
What each platform version added to the API and to the webhooks, newest first. The API stays on /v1 and changes only by adding. The version numbers are the numbers of the platform updates; the latest one described here is 1.0.97.
Good to know
Updates that are not listed did not add anything to the API or the webhooks. Everything else in each update is in the Release notes.
The rules we follow#
| We may | We do not (inside v1) |
|---|---|
| Add a field to an answer or a webhook message. | Rename or remove a field, or change its type or its meaning. |
| Add a call, an optional query parameter or a webhook event. | Remove a call or an event, or make an optional parameter required. |
| Add a new value to a list of choices (for example a new order source). | Change what an existing value means. |
| Add a new error code for a new situation. | Change the HTTP status or the code of an existing error. |
So write your code to ignore what it does not know: unknown fields, unknown event types, and unknown values in a list of choices. An endpoint that listens to all events will receive new events when they are added. The original GET /products, GET /products/{id}, GET /orders and GET /orders/{number} answers keep every field they ever had, in the same order.
By platform version#
1.0.87 - Gift fields on orders#
- API: The full order (
?expand=full, and the answers to order writes) gains three read-only fields at the end:gift,gift_messageandpackaging(name,fee,gst_rate, ornull). The plain order answer is unchanged. - API: Sending
gift,gift_messageorpackagingin a request is refused with 422 and a reason: gift details cannot be changed through the API. - Webhooks: Every order event carries the same three fields in
data. An endpoint that is set not to include personal details always getsnullforgift_message.
1.0.83 - Return events#
- Webhooks: Four new events:
return.requested,return.approved,return.received,return.refunded. That makes 20 events in all. Theirdatais a new return object (see the return). - API: No new calls: returns are not available through the API calls.
1.0.82 - Where an order came from#
- API: Every order carries the read-only
source(website,phone,whatsapp,counter,marketplaceorother), added at the end of the order, also in the plain shape. Sending it is refused with 422. - Webhooks: The order events carry the same field. An order that staff create for a customer sends the usual order events.
1.0.76 - A clear answer when the store is busy#
- API: When the store cannot reach its database for a moment, the API answers
503withRetry-After: 10and{"error": "service_busy", "message": "..."}, instead of an unclear error. Wait and send the same request again.
1.0.75 - The allowed-address list behind a CDN#
- API: When the store is set up for the hosting network or CDN in front of it, the allowed-address list of a key sees the real visitor address.
1.0.72 - Headers named after the platform, store-chosen order prefix#
- Webhooks: Messages carry the headers
X-GroKeeper-Event,X-GroKeeper-Delivery,X-GroKeeper-TopicandX-GroKeeper-Signature, and the User-AgentGroKeeper-Webhooks/1.0. Signing did not change. - API: The order number prefix is a setting of each store (default
GK-). An order number is text: the prefix, the date as yymmdd, a dash and four letters or digits. The documentation, the OpenAPI file and the Postman collection use general example values. - API: No API answer changed.
1.0.65 - The API and webhooks upgrade#
- API: Keys have scopes (8 in all), an optional allowed-address list, an optional expiry date, their own requests-per-minute limit (default 120), a pause switch, Rotate secret and Revoke. The secret is shown once. Keys that existed before keep read-only access to products and orders.
- API: Calls grew to 20 in 6 resources. New reads: categories, the sizes of a product, stock levels, the stock history and customers (contacts). New writes: create, update and archive a product; add and update a size; adjust stock; change an order's status; add shipment details; add an internal note.
- API: Lists have
linksand acceptlimit,pageandupdated_since.?expand=fulladds fields to the original product and order answers. Errors have one format. POST and PATCH accept anIdempotency-Key(kept 24 hours). Every answer carriesX-RateLimit-*headers. - API: The OpenAPI 3.1 file, the Postman collection, the Request log in the admin and the documentation in the admin.
- Webhooks: 16 events (orders, shipment details, products, stock, a new contact and a review), signed with a time and an HMAC-SHA256, each with an event id. A delivery log, 8 attempts with automatic retries, Redeliver, Send test event, automatic switch-off after repeated failures, a signing secret for each endpoint with Rotate secret (the old one keeps signing 24 hours), and a switch for customers' personal details on each endpoint.
1.0.57 - Safer webhook addresses#
- Webhooks: A webhook address must be a public internet address. Private, internal and localhost addresses are refused when it is saved and again each time a message is sent, and a redirect to a different website is not followed.
Before 1.0.65 - the first API#
- API: four read-only calls:
GET /products,GET /products/{id},GET /ordersandGET /orders/{number}, with a key that could read products and orders. - Webhooks: one event for each endpoint, from three order events:
order.created,order.paidandorder.updated.