Buy buttons
GET
/api/v1/commerce/buy-buttons
const url = 'https://digize.com/api/v1/commerce/buy-buttons';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”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
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
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
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
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
message
required
string
details
object
key
additional properties
any
Example
{ "error": { "code": "invalid" }}