[NEWS] Rabat na duże zamówienie dla transakcji B2B / Large order discount for B2B transactions
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 244
- Forks
- 40
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Od dziś dodasz rabat na duże zamówienie do swoich ofert. Dzięki niemu zaoferujesz kupującym rabat podczas transakcji B2B (firma - firma). Aby dodać rabat, skorzystaj z [POST /sale/loyalty/promotions](https://developer.allegro.pl/documentation/#operation/createPromotionUsingPOST_1) i określ progi wartościowe pojedynczego zamówienia oraz przypadający dla nich rabat procentowy. Rabatem zostaną objęte wszystkie twoje oferty.
**Przykładowy 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", -- typ promocji (lista dostępnych wartości
znajduje się w dokumentacji zasobu)
"thresholds": [ -- progi rabatowe
{
"orderValue": {
"lowerBound": {
"amount": "1000.00", -- wartość zamówienia
"currency": "PLN"
}
},
"discount": {
"percentage": "5" -- wysokość rabatu (%)
}
},
{
"orderValue": {
"lowerBound": {
"amount": "1500.00",
"currency": "PLN"
}
},
"discount": {
"percentage": "8"
}
}
]
}
}
],
"offerCriteria": [
{
"type": "ALL_OFFERS" -- rabatem zostaną
} objęte wszystkie oferty
]
}'
```
W odpowiedzi otrzymasz identyfikator utworzonego rabatu.
**Przykładowy response:**
```
{
"id": "ba01f101-c9ef-4e5d-a88f-efb721bdbb9a", -- identyfikator rabatu
"createdAt": "2020-10-27T06:31:29.36Z", -- data utworzenia
"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"
}
```
Więcej informacji o rabacie na duże zamówienie i zasobach do zarządzania nim znajdziesz w [naszym poradniku](https://developer.allegro.pl/offer_bundles/#40).
-----
From today you can add a large order discount to your offers. Thanks to it, you will offer a discount for buyers during B2B transactions (company - company). To create a large order discount, please use [POST /sale/loyalty/promotions](https://developer.allegro.pl/documentation/#operation/createPromotionUsingPOST_1) and define the single order value thresholds and percentage discount for them. Large order discount will be applied to all of your offers.
**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"
}
```
You will find more information about large order discount and resources to manage it in [our tutorial](https://developer.allegro.pl/en/offer_bundles/#40).
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.