(Quick Reference)

47 Promotions - Reference Documentation

Version: 2.1

47 Promotions

47.1 List

Service: List of promotions

Description: This web service returns a json list of promotions.

URL:

https://BASE_URL/api/VERSION/promotionLists

Method: GET

Parameters:

Pagination parameters:

NameDescriptionTypeRequiredPossible values
maxLimits the number of resources requested to return.Integerno 
offsetTells where to start returning records from the entire set of results.Integerno 
orderOrders ascending or descending.Integernoasc,desc
sortOrders the results by the specified field.Stringno 

The max parameter is set to 100 by default.

Filters parameters:

NameDescriptionTypeRequiredExample values
dateCreated_gtFilters by the resource's creation date time and operator greater thanDateno2016-08-15T14:52:48Z
dateCreated_gteFilters by the resource's creation date time and operator greater than or equalDateno 
dateCreated_ltFilters by the resource's creation date time and operator less thanDateno 
dateCreated_lteFilters by the resource's creation date time and operator less than or equalDateno 
lastUpdated_gtFilters by the resource's last-modified date time and operator greater thanDateno 
lastUpdated_gteFilters by the resource's last-modified date time and operator greater than or equalDateno 
lastUpdated_ltFilters by the resource's last-modified date time and operator less thanDateno 
lastUpdated_lteFilters by the resource's last-modified date time and operator less than or equalDateno 
referenceWildcard search by the resource's referenceStringnoreference=*buy_more*
descriptionWildcard search by the resource's descriptionStringno 
applyToAllCustomers Booleannofalse, true

Dates should be formatted as the ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ)

Success Output

Success case: response.status = 200

{
  "paging": {
    "total": 11,
    "max": 5,
    "offset": 0,
    "previous": null,
    "next": "/api/v1.0/promotionLists?max=5&offset=5&sort=dateCreated&order=asc"
  },
  "data": [
    {
      "id": 1,
      "reference": "save_more",
      "description": "Buy More, Save More",
      "startDate": "2015-12-01",
      "endDate": "2015-12-31",
      "isActive": false,
      "applyToAllCustomers": true,
      "promotionInputs": [
        {
          "id": 1,
          "href": "/api/v1.0/promotionInputs/1"
        }
      ],
      "promotionOutputs": [
        {
          "id": 1,
          "href": "/api/v1.0/promotionOutputs/1"
        }
      ],
      "organization": "entity1",
      "dateCreated": "2015-12-17T14:36:26Z",
      "lastUpdated": "2015-12-17T14:36:26Z"
    },…
  ]
}

Failure Output

Failure case:response.status = 400
{
   "error": "invalid_param",
   "error_description": "The parameters [dateCreated_gta] you provided are not valid for this request."
}
{
    "error": "invalid_datetime_format",
    "error_description": "Invalid datetime filter (not ISO-8601 formatted): [2016-08-1Z]"
}
Failure case:response.status = 500
{
   "error": "server_error",
   "error_description": "Oops! Something went wrong..."
}

47.2 Show

Service: Show a promotion list

Description: This web service return an existing promotion list of the specified id in JSON format

URL:

https://BASE_URL/api/VERSION/promotionLists/{id}

URL with external_id:

https://BASE_URL/api/VERSION/promotionLists/reference/{id}

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idThe ID of the desired promotion listLong/StringYes777

Success Output

Success case: response.status = 200

{
      "id": 1,
      "reference": "save_more",
      "description": "Buy More, Save More",
      "startDate": "2015-12-01",
      "endDate": "2015-12-31",
      "isActive": false,
      "applyToAllCustomers": true,
      "promotionInputs": [
        {
          "id": 1,
          "href": "/api/v1.0/promotionInputs/1"
        }
      ],
      "promotionOutputs": [
        {
          "id": 1,
          "href": "/api/v1.0/promotionOutputs/1"
        }
      ],
      "organization": "entity1",
      "dateCreated": "2015-12-17T14:36:26Z",
      "lastUpdated": "2015-12-17T14:36:26Z"
 }

Failure Output

Failure case:response.status = 400
{
    "error": "invalid_param_type",
    "error_description": "The type of parameter id you provided is not valid for this request."
}

Failure case:response.status = 404
{
  "error": "not_found",
  "error_description": "The promotion list with the id 199 doesn't exist."
}

