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:

FieldReason in the answer
stockStock cannot be set here. Use POST /api/v1/inventory/adjustments, which records a reason in the stock history.
quantityStock cannot be set here. Use POST /api/v1/inventory/adjustments.
payment_statusPayment status cannot be changed through the API.
payment_methodThe payment method cannot be changed through the API.
sourceThe order source cannot be changed through the API.
giftGift details cannot be changed through the API.
gift_messageGift details cannot be changed through the API.
packagingGift details cannot be changed through the API.
totalOrder amounts cannot be changed through the API.
subtotalOrder amounts cannot be changed through the API.
discountOrder amounts cannot be changed through the API.
itemsOrder lines cannot be changed through the API.
refundRefunds are not available through the API.
refunded_amountRefunds 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.