Get a Rule Promotion by ID
GEThttps://useast.api.elasticpath.com/v2/rule-promotions/:promotionID
Retrieves a single Rule Promotion by the promotion ID. Responses include promotion specifications such as discount type, eligibility criteria, and configuration details.
Request
Path Parameters
promotionID stringrequired
The unique identifier of the rule promotion.
Header Parameters
Authorization Bearerrequired
The Bearer token required to get access to the API.
Responses
- 200
OK
- application/json
- Schema
- Example (auto)
Schema
data object
{
"data": {
"type": "rule_promotion",
"id": "string",
"store_id": "string",
"name": "string",
"description": "string",
"priority": 0,
"enabled": true,
"automatic": true,
"stackable": true,
"override_stacking": true,
"rule_set": {
"catalog_ids": [
"string"
],
"currencies": [
"string"
],
"rules": {
"strategy": "string",
"operator": "string",
"args": [
"string"
],
"children": [
{
"strategy": "string",
"operator": "string",
"args": [
"string"
]
}
]
},
"actions": [
{
"strategy": "string",
"args": [
"string"
],
"condition": {
"strategy": "string",
"children": [
{
"strategy": "string",
"operator": "string",
"args": [
"string"
]
}
]
},
"limitations": {
"max_discount": 0,
"max_quantity": 0,
"items": {
"max_items": 0,
"price_strategy": "cheapest"
}
}
}
]
},
"start": "2024-07-29T15:51:28.071Z",
"end": "2024-07-29T15:51:28.071Z",
"meta": {
"timestamps": {
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
}
}
}
Authorization: http
name: BearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://useast.api.elasticpath.com/v2/rule-promotions/:promotionID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear