1. Large order discount

Thanks to new possibilities, you can offer a discount for B2B transactions (company - company). It will be a percentage discount, the amount of which depends on the single order value. Large order discount will be applied to all of your offers.

Add large order discount

To create a large order discount, please use POST /sale/loyalty/promotions and define the single order value thresholds and percentage discount for them. You can only add one large order discount.


Sample request:

  curl -X POST
  ‘https://api.allegro.pl/sale/loyalty/promotions' 
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
  -H ‘Authorization: Bearer {token}’ 
  -d ‘{
    “benefits”: [
      {
        “specification”: {
            “type”: “LARGE_ORDER_DISCOUNT”,    – promotion type (list of available
                                               values can be found in resource documentation)
            “thresholds”: [                    – discount thresholds
              {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “1000.00”,   – order value
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “5”          – discount percentage (%)
                }
            },
            {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “1500.00”,
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “8”
                }
            }
            ]
        }
    }
    ],
    “offerCriteria”: [
      {
        “type”: “ALL_OFFERS”                   – discount will be applied
      }                                        to all of your offers
    ]
  }’


In response, you will receive the ID of the created large order discount.

Sample response:

  {
    “id”: “ba01f101-c9ef-4e5d-a88f-efb721bdbb9a”,    – large order discount ID
    “createdAt”: “2020-10-27T06:31:29.36Z”,          – creation date
    “benefits”: [
      {
        “specification”: {
            “thresholds”: [
              {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “1000.00”,
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “5”
                }
            },
            {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “1500.00”,
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “8”
                }
            }
            ],
            “type”: “LARGE_ORDER_DISCOUNT”
        }
    }
    ],
    “offerCriteria”: [
      {
        “type”: “ALL_OFFERS”
      }
    ]
    “status”: “ACTIVE”
  }

Retrieve large order discount

GET /sale/loyalty/promotions returns a list of all promotions created in your account. To receive only an ID of large order discount, please use the filter “promotionType=LARGE_DISCOUNT_ORDER”.

Note! If you use the “offer.id” filter for a large order discount, we will not return the list of offers to which the discount is assigned. We will return an empty response.


Sample request:

  curl -X GET
  ‘https://api.allegro.pl/sale/loyalty/promotions?promotionType=LARGE_DISCOUNT_ORDER' 
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’
  


Sample response:

  {
    “promotions”: [
        {
            “id”: “ba01f101-c9ef-4e5d-a88f-efb721bdbb9a”,        – large order discount ID
            “createdAt”: “2020-10-27T06:31:29.36Z”,              – creation date
            “benefits”: [
                {
                    “specification”: {
                        “thresholds”: [
                            {
                                “orderValue”: {
                                    “lowerBound”: {
                                        “amount”: “1000.00”,
                                        “currency”: “PLN”
                                    }
                                },
                                “discount”: {
                                    “percentage”: “5”
                                }
                            },
                            {
                                “orderValue”: {
                                    “lowerBound”: {
                                        “amount”: “1500.00”,
                                        “currency”: “PLN”
                                    }
                                },
                                “discount”: {
                                    “percentage”: “8”
                                }
                            }
                        ],
                        “type”: “LARGE_ORDER_DISCOUNT”
                    }
                }
            ],
            “offerCriteria”: [
                {
                    “type”: “ALL_OFFERS”
                }
            ],
            “status”: “ACTIVE”
        }
    ],
    “totalCount”: 1
  }

Retrieve information about large order discount

If you want to retrieve detailed information about the large order discount, please use GET /sale/loyalty/promotions/{promotionId}.


Sample request:

  curl -X GET
  ‘https://api.allegro.pl/sale/loyalty/promotions/ba01f101-c9ef-4e5d-a88f-efb721bdbb9a' 
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’
  


Sample response:

  {
    “id”: “ba01f101-c9ef-4e5d-a88f-efb721bdbb9a”,          – large order discount ID
    “createdAt”: “2020-10-27T06:31:29.36Z”,                – creation date
    “benefits”: [
      {
        “specification”: {
            “thresholds”: [                                – discount threshold
              {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “1000.00”,               – order value
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “5”                      – discount percentage (%)
                }
            },
            {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “1500.00”,
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “8”
                }
            }
            ],
            “type”: “LARGE_ORDER_DISCOUNT”,
        }
    }
    ],
    “offerCriteria”: [
      {
        “type”: “ALL_OFFERS”                               – discount is applied
      }                                                    to all of your offers
    ],
    “status”: “ACTIVE”
  }
  

Edit discount thresholds

We have provided the option to edit the order value thresholds and the amount of the discount granted. Please use PUT /sale/loyalty/promotions/{promotionId} to change large order discount settings.


