allegro / allegro/allegro-api

[NEWS] Dodaj numer przesyłki w uproszczony sposób / Add a tracking number easier

オープン
#3,869 コメント 0 件 リアクション 0 件 担当者 1 名 @MaciejFrackowiak が担当を希望しています GitHub で見る
News
主要言語
言語のデータがありません
スター
244
フォーク
40
PR マージ指標
30日以内にマージされた PR はありません

説明

Od dzisiaj łatwiej dodasz numer przesyłki do zamówienia. Już nie musisz podawać kolejnych lineItems.id wchodzących w skład zamówienia. Wystarczy, że skorzystasz z [POST /order/checkout-forms/{id}/shipments](https://developer.allegro.pl/documentation/#operation/createOrderShipmentsUsingPOST) i przekażesz w żądaniu wymagane wartości (carrierId oraz waybill), a my przypiszemy numer przesyłki do każdego lineItem.id z zamówienia.

**Przykładowy request:**
```
curl -X POST \
https://api.allegro.pl/order/checkout-forms/31896452-2de1-11e9-bced-352ab82ad9cd/shipments \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/vnd.allegro.public.v1+json' \
-H 'Accept: application/vnd.allegro.public.v1+json' \
-d '{
"waybill": "12345678910PL",
"carrierId": "DHL"
}’
```

**Przykładowy response:**
```
{
"waybill": "12345678910PL",
"carrierId": "DHL",
"lineItems": [
{
"id": "31896450-2de1-11e9-bced-352ab82ad9cd"
},
{
"id": "5b1f4a62-6969-11e8-b090-8b2d9f391430"
}
],
"createdAt": "2020-10-27T11:46:48.264Z",
"id": "REhMOjEyMzQ1Njc4OTEwUEw="
}
```
-----
From today you can add a tracking number more easily. You no longer need to enter the next lineItems.id included in the order. Use [POST /order/checkout-forms/{id}/shipments](https://developer.allegro.pl/documentation/#operation/createOrderShipmentsUsingPOST) and send in a request only required values (carrierId and waybill) - we will assign a tracking number to each lineItem.id from your order.

**Sample request:**
```
curl -X POST \
https://api.allegro.pl/order/checkout-forms/31896452-2de1-11e9-bced-352ab82ad9cd/shipments \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/vnd.allegro.public.v1+json' \
-H 'Accept: application/vnd.allegro.public.v1+json' \
-d '{
"waybill": "12345678910PL",
"carrierId": "DHL"
}’
```

**Sample response:**
```
{
"waybill": "12345678910PL",
"carrierId": "DHL",
"lineItems": [
{
"id": "31896450-2de1-11e9-bced-352ab82ad9cd"
},
{
"id": "5b1f4a62-6969-11e8-b090-8b2d9f391430"
}
],
"createdAt": "2020-10-27T11:46:48.264Z",
"id": "REhMOjEyMzQ1Njc4OTEwUEw="
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。