Skip to content

Buy buttons

GET
/api/v1/commerce/buy-buttons
curl --request GET \
--url https://digize.com/api/v1/commerce/buy-buttons \
--header 'x-api-key: <x-api-key>'

Whether buy buttons and the embedded cart are on for other websites, the key their embed code carries, and the websites allowed to use it.

Needs the commerce:read permission.

Done

Media typeapplication/json
object
enabled
required
boolean
key
required

The key the embed code carries; made when buttons first go on.

string | null
origins
required

The websites allowed to use the key, as https://example.com.

Array<string>
ready
required

Whether the store is open and takes card payments, so buttons can sell.

boolean
scriptUrl
required

The script the embed code loads.

string

Example generated

{
"enabled": true,
"key": "example",
"origins": [
"example"
],
"ready": true,
"scriptUrl": "example"
}

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"
}
}

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"
}
}