47.3 Create

Service: Create a promotion list

Description: Returns the created promotion list in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

URL:

https://BASE_URL/api/VERSION/promotionLists

Method: POST

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
reference Stringyes 
description Stringyes 
startDateShould be formatted as yyyy-MM-ddDateyes 
endDateShould be formatted as yyyy-MM-ddDateyes 
isActiveBy default, it is set to true and it tell if the promotion list is active or notBooleannotrue, false
applyToAllCustomersBy default, it's set to false and it tell if the promotion list is assigned to all customers or notBooleannotrue, false
promotionInputsIt contain the sequence inputs for the promotionJSONyes 
promotionOutputsIt contain the sequence outputs concluded from the inputs of the promotionJSONyes 
useExternalIdBy default, it is set to false. set it to true if you want to use external ids.Booleannotrue , false

Promotion details parameters :

Parameter name: promotionInputs

Parameter type: a json structure

NameDescriptionTypeRequiredExample values
inputTypeShould be equal to 1 for item quantity , 2 for item group, 3 for invoice amount, 4 for item amount and 5 for item categoryInteger/Stringyes1,2,3,"4","5"
valueShould be a double if inputType is an amount (3,4) or integer if inputType is a quantity (1,2,5)Double/Integeryes 
sequenceUsed to manage input/ouput sequencesIntegeryes 
serialIn every sequence, input can have one or more serials connected by operator ANDIntegeryes 
itemIdRequired if inputType equal to '1' or '4'Integer/String- 
unitIdRequired if inputType equal to '1' or '4'Integer/String- 
itemGroupIdRequired if inputType equal to '2'Integer/String- 
itemCategoryIdRequired if inputType equal to '5'Integer/String- 
enablePromotionSumBy default it is set to falseBooleannotrue, false
applyToAllItemsInputBy default it set to false and it tell if the promotion inputs are applied for all items or not, it is considered only if inputType equal to '1' or '4'Booleanyestrue , false
promotionTypeIt define the promotion type and it take one of this value : '1' for greater than , '2' for less than and '3' for equalInteger/Stringyes1,2,"3"

the numeric value used in sequence attribute to declare a sequence must at least used one time for sequence in the promotion output
In case inputType equal to '1' or '4' so itemId and unitId are required, there is one more condition is that the item extracted from the specified itemId must be assigned to the unit related to the specified unitId

Parameter name: promotionOutputs

Parameter type: a json structure

NameDescriptionTypeRequiredExample values
outputTypeShould be equal to 1 if Item quantity, 2 if Item Discount , 3 if Item Group, 4 if Item Group Discount, 5 if Invoice Discount, 6 if Item Category and 7 if Item Category DiscountInteger/Stringyes1,2,3,4,5,6,7
valueShould be a double if outputType is a discount (2,4,5,7) or integer if outputType is a quantity (1,3,6)Double/Integeryes 
discountTypeShould be equal to 1 if Percentage, 2 if Value, required if outputType is a discount (2,4,5,7)Integer/String-1,2
sequenceUsed to manage input/ouput sequencesIntegeryes 
serialIn every sequence, input can have one or more serials connected by operator ANDIntegeryes 
itemIdRequired if inputType equal to '1' or '2'Integer/String- 
unitIdRequired if inputType equal to '1' or '2'Integer/String- 
itemGroupIdRequired if inputType equal to '3' or '4'Integer/String- 
itemCategoryIdRequired if inputType equal to '6' or '7'Integer/String- 
duplicatePromotionBy default, it is set to falseBooleannotrue, false
applyToAllItemsOutputBy default it set to false and it tell if the promotion outputs are applied to all items or not, it is considered only if outputType@ equal to '1' or '2'Booleanyestrue , false

the numeric value used in sequence attribute to declare a promotion output must be already used in a promotion input.

In case outputType equal to '1' or '2' so itemId and unitId are required, there is one more condition is that the item extracted from the specified itemId must be assigned to the unit related to the specified unitId.

Example:

{
    "reference": "R-P-08969",
    "description": "Five for double five",
    "startDate": "2016-08-01",
    "endDate": "2016-08-31",
    "isActive": true,
    "paymentTypeId": 7,
    "applyToAllCustomers":true,
    "promotionInputs": [
      {
      "itemId": 13,
      "unitId": 1,
      "inputType": "5",
      "sequence": 1,
      "serial": 1,
      "value": "5",
      "enablePromotionSum": true,
      "applyToAllItemsInput":true,
      "promotionType" : 1,
      "itemGroupId" : 1,
      "itemCategoryId" :1
     }],
    "promotionOutputs": [
      {
        "itemId": 13,
        "unitId": 1,
        "outputType": "7",
        "itemGroupId": "1",
        "discountType": "1",
        "sequence": 1,
        "serial": 1,
        "value": "5",
        "duplicatePromotion":true,
        "applyToAllItemsOutput":false,
        "itemGroupId" : 1,
        itemCategoryId:1
     },
     {
        "itemId": 13,
        "unitId": 1,
        "outputType": "7",
        "itemGroupId": "1",
        "discountType": "2",
        "sequence": 1,
        "serial": 2,
        "value": "5",
        "duplicatePromotion":true,
        "applyToAllItemsOutput":false,
        "itemGroupId" : 1,
        "itemCategoryId" :1
     }]
}

Success Output

Success case: response.status = 201

{
  "id": 18,
  "reference": "R-P-08969",
  "description": "Five for double five",
  "startDate": "2016-08-01",
  "endDate": "2016-08-31",
  "isActive": true,
  "applyToAllCustomers": true,
  "promotionInputs": [
    {
      "id": 46,
      "href": "/api/v1.0/promotionInputs/46"
    }
  ],
  "promotionOutputs": [
    {
      "id": 48,
      "href": "/api/v1.0/promotionOutputs/48"
    },
    {
      "id": 49,
      "href": "/api/v1.0/promotionOutputs/49"
    }
  ],
  "organization": "New Delice",
  "dateCreated": "2016-10-07T15:38:30Z",
  "lastUpdated": "2016-10-07T15:38:30Z"
}

Failure Output

Failure case:response.status = 400

{
  "error": "not_unique",
  "error_description": "reference already used"
}

{
  "error": "missing_param",
  "error_description": "discountType parameter is missing"
}

{
  "error": "missing_param",
  "error_description": "itemId parameter is missing"
}

{
  "error": "invalid_sequence",
  "error_description": "Input options should be equal to output options."
}

Failure case:response.status = 404
{
  "error": "not_found",
  "error_description": "The item with the id 999 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The unit with the id 100 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The unit with the id 100 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The item group with the id 618 doesn't exist."
}

Failure case:response.status = 500
{
   "error": "server_error",
   "error_description": "Oops! Something went wrong..."
}

47.4 Update

Service: Update a promotion list

Description: Returns the updated promotion list in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

URL:

https://BASE_URL/api/VERSION/promotionLists/{id}

URL with external_id:

https://BASE_URL/api/VERSION/promotionLists/reference/{id}

Method: PUT

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
idThe ID of the desired promotion listLongyes123
reference Stringyes 
description Stringyes 
startDateShould be formatted as yyyy-MM-ddDateyes 
endDateShould be formatted as yyyy-MM-ddDateyes 
isActiveBy default, it is set to trueBooleannotrue, false
applyToAllCustomersBy default, it's set to falseBooleannotrue, false
promotionInputsIt contain the sequence inputs for the promotionJSONyes 
promotionOutputsIt contain the sequence outputs concluded from the inputs of the promotionJSONyes 

Promotion details parameters :

Parameter name: promotionInputs

Parameter type: a json structure

NameDescriptionTypeRequiredExample values
inputTypeShould be equal to 1 for item quantity , 2 for item group, 3 for invoice amount, 4 for item amount and 5 for item categoryInteger/Stringyes1,2,3,"4","5"
valueShould be a double if inputType is an amount (3,4) or integer if inputType is a quantity (1,2,5)Double/Integeryes 
sequenceUsed to manage input/ouput sequencesIntegeryes 
serialIn every sequence, input can have one or more serials connected by operator ANDIntegeryes 
itemIdRequired if inputType equal to '1' or '4'Integer/String- 
unitIdRequired if inputType equal to '1' or '4'Integer/String- 
itemGroupIdRequired if inputType equal to '2'Integer/String- 
itemCategoryIdRequired if inputType equal to '5'Integer/String- 
enablePromotionSumBy default, it is set to falseBooleannotrue, false
applyToAllItemsInputBy default it set to false and it tell if the promotion inputs are applied for all items or not, it is considered only if inputType equal to '1' or '4'Booleanyestrue , false
promotionTypeIt define the promotion type and it take one of this value : '1' for greater than , '2' for less than and '3' for equalInteger/Stringyes1,2,"3"