Sample request:

  curl -X PUT
  ‘https://api.allegro.pl/sale/loyalty/promotions/ba01f101-c9ef-4e5d-a88f-efb721bdbb9a' 
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
  -H ‘Authorization: Bearer {token}’ 
  -d ‘{
    “id”: “ba01f101-c9ef-4e5d-a88f-efb721bdbb9a”,
    “benefits”: [
      {
        “specification”: {
            “type”: “LARGE_ORDER_DISCOUNT”,
            “thresholds”: [
              {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “2000.00”,
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “10”
                }
            },
            {
                “orderValue”: {
                    “lowerBound”: {
                        “amount”: “3000.00”,
                        “currency”: “PLN”
                    }
                },
                “discount”: {
                    “percentage”: “15”
                }
            }
            ]
        }
    }
    ],
    “offerCriteria”: [
      {
        “type”: “ALL_OFFERS”
      }
    ]
  }’

Remove large order discount

If you want to remove the large order discount, please use DELETE /sale/loyalty/promotions/{promotionId}. This operation will remove the discount from all your offers - its execution time depends on the number of offers you have.


Sample request:

  curl -X DELETE
  ‘https://api.allegro.pl/sale/loyalty/promotions/ba01f101-c9ef-4e5d-a88f-efb721bdbb9a' 
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  status 204 No Content

2. Wholesale price list

Thanks to wholesale price lists, you will offer a discount for B2B transactions (company - company). It will be a percentage discount, the amount of which depends on the number of items purchased in the offer.

Add wholesale price list

To create a wholesale price list, please use POST /sale/loyalty/promotions and define the quantitative thresholds and the percentage discount applicable to them.


Sample request:

 curl -X POST
 ‘https://api.allegro.pl/sale/loyalty/promotions' 
 -H ‘Accept: application/vnd.allegro.public.v1+json’ 
 -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
 -H ‘Authorization: Bearer {token}’ 
 -d ‘{
 “benefits”: [
    {
      “specification”: {
          “type”: “WHOLESALE_PRICE_LIST”,        – promotion type (list of available values
                                                 can be found in resource documentation)
          “name”: “Cennik hurtowy nr 1”,         – wholesale price list name
          “thresholds”: [                        – discount thresholds
              {
                “quantity”: {                    – minimum quantity purchased items
                },
                “discount”: {                    – discount percentage (%)
                    “percentage”: “5”
                }
              },
              {
                “quantity”: {
                    “lowerBound”: 10
                },
                “discount”: {
                    “percentage”: “8”
                }
              }
            ]
          }
    }
  ],
  “offerCriteria”: [
    {
      “type”: “OFFERS_ASSIGNED_EXTERNALLY”        – you will assign offers via
    }                                             PUT /sale/offer-modification-commands/{commandId}
  ]
 }’


In response, you will receive the ID of the created wholesale price list.

Sample response:

 {
    “id”: “9de4be5d-9c60-48aa-8711-363625c9d793”,    – wholesale price list ID
    “createdAt”: “2020-08-13T06:08:06.011Z”,         – creation date
    “benefits”: [
        {
            “specification”: {
                “name”: “Cennik hurtowy nr 1”,
                “thresholds”: [
                    {
                        “quantity”: {
                            “lowerBound”: 5
                        },
                        “discount”: {
                            “percentage”: “5”
                        }
                    },
                    {
                        “quantity”: {
                            “lowerBound”: 10
                        },
                        “discount”: {
                            “percentage”: “8”
                        }
                    }
                ],
                “type”: “WHOLESALE_PRICE_LIST”
            }
        }
    ],
    “offerCriteria”: [
        {
            “type”: “OFFERS_ASSIGNED_EXTERNALLY”
        }
    ],
    “status”: “ACTIVE”
 }

Assign offers to the wholesale price list

You will assign the created wholesale price list to selected offers using the resource responsible for group changes in the offers - PUT /sale/offer-modification-commands/{commandId}.


Sample request:

   curl -X PUT 
   ‘https://api.allegro.pl/sale/offer-modification-commands/daccd266-fa5e-4a6b-a10b-d24836c411e1' 
   -H ‘Authorization: Bearer {token}’ 
   -H ‘Accept: application/vnd.allegro.public.v1+json’ 
   -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 
    -d ‘{
   “modification”: {
     “discounts”: {                                          – change type
       “wholesalePriceList”: {
         “id”: “9de4be5d-9c60-48aa-8711-363625c9d793”        – wholesale price list ID
       }
     }
   },
   “offerCriteria”: [
     {
       “offers”: [
         {
           “id”: “9292002929”                                – offer ID
         },
         {
           “id”: “9876543210”
         }
       ],
       “type”: “CONTAINS_OFFERS”
     }
   ]
  }’

You will add the wholesale price list to a single offer when listing (POST /sale/offers) or editing an offer (PUT /sale/offers/{offerId}) by providing its identifier in the wholesalePriceList.id field in the discounts section.


   …
   “discounts”: {
       “wholesalePriceList”: {
           “id”: “5637592a-0a24-4771-b527-d89b2767d821”
       }
   },
   …


If you want to unrelate the offers with the selected wholesale price list, enter the null value as the price list identifier.


Sample request:

   curl -X PUT 
   ‘https://api.allegro.pl/sale/offer-modification-commands/daccd266-fa5e-4a6b-a10b-d24836c411e1' 
   -H ‘Authorization: Bearer {token}’ 
   -H ‘Accept: application/vnd.allegro.public.v1+json’ 
   -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 
   -d ‘{
   “modification”: {
     “discounts”: {
       “wholesalePriceList”: {
         “id”: null
       }
     }
   },
   “offerCriteria”: [
     {
       “offers”: [
         {
           “id”: “9292002929”
         },
         {
           “id”: “9876543210”
         }
       ],
       “type”: “CONTAINS_OFFERS”
     }
   ]
  }’

Retrieve wholesale price lists

GET /sale/loyalty/promotions returns a list of all promotions created in your account. To receive only a list of wholesale price lists, please use the filter “promotionType=WHOLESALE_PRICE_LIST”.

Note! If you use the “offer.id” filter for wholesale price lists, you will not receive the price list to which this offer is assigned.


Sample request:

   curl -X GET
   ‘https://api.allegro.pl/sale/loyalty/promotions?promotionType=WHOLESALE_PRICE_LIST' 
   -H ‘Accept: application/vnd.allegro.public.v1+json’ 
   -H ‘Authorization: Bearer {token}’


Sample response:

   {
    “promotions”: [
        {
            “id”: “9de4be5d-9c60-48aa-8711-363625c9d793”,        – wholesale price list ID
            “createdAt”: “2020-08-13T06:08:06.011Z”,             – creation date
            “benefits”: [
                {
                    “specification”: {
                        “name”: “Price list number 1”,           – wholesale price list name
                        “thresholds”: [                          – discount thresholds
                            {
                                “quantity”: {                    – minimum quantity
                                    “lowerBound”: 5              purchased items
                                },
                                “discount”: {                    – discount percentage (%)
                                    “percentage”: “5”
                                }
                            },
                            {
                                “quantity”: {
                                    “lowerBound”: 10
                                },
                                “discount”: {
                                    “percentage”: “8”
                                }
                            }
                        ],
                        “type”: “WHOLESALE_PRICE_LIST”
                    }
                }
            ],
            “offerCriteria”: [
                {
                    “type”: “OFFERS_ASSIGNED_EXTERNALLY”
                }
            ],
            “status”: “ACTIVE”
        },
        {
            “id”: “8d389509-18ac-4d66-957a-0124b26864fb”,
            “createdAt”: “2020-08-13T06:03:32.649Z”,
            “benefits”: [
                {
                    “specification”: {
                          “name”: “Price list number 2”,
                          “thresholds”: [
                            {
                                “quantity”: {
                                    “lowerBound”: 20
                                },
                                “discount”: {
                                    “percentage”: “5”
                                }
                            },
                            {
                                “quantity”: {
                                    “lowerBound”: 40
                                },
                                “discount”: {
                                    “percentage”: “10”
                                }
                            },
                            {
                                “quantity”: {
                                    “lowerBound”: 60
                                },
                                “discount”: {
                                    “percentage”: “15”
                                }
                            }
                        ],
                        “type”: “WHOLESALE_PRICE_LIST”
                    }
                }
            ],
            “offerCriteria”: [
                {
                    “type”: “OFFERS_ASSIGNED_EXTERNALLY”
                }
            ],
            “status”: “ACTIVE”
        }
    ],
    “totalCount”: 2
  }

Retrieve information about wholesale price list

If you want to retrieve detailed information about the selected wholesale price list, please use GET /sale/loyalty/promotions/{promotionId}.


Sample request:

   curl -X GET
   ‘https://api.allegro.pl/sale/loyalty/promotions/9de4be5d-9c60-48aa-8711-363625c9d793' 
   -H ‘Accept: application/vnd.allegro.public.v1+json’ 
   -H ‘Authorization: Bearer {token}’


