Skip to main content
GET
/
campaigns
/
{campaign}
/
discount-codes
cURL
curl --request GET \
  --url https://api.givebutter.com/v1/campaigns/{campaign}/discount-codes \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": 123,
      "campaign_id": 123,
      "code": "<string>",
      "type": "<string>",
      "amount": 123,
      "used": 123,
      "uses": 123,
      "active": true,
      "total_discount": "<string>",
      "starts_at": "<string>",
      "expires_at": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "items": [
        "<unknown>"
      ],
      "all_items": true
    }
  ],
  "links": {
    "first": "<string>",
    "last": "<string>",
    "prev": "<string>",
    "next": "<string>"
  },
  "meta": {
    "current_page": 2,
    "from": 2,
    "last_page": 2,
    "links": [
      {
        "url": "<string>",
        "label": "<string>",
        "active": true
      }
    ],
    "path": "<string>",
    "per_page": 1,
    "to": 2,
    "total": 1
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

campaign
integer
required

The campaign ID

Query Parameters

limit
string
default:20

Response

Paginated set of CampaignDiscountCodeResource

data
CampaignDiscountCodeResource · object[]
required
meta
object
required