the numeric value used in sequence attribute to declare a sequence must at least used one time for sequence in the promotion output
In case inputType equal to '1' or '4' so itemId and unitId are required, there is one more condition is that the item extracted from the specified itemId must be assigned to the unit related to the specified unitId

Parameter name: promotionOutputs

Parameter type: a json structure

NameDescriptionTypeRequiredExample values
outputTypeShould be equal to 1 if Item quantity, 2 if Item Discount , 3 if Item Group, 4 if Item Group Discount, 5 if Invoice Discount, 6 if Item Category and 7 if Item Category DiscountInteger/Stringyes1,2,3,4,5,6,7
valueShould be a double if outputType is a discount (2,4,5,7) or integer if outputType is a quantity (1,3,6)Double/Integeryes 
discountTypeShould be equal to 1 if Percentage, 2 if Value, required if outputType is a discount (2,4,5)Integer/String-1,2
sequenceUsed to manage input/ouput sequencesIntegeryes 
serialIn every sequence, input can have one or more serials connected by operator ANDIntegeryes 
itemIdRequired if inputType equal to '1' or '2'Integer/String- 
unitIdRequired if inputType equal to '1' or '2'Integer/String- 
itemGroupIdRequired if inputType equal to '3' or '4'Integer/String- 
itemCategoryIdRequired if inputType equal to '6' or '7'Integer/String- 
duplicatePromotionBy default, it is set to falseBooleannotrue, false
applyToAllItemsOutputBy default it set to false and it tell if the promotion outputs are applied to all items or not, it is considered only if outputType@ equal to '1' or '2'Booleanyestrue , false

the numeric value used in sequence attribute to declare a promotion output must be already used in a promotion input.

In case outputType equal to '1' or '2' so itemId and unitId are required, there is one more condition is that the item extracted from the specified itemId must be assigned to the unit related to the specified unitId.

Example:

{
    "reference": "R-P-08969",
    "description": "Five for double ten",
    "startDate": "2016-08-01",
    "endDate": "2016-08-31",
    "isActive": true,
    "paymentTypeId": 7,
    "applyToAllCustomers":true,
    "promotionInputs": [
      {
      "itemId": 13,
      "unitId": 1,
      "inputType": "5",
      "sequence": 1,
      "serial": 1,
      "value": "5",
      "enablePromotionSum": true,
      "applyToAllItemsInput":true,
      "promotionType" : 1,
      "itemGroupId" : 1,
      "itemCategoryId" :1
     }],
    "promotionOutputs": [
      {
        "itemId": 13,
        "unitId": 1,
        "outputType": "7",
        "itemGroupId": "1",
        "discountType": "1",
        "sequence": 1,
        "serial": 1,
        "value": "10",
        "duplicatePromotion":true,
        "applyToAllItemsOutput":false,
        "itemGroupId" : 1,
        itemCategoryId:1
     },
     {
        "itemId": 13,
        "unitId": 1,
        "outputType": "7",
        "itemGroupId": "1",
        "discountType": "2",
        "sequence": 1,
        "serial": 2,
        "value": "10",
        "duplicatePromotion":true,
        "applyToAllItemsOutput":false,
        "itemGroupId" : 1,
        "itemCategoryId" :1
     }]
}

Success Output

Success case: response.status = 200

{
  "id": 18,
  "reference": "R-P-08969",
  "description": "Five for double ten",
  "startDate": "2016-08-01",
  "endDate": "2016-08-31",
  "isActive": true,
  "applyToAllCustomers": true,
  "promotionInputs": [
    {
      "id": 46,
      "href": "/api/v1.0/promotionInputs/46"
    }
  ],
  "promotionOutputs": [
    {
      "id": 48,
      "href": "/api/v1.0/promotionOutputs/48"
    },
    {
      "id": 49,
      "href": "/api/v1.0/promotionOutputs/49"
    }
  ],
  "organization": "New Delice",
  "dateCreated": "2016-10-07T15:38:30Z",
  "lastUpdated": "2016-10-07T15:38:30Z"
}

Failure Output

Failure case:response.status = 400

{
  "error": "not_unique",
  "error_description": "reference already used"
}

{
  "error": "missing_param",
  "error_description": "discountType parameter is missing"
}

{
  "error": "missing_param",
  "error_description": "itemId parameter is missing"
}

{
  "error": "invalid_sequence",
  "error_description": "Input options should be equal to output options."
}

Failure case:response.status = 404

{
  "error": "not_found",
  "error_description": "The promotion list with the id 123 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The item with the id 999 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The unit with the id 100 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The unit with the id 100 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The item group with the id 618 doesn't exist."
}

Failure case:response.status = 500
{
   "error": "server_error",
   "error_description": "Oops! Something went wrong..."
}

47.5 Upsert

Service: Upsert a promotion list

Description: This web service is used to insert a promotion list object to the database if it does not already exist, or update it.

URL with external_id:

https://BASE_URL/api/VERSION/promotionLists/reference/{id}

Method: POST

Request content type: application/json

Parameters:

NameDescriptionTypeRequiredExample values
description Stringyes 
startDateShould be formatted as yyyy-MM-ddDateyes 
endDateShould be formatted as yyyy-MM-ddDateyes 
isActiveBy default, it is set to true and it tell if the promotion list is active or notBooleannotrue, false
applyToAllCustomersBy default, it's set to false and it tell if the promotion list is assigned to all customers or notBooleannotrue, false
promotionInputsIt contain the sequence inputs for the promotionJSONyes 
promotionOutputsIt contain the sequence outputs concluded from the inputs of the promotionJSONyes 

Promotion details parameters :

Parameter name: promotionInputs

Parameter type: a json structure

NameDescriptionTypeRequiredExample values
inputTypeShould be equal to 1 for item quantity , 2 for item group, 3 for invoice amount, 4 for item amount and 5 for item categoryInteger/Stringyes1,2,3,"4","5"
valueShould be a double if inputType is an amount (3,4) or integer if inputType is a quantity (1,2,5)Double/Integeryes 
sequenceUsed to manage input/ouput sequencesIntegeryes 
serialIn every sequence, input can have one or more serials connected by operator ANDIntegeryes 
itemIdRequired if inputType equal to '1' or '4'String- 
unitIdRequired if inputType equal to '1' or '4'String- 
itemGroupIdRequired if inputType equal to '2'String- 
itemCategoryIdRequired if inputType equal to '5'String- 
enablePromotionSumBy default it is set to falseBooleannotrue, false
applyToAllItemsInputBy default it set to false and it tell if the promotion inputs are applied for all items or not, it is considered only if inputType equal to '1' or '4'Booleanyestrue , false
promotionTypeIt define the promotion type and it take one of this value : '1' for greater than , '2' for less than and '3' for equalInteger/Stringyes1,2,"3"

the numeric value used in sequence attribute to declare a sequence must at least used one time for sequence in the promotion output
In case inputType equal to '1' or '4' so itemId and unitId are required, there is one more condition is that the item extracted from the specified itemId must be assigned to the unit related to the specified unitId

Parameter name: promotionOutputs

Parameter type: a json structure

NameDescriptionTypeRequiredExample values
outputTypeShould be equal to 1 if Item quantity, 2 if Item Discount , 3 if Item Group, 4 if Item Group Discount, 5 if Invoice Discount, 6 if Item Category and 7 if Item Category DiscountInteger/Stringyes1,2,3,4,5,6,7
valueShould be a double if outputType is a discount (2,4,5,7) or integer if outputType is a quantity (1,3,6)Double/Integeryes 
discountTypeShould be equal to 1 if Percentage, 2 if Value, required if outputType is a discount (2,4,5,7)Integer/String-1,2
sequenceUsed to manage input/ouput sequencesIntegeryes 
serialIn every sequence, input can have one or more serials connected by operator ANDIntegeryes 
itemIdRequired if inputType equal to '1' or '2'String- 
unitIdRequired if inputType equal to '1' or '2'String- 
itemGroupIdRequired if inputType equal to '3' or '4'String- 
itemCategoryIdRequired if inputType equal to '6' or '7'String- 
duplicatePromotionBy default, it is set to falseBooleannotrue, false
applyToAllItemsOutputBy default it set to false and it tell if the promotion outputs are applied to all items or not, it is considered only if outputType@ equal to '1' or '2'Booleanyestrue , false

the numeric value used in sequence attribute to declare a promotion output must be already used in a promotion input.

In case outputType equal to '1' or '2' so itemId and unitId are required, there is one more condition is that the item extracted from the specified itemId must be assigned to the unit related to the specified unitId.

Example:

{
    "reference": "R-P-08969",
    "description": "Five for double five",
    "startDate": "2016-08-01",
    "endDate": "2016-08-31",
    "isActive": true,
    "paymentTypeId": 7,
    "applyToAllCustomers":true,
    "promotionInputs": [
      {
      "itemId": 13,
      "unitId": 1,
      "inputType": "5",
      "sequence": 1,
      "serial": 1,
      "value": "5",
      "enablePromotionSum": true,
      "applyToAllItemsInput":true,
      "promotionType" : 1,
      "itemGroupId" : 1,
      "itemCategoryId" :1
     }],
    "promotionOutputs": [
      {
        "itemId": 13,
        "unitId": 1,
        "outputType": "7",
        "itemGroupId": "1",
        "discountType": "1",
        "sequence": 1,
        "serial": 1,
        "value": "5",
        "duplicatePromotion":true,
        "applyToAllItemsOutput":false,
        "itemGroupId" : 1,
        itemCategoryId:1
     },
     {
        "itemId": 13,
        "unitId": 1,
        "outputType": "7",
        "itemGroupId": "1",
        "discountType": "2",
        "sequence": 1,
        "serial": 2,
        "value": "5",
        "duplicatePromotion":true,
        "applyToAllItemsOutput":false,
        "itemGroupId" : 1,
        "itemCategoryId" :1
     }]
}

Success Output

Success case: response.status = 201

{
  "id": 18,
  "reference": "R-P-08969",
  "description": "Five for double five",
  "startDate": "2016-08-01",
  "endDate": "2016-08-31",
  "isActive": true,
  "applyToAllCustomers": true,
  "promotionInputs": [
    {
      "id": 46,
      "href": "/api/v1.0/promotionInputs/46"
    }
  ],
  "promotionOutputs": [
    {
      "id": 48,
      "href": "/api/v1.0/promotionOutputs/48"
    },
    {
      "id": 49,
      "href": "/api/v1.0/promotionOutputs/49"
    }
  ],
  "organization": "New Delice",
  "dateCreated": "2016-10-07T15:38:30Z",
  "lastUpdated": "2016-10-07T15:38:30Z"
}

Failure Output

Failure case:response.status = 400

{
  "error": "not_unique",
  "error_description": "reference already used"
}

{
  "error": "missing_param",
  "error_description": "discountType parameter is missing"
}

{
  "error": "missing_param",
  "error_description": "itemId parameter is missing"
}

{
  "error": "invalid_sequence",
  "error_description": "Input options should be equal to output options."
}

Failure case:response.status = 404
{
  "error": "not_found",
  "error_description": "The item with the id 999 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The unit with the id 100 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The unit with the id 100 doesn't exist."
}

{
  "error": "not_found",
  "error_description": "The item group with the id 618 doesn't exist."
}

Failure case:response.status = 500
{
   "error": "server_error",
   "error_description": "Oops! Something went wrong..."
}

47.6 Delete

Service: Delete a promotion list

Description: Returns a json response.

URL:

https://BASE_URL/api/VERSION/promotionLists/{id}

URL with external_id:

https://BASE_URL/api/VERSION/promotionLists/reference/{id}

Method: DELETE

Parameters:

NameDescriptionTypeRequiredExample values
idThe ID of the desired promotion listLong/Stringyes123

Success Output

Success case: response.status = 200

{
  "success": "true",
  "success_description": "Instance deleted successfully"
}

Failure Output

Failure case:response.status = 400

{
  "error": "delete_failed",
  "error_description": "Failed to delete instance."
}

Failure case:response.status = 404

{
  "error": "not_found",
  "error_description": "The promotion list with the id 123 doesn't exist."
}