Sample response:

   {
    “id”: “9de4be5d-9c60-48aa-8711-363625c9d793”,            – wholesale price list ID
    “createdAt”: “2020-08-13T06:08:06.011Z”,                 – creation date
    “benefits”: [
        {
            “specification”: {
                “name”: “Price list number 1”,               – wholesale price list name
                “thresholds”: [                              – discount thresholds
                    {
                        “quantity”: {                        – minium quantity
                            “lowerBound”: 5                  purchased items
                        },
                        “discount”: {                        – discount percentage (%)
                            “percentage”: “5”
                        }
                    },
                    {
                        “quantity”: {
                            “lowerBound”: 10
                        },
                        “discount”: {
                            “percentage”: “8”
                        }
                    }
                ],
                “type”: “WHOLESALE_PRICE_LIST”
            }
        }
    ],
    “offerCriteria”: [
        {
            “type”: “OFFERS_ASSIGNED_EXTERNALLY”
        }
    ],
    “status”: “ACTIVE”
  }

Edit wholesale price list

We have provided the option of editing wholesale price lists. Please use PUT /sale/loyalty/promotions/{promotionId} to change wholesale price list settings.


Sample request:

  curl -X PUT
  ‘https://api.allegro.pl/sale/loyalty/promotions/9de4be5d-9c60-48aa-8711-363625c9d793' 
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
  -H ‘Authorization: Bearer {token}’ 
  -d ‘{
    “id”: “9de4be5d-9c60-48aa-8711-363625c9d793”,
    “benefits”: [
        {
                “specification”: {
                “name”: “Price list number 1”,
                “thresholds”: [
                    {
                        “quantity”: {
                            “lowerBound”: 10
                        },
                        “discount”: {
                            “percentage”: “10”
                        }
                    },
                    {
                        “quantity”: {
                            “lowerBound”: 20
                        },
                        “discount”: {
                            “percentage”: “20”
                        }
                    }
                ],
                “type”: “WHOLESALE_PRICE_LIST”
            }
        }
    ],
    “offerCriteria”: [
        {
            “type”: “OFFERS_ASSIGNED_EXTERNALLY”
        }
    ],
    “status”: “ACTIVE”
  }’

Remove wholesale price list

If you want to remove the wholesale price list, please use DELETE /sale/loyalty/promotions/{promotionId}. This operation will also separate the wholesale price list from all related offers.


Sample request:

  curl -X DELETE
  ‘https://api.allegro.pl/sale/loyalty/promotions/9de4be5d-9c60-48aa-8711-363625c9d793' 
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  status 204 No Content

3. Quantitative discounts

Thanks to quantity discounts, you can offer buyers a discount for another item, when buying a certain number of pieces on one or many offers. You can find more on this here. To support quantitative discount, we have added new resources to Allegro REST API:

Create new quantitative discount

Via POST /sale/loyalty/promotions you will add a new quantitative discount.


Sampe request:

  curl -X POST
  ‘https://api.allegro.pl/sale/loyalty/promotions'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
  -H ‘Authorization: Bearer {token}’ 
  -d ‘{
  “benefits”: [{                                          – required, describes benefits
                                                          for a buyer
    “specification”: {
      “type”: “UNIT_PERCENTAGE_DISCOUNT”,                 – required, benefit type,
                                                          two values are supported:
                                                          UNIT_PERCENTAGE_DISCOUNT
                                                          (percentage discount on
                                                          a product item); ORDER_FIXED_DISCOUNT
                                                          (discount amount applied
                                                          to sets. We will use this
                                                          value to calculate the price.)
      “configuration”: {
        “percentage”: “30”                                – required, provide the percentage
                                                          discount. We will use this value to
                                                          calculate the price.) Minimum discount
                                                          value is 15 and maximum – 100.
      },
      “trigger”: {
        “forEachQuantity”: “3”,                           – required, provide which item should
                                                          be discounted. You can apply the
                                                          quantitative discount to second, third,
                                                          fourth or fifth item.
        “discountedNumber”: “1”                           – required, only one value
                                                          is supported, i.e. 1
      }
    }
  }],
  “offerCriteria”: [{
    “type”: “CONTAINS_OFFERS”,                            – required, only one
                                                          value is supported, i.e. CONTAINS_OFFERS
                                                          (offers included in a set
                                                          or the quantitative discount)
    “offers”: [{                                          – required, offers included in a set or
                                                          the quantitative discount
      “id”: “6205628150”                                  – required, offer ID.
                                                          You cannot add a quantitative discount
                                                          to Daily Deal Zone offers.
                                                          If you want to add a
                                                          quantity discount on one offer, enter here
                                                          the id of one selected offer. If you enter
                                                          multiple offer id you will set a quantity
                                                          discount on many offers.
     },
     {
      “id”: “6205628489”
     },
     {
      “id”: “6205628082”
     },
     {
      “id”: “6205628361”
     }]
   }]
 }’


