Get a Promotion History
GEThttps://useast.api.elasticpath.com/v2/promotions/:promotionID/history
Use this endpoint to retrieve a promotion history.
Request
Path Parameters
promotionID stringrequired
The ID of the promotion.
Header Parameters
Authorization Bearerrequired
The Bearer token required to get access to the API.
Responses
- 200
- 401
Response Headers
- application/json
- Schema
- Example (auto)
Schema
data object[]
links object
meta object
{
"data": [
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"currencies": [
{
"amount": 0,
"currency": "string"
}
],
"conditions": {
"or": [
{
"and": [
{
"attribute": {
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
},
{
"node": {
"values": [
"string"
]
}
}
]
}
]
}
}
},
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"currencies": [
{
"percentage": 0,
"currency": "string"
}
],
"conditions": {
"or": [
{
"and": [
{
"attribute": {
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
},
{
"node": {
"values": [
"string"
]
}
}
]
}
]
}
}
},
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"targets": [
"string"
],
"target_nodes": [
"string"
],
"target_attributes": [
{
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
],
"currencies": [
{
"amount": 0,
"currency": "string"
}
],
"conditions": {
"or": [
{
"and": [
{
"attribute": {
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
},
{
"node": {
"values": [
"string"
]
}
}
]
}
]
}
}
},
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"targets": [
"string"
],
"target_nodes": [
"string"
],
"target_attributes": [
{
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
],
"conditions": {
"or": [
{
"and": [
{
"attribute": {
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
},
{
"node": {
"values": [
"string"
]
}
}
]
}
]
},
"percent": 0
}
},
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"targets": [
"string"
],
"target_nodes": [
"string"
],
"target_attributes": [
{
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
],
"conditions": {
"or": [
{
"and": [
{
"attribute": {
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
},
{
"node": {
"values": [
"string"
]
}
}
]
}
]
},
"x": 0,
"y": 0
}
},
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"targets": [
"string"
],
"target_nodes": [
"string"
],
"currencies": [
{
"amount": 0,
"currency": "string"
}
],
"conditions": {
"or": [
{
"and": [
{
"attribute": {
"template": "string",
"field": "string",
"type": "string",
"value": "string"
}
},
{
"node": {
"values": [
"string"
]
}
}
]
}
]
},
"x": 0
}
},
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"currencies": [
{
"amount": 0,
"currency": "string"
}
],
"requirements": [
{
"targets": [
"string"
],
"quantity": 0
}
]
}
},
{
"type": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"name": "string",
"description": "string",
"promotion_type": "fixed_discount",
"enabled": true,
"automatic": true,
"start": "string",
"end": "string",
"min_cart_value": {},
"max_applications_per_cart": 0,
"schema": {
"target_catalogs": [
"string"
],
"requirements": [
{
"targets": [
"string"
],
"quantity": 0
}
],
"gifts": [
"string"
],
"auto_add_free_gift": true
}
}
],
"links": {
"current": "string",
"first": "string",
"last": "string",
"next": "string",
"prev": "string"
},
"meta": {
"page": {
"current": 0,
"limit": 0,
"offset": 0,
"total": 0
},
"results": {
"total": 0
}
}
}
Unauthorized
- application/json
- Schema
- Example (auto)
- Example
Schema
detailstring
statusstring
titlestring
[
null
]
[
{
"errors": [
{
"status": 401,
"title": "Unauthorized"
}
]
}
]
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/promotions/:promotionID/history");
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