Skip to main content
Note: check code in your code. message is for people and may change.

Any endpoint

Returned with status 401 when there’s no Authorization header.
Returned with status 401 when the key is wrong, or it was regenerated in Baag App.
Returned with status 403 when the store’s plan doesn’t include API access. The keys work again once the store is back on the Basic plan.
Returned with status 404 when there’s no endpoint at this path.
Returned with status 429 when the key sent too many requests in a short time. Wait a moment, then retry.
Returned with status 500 when something went wrong on Baag’s side. Retry.

Products and collections

Returned with status 400 when limit is below 1 or not a whole number.
Returned with status 404 when there’s no product with this slug in the store, or it’s archived.
Returned with status 404 when there’s no collection with this id in the store.

Checkout

Returned with status 400 when a field is missing or has a wrong value. The message names the field.
Returned with status 400 when the size and color don’t match a variant, or you sent them for a product that has none.
Returned with status 403 when you used your public key. Call this endpoint from your server with your secret key.
Returned with status 404 when there’s no product with this slug in the store, or it’s archived.
Returned with status 404 when there’s no checkout session with this id in the store.
Returned with status 409 when the product, or the size and color picked, is sold out.
Returned with status 409 when the buyer asked for more than what’s left. The message says how many are left.