Skip to main content

Update Store

Sparse-update store-level checkout setup: payment-method enablement and order, popup embed hostnames, abandoned-cart recovery defaults, and VAT / flat / GTU / exempt defaults. Only the keys you send are changed. Unknown keys — including profile fields such as name or logo_url — return 422.

Omitted keys are unchanged. A patch applies as a whole: when any part of it is rejected, nothing in it is written. Behaviour for each section is on the Store index.

Request

PATCH /store

Request Body

All fields optional. Omit a key to leave it unchanged.

ParameterTypeRequiredDescription
payment_methodsarrayNoSparse-by-id list. Unlisted methods are unchanged. See Payment methods.
payment_methods[].idstringYes, when the item is sentCatalog key. Duplicate or unknown id returns 422.
payment_methods[].is_enabledbooleanNoOmit to leave this method's enablement unchanged. true for a method the store has not activated returns 422 — see Payment methods.
payment_methods[].orderintegerNoDisplay order, lower first. Minimum 0. Omit to leave unchanged.
popup_allowed_domainsarrayNoReplace-all hostnames. [] clears. See Popup allowed domains.
checkout_recoveryobjectNoSparse-merges enabled. Sending coupon replaces the pair; coupon: null clears. See Checkout recovery.
checkout_recovery.enabledbooleanNoStore-wide recovery switch.
checkout_recovery.couponobjectNo{ "amount": 500, "percent": null } or { "amount": null, "percent": 10 }, or null to clear. Do not send currency.
vat_ratestringNoStore default VAT rate. null clears. See Tax defaults.
flat_ratenumberNoStore default flat-rate tax percent. null clears.
gtu_codeintegerNoStore default GTU code 1–13. null clears.
exempt_tax_kindstringNoStore default exemption basis. null clears.

Do not send provider or is_available on payment methods.

Example Requests

Enable a method and set a recovery coupon:

curl -X PATCH "https://cart.easy.tools/api/v1/store" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"payment_methods": [
{ "id": "card", "is_enabled": true, "order": 1 },
{ "id": "blik", "is_enabled": true, "order": 2 }
],
"popup_allowed_domains": ["app.example.com", "preview.example.com"],
"checkout_recovery": {
"enabled": true,
"coupon": { "amount": 500, "percent": null }
},
"vat_rate": "23"
}'

Clear the recovery coupon only:

curl -X PATCH "https://cart.easy.tools/api/v1/store" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"checkout_recovery": {
"coupon": null
}
}'

Response

Success Response (200)

The same envelope as Get Store. See Store Object.

{
"store": {
"id": "22b65ad7-ef20-4d46-9f04-110eba99cc77",
"name": "Acme",
"slug": "acme",
"email": "store@example.com",
"website_url": "https://mysite.com",
"logo_url": "https://cdn.example.com/logo.png",
"tax_id": "12-3456789",
"company_name": "Acme Inc.",
"full_name": "John Doe",
"phone": "+1 212 555 0100",
"address": {
"street": "Main Street",
"street_number": "123",
"house_number": "4",
"post_code": "10001",
"city": "New York",
"state": "NY",
"country": "US"
},
"created_at": "2024-01-10T08:00:00+00:00",
"payment_methods": [
{
"id": "card",
"provider": "stripe",
"is_enabled": true,
"order": 1,
"is_available": true
},
{
"id": "blik",
"provider": "stripe",
"is_enabled": true,
"order": 2,
"is_available": true
}
],
"popup_allowed_domains": ["app.example.com", "preview.example.com"],
"checkout_recovery": {
"enabled": true,
"coupon": {
"amount": 500,
"percent": null
}
},
"vat_rate": "23",
"flat_rate": null,
"gtu_code": null,
"exempt_tax_kind": null
},
"currencies": ["usd", "eur"]
}

Error Responses

Validation Error (422 Unprocessable Entity)

Unknown top-level key:

{
"message": "The given data was invalid.",
"errors": {
"name": [
"The name field is not allowed."
]
}
}

Enabling a method the store has not activated:

{
"message": "The given data was invalid.",
"errors": {
"payment_methods.0.is_enabled": [
"This payment method is not available."
]
}
}

A hostname with a scheme:

{
"message": "The given data was invalid.",
"errors": {
"popup_allowed_domains.0": [
"Enter valid domain (e.g. mydomain.com, without http:// or https://)"
]
}
}

Both coupon amount and percent:

{
"message": "The given data was invalid.",
"errors": {
"checkout_recovery.coupon": [
"Provide either amount or percent, not both."
]
}
}

Duplicate id, unknown catalog id, provider or is_available on write, coupon.currency, and invalid tax values also return 422 on that path.

Unauthorized Error (401)

{
"message": "Unauthenticated."
}

Forbidden Error (403)

Returned when the selected store has not granted you API access — see Store selection.

{
"message": "You do not have API access to the requested store."
}