- Created by anagorski, last modified by Paweł Milewski on Jul 01, 2022
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 23 Next »
Obiekt przesyłki wykorzystywany jest do uzyskania dostępnych ofert, a jednocześnie reprezentuje ona fizyczną paczkę (lub paczki), która będzie przesłana pomiędzy określonymi adresami.
Na tej stronie
Tworzenie przesyłki w trybie uproszczonym
Aby utworzyć przesyłkę w ramach określonej organizacji, użytkownik musi być jej członkiem.
Klienci debetowi
Po utworzeniu przesyłki nie zwracamy cen dla klientów debetowych. Atrybut rate
przyjmuje wartość null
Działanie asynchroniczne
Po utworzeniu przesyłki zostanie uruchomiony asynchroniczny proces przygotowywania ofert, manifestacji oraz kupienia oferty.
POST /v1/organizations/:organization_id/shipments
Parametry
Wszystkie poniższe parametry powinny być zawarte w obiekcie shipment
.
Parametr | Typ | Opis | Walidacja |
---|---|---|---|
| Receiver | Dane odbiorcy paczki | Atrybut jest wymagany.
|
| Sender | Dane nadawcy paczki. | Atrybut nie jest wymagany.
|
| Array[ParcelsSimple] | Dane paczek zawartych w przesyłce. | Atrybut jest wymagany.
|
| CustomAttributes | Dodatkowe atrybuty przesyłki, np.
| Atrybut nie jest wymagany.
|
| Cod | Wartość pobrania. | Atrybut nie jest wymagany.
|
| Insurance | Kwota ubezpieczenia przesyłki. | Atrybut nie jest wymagany.
|
| String | Dodatkowy opis przesyłki, np. numer zamówienia. | Atrybut nie jest wymagany.
|
| Bool | Określa przesyłkę jako zwrotną. | Atrybut nie jest wymagany.
|
| String | Wybrana przez klienta usługa. Dostępne wartości patrz [1.9.1] Rozmiary i usługi dla przesyłek . | Atrybut jest wymagany. |
| Array[String] | Usługi dodatkowe. Dostępne usługi dodatkowe: | Atrybut nie jest wymagany.
|
| String | Identyfikator broker'a generującego przesyłki w ramach innej organizacji. | Atrybut nie jest wymagany. |
| Bool | Ustawienie parametru na | Atrybut nie jest wymagany. |
| String | Nazwa miejsca powstania kosztów. | Atrybut nie jest wymagany.
Miejsce powstania kosztów musi najpierw być dodane do organizacji, aby można je było przypisać do przesyłki, [1.10.0] Miejsce powstania kosztów |
| String | Dowolny komentarz | Atrybut nie jest wymagany
|
Przykładowe zapytania
Pojedyncza paczka dla przesyłki kurierskiej:
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "street": "Cybernetyki", "building_number": "10", "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "parcels": [ { "id": "small package", "dimensions": { "length": "80", "width": "360", "height": "640", "unit": "mm" }, "weight": { "amount": "25", "unit": "kg" }, "is_non_standard": false } ], "insurance": { "amount": 25, "currency": "PLN" }, "cod": { "amount": 12.50, "currency": "PLN" }, "service": "inpost_courier_standard", "additional_services": ["email", "sms"], "reference": "Test", "comments": "dowolny komentarz", "external_customer_id": "8877xxx", "mpk": "Nazwa miejsca powstania kosztów" }'
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/1", "id": 1234567890, "status": "created", "tracking_number": null, "service": "inpost_courier_standard", "reference": "Test", "is_return": false, "application_id": 123, "created_by_id": null, "external_customer_id": "8877xxx", "sending_method": null, "mpk": { "id": 1, "name": "Nazwa miejsca powstania kosztów" }, "comments": "dowolny komentarz", "additional_services": [ "email", "sms" ], "custom_attributes": {}, "cod": { "amount": 12.5, "currency": "PLN" }, "insurance": { "amount": 25.0, "currency": "PLN" }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "id": 123, "street": "Malborska", "building_number": "130", "line1": null, "line2": null, "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": null, "dimensions": { "length": 80.0, "width": 360.0, "height": 640.0, "unit": "mm" }, "weight": { "amount": 25.0, "unit": "kg" } } ], "end_of_week_collection": false, "created_at": "2020-02-23T18:07:08.967+01:00", "updated_at": "2020-02-23T18:07:08.967+01:00" }
Zapytanie z wieloma paczkami (można tworzyć tylko dla inpost_courier)
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "street": "Cybernetyki", "building_number": "10", "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "parcels": [ { "id": "small package", "dimensions": { "length": "80", "width": "360", "height": "640", "unit": "mm" }, "weight": { "amount": "25", "unit": "kg" }, "is_non_standard": true }, { "id": "big package", "dimensions": { "length": "80", "width": "360", "height": "640", "unit": "mm" }, "weight": { "amount": "25", "unit": "kg" }, "is_non_standard": true } ], "insurance": { "amount": 25, "currency": "PLN" }, "cod": { "amount": 12.50, "currency": "PLN" }, "service": "inpost_courier_standard", "additional_services": ["email", "sms"], "reference": "Test", "comments": "dowolny komentarz", "external_customer_id": "8877xxx", "mpk": "Nazwa miejsca powstania kosztów" }'
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890", "id": 1234567890, "status": "created", "tracking_number": null, "service": "inpost_courier_standard", "reference": "Test", "is_return": false, "application_id": 123, "created_by_id": null, "external_customer_id": "8877xxx", "sending_method": null, "mpk": { "id": 1, "name": "Nazwa miejsca powstania kosztów" }, "comments": "dowolny komentarz", "additional_services": [ "email", "sms" ], "custom_attributes": {}, "cod": { "amount": 12.5, "currency": "PLN" }, "insurance": { "amount": 25.0, "currency": "PLN" }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "id": 509576837, "street": "Cybernetyki", "building_number": "10", "line1": null, "line2": null, "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": true, "template": null, "dimensions": { "length": 80.0, "width": 360.0, "height": 640.0, "unit": "mm" }, "weight": { "amount": 25.0, "unit": "kg" } }, { "id": 123, "tracking_number": null, "is_non_standard": true, "template": null, "dimensions": { "length": 80.0, "width": 360.0, "height": 640.0, "unit": "mm" }, "weight": { "amount": 25.0, "unit": "kg" } } ], "end_of_week_collection": false, "created_at": "2020-02-23T18:22:57.378+01:00", "updated_at": "2020-02-23T18:22:57.378+01:00" }
Przesyłka kurierska - InPost Kurier C2C (usługa dla klienta detalicznego - prepaid)
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "street": "Cybernetyki", "building_number": "10", "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "parcels": { "template": "small" }, "insurance": { "amount": 25, "currency": "PLN" }, "cod": { "amount": 12.50, "currency": "PLN" }, "custom_attributes": { "sending_method": "parcel_locker", "dropoff_point": "KRA012" }, "service": "inpost_courier_c2c", "reference": "Test" }
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/123", "id": 123, "status": "created", "tracking_number": null, "service": "inpost_courier_c2c", "reference": "Test", "is_return": false, "application_id": 25, "created_by_id": null, "external_customer_id": null, "sending_method": "parcel_locker", "end_of_week_collection": false, "comments": null, "mpk": null, "additional_services": [], "custom_attributes": { "dropoff_point": "KRA012", "sending_method": "parcel_locker" }, "cod": { "amount": 12.5, "currency": "PLN" }, "insurance": { "amount": 25.0, "currency": "PLN" }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "id": 123, "street": "Cybernetyki", "building_number": "10", "line1": null, "line2": null, "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": "small", "dimensions": { "length": 380.0, "width": 640.0, "height": 80.0, "unit": "mm" }, "weight": { "amount": 25.0, "unit": "kg" } } ], "created_at": "2021-12-13T12:32:57.987+01:00", "updated_at": "2021-12-13T12:32:57.987+01:00" }
Przesyłka kurierska Paleta Standard
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ { "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "street": "Cybernetyki", "building_number": "10", "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "parcels": { "dimensions": { "length": "800", "width": "800", "height": "800", "unit": "mm" }, "weight": { "amount": "50", "unit": "kg" } }, "service": "inpost_courier_palette", "additional_services": ["email", "sms"], "reference": "Test", "comments": "dowolny komentarz", "external_customer_id": "8877xxx", "mpk": "Nazwa miejsca powstania kosztów" }
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/123", "id": 123, "status": "created", "tracking_number": null, "service": "inpost_courier_palette", "reference": "Test", "is_return": false, "application_id": 25, "created_by_id": null, "external_customer_id": "8877xxx", "sending_method": null, "end_of_week_collection": false, "comments": "dowolny komentarz", "mpk": { "id": 1, "name": "Nazwa miejsca powstania kosztów" }, "additional_services": [ "email", "sms" ], "custom_attributes": {}, "cod": { "amount": null, "currency": null }, "insurance": { "amount": null, "currency": null }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "receiver@example.com", "phone": "888000000", "address": { "id": 123, "street": "Cybernetyki", "building_number": "10", "line1": null, "line2": null, "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": null, "dimensions": { "length": 800.0, "width": 800.0, "height": 800.0, "unit": "mm" }, "weight": { "amount": 50.0, "unit": "kg" } } ], "created_at": "2021-12-13T12:42:29.071+01:00", "updated_at": "2021-12-13T12:42:29.071+01:00" }
Przesyłka paczkomatowa standard
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "test@inpost.pl", "phone": "111222333" }, "parcels": { "template": "small" }, "insurance": { "amount": 25, "currency": "PLN" }, "cod": { "amount": 12.50, "currency": "PLN" }, "custom_attributes": { "sending_method": "dispatch_order", "target_point": "KRA012" }, "service": "inpost_locker_standard", "reference": "Test", "external_customer_id": "8877xxx" }'
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890", "id": 1234567890, "status": "created", "tracking_number": null, "service": "inpost_locker_standard", "reference": "Test", "is_return": false, "application_id": 123, "created_by_id": null, "external_customer_id": "8877xxx", "sending_method": "dispatch_order", "mpk": null, "comments": null, "additional_services": [], "custom_attributes": { "sending_method": "dispatch_order", "target_point": "KRA012" }, "cod": { "amount": 12.5, "currency": "PLN" }, "insurance": { "amount": 25.0, "currency": "PLN" }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "test@inpost.pl", "phone": "111222333", "address": null }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": "small", "dimensions": { "length": 380.0, "width": 640.0, "height": 80.0, "unit": "mm" }, "weight": { "amount": 25.0, "unit": "kg" } } ], "end_of_week_collection": false, "created_at": "2020-02-23T18:17:40.073+01:00", "updated_at": "2020-02-23T18:17:40.073+01:00" }
Przesyłka paczkomatowa - Podaj Dalej
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "test@inpost.pl", "phone": "111222333" }, "parcels": { "template": "large" }, "insurance": { "amount": 25, "currency": "PLN" }, "cod": { "amount": 12.50, "currency": "PLN" }, "custom_attributes": { "sending_method": "parcel_locker", "target_point": "KRA012", "dropoff_point":"KRA012" }, "service": "inpost_locker_pass_thru", "reference": "Test", "external_customer_id": "8877xxx" }
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/123", "id": 123, "status": "created", "tracking_number": null, "service": "inpost_locker_pass_thru", "reference": "Test", "is_return": false, "application_id": 25, "created_by_id": null, "external_customer_id": "8877xxx", "sending_method": "parcel_locker", "end_of_week_collection": false, "comments": null, "mpk": null, "additional_services": [], "custom_attributes": { "target_point": "KRA012", "dropoff_point": "KRA012", "sending_method": "parcel_locker" }, "cod": { "amount": 12.5, "currency": "PLN" }, "insurance": { "amount": 25.0, "currency": "PLN" }, "sender": { "id": 123, "name": null, "company_name": "ShpiX MM", "first_name": "Michał", "last_name": "Machowski", "email": "mmachowski@grupainteger.pl", "phone": "885887738", "address": { "id": 1011558443, "street": null, "building_number": null, "line1": "test", "line2": null, "city": "test", "post_code": "02-677", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "test@inpost.pl", "phone": "111222333", "address": null }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": "large", "dimensions": { "length": 380.0, "width": 640.0, "height": 410.0, "unit": "mm" }, "weight": { "amount": 25.0, "unit": "kg" } } ], "created_at": "2021-12-13T12:49:48.159+01:00", "updated_at": "2021-12-13T12:49:48.159+01:00" }
Przesyłka Allegro Paczkomaty24/7 InPost
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "123abc+123abc@user.allegrogroup.pl", "phone": "111222333" }, "parcels": { "template": "small" }, "custom_attributes": { "target_point": "KRA012", "sending_method": "dispatch_order" }, "service": "inpost_locker_allegro" }'
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890", "id": 1234567890, "status": "created", "tracking_number": null, "service": "inpost_locker_allegro", "reference": null, "is_return": false, "application_id": 123, "created_by_id": null, "external_customer_id": null, "sending_method": "dispatch_order", "mpk": null, "comments": null, "additional_services": [], "custom_attributes": { "sending_method": "dispatch_order", "target_point": "KRA012" }, "cod": { "amount": null, "currency": null }, "insurance": { "amount": 5000, "currency": "PLN" }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "123abc+123abc@user.allegrogroup.pl", "phone": "111222333", "address": null }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": "small", "dimensions": { "length": 380.0, "width": 640.0, "height": 80.0, "unit": "mm" }, "weight": { "amount": 10.0, "unit": "kg" } } ], "end_of_week_collection": false, "created_at": "2020-02-23T18:52:25.100+01:00", "updated_at": "2020-02-23T18:52:25.100+01:00" }
Przesyłka Allegro miniKurier24 InPost
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "123abc+123abc@user.allegrogroup.pl", "phone": "888000000", "address": { "street": "Cybernetyki", "building_number": "10", "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "parcels": { "template": "letter_a" }, "custom_attributes": { "sending_method": "dispatch_order" }, "service": "inpost_letter_allegro" }'
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890", "id": 1234567890 "status": "created", "tracking_number": null, "service": "inpost_letter_allegro", "reference": null, "is_return": false, "application_id": 123, "created_by_id": null, "external_customer_id": null, "sending_method": "dispatch_order", "mpk": null, "comments": null, "additional_services": [], "custom_attributes": { "sending_method": "dispatch_order" }, "cod": { "amount": null, "currency": null }, "insurance": { "amount": 5000, "currency": "PLN" }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "123abc+123abc@user.allegrogroup.pl", "phone": "888000000", "address": { "id": 123, "street": "Cybernetyki", "building_number": "10", "line1": null, "line2": null, "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": "letter_a", "dimensions": { "length": 380.0, "width": 640.0, "height": 80.0, "unit": "mm" }, "weight": { "amount": 10.0, "unit": "kg" } } ], "end_of_week_collection": false, "created_at": "2020-02-23T19:24:51.120+01:00", "updated_at": "2020-02-23T19:24:51.120+01:00" }
Przesyłka Allegro Kurier24 InPost:
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "receiver": { "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "gtcc1rh559+4fe361dc5@user.allegrogroup.pl", "phone": "888000000", "address": { "street": "Cybernetyki", "building_number": "10", "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "parcels": { "dimensions": { "length": "10", "width": "10", "height": "10", "unit": "mm" }, "weight": { "amount": "10", "unit": "kg" } }, "cod": { "amount": 12.50, "currency": "PLN" }, "custom_attributes": { "sending_method": "dispatch_order" }, "service": "inpost_courier_allegro" }'
Odpowiedź
HTTP/1.1 201 CREATED Content-Type: application/json { "href": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890", "id": 1234567890, "status": "created", "tracking_number": null, "service": "inpost_courier_allegro", "reference": null, "is_return": false, "application_id": 123, "created_by_id": null, "external_customer_id": null, "sending_method": "dispatch_order", "mpk": null, "comments": null, "additional_services": [], "custom_attributes": { "sending_method": "dispatch_order" }, "cod": { "amount": 12.5, "currency": "PLN" }, "insurance": { "amount": 5000, "currency": "PLN" }, "sender": { "id": "123", "name": "Nazwa", "company_name": "InPost S.A.", "first_name": "Jan", "last_name": "Nowak", "email": "sender@email.com", "phone": "888000000", "address": { "id": "123", "street": "Malborska", "building_number": "130", "line1": null, "line2": null "city": "Kraków", "post_code": "30-624", "country_code": "PL" } }, "receiver": { "id": 123, "name": "Name", "company_name": "Company name", "first_name": "Jan", "last_name": "Kowalski", "email": "123abc+123abc@user.allegrogroup.pl", "phone": "888000000", "address": { "id": 123, "street": "Cybernetyki", "building_number": "10", "line1": null, "line2": null, "city": "Warszawa", "post_code": "02-677", "country_code": "PL" } }, "selected_offer": null, "offers": [], "transactions": [], "parcels": [ { "id": 123, "tracking_number": null, "is_non_standard": false, "template": null, "dimensions": { "length": 10.0, "width": 10.0, "height": 10.0, "unit": "mm" }, "weight": { "amount": 10.0, "unit": "kg" } } ], "end_of_week_collection": false, "created_at": "2020-02-23T19:09:25.712+01:00", "updated_at": "2020-02-23T19:09:25.712+01:00" }
Informacje o błędach
Błędy, jakie mogą wystąpić podczas tworzenia przesyłki (poniższe błędy są wysyłane do aplikacji która wysłała żądanie, nie na webhook):
validation_failed
- przesyłane parametry są niepoprawne. Szczegóły zawarte w poludetails
,resource_not_found
- w przypadku gdy użytkownik próbuje utworzyć przesyłkę dla organizacji, która nie istnieje lub nie ma uprawnień do jej utworzenia,no_carriers
- w przypadku gdy organizacja nie ma podpisanej umowy z żadnym przewoźnikiem,carrier_unavailable
- w przypadku gdy organizacja nie ma podpisanej umowy z przewoźnikiem świadczącym wybraną usługę wskazaną w atrybucieservice
- No labels