API introduction
What the API will never do
The API is built so that money, stock and payments can only change in the places meant for them. These limits are on purpose.
There are no checkout, cart, payment, refund or coupon calls#
- No cart or checkout, and no way to take a payment.
- No refunds, credit notes or coupons.
- Nothing is deleted. The only DELETE call archives a product, which can be restored in the admin. Sizes, orders and contacts cannot be deleted.
- Payment status and order amounts (subtotal, discount, total, order lines) can never be changed.
- Stock is never accepted when creating or updating a product or a size. It changes only through
POST /inventory/adjustments, which needs a reason and is written to the stock history with the key as its author. - Contacts are read only. Consent, notes, tags and spend are never returned.
Fields that are refused#
If a request contains one of these fields it is refused with 422, and this is the reason you are given:
| Field | Reason in the answer |
|---|---|
stock | Stock cannot be set here. Use POST /api/v1/inventory/adjustments, which records a reason in the stock history. |
quantity | Stock cannot be set here. Use POST /api/v1/inventory/adjustments. |
payment_status | Payment status cannot be changed through the API. |
payment_method | The payment method cannot be changed through the API. |
source | The order source cannot be changed through the API. |
gift | Gift details cannot be changed through the API. |
gift_message | Gift details cannot be changed through the API. |
packaging | Gift details cannot be changed through the API. |
total | Order amounts cannot be changed through the API. |
subtotal | Order amounts cannot be changed through the API. |
discount | Order amounts cannot be changed through the API. |
items | Order lines cannot be changed through the API. |
refund | Refunds are not available through the API. |
refunded_amount | Refunds are not available through the API. |
Any other field a call does not accept is refused too, with the list of the fields it does accept.
Rolling out
Public storefront API. A separate API for headless or custom storefronts (catalogue, cart, checkout and customer sign-in) is coming soon. It is not built and has no date. Until then, cart, checkout and payment happen only in the GroKeeper store itself.