Skip to main content
GET
/
api
/
v1
/
discounts.json
List Discounts
curl --request GET \
  --url https://api.launchmystore.io/api/v1/discounts.json \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data.items": [
    {
      "id": "<string>",
      "code": "<string>",
      "type": "<string>",
      "value": 123,
      "status": "<string>",
      "usage_count": 123,
      "usage_limit": 123,
      "starts_at": "<string>",
      "ends_at": "<string>",
      "created_at": "<string>"
    }
  ],
  "data.pagination": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

Use this file to discover all available pages before exploring further.

List Discounts

Returns a paginated list of discount codes in the store.

Request

curl -X GET "https://api.launchmystore.io/api/v1/discounts.json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Parameters

page
integer
default:"1"
Page number for pagination
limit
integer
default:"50"
Number of items per page (max 250)
status
string
Filter by status: active, expired, scheduled, disabled
type
string
Filter by discount type: percentage, fixed_amount, free_shipping, buy_x_get_y
code
string
Search by discount code (partial match)
created_at_min
string
Filter discounts created after this date (ISO 8601)
created_at_max
string
Filter discounts created before this date (ISO 8601)

Response

success
boolean
Whether the request succeeded
data.items
array
Array of discount objects
data.pagination
object
Pagination information

Example Response

{
  "success": true,
  "data": {
    "items": [
      {
        "id": "disc_abc123",
        "code": "SUMMER20",
        "type": "percentage",
        "value": 20,
        "status": "active",
        "usage_count": 145,
        "usage_limit": 500,
        "minimum_order_amount": 5000,
        "applies_to": "all",
        "starts_at": "2024-06-01T00:00:00Z",
        "ends_at": "2024-08-31T23:59:59Z",
        "created_at": "2024-05-15T10:00:00Z"
      },
      {
        "id": "disc_def456",
        "code": "FREESHIP",
        "type": "free_shipping",
        "value": 0,
        "status": "active",
        "usage_count": 89,
        "usage_limit": null,
        "minimum_order_amount": 7500,
        "applies_to": "all",
        "starts_at": "2024-01-01T00:00:00Z",
        "ends_at": null,
        "created_at": "2024-01-01T08:00:00Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 15,
      "hasMore": false
    }
  }
}

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have read_discounts scope