Skip to content

List a site's gift cards

Try it

Gift cards the site's store has sold (and any made by hand), newest first: the code, what it was worth and what is left (cents), and the order that bought it.

GET/api/v1/sites/{site_id}/gift-cards

Authentication

An API key as Authorization: Bearer or x-api-key. It needs the store:read scope — read store products, stock and orders.

store:readRead onlyMCP tool: list_gift_cards

Parameters

Named placeholders go in the path; the rest in the query string.

site_idstringPath · required
The site's id.1 to 100 characters
limitintegerQuery · optional
How many to return (1–100).1 to 100Default 50
cursorstringQuery · optional
next_cursor from the previous page.1 to 100 characters

Response

200 with JSON on success (schema on the right). Errors use the standard envelope.

curl
curl -X GET 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/gift-cards' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY"
Example arguments
{
  "site_id": "SITE_ID"
}
Response schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "initial_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "balance_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "order_number": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_sample": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "code",
          "initial_cents",
          "balance_cents",
          "order_number",
          "is_sample",
          "created_at"
        ],
        "additionalProperties": false
      }
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "data",
    "has_more",
    "next_cursor"
  ],
  "additionalProperties": false
}