Skip to content

Update store settings

PATCH
/api/v1/commerce/settings
curl --request PATCH \
--url https://digize.com/api/v1/commerce/settings \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "general": { "name": "example", "contactEmail": "", "phone": "example", "address": { "line1": "example", "city": "example", "region": "example", "postalCode": "example", "country": "example" } }, "storefront": { "open": true, "tagline": "example", "brandColor": "example", "logoImageId": "example", "hostname": "example" }, "payments": { "methods": { "card": true, "apple_pay": true, "google_pay": true, "link": true, "cash_app": true, "klarna": true }, "statementDescriptor": "example" }, "shipping": [ { "id": "example", "zone": "example", "name": "example", "price": 1, "freeOver": 1, "delivery": "example" } ], "taxes": { "name": "example", "rate": 1, "pricesIncludeTax": true, "taxShipping": true }, "checkout": { "requirePhone": true, "orderNotes": true, "reminderAfter": 1, "shipsTo": [ "US" ] }, "policies": { "refund": "example", "privacy": "example", "terms": "example" }, "inventory": { "trackByDefault": true, "allowOverselling": true, "lowStockThreshold": 1 } }'

Saves some sections of the store’s settings, each given whole: general, storefront, payments, shipping, taxes, checkout, policies, inventory. A new statement descriptor is sent to Stripe too.

Needs the commerce:write permission.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
general
object
name
required
string
>= 1 characters <= 60 characters
contactEmail
required
Any of:
string
phone
required
string
<= 40 characters
address
required
object
line1
required
string
<= 120 characters
city
required
string
<= 80 characters
region
required
string
<= 40 characters
postalCode
required
string
<= 20 characters
country
required
string
<= 60 characters
storefront
object
open
required
boolean
tagline
required
string
<= 160 characters
brandColor
required
string
/^#[0-9a-fA-F]{6}$/
logoImageId
required
Any of:
string
<= 120 characters
hostname
required
string
<= 253 characters
payments
object
methods
required
object
card
required
boolean
apple_pay
required
boolean
google_pay
required
boolean
link
required
boolean
cash_app
required
boolean
klarna
required
boolean
statementDescriptor
required
string
/^[A-Za-z0-9 .-]{5,22}$/
shipping
Array<object>
<= 20 items
object
id
required
string
>= 1 characters <= 64 characters
zone
required
string
<= 80 characters
name
required
string
>= 1 characters <= 60 characters
price
required
integer
<= 9007199254740991
freeOver
required
Any of:
integer
<= 9007199254740991
delivery
required
string
<= 80 characters
taxes
object
name
required
string
>= 1 characters <= 40 characters
rate
required
number
<= 50
pricesIncludeTax
required
boolean
taxShipping
required
boolean
checkout
object
requirePhone
required
boolean
orderNotes
required
boolean
reminderAfter
required
integer
<= 10080
shipsTo
Array<string>
default: US >= 1 items <= 50 items
policies
object
refund
required
string
<= 5000 characters
privacy
required
string
<= 5000 characters
terms
required
string
<= 5000 characters
inventory
object
trackByDefault
required
boolean
allowOverselling
required
boolean
lowStockThreshold
required
integer
<= 100000

Done

Media typeapplication/json
object
general
required
object
name
required
string
>= 1 characters <= 60 characters
contactEmail
required
Any of:
string
phone
required
string
<= 40 characters
address
required
object
line1
required
string
<= 120 characters
city
required
string
<= 80 characters
region
required
string
<= 40 characters
postalCode
required
string
<= 20 characters
country
required
string
<= 60 characters
storefront
required
object
open
required
boolean
tagline
required
string
<= 160 characters
brandColor
required
string
/^#[0-9a-fA-F]{6}$/
logoImageId
required
Any of:
string
<= 120 characters
hostname
required
string
<= 253 characters
logoUrl
required
string | null
payments
required
object
methods
required
object
card
required
boolean
apple_pay
required
boolean
google_pay
required
boolean
link
required
boolean
cash_app
required
boolean
klarna
required
boolean
statementDescriptor
required
string
/^[A-Za-z0-9 .-]{5,22}$/
stripeAccountId
required
string
chargesEnabled
required
boolean
payoutsEnabled
required
boolean
shipping
required
Array<object>
<= 20 items
object
id
required
string
>= 1 characters <= 64 characters
zone
required
string
<= 80 characters
name
required
string
>= 1 characters <= 60 characters
price
required
integer
<= 9007199254740991
freeOver
required
Any of:
integer
<= 9007199254740991
delivery
required
string
<= 80 characters
taxes
required
object
name
required
string
>= 1 characters <= 40 characters
rate
required
number
<= 50
pricesIncludeTax
required
boolean
taxShipping
required
boolean
checkout
required
object
requirePhone
required
boolean
orderNotes
required
boolean
reminderAfter
required
integer
<= 10080
shipsTo
required
Array<string>
default: US >= 1 items <= 50 items
policies
required
object
refund
required
string
<= 5000 characters
privacy
required
string
<= 5000 characters
terms
required
string
<= 5000 characters
inventory
required
object
trackByDefault
required
boolean
allowOverselling
required
boolean
lowStockThreshold
required
integer
<= 100000

Example

{
"general": {
"contactEmail": ""
},
"checkout": {
"shipsTo": [
"US"
]
}
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}