[GET] Get Promotion Data

GET /v1/promotion/[promotion id]

The request allows you to get the data of the promotion.

[promotion id]
required
Promotion identifier
You can get it from: Example: /v1/promotion/123456
AuthorizationJWT
required
Authorization token
  • Format: Bearer [token]
  • Where [token] is substituted by the token, value obtained through the authentication API
GET https://api.ecommerce.noventiq.com/v1/promotion/123456

In response to the request, you receive the server response code corresponding to the processing result. Depending on the code, the response body may contain additional parameters.

If processing is successful, the following will return in response:

  • Server response code: HTTP/1.1 200 ОК
  • Response body: promotion data in JSON format
id
number
required
Promotion identifier
[...]
required
Promotion data
The list and the format of the parameters is the same as in the request for creating promotions. If any of the parameters is optional or is not filled in when creating/editing a promotion, it is filled in with the default value. With the exception of:
  • coupons.coupon_type - if the parameter was not filled in for a promotion earlier, it does not return in response to the request for getting promotion data. In this case, promotion codes have the reusable type reusable.
update_date
string
required
Promotion latest update date

Format: YYYY-MM-DDThh:mm:ss±hh:mm.
{
 "id": 36,
 "promotion_type": "coupon",
 "promotion_name": "Black Friday",
 "status": true,
 "date_from": "2022-04-08T12:53:02+03:00",
 "date_to": "3000-01-01T00:00:00+03:00",
 "update_date": "2022-11-01T12:53:02+03:00",
 "coupons": {
  "coupon_type": "one-time",
  "coupon_code": [
   "PROMO-001",
   "PROMO-002"
  ],
  "discount_percent": "10",
  "product_id": [
   11111
  ]
 },
 "update_date": "2022-04-08T12:53:02+03:00"
}

If an error occurs while processing the request, you receive a server response code corresponding to the result of processing.

Depending on the code, the response body may contain additional parameters.

HTTP code Description
HTTP/1.1 400 Bad Request The request is not valid (error in parameters; necessary data is not transferred, etc.).
An additional error code (one or more) will be transferred in the response bodу.
HTTP/1.1 401 Unauthorized Unsuccessful authorization.
An additional error code (one or more) will be transferred in the response bodу.
HTTP/1.1 404 Not found Invalid request URL or no promotion having the identifier transferred is found. If no promotion is found, an additional additional error code will return in the response body. 
HTTP/1.1 500 Request Error Internal Server Error. Please try again later or contact support.
Error Message Description
11000 No access to promotion management. Please contact technical support. During processing, we could not identify your account setting unambiguously. Please contact support team.

The errors are the same for all the APIs that use token authorization.

Error Message Description
11200 Promotion not found: [promotion id] No promotion with the identifier transferred is found, or you do not have the rights to get the data. 
errors
array [objects]
required
Error list
errors / [error object]
/
error
number
required
Error code
errors / [error object]
/
message
string
Error description
{
 "errors": [{
   "error": 11200,
   "message": "Promotion not found: 123"
  }
 ]
}