allegro / allegro/allegro-api

[NEWS] Zamówienia - zmiany wspierające obsługę bonów dla konkretnego przedmiotu / Orders - we have introduced new fields to handle vouchers for a specific item

Offen
#7,773 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @AureliuszBrussy Auf GitHub ansehen
News
Vorherrschende Sprache
Keine Sprachdaten
Sterne
244
Forks
40
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Wdrożyliśmy możliwość dodawania bonów do konkretnych przedmiotów w procesie zakupowym, dzięki czemu kupujący będzie mógł skorzystać z akcji ["Bon 2500 zł na laptopa dla nauczycieli"](https://allegro.pl/kampania/bon-na-laptop-dla-nauczyciela-dofinansowanie), a w przyszłości również z innych. Do obsługi takich zamówień konieczne są zmiany w API, dlatego wprowadziliśmy zmiany w:

- [GET /order/checkout-forms](https://developer.allegro.pl/documentation#operation/getListOfOrdersUsingGET) - lista zamówień,
- [GET /order/checkout-forms/{id}](https://developer.allegro.pl/documentation#operation/getOrdersDetailsUsingGET) - szczegóły zamówienia.

**Co zmieniliśmy?**

Do tablicy obiektów **"lineItems[]"** dodaliśmy tablicę **"vouchers[]"**:

```json5
...
"lineItems": [
...
"vouchers": [
{
"code": "Code12345",
"type": "NOTEBOOKS_FOR_TEACHERS",
"status": "ACTIVE",
"externalTransactionId": "sampleExternalTransactionId",
"value": {
"amount": "123.45",
"currency": "PLN"
}
}
]
...
]
...
```

gdzie zwrócimy:

- **kod bonu**, który użył kupujący,
- **rodzaj bonu** - w tej chwili dostępna jest tylko jedna wartość "NOTEBOOKS_FOR_TEACHERS" - [akcja dofinansowania 2500zł na laptop dla nauczycieli](https://www.gov.pl/web/edukacja-i-nauka/laptopy-dla-czwartoklasistow-i-bony-dla-nauczycieli),
- **status** - dostępne wartości:
- “ACTIVE” - aktywny, gotowy do użycia,
- ”CANCELLED” - anulowany, wyłączony z użycia,
- **externalTransactionId** - zewnętrzny identyfikator transakcji dla bonu, pozwalający w jednoznaczny sposób zidentyfikować wykorzystanie bonu. Wartość może różnić się w zależności od statusu.
- obiekt **value** - całkowita wartość wykorzystanego bonu.

Jeśli nie dostosujesz swojej aplikacji, sprzedający, którzy będą brać udział w akcji nie otrzymają, z poziomu Twojej aplikacji, kodu potrzebnego do rozliczenia bonu.
______________________
We have implemented the possibility to add vouchers to specific items in the purchase process, so that the buyer will be able to take advantage of the ["PLN 2,500 voucher for a laptop for teachers"](https://allegro.pl/kampania/bon-na-laptop-dla-nauczyciela-dofinansowanie) action, and others in the future. Changes to the API are required to handle such orders, so we introduced changes to:

* [GET /order/checkout-forms](https://developer.allegro.pl/documentation#operation/getListOfOrdersUsingGET) - order list,
* [GET /order/checkout-forms/{id}](https://developer.allegro.pl/documentation#operation/getOrdersDetailsUsingGET) - order details.

**What did we change?**

We added an **"vouchers[]"** array to the existing **"lineItems[]"** objects:

```json5
...
"lineItems": [
...
"vouchers": [
{
"code": "Code12345",
"type": "NOTEBOOKS_FOR_TEACHERS",
"status": "ACTIVE",
"externalTransactionId": "sampleExternalTransactionId",
"value": {
"amount": "123.45",
"currency": "PLN"
}
}
]
...
]
...
```

where we return:
- the voucher **code** that the buyer used,
- the **type** of voucher - at the moment there is only one value available "NOTEBOOKS_FOR_TEACHERS" - [2,500zl subsidy action for a laptop for teachers](https://www.gov.pl/web/edukacja-i-nauka/laptopy-dla-czwartoklasistow-i-bony-dla-nauczycieli),
- **status** - available values:
- "ACTIVE" - active, ready to use,
- "CANCELLED" - cancelled, disabled from use,
- **externalTransactionId** - external transaction identifier for the voucher to uniquely identify the consumption of the voucher. The value may vary depending on the status.
- **value** object - the total value of the used voucher.

If you do not adjust your application, the sellers who participate in the action will not receive, from your application, the code needed to settle the voucher.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.