API Referencev1DiscountsBy ID

Get a discount

GET
/v1/discounts/{id}
X-API-Key<token>

Per-store API key created in the dashboard at Settings > Developer > API Keys.

In: header

Path Parameters

id*string
Length1 <= length

Response Body

application/json

application/json

curl -X GET "https://api.whatalo.com/v1/discounts/472819365047"
{
  "data": {
    "id": "disc_abc123",
    "code": "SUMMER20",
    "type": "percentage",
    "value": 20,
    "min_order_amount": 0,
    "max_uses": 0,
    "current_uses": 0,
    "starts_at": "string",
    "expires_at": "string",
    "is_active": true,
    "applies_to_all": true,
    "applicable_product_ids": [
      "string"
    ],
    "applicable_category_ids": [
      "string"
    ],
    "is_expired": true,
    "is_usable": true,
    "has_usage_limit": true,
    "created_at": "string",
    "updated_at": "string"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request body",
    "details": [
      {
        "field": "string",
        "message": "string"
      }
    ]
  }
}