Sample response:

  {
    “id”: “1ec57865-7e15-46f2-b70a-27ea857dd21c”,       – discount ID, use it in GET and DELETE
                                                        resources as {promotionId}
    “createdAt”: “2018-10-08T09:28:28.951Z”,
    “benefits”: [
        {
            “specification”: {
                “configuration”: {
                    “percentage”: “30”                  – percentage discount.
                },
                “trigger”: {
                    “forEachQuantity”: 3,               – which item should
                                                          be discounted
                    “discountedNumber”: 1
                },
                “type”: “UNIT_PERCENTAGE_DISCOUNT”
            }
        }
    ],
    “offerCriteria”: [
        {
            “offers”: [
                {
                    “id”: “6205628150”,                 – offers included in the
                                                        quantitative discount
                    “quantity”: null,                   – field used for promotional
                                                        sets of offers - the number of
                                                        items of the offer included in the set
                    “promotionEntryPoint”: null         – field used for promotional
                                                        sets of offers - specify on which
                                                        offer should be display the set of offers
                },
                {
                    “id”: “6205628489”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                },
                {
                    “id”: “6205628150”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                },
                {
                    “id”: “6205628082”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                },
                {
                    “id”: “6205628361”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                }]
            “type”: “CONTAINS_OFFERS”
        }
    ],
    “status”: “ACTIVE”,
    “campaigns”: null
  }

List of promotional features

Via GET /sale/loyalty/promotions you will retrieve information about your deals. You must be logged in as an Allegro user.


Note! You can filter data by offer id and promotion type:

  • BUNDLE - promotional sets of offers,

  • MULTIPACK - quantitative discounts on a single offer,

  • CROSSMULTIPACK - quantitative discounts on many offers.

Sample calls:


Remember! Even if you set the limit and offset parameters, the maximum number of promotional features that we will return is 50000. If you have created more promotional features on your account, use the filter: promotion type or offer id to retrieve the complete list.


Sample request:

  curl -X GET
  ‘https://api.allegro.pl/sale/loyalty/promotions'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  {
    “promotions”: [
        {
            “id”: “1ec57865-7e15-46f2-b70a-27ea857dd21c”,   – discount ID, use it in GET and
                                                            DELETE resources as {promotionId}
            “createdAt”: “2018-10-08T09:28:28.951Z”,
            “benefits”: [
                {
                    “specification”: {
                        “configuration”: {
                            “percentage”: “30”
                        },
                        “trigger”: {
                            “forEachQuantity”: 3,
                            “discountedNumber”: 1
                        },
                        “type”: “UNIT_PERCENTAGE_DISCOUNT”
                    }
                }
            ],
            “offerCriteria”: [
                {
                    “offers”: [
                        {
                            “id”: “6205628150”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205628489”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205628150”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205628082”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205628361”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        }]
                    “type”: “CONTAINS_OFFERS”
                }
            ],
            “status”: “ACTIVE”,
            “campaigns”: null
        }
        {
            “id”: “3329980c-e0d4-11e8-9f32-f2801f1b9fd1”,
            “createdAt”: “2018-10-08T08:28:28.951Z”,
            “benefits”: [
                {
                    “specification”: {
                        “configuration”: {
                            “percentage”: “50”
                        },
                        “trigger”: {
                            “forEachQuantity”: 3,
                            “discountedNumber”: 1
                        },
                        “type”: “UNIT_PERCENTAGE_DISCOUNT”
                    }
                }
            ],
            “offerCriteria”: [
                {
                    “offers”: [
                        {
                            “id”: “6205628154”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205627489”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205626150”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205628762”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        },
                        {
                            “id”: “6205628337”,
                            “quantity”: null,
                            “promotionEntryPoint”: null
                        }]
                    “type”: “CONTAINS_OFFERS”
                }
            ],
            “status”: “ACTIVE”,
            “campaigns”: null
        }
    ],
    “totalCount”: 2
  }

Information about an quantitative discount

Via GET /sale/loyalty/promotions/{promotionId} you will retrieve information about a quantitative discount within one {promotionId}. You must be logged in as a seller who added the deal.


Sample request:

  curl -X GET
  ‘https://api.allegro.pl/sale/loyalty/promotions/{promotionId}'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  {
    “id”: “1ec57865-7e15-46f2-b70a-27ea857dd21c”,       – discount ID, use it in GET and
                                                        DELETE resources as {promotionId}
    “createdAt”: “2018-10-08T09:28:28.951Z”,
    “benefits”: [
        {
            “specification”: {
                “configuration”: {
                    “percentage”: “30”
                },
                “trigger”: {
                    “forEachQuantity”: 3,
                    “discountedNumber”: 1
                },
                “type”: “UNIT_PERCENTAGE_DISCOUNT”
            }
        }
    ],
    “offerCriteria”: [
        {
            “offers”: [
                {
                    “id”: “6205628150”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                },
                {
                    “id”: “6205628489”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                },
                {
                    “id”: “6205628150”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                },
                {
                    “id”: “6205628082”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                },
                {
                    “id”: “6205628361”,
                    “quantity”: null,
                    “promotionEntryPoint”: null
                }]
            “type”: “CONTAINS_OFFERS”
        }
    ],
    “status”: “ACTIVE”,
    “campaigns”: null
  }

Remove an quantitative discount

Via DELETE /sale/loyalty/promotions/{promotionId} you will remove a particular deal. To do so, you must be logged in as a seller.


Sample request:

  curl -X DELETE
  ‘https://api.allegro.pl/sale/loyalty/promotions/{promotionId}'
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  status 204 No Content

4. Promotional sets of offers

We have introduced of new promotional features. Sellers can offer a set of various items at a reduced price. More information about that you can find here.

To support promotional sets of offers, we have added new resources to Allegro REST API:

Create new promotional set of offers

Via POST /sale/loyalty/promotions you will add a new promotional features as a logged-in seller..

NOTE!

  • You need at least 2 offers to create a promotional feature.

  • One promotional feature cannot contain more than 9 offers.

  • One offer can be added to 7 different promotional features.


Sample request:

  curl -X POST
  ‘https://api.allegro.pl/sale/loyalty/promotions'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
  -H ‘Authorization: Bearer {token}’ 
  -d ‘{
    “benefits”: [{                              – required, describes bonuses for a buyery
        “specification”: {
            “type”: “ORDER_FIXED_DISCOUNT”,     – required, at present only one
                                                ORDER_FIXED_DISCOUNT value is available
                                                a promotional features discount. (We will
                                                use this value to calculate the
                                                promotional features price.)
            “value”: {                          – required, provide a promotional features
                                                discount. We will use this value to
                                                calculate the promotional features price.
                “amount”: “10”,
                “currency”: “PLN”
            }
        }
    }],
    “offerCriteria”: [{                         – required, an array of offers in a
                                                promotional features
        “type”: “CONTAINS_OFFERS”,              – required, at present only one
                                                CONTAINS_OFFERS value is available
                                                (offers included in a promotional features)
        “offers”: [{                            – required, offers included in a
                                                promotional features
            “id”: “6966354299”,                 – required, offer ID
            “quantity”: 2,                      – required, a number of items of a given
                                                offer in a promotional features
            “promotionEntryPoint”: true         – required, define whether promotional
                                                features should should be displayed on a page
        }, {
            “id”: “6966344380”,
            “quantity”: 1,
            “promotionEntryPoint”: false
        }]
    }]
  }’


Sample response:

  {
    “id”: “02fe997e-9973-419a-b8ea-a409222e27a5”,   – promotional features ID. Use in resources
                                                    GET, PUT and DELETE - as {promotionId}
    “createdAt”: “2017-10-18T14:03:05.807Z”,
    “benefits”: [{
        “specification”: {
            “type”: “ORDER_FIXED_DISCOUNT”,
            “value”: {
                “amount”: “10”,
                “currency”: “PLN”
            }
        }
    }],
    “offerCriteria”: [{
        “type”: “CONTAINS_OFFERS”,
        “offers”: [{
            “id”: “6966354299”,
            “quantity”: 2,
            “promotionEntryPoint”: true
        }, {
            “id”: “6966344380”,
            “quantity”: 1,
            “promotionEntryPoint”: false
        }]
    }],
    “status”: “ACTIVE”
  }

List of promotional features

Via GET /sale/loyalty/promotions you will retrieve information about your promotional feature. You must be logged in as an Allegro user.


Note! You can filter data by offer id and promotion type:

  • BUNDLE - promotional sets of offers,

  • MULTIPACK - quantitative discounts on a single offer,

  • CROSSMULTIPACK - quantitative discounts on many offers.

Sample calls:

Remember! Even if you set the limit and offset parameters, the maximum number of promotional features that we will return is 50000. If you have created more promotional features on your account, use the filter: promotion type or offer id to retrieve the complete list.


Sample request:

  curl -X GET
  ‘https://api.allegro.pl/sale/loyalty/promotions'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  {
    “promotions”: [
        {
            “id”: “02fe997e-9973-419a-b8ea-a409222e27a5”,
            “createdAt”: “2017-10-18T14:03:05.807Z”,
            “benefits”: [
                {
                    “specification”: {
                        “value”: {
                            “amount”: “10”,
                            “currency”: “PLN”
                        },
                        “type”: “ORDER_FIXED_DISCOUNT”
                    }
                }
            ],
            “offerCriteria”: [
                {
                    “offers”: [
                        {
                            “id”: “6966354299”,
                            “quantity”: 2,
                            “promotionEntryPoint”: true
                        },
                        {
                            “id”: “6966344380”,
                            “quantity”: 1,
                            “promotionEntryPoint”: false
                        }
                    ],
                    “type”: “CONTAINS_OFFERS”
                }
            ],
            “status”: “ACTIVE”
        }
    ],
    “totalCount”: 1
  }

Information about a promotional set of offers

Via GET /sale/loyalty/promotions/{promotionId} you will retrieve information about a quantitative discount within one {promotionId}. You must be logged in as a seller who added the deal.


Sample request:

  curl -X GET
  ‘https://api.allegro.pl/sale/loyalty/promotions/{promotionId}'
  -H ‘Accept: application/vnd.allegro.public.v1+json’   
  -H ‘Authorization: Bearer {token}’


Sample response:

  {
    “id”: “02fe997e-9973-419a-b8ea-a409222e27a5”,
    “createdAt”: “2017-10-18T14:03:05.807Z”,
    “benefits”: [
        {
            “specification”: {
                “value”: {
                    “amount”: “10”,
                    “currency”: “PLN”
                },
                “type”: “ORDER_FIXED_DISCOUNT”
            }
        }
    ],
    “offerCriteria”: [
        {
            “offers”: [
                {
                    “id”: “6966354299”,
                    “quantity”: 2,
                    “promotionEntryPoint”: true
                },
                {
                    “id”: “6966344380”,
                    “quantity”: 1,
                    “promotionEntryPoint”: false
                }
            ],
            “type”: “CONTAINS_OFFERS”
        }
    ],
    “status”: “ACTIVE”
  }

Remove a promotional set of offers

Via DELETE /sale/loyalty/promotions/{promotionId} you will remove a particular promotional feature. To do so, you must be logged in as a seller.


Sample request:

  curl -X DELETE
  ‘https://api.allegro.pl/sale/loyalty/promotions/{promotionId}'
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’ 


Sample response:

  status 204 No Content

5. Badges on a list of offers

We have introduced new resources for handling and managing paid new special badges for quantity discounts on one offer.

Assigning a paid quantitative discount badge displayed on a list of offers to an offer:


campaign

Submit an application

Use POST /sale/loyalty/promotion-campaigns to submit an application for assigning a paid quantitative discount badge to an offer. Log to the seller account.


Sample request:

  curl -X POST 
  ‘https://api.allegro.pl/sale/loyalty/promotion-campaigns'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
  -H ‘Authorization: Bearer {token}’ 
  -d ‘{
        “promotion”:{
                “id”: “5ea1b1b1-8c7a-469f-a71e-526b38e9b48b”
                                                – ID of the quantitative discount;
                                                you can provide only one.
                                                Retrieve it by calling:
                                                GET na zasobie /sale/loyalty/promotions
        },
        “campaign”: {
                “id”: “LISTING_BADGE”           – type of a paid badge displayed
                                                on a list of offers; only one
                                                value is supported
        }
  }’


Sample response:

  {
    “link”: “/sale/loyalty/promotion-campaign-applications/f40e3832-4928-49f3-9b32-c6eb953a5110”,
                                                – link to resources for
                                                checking the application status
    “promotion”: {
        “id”: “5ea1b1b1-8c7a-469f-a71e-526b38e9b48b”
                                                – ID of a quantitative discount;
                                                retrieve it by calling:
                                                GET na zasobie /sale/loyalty/promotions
    },
    “campaign”: {
        “id”: “LISTING_BADGE”
    },
    “status”: “REQUESTED”                       – sresponse status; three values are
                                                supported:  REQUESTED (submitted),
                                                VERIFICATION (verification in progress),
                                                DECLINED (rejected).
  }

Check application status

Use GET /sale/loyalty/promotion-campaign-applications/{applicationId} to check the status of the application for assigning a paid quantitative discount badge. Log to the seller account.


Sample request:

  curl -X GET 
  ‘https://api.allegro.pl/sale/loyalty/promotion-campaign-applications/{applicationId}'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  {
    “link”: “/sale/loyalty/promotion-campaign-applications/f40e3832-4928-49f3-9b32-c6eb953a5110”,
                                                – link to resources for checking
                                                the application status
    “promotion”: {
        “id”: “5ea1b1b1-8c7a-469f-a71e-526b38e9b48b”
                                            – ID of a quantitative discount;
                                            Retrieve it by calling:
                                            GET na zasobie /sale/loyalty/promotions
    },
    “campaign”: {
        “id”: “LISTING_BADGE”
    },
    “status”: “VERIFICATION”                – response status; three values are
                                            supported:  REQUESTED (submitted),
                                            VERIFICATION (verification in progress),
                                            DECLINED (rejected).
 }


f the application is approved, we will return 303 status response with an additional header:

  Location: /sale/loyalty/promotion-campaigns?promotion.id=5ea1b1b1-8c7a-469f-a71e-526b38e9b48b
                                            – use this information to retrieve information
                                            on an active promotional campaign by calling
                                            GET /sale/loyalty/promotion-campaigns?promotion.id={promotionId}


In the event that you call DELETE:

    404 Not Found

Information about promotional campaigns

Use GET /sale/loyalty/promotion-campaigns to retrieve information on all campaigns. Log to the seller account. You can also retrieve the list of campaigns in adjusted batches using the following parameters:

  • limit - define a number of campaigns to be returned (50 by default)

  • offset - define a starting point for retrieving another batch of data (0 or the multiplied limit value).


Sample request:

  curl -X GET 
  ‘https://api.allegro.pl/sale/loyalty/promotion-campaigns'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  {
    “promotionCampaigns”: [{
        “promotion”: {
            “id”: “5ea1b1b1-8c7a-469f-a71e-526b38e9b48b”
                                            – ID of a quantitative discount;
                                            retrieve it by calling:
                                            GET na zasobie /sale/loyalty/promotions
        },
        “campaign”: {
            “id”: “LISTING_BADGE”
        },
        “status”: “ACTIVE”                  – campaign status; three values are supported:
                                            ACTIVE (campaign is active), PENDING (campaign
                                            is accepted and is waiting to be activated)
                                            SUSPENDED (the discount has been suspended
                                            because of suspending discount campaign e.g.
                                            due to shrinking stock. Once the stock is
                                            replenished, the campaign is resumed automatically)
    },
    {
        “promotion”: {
            “id”: “9f193c6e-de79-11e8-9f32-f2801f1b9fd1”
        },
        “campaign”: {
            “id”: “LISTING_BADGE”
        },
        “status”: “ACTIVE”
    }],
    “totalCount”: 2
    }

Information about single campaign

Use GET /sale/loyalty/promotion-campaigns?promotion.id={promotionId} to retrieve information on an active campaign. Log to the seller account.


Sample request:

  curl -X GET 
  ‘https://api.allegro.pl/sale/loyalty/promotion-campaigns?promotion.id={promotionId}'
  -H ‘Accept: application/vnd.allegro.public.v1+json’ 
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’  
  -H ‘Authorization: Bearer {token}’


Sample response:

  {
    “promotionCampaigns”: [{
        “promotion”: {
            “id”: “5ea1b1b1-8c7a-469f-a71e-526b38e9b48b”
                                            – ID of a quantitative discount;
                                            retrieve it by calling:
                                            GET na zasobie /sale/loyalty/promotions
        },
        “campaign”: {
            “id”: “LISTING_BADGE”
        },
        “status”: “ACTIVE”                  – campaign status; three values are supported:
                                            ACTIVE (campaign is active), PENDING (campaign
                                            is accepted and is waiting to be activated)
                                            SUSPENDED (the discount has been suspended
                                            because of suspending discount campaign e.g.
                                            due to not enough items on sale. Once the stock
                                            is replenished, the campaign is resumed automatically)
    }],
    “totalCount”: 1
  }

Delete an application

Use DELETE /sale/loyalty/promotion-campaign-applications/{applicationId} to remove an application for creating a promotional campaign. Log to the seller account.


Sample request:

  curl -X DELETE
  ‘https://api.allegro.pl/sale/loyalty/promotion-campaign-applications/{applicationId}'
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  status 204 No Content

Remove a promotional campaign

Use DELETE /sale/loyalty/promotion-campaigns?promotion.id={promotionId} to remove a promotional campaign. Log to the seller account


Sample request:

  curl -X DELETE
  ‘https://api.allegro.pl/sale/loyalty/promotion-campaigns?promotion.id={promotionId}'
  -H ‘Content-Type: application/vnd.allegro.public.v1+json’ 
  -H ‘Authorization: Bearer {token}’


Sample response:

  status 204 No Content

List of resources

You will find full documentation of resources in the swagger.yaml form file here.

List of basic resources used in tutorial:

List of supporting resources used in tutorial: