API Reference
Resources
Retrieve a fixed price promotion
How to fetch a specific fixed price promotion via API
To fetch a single fixed price promotion, send a GET request to the /api/fixed_price_promotions/:id endpoint, where id is the ID of the resource that you want to retrieve.

Request

GET https://yourdomain.commercelayer.io/api/fixed_price_promotions/:id

Example

Request
Response
The following request fetches the fixed price promotion identified by the id "xYZkjABcde":
1
curl -g -X GET \
2
'https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde' \
3
-H 'Accept: application/vnd.api+json' \
4
-H 'Authorization: Bearer your-access-token'
Copied!
On success, the API responds with a 200 OK status code, returning a single resource object:
1
{
2
"data": {
3
"id": "xYZkjABcde",
4
"type": "fixed_price_promotions",
5
"links": {
6
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde"
7
},
8
"attributes": {
9
"name": "Personal promotion",
10
"starts_at": "2018-01-01T12:00:00.000Z",
11
"expires_at": "2018-01-02T12:00:00.000Z",
12
"total_usage_limit": 5,
13
"total_usage_count": 2,
14
"active": true,
15
"created_at": "2018-01-01T12:00:00.000Z",
16
"updated_at": "2018-01-01T12:00:00.000Z",
17
"reference": "ANY-EXTERNAL-REFEFERNCE",
18
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
19
"metadata": {
20
"foo": "bar"
21
},
22
"fixed_amount_cents": 1000,
23
"fixed_amount_float": 10.0,
24
"formatted_fixed_amount": "€10,00"
25
},
26
"relationships": {
27
"market": {
28
"links": {
29
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/market",
30
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/market"
31
}
32
},
33
"promotion_rules": {
34
"links": {
35
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/promotion_rules",
36
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/promotion_rules"
37
}
38
},
39
"order_amount_promotion_rule": {
40
"links": {
41
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/order_amount_promotion_rule",
42
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/order_amount_promotion_rule"
43
}
44
},
45
"sku_list_promotion_rule": {
46
"links": {
47
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/sku_list_promotion_rule",
48
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/sku_list_promotion_rule"
49
}
50
},
51
"coupon_codes_promotion_rule": {
52
"links": {
53
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/coupon_codes_promotion_rule",
54
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/coupon_codes_promotion_rule"
55
}
56
},
57
"attachments": {
58
"links": {
59
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/attachments",
60
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/attachments"
61
}
62
},
63
"sku_list": {
64
"links": {
65
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/sku_list",
66
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/sku_list"
67
}
68
},
69
"skus": {
70
"links": {
71
"self": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/relationships/skus",
72
"related": "https://yourdomain.commercelayer.io/api/fixed_price_promotions/xYZkjABcde/skus"
73
}
74
}
75
},
76
"meta": {
77
"mode": "test"
78
}
79
}
80
}
Copied!
Last modified 2mo ago
Copy link