API Documentation
Authentication APIs
- Login & Register
- Create & Manage Users
Catalog APIs
- GETList all products
- GETList all skus
- GETRetrieve a product
- GETRetrieve product variants
- GETRetrieve variant detail
- GETList all categories
- GETRetrieve product reviews
- POSTCreate product review
- GETRetrieve similar products
- GETRetrieve up sell products
- GETRetrieve cross sell products
- GETRetrieve recommended products
- POSTDatocms webhook
Cart & Checkout APIs
- Cart
- Checkout
Coupons & promotions API
Customers API
Orders APIs
Shipping APIs
Analytics
Campaigns API
Retrieve all promotions
GET
/
offer
/
promotions
curl --request GET \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/admin/offer/promotions \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"promotions": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"promotion_type": "discount",
"details": {
"discount_type": "percentage",
"discount_percent": 0,
"fixed_discount_amount": 0,
"max_discount_amount": 123,
"products": [
{
"product_id": "<string>",
"minimum_price": 0,
"minimum_value": 0,
"minimum_quantity": 0
}
],
"category_id": [
"<string>"
]
},
"tags": [
"<string>"
],
"active": true,
"status": "draft",
"customer_eligibility": "all",
"customer_id": [
"<string>"
],
"segment_id": [
"<string>"
],
"applies_to_product": "all",
"has_redemption_limit": false,
"redemption_limit": 0,
"redemption_count": 123,
"require_minimum_order_total": false,
"minimum_order_total": 0,
"for_first_time_customer_only": false,
"can_be_used_with_promotion": false,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
]
}
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
200 - application/json
OK
Available options:
discount
, free-goods
, fixed-price
, free-shipping
, buy-x-get-y
, volume-based
Available options:
percentage
, fixed-amount
required if discount_type = percentage
required if discount_type = fixed-amount
use this key to specify particular products. OPTIONAL.
required if paroducts object is passed in request body.
use this key to specify particular categories. OPTIONAL.
this key is ignored in create promotion api and draft status will be added by default. required in update promotion api only.
Available options:
draft
, live
, stopped
, expired
Available options:
all
, customer
, segment
required if customer_eligibility = customer
required if customer_eligibility = segment
Available options:
all
, product
, category
curl --request GET \
--url https://services.commercengine.dev/api/v1/x2yh61zw4k/admin/offer/promotions \
--header 'Authorization: Bearer <token>'
{
"message": "<string>",
"success": true,
"content": {
"promotions": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"promotion_type": "discount",
"details": {
"discount_type": "percentage",
"discount_percent": 0,
"fixed_discount_amount": 0,
"max_discount_amount": 123,
"products": [
{
"product_id": "<string>",
"minimum_price": 0,
"minimum_value": 0,
"minimum_quantity": 0
}
],
"category_id": [
"<string>"
]
},
"tags": [
"<string>"
],
"active": true,
"status": "draft",
"customer_eligibility": "all",
"customer_id": [
"<string>"
],
"segment_id": [
"<string>"
],
"applies_to_product": "all",
"has_redemption_limit": false,
"redemption_limit": 0,
"redemption_count": 123,
"require_minimum_order_total": false,
"minimum_order_total": 0,
"for_first_time_customer_only": false,
"can_be_used_with_promotion": false,
"starts_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"modified_at": "2023-11-07T05:31:56Z"
}
]
}
}