Skip to main content
GET
/
api
/
v1
/
discounts
/
{id}
.json
Get Discount
curl --request GET \
  --url https://api.launchmystore.io/api/v1/discounts/{id}.json \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "id": "<string>",
    "code": "<string>",
    "title": "<string>",
    "type": "<string>",
    "value": 123,
    "value_type": "<string>",
    "status": "<string>",
    "usage_count": 123,
    "usage_limit": 123,
    "once_per_customer": true,
    "minimum_order_amount": 123,
    "minimum_quantity": 123,
    "applies_to": "<string>",
    "product_ids": [
      {}
    ],
    "collection_ids": [
      {}
    ],
    "customer_eligibility": "<string>",
    "starts_at": "<string>",
    "ends_at": "<string>",
    "created_at": "<string>",
    "updated_at": "<string>"
  }
}

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.

Get Discount

Returns a single discount code by its ID.

Request

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

Path Parameters

id
string
required
The unique discount ID

Response

success
boolean
Whether the request succeeded
data
object
Discount object

Example Response

{
  "success": true,
  "data": {
    "id": "disc_abc123",
    "code": "SUMMER20",
    "title": "Summer Sale 20% Off",
    "type": "percentage",
    "value": 20,
    "value_type": "percentage",
    "status": "active",
    "usage_count": 145,
    "usage_limit": 500,
    "once_per_customer": true,
    "minimum_order_amount": 5000,
    "minimum_quantity": null,
    "applies_to": "specific_collections",
    "product_ids": [],
    "collection_ids": ["col_summer1", "col_summer2"],
    "customer_eligibility": "all",
    "customer_ids": [],
    "segment_ids": [],
    "starts_at": "2024-06-01T00:00:00Z",
    "ends_at": "2024-08-31T23:59:59Z",
    "created_at": "2024-05-15T10:00:00Z",
    "updated_at": "2024-05-15T10:00:00Z"
  }
}

Error Codes

CodeDescription
UNAUTHORIZEDInvalid or missing access token
FORBIDDENApp doesn’t have read_discounts scope
NOT_FOUNDDiscount with the specified ID does not exist