# Campaigns Endpoints

The campaigns API end-points allow you to query campaigns defined in Quicklizard's Online Platform and modify product prices in your internal system based on these definitions.

# /api/v2/campaigns

Endpoint - GET /api/v2/campaigns

# Request parameters

  • page [Integer] - results page number
  • per_page [Integer] - results per page (defaults to 30, with maximum of 50 results per page)

# Example Request

curl -XGET -H 'API_KEY: YOUR_API_KEY_HERE' -H 'API_DIGEST: YOUR_API_DIGEST_HERE' \
'https://api.quicklizard.com/api/v2/campaigns?page=1&per_page=50'

# Example Response

{
  "result": [
    {
      "client_key": "dummy",
      "name": "Test Campaign",
      "starts_at": "2017-04-24T09:00:00.000Z",
      "ends_at": "2017-04-27T09:00:00.000Z",
      "products": [
        {
          "uid": "gdch5qabpf7n9j5kcjdq71mqdetdp46k",
          "client_uid": "549870",
          "label": "dummy product",
          "base_price": 388.9,
          "discount": 0.3,
          "campaign_price": 387.73
        }
      ],
      "id": "AVuZtpS_UMjUFdQjeB6t"
    }
  ],
  "total": 15
}

# Response Fields

  • total [Integer] - total number of campaigns
  • results [Array] - list of campaigns where each campaign has the following fields:

  • id [String] - campaign identifier
  • client_key [String] - your Quicklizard client key
  • name [String] - campaign name
  • starts_at [String] - UTC timestamp of campaign start date
  • ends_at [String] - UTC timestamp of campaign end date
  • products [Array] - campaign products list
    • uid [String] - product unique identifier on the Quicklizard platform
    • client_uid [String] - the UID string used to identify this product by the client
    • label [String] - product name
    • price_price [Float] - product's price before campaign discount
    • discount [Float] - price discount level in percent
    • campaign_price [Float] - product discounted price during campaign