[1.23.0] Shipment creation in simplified mode
Warning!
Resource available only in the following countries: PL, IT
On this page
- 1 Authentication
- 2 Shipment creation in simplified mode
- 3 Example requests
- 3.1 Single parcel for courier delivery
- 3.2 Single parcel shipment and courier service on IT instance
- 3.3 Query with multiple packages (can only be created for inpost_courier)
- 3.4 Courier service - InPost Courier C2C (service for retail customer - prepaid)
- 3.5 Courier service Standard pallet
- 3.6 Parcel locker standard
- 3.7 Parcel locker - Pass-Thru
- 3.8 Shipment Allegro Paczkomat® 24/7 InPost
- 3.9 Shipment Allegro miniKurier24 InPost
- 3.10 Shipment Allegro Kurier24 InPost
- 4 Error information
Shipment creation in simplified mode
In order to create a shipment within an organization the user has to be its member.
Warning! Debit clients!
After creating a shipment we do not return prices for debit clients. The rate
attribute is null
POST /v1/organizations/:organization_id/shipments
Parameters
All the following attributes should be included in the shipment
object.
Parameter | Type | Description | Validation | Availability |
---|---|---|---|---|
| Receiver | Receiver details | The attribute is required.
| PL, IT |
| Sender | Sender details. | The attribute is optional.
| PL, IT |
| Array[ParcelsSimple] | Details of parcels in the shipment. | The attribute is required.
| PL, IT |
| CustomAttributes | Additional shipment attributes, e.g.
| The attribute is optional.
| PL, IT |
| Cod | Cash collection amount. | The attribute is optional.
| PL |
| Insurance | Shipment insurance amount. | The attribute is optional.
| PL, IT |
| String | Additional shipment description, e.g. order number. | The attribute is optional.
| PL, IT |
| Bool | Determines whether the shipment is a return shipment. | The attribute is optional.
| PL, IT |
| String | Selected service. Available services: https://dokumentacja-inpost.atlassian.net/wiki/spaces/PL/pages/28639264 | The attribute is required. | PL, IT |
| Array[String] | Additional services. Available additional services: https://dokumentacja-inpost.atlassian.net/wiki/spaces/PL/pages/28639264 | The attribute is optional.
| PL, IT |
| String | ID of the broker generating shipments within a different organization. | The attribute is optional. | PL, IT |
| Bool | Setting the parameter to | The attribute is optional.
| PL, IT |
| String | Name of cost center. | The attribute is optional.
The cost center must first be added to the organization in order to assign it to the shipment. | PL, IT |
| String | Any comment | The attribute is optional.
| PL, IT |
Example requests
Single parcel for courier delivery
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"
}'
Response
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"
}
Single parcel shipment and courier service on IT instance
Response
Query with multiple packages (can only be created for inpost_courier)
Response
Courier service - InPost Courier C2C (service for retail customer - prepaid)
Response
Courier service Standard pallet
Response
Parcel locker standard
Response
Parcel locker - Pass-Thru
Response
Shipment Allegro Paczkomat® 24/7 InPost
Response
Shipment Allegro miniKurier24 InPost
Response
Shipment Allegro Kurier24 InPost
Response