Gift card stats
GET
/api/v1/commerce/gift-cards/stats
const url = 'https://digize.com/api/v1/commerce/gift-cards/stats';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/gift-cards/stats \ --header 'x-api-key: <x-api-key>'The balance left on cards that can be spent, and what was issued and spent in the last 30 days.
Needs the commerce:read permission.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Done
Media typeapplication/json
object
outstanding
required
number
spendable
required
number
issued
required
object
count
required
number
value
required
number
redeemed
required
number
Example generated
{ "outstanding": 1, "spendable": 1, "issued": { "count": 1, "value": 1 }, "redeemed": 1}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" }}