Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Table of Contents

Uwierzytelnianie

Dostęp do zasobu wymaga podania prawidłowego i ważnego access tokenu.



Tworzenie przesyłki w trybie uproszczonym 

Info

Aby utworzyć przesyłkę w ramach określonej organizacji, użytkownik musi być jej członkiem.

Note

Klienci debetowi

Po utworzeniu przesyłki nie zwracamy cen dla klientów debetowych. Atrybut rate przyjmuje wartość null

Note

Działanie asynchroniczne

Po utworzeniu przesyłki zostanie uruchomiony asynchroniczny proces przygotowywania ofert, manifestacji oraz kupienia oferty.

Code Block
languagejson
POST /v1/organizations/:organization_id/shipments

Parametry

Wszystkie poniższe parametry powinny być zawarte w obiekcie shipment.

Parametr

Typ

Opis

Walidacja

receiver

Receiver

Dane odbiorcy paczki

Atrybut jest wymagany.

  • Jeśli ma być przedstawiona oferta usługi kurierskiej (łącznie z inpost_courier_c2c), należy podać co najmniej receiver.phone, receiver.company_name i/lub receiver.first_name i receiver.last_name oraz obiekt address

  • Jeśli ma być przedstawiona oferta Paczkomat® należy podać receiver.phone i receiver.email

  • Podanie wszystkich danych umożliwi przedstawienie ofert obu typów

  • Jeśli zostanie przekazany atrybut is_return = true, atrybut receiver nie będzie wymagany

sender

Sender

Dane nadawcy paczki.

Atrybut nie jest wymagany.

  • Jeśli nie zostaną podane żadne dane, domyślnie zostaną użyte dane organizacji, w ramach której tworzona jest przesyłka.

parcels

Array[ParcelsSimple]

Dane paczek zawartych w przesyłce.

Atrybut jest wymagany.

  • Kolekcja minimum 1, maksimum 99

custom_attributes

CustomAttributes

Dodatkowe atrybuty przesyłki, np.

"custom_attributes": {
"target_point": "KRA010"
}

Atrybut nie jest wymagany.

  • Lista dodatkowych atrybutów została opisana we wstępie.

  • Wymagane jest podanie Paczkomat® w przypadku przesyłki Paczkomat®.

cod

Cod

Wartość pobrania.

Atrybut nie jest wymagany.

  • Walidacja oraz wymagalność przekazania atrybutu występuje w momencie przekazania serwisu.

insurance

Insurance

Kwota ubezpieczenia przesyłki.

Atrybut jest wymagany dla poniższych serwisów:

inpost_courier_standard, inpost_courier_express_1000, inpost_courier_express_1200, inpost_courier_express_1700, inpost_courier_palette w przypadku przekazania atrybutu COD.

  • Walidacja oraz wymagalność przekazania atrybutu występuje w momencie przekazania serwisu.

reference

String

Dodatkowy opis przesyłki, np. numer zamówienia.

Atrybut nie jest wymagany.

  • Minimum 3 znaki, maksimum 100 znaków, możliwość przekazania pustego atrybutu.

is_return

Bool

Określa przesyłkę jako zwrotną.

Atrybut nie jest wymagany.

  • Dopuszczalne wartości (true, false)

  • Możliwość przekazania pustego atrybutu.

  • Jeśli ustawione na true, określa przesyłkę jako zwrotną. W takiej sytuacji dane nadawcy i odbiorcy zostaną automatycznie zamienione miejscami.

service

String

Wybrana przez klienta usługa.

Dostępne wartości patrz [1.9.1] Rozmiary i usługi dla przesyłek .

Atrybut jest wymagany.


additional_services

Array[String]

Usługi dodatkowe.

Dostępne usługi dodatkowe: smsemailsaturday.

[1.9.1] Rozmiary i usługi dla przesyłek.

Atrybut nie jest wymagany.

  • Atrybut walidowany w momencie przekazania wartości.

  • Przekazując atrybut additional_services system sprawdza przekazanie atrybutu service, jeśli atrybut service nie zostanie przekazany lub przekazany atrybut additional_services nie mieści się w zakresie przekazanego serwisu, użytkownik otrzyma błąd.

external_customer_id 

String

Identyfikator broker'a generującego przesyłki w ramach innej organizacji.

Atrybut nie jest wymagany.

only_choice_of_offer

Bool

Ustawienie parametru na true powoduje, że oferta zostanie wybrana dla podanego serwisu, ale nie zostanie automatycznie opłacona. Taką przesyłkę trzeba opłacić przed końcem wygaśnięcia oferty, wykonując operacje [1.3] Opłacanie przesyłki.

Atrybut nie jest wymagany.


mpk

String

Nazwa miejsca powstania kosztów.

Atrybut nie jest wymagany.

  • Maksymalnie 255 znaków

  • Jeśli atrybut jest podany, weryfikujemy czy przynależy do organizacji, z której wykonywane jest żądanie

  • Możliwość przekazania pustego atrybutu

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

comments

String

Dowolny komentarz

Atrybut nie jest wymagany

  • Maksymalnie 100 znaków

  • Możliwość przekazania pustego atrybutu

Przykładowe zapytania

Pojedyncza paczka dla przesyłki kurierskiej:

Code Block
languagejson
curl -X-location POST 'https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments' \
-H-header 'Authorization: Bearer tokeneyJhbGciOiJSUzI1NiIsInR5c...' \
-H-header 'Content-Type: application/json' \
-d-data-raw '{
    "receiversender": {
        "company_name": "NameCompany_name",
        "companyfirst_name": "Company name",
    	"first_name": "Jan",
        "last_name": "Kowalskilast_name",
          "email": "receiver@exampletest@grupainteger.compl",
        "phone": "888000000321321321",
        "address": {
            "street": "CybernetykiCzerniakowska",
            "building_number": "1087A",
            "city": "Warszawa",
            "post_code": "0200-677718",
            "country_code": "PL"
        }
    },
    "parcelsreceiver": [{
        {
   "company_name": "Company name",
        "idfirst_name": "small packageJan",
            "dimensions": {"last_name": "Kowalski",
        "email": "receiver@example.com",
        "lengthphone": "80888000000",
        "address": {
      "width": "360",      "street": "Cybernetyki",
            "heightbuilding_number": "64010",
                "unitcity": "mmWarszawa",
            } "post_code": "02-677",
            "weightcountry_code": {"PL"
        }
    },
    "amountparcels": "25", [
        {
            "unitid": "kgsmall package",
            "dimensions": {
  },              "is_non_standardlength": false
 "80",
      }     ],     "insurancewidth": {"360",
        "amount": 25,         "currencyheight": "PLN640",
    },     "cod": {         "amountunit": 12.50, "mm"
          "currency": "PLN"
    },
    "service": "inpost_courier_standard",     "additional_services": ["email", "smsweight"],: {
   "reference": "Test",     "comments": "dowolny komentarz",     "external_customer_idamount": "8877xxx25",
    "mpk": "Nazwa miejsca powstania kosztów" }'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201 CREATED Content-Type: application/json {     "hrefunit": "https://api-shipx-pl.easypack24.net/v1/shipments/1",kg"
     "id": 1234567890,     "status": "created", },
      "tracking_number": null,     "service": "inpost_courieris_non_standard",: false
      "reference": "Test", }
   "is_return": false ],
    "application_idinsurance": 123, {
        "created_by_idamount": null25,
    "external_customer_id    "currency": "8877xxxPLN",
    "sending_method": null},
    "mpkcod": {
        "idamount": 112.50,
        "namecurrency": "Nazwa miejsca powstania kosztówPLN"
    },
    "commentsservice": "dowolny komentarzinpost_courier_standard",
    "additional_services": [
        "email",
        "sms"
    ],
    "custom_attributesreference": {}"Test",
    "codcomments": {"dowolny komentarz"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201   CREATED
Content-Type: application/json
{
    "amounthref": 12.5,"https://api-shipx-pl.easypack24.net/v1/shipments/1234",
    "id": 1234,
    "currencystatus": "PLNcreated",
    } "tracking_number": null,
    "insurancereturn_tracking_number": {null,
        "amountservice": 25.0"inpost_courier_standard",
        "currencyreference": "PLNTest",
    }"is_return": false,
    "senderapplication_id": {
 25,
      "created_by_id": "123"null,
        "name"external_customer_id": "Nazwa",
  null,
     "companysending_namemethod": null,
"InPost S.A.",   "end_of_week_collection": false,
    "first_namecomments": "Jandowolny komentarz",
    "mpk": null,
    "lastadditional_nameservices": "Nowak",[
        "email": "sender@email.com",
        "phonesms":
"888000000",    ],
    "addresscustom_attributes": {},
    "cod": {
        "idamount": "123"12.5,
            "streetcurrency": "MalborskaPLN",
    },
    "insurance": {
  "building_number": "130", 		    "line1amount": null25.0,

           "line2currency": null"PLN"
    },
       "citysender": "Kraków",{
            "post_code": "30-624",
            "country_code": "PL"
        }
    },
    "receiver": {
        "id": 123"id": 2798153592,
        "name": "Name"null,
        "company_name": "Company _name",
        "first_name": "Janfirst_name",
        "last_name": "Kowalskilast_name",
        "email": "receiver@exampletest@grupainteger.compl",
        "phone": "888000000321321321",
        "address": {
            "id": 1231970664224,
            "street": "MalborskaCzerniakowska",
            "building_number": "13087A",
            "line1": null,
            "line2": null,
            "city": "KrakówWarszawa",
            "post_code": "3000-624718",
            "country_code": "PL"
        }
    },
    "selected_offerreceiver": null,{
        "offersid": []2798153591,
    "transactions": [],     "parcelsname": [null,
        {
 "company_name": "Company name",
          "idfirst_name": 123"Jan",
            "trackinglast_numbername": null,
  "Kowalski",
         "is_non_standardemail": false,
   "receiver@example.com",
        "templatephone": null,
   "888000000",
        "dimensionsaddress": {
                "lengthid": 80.01970664223,
                "widthstreet": 360.0,
  "Cybernetyki",
             "heightbuilding_number": 640.0"10",
                "unitline1": "mm"null,
            "line2": }null,
            "weightcity": {"Warszawa",
                "amount"post_code": 25.0"02-677",
            "country_code": "PL"
        }
    },
    "unitselected_offer": null,
    "kg"offers": [],
    "transactions": [],
    "parcels": [
  }      {
  }     ],     "end_of_week_collectionid": false,1404043193,
            "createdidentify_atnumber": "2020-02-23T18:07:08.967+01:00",small package",
            "updatedtracking_atnumber": null,
        "2020-02-23T18:07:08.967+01:00"
}

Zapytanie z wieloma paczkami (można tworzyć tylko dla inpost_courier)

Code Block
languagejson
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{
    "is_non_standard": false,
            "template": null,
            "
receiver
dimensions": {
      
"name":
 
"Name",
         "
company_name
length": 
"Company name",
80.0,
      
"first_name":
 
"Jan",
         "
last_name
width": 
"Kowalski"
360.0,
          
"email":
 
"receiver@example.com",
     "
phone
height": 
"888000000",
640.0,
  
"address":
 
{
             "
street
unit": "
Cybernetyki
mm"
,

            
"building_number": "10"
},
            "
city
weight": 
"Warszawa",
{
                "
post_code
amount": 
"02-677",
25.0,
                "
country_code
unit": "
PL
kg"

       
}
     }
,

    
"parcels":
 
[
   }
    
{
],
    "
id
created_at": "
small package",
2023-12-18T23:52:42.375+01:00",
    
"
dimensions
updated_at": 
{ "length": "80",
"2023-12-18T23:52:42.375+01:00"
}

Zapytanie z wieloma paczkami (można tworzyć tylko dla inpost_courier)

Code Block
languagejson
curl --location 'https://api-shipx-pl.easypack24.net/v1/organizations/115/shipments' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI...' \
--header 'Content-Type: application/json' \
--data-raw '{
     "sender": {
        "widthcompany_name": "360Company_name",
        "first_name": "first_name",
        "heightlast_name": "640last_name",
          "email": "test@grupainteger.pl",
        "unitphone": "mm321321321",
        "address":  {
 },             "weightstreet": {"Czerniakowska",
                "amount"building_number": "2587A",
                "unitcity": "kgWarszawa",
            },
 "post_code": "00-718",
            "iscountry_non_standardcode": true"PL"
        },
    },
"receiver": {
  {      "company_name": "Company name",
    	"idfirst_name": "big packageJan",
            "dimensions"last_name": {
  "Kowalski",  
           "lengthemail": "80receiver@example.com",
        "phone": "888000000",
        "widthaddress": "360",{
                "heightstreet": "640Cybernetyki",
 
              "unitbuilding_number": "mm10",
            }"city": "Warszawa",
            "weightpost_code": {"02-677",
                "amount"country_code": "25PL",
        }
    },
    "unitparcels": "kg"[
         {
  },              "is_non_standard"id": true"small package",
       }     ],
    "insurance"dimensions": {
        "amount": 25,         "currencylength": "PLN80",
    },     "cod": {         "amountwidth": 12.50"360",
        "currency": "PLN"     },     "serviceheight": "inpost_courier_standard640",
     "additional_services": ["email", "sms"],           "referenceunit": "Testmm",
    "comments": "dowolny komentarz",     "external_customer_id": "8877xxx" },
    "mpk": "Nazwa miejsca powstania kosztów" }'

Odpowiedź

Code Block
languagejson
HTTP/1.1

 

201

 

CREATED Content-Type: application/json

 "weight": {
    

"href":

 

"https://api-shipx-pl.easypack24.net/v1/shipments/1234567890",

     

"id":

 

1234567890,

     "

status

amount": "

created

25",
    

"tracking_number":

 

null,

     

"service":

 

"inpost_courier_standard",

     "

reference

unit": "

Test

kg"

,


    

"is_return": false,

       

"application_id": 123,

 },
      

"created_by_id": null,

       "

external

is_

customer

non_

id

standard": 

"8877xxx",

true
    

"sending_method":

 

null,

   },
 

"mpk":

 

{

      {
  

"id":

 

1,

         "

name

id": "

Nazwa

big package",

miejsca

 

powstania

 

kosztów"

     

},

     "

comments

dimensions": {
 

"dowolny

 

komentarz",

     

"additional_services":

 

[

        "length": "

email

80",
        

"sms"

     

],

   "

custom_attributes

width": 

{},

"360",
      

"cod":

 

{

         "

amount

height": 

12.5,

"640",
                "

currency

unit": "

PLN

mm"
            },
            "

insurance

weight": {


       

"amount": 25.0,

         "

currency

amount": "

PLN

25",
 

},

     

"sender":

 

{

         "

id

unit": "

123

kg"

,


           

"name": "Nazwa",

 },
             "

company

is_non_

name

standard": 

"InPost S.A.",

true
        }

"first_name":

 

"Jan",

   ],
    

"

last_name

insurance": 

"Nowak",

{
        "

email

amount": 

"sender@email.com"

25,
        "

phone

currency": "

888000000

PLN"

,


    },
    "

address

cod": {
        

"

id

amount": 

"123",

12.50,
        "

street

currency": "

Malborska

PLN"

,


    },
    

"building_number"

"service": "

130

inpost_courier_standard",

    "

line1

additional_services": 

null

["email", "sms"],
    "reference": "Test",
    

"

line2

comments": 

null

"dowolny komentarz"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json
{
    "cityhref": "Krakówhttps://api-shipx-pl.easypack24.net/v1/shipments/12345",
      "id": 12345,
     "post_codestatus": "30-624created",
      "tracking_number": null,
     "countryreturn_tracking_codenumber": "PL"null,
    "service": "inpost_courier_standard",
  }     }"reference": "Test",
    "receiveris_return": {false,
    "application_id": 25,
    "created_by_id": 123null,
    "external_customer_id": null,
    "namesending_method": "Name"null,
    "end_of_week_collection": false,
    "company_namecomments": "Companydowolny namekomentarz",
        "first_name"mpk": "Jan",
   null,
    "lastadditional_nameservices": "Kowalski",[
        "email": "receiver@example.com",
        "phonesms":
"888000000",    ],
    "addresscustom_attributes": {},
    "cod": {
        "idamount": 50957683712.5,
 
          "streetcurrency": "CybernetykiPLN",
    },
       "building_number"insurance": "10",{
            "line1amount": null25.0,
        "currency": "PLN"
   "line2": null},
    "sender": {
        "cityid": "Warszawa",
   2798157080,
        "post_codename": "02-677"null,
            "countrycompany_codename": "PLCompany_name",
        }
"first_name": "first_name",
   },     "selectedlast_offername": null"last_name",
        "offersemail": []"test@grupainteger.pl",
    "transactions": [],    "phone": "parcels321321321":,
[        "address": {
            "id": 1231970666604,
            "tracking_numberstreet": null"Czerniakowska",
            "isbuilding_non_standardnumber": true"87A",
            "templateline1": null,
            "dimensionsline2": {null,
                "lengthcity": 80.0"Warszawa",
                "width"post_code": 360.0"00-718",
                "height": 640.0,"country_code": "PL"
        }
    },
    "unitreceiver": "mm"{
            }"id": 2798157079,
          "name": null,
 "weight": {      "company_name": "Company name",
        "amountfirst_name": 25.0,"Jan",
        "last_name": "Kowalski",
        "unitemail": "kgreceiver@example.com",
        "phone": "888000000",
  }      "address": {
 },            {"id": 1970666603,
            "idstreet": 123"Cybernetyki",
            "trackingbuilding_number": null"10",
            "is_non_standardline1": truenull,
            "templateline2": null,
            "dimensionscity": {
"Warszawa",
               "length"post_code": 80.0"02-677",
                "width": 360.0,"country_code": "PL"
        }
    },
    "heightselected_offer": 640.0null,
    "offers": [],
    "transactions": [],
    "unitparcels": "mm"[
        {
   },             "weightid": {1404044945,
                "amount"identify_number": 25.0"small package",
                "unit": "kg"
"tracking_number": null,
            "is_non_standard": true,
            "template": null,
           } "dimensions": {
      }     ],     "end_of_week_collectionlength": false,80.0,
           "created_at": "2020-02-23T18:22:57.378+01:00",     "width": 360.0,
                "height": 640.0,
         "updated_at       "unit": "2020-02-23T18:22:57.378+01:00"
}

Przesyłka kurierska - InPost Kurier C2C (usługa dla klienta detalicznego - prepaid)

Code Block
languagejson
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{mm"
            },
            "receiverweight": {
        "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ź

Code Block
languagejson
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "href": " {
                "amount": 25.0,
                "unit": "kg"
            }
        },
        {
            "id": 1404044946,
            "identify_number": "big package",
            "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"
            }
        }
    ],
    "created_at": "2023-12-18T23:55:30.620+01:00",
    "updated_at": "2023-12-18T23:55:30.620+01:00"
}

Przesyłka kurierska - InPost Kurier C2C (usługa dla klienta detalicznego - prepaid)

Code Block
languagejson
curl --location '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": {
 organizations/1/shipments' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJzQlp...' \
--header 'Content-Type: application/json' \
--data-raw '{
     "sender": {
        "company_name": "Company_name",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "test@grupainteger.pl",
        "phone": "321321321",
        "address": {
            "street": "Czerniakowska",
            "building_number": "87A",
            "city": "Warszawa",
            "post_code": "00-718",
            "idcountry_code": "123",PL"
        }
    },
 "namereceiver": "Nazwa",{
        "company_name": "InPost S.A.Company name",
        "first_name": "Jan",
        "last_name": "NowakKowalski",  
        "email": "sender@emailreceiver@example.com",
        "phone": "888000000",
        "address": {
            "idstreet": "123Cybernetyki",
            "streetbuilding_number": "Malborska10",
            "building_numbercity": "130Warszawa",
		
            "line1post_code": null"02-677",
            "line2country_code": null"PL"
    }
    },
    "parcels": {
        "citytemplate": "Kraków",small"
        
    },
    "post_codeinsurance": "30-624", {
        "amount": 25,
        "country_codecurrency": "PLPLN"
           }     },
    "receiver    "cod": {
        "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

Code Block
languagejson
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"
    } {
        "amount": 12.50,
        "currency": "PLN"
   },
    "custom_attributes": {
        "sending_method": "parcel_locker",
        "dropoff_point": "BTO02M"
    },
    "service": "inpost_courier_c2c",
    "reference": "Test"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json

{
    "href": "https://api-shipx-pl.easypack24.net/v1/shipments/12345",
    "id": 12345,
    "status": "created",
    "tracking_number": null,
    "return_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": "BTO02M",
        "sending_method": "parcel_locker"
    },
    "cod": {
        "amount": 12.5,
        "currency": "PLN"
    },
    "insurance": {
        "amount": 25.0,
        "currency": "PLN"
    },
    "sender": {
        "id": 2798158940,
        "name": null,
        "company_name": "Company_name",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "test@grupainteger.pl",
        "phone": "321321321",
        "address": {
            "id": 1970667852,
            "street": "Czerniakowska",
            "building_number": "87A",
            "line1": null,
            "line2": null,
            "city": "Warszawa",
            "post_code": "00-718",
            "country_code": "PL"
        }
    },
    "receiver": {
        "id": 2798158939,
        "name": null,
        "company_name": "Company name",
        "first_name": "Jan",
        "last_name": "Kowalski",
        "email": "receiver@example.com",
        "phone": "888000000",
        "address": {
            "id": 1970667851,
            "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": 1404045876,
            "identify_number": null,
            "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": "2023-12-18T23:57:12.508+01:00",
    "updated_at": "2023-12-18T23:57:12.508+01:00"
}

Przesyłka kurierska Paleta Standard

Code Block
languagejson
curl --location 'https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI...' \
--header 'Content-Type: application/json' \
--data-raw '{
     "sender": {
        "company_name": "Company_name",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "test@grupainteger.pl",
        "phone": "321321321",
        "address": {
            "street": "Czerniakowska",
            "building_number": "87A",
            "city": "Warszawa",
            "post_code": "00-718",
            "country_code": "PL"
        }
    },
"receiver": {
        "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"
    }'

Odpowiedź

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json
{
    "href": "https://api-shipx-pl.easypack24.net/v1/shipments/12345",
    "id": 12345,
    "status": "created",
    "tracking_number": null,
    "return_tracking_number": null,
    "service": "inpost_courier_palette",
    "reference": "Test",
    "is_return": false,
    "application_id": 25,
    "created_by_id": null,
    "external_customer_id": null,
    "sending_method": null,
    "end_of_week_collection": false,
    "comments": "dowolny komentarz",
    "mpk": null,
    "additional_services": [
        "email",
        "sms"
    ],
    "custom_attributes": {},
    "cod": {
        "amount": null,
        "currency": null
    },
    "insurance": {
        "amount": null,
        "currency": null
    },
    "sender": {
        "id": 2798161130,
        "name": null,
        "company_name": "Company_name",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "test@grupainteger.pl",
        "phone": "321321321",
        "address": {
            "id": 1970669350,
            "street": "Czerniakowska",
            "building_number": "87A",
            "line1": null,
            "line2": null,
            "city": "Warszawa",
            "post_code": "00-718",
            "country_code": "PL"
        }
    },
    "receiver": {
        "id": 2798161129,
        "name": null,
        "company_name": "Company name",
        "first_name": "Jan",
        "last_name": "Kowalski",
        "email": "receiver@example.com",
        "phone": "888000000",
        "address": {
            "id": 1970669349,
            "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": 1404046973,
            "identify_number": null,
            "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": "2023-12-18T23:59:46.509+01:00",
    "updated_at": "2023-12-18T23:59:46.509+01:00"
}

Przesyłka Paczkomat® standard

Code Block
languagejson
curl --location 'https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sender": {
        "company_name": "Company_name",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "test@grupainteger.pl",
        "phone": "321321321",
        "address": {
            "street": "Czerniakowska",
            "building_number": "87A",
            "city": "Warszawa",
            "post_code": "00-718",
            "country_code": "PL"
        }
    },
    "receiver": {
        "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": "BTO02M"
    },
    "service": "inpost_locker_standard",
    "reference": "Test"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201200 OK CREATED
Content-Type: application/json
{
        "href":  "https://api-shipx-pl.easypack24.net/v1/shipments/12312345",
        "id": 123 12345,
        "status":  "created",
    "tracking_number": null,
    "    "return_tracking_number": null null,
        "service":  "inpost_courierlocker_palettestandard",
        "reference":  "Test",
        "is_return": false false,
        "application_id": 25 25,
        "created_by_id": null null,
        "external_customer_id": "8877xxx" null,
        "sending_method": null,
     "dispatch_order",
    "end_of_week_collection": false,
     false,
    "comments": "dowolny komentarz",
     null,
    "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
     null,
    "additional_services": [],
    "custom_attributes": {
        "target_point": "BTO02M",
        "sending_method": "dispatch_order"
    },
    "cod": {
        "amount": 12.5,
        "currency": "PLN"
    },
    "insurance": {
        "amount": 25.0,
        "currency": "PLN"
    },
    "sender": {
        "id": "123"2798165704,
        "name": "Nazwa"null,
        "company_name": "InPost S.A.Company_name",
        "first_name": "Janfirst_name",
        "last_name": "Nowaklast_name",
        "email": "sender@emailtest@grupainteger.compl",
        "phone": "888000000321321321",
        "address": {
            "id": "123"1970672593,
            "street": "MalborskaCzerniakowska",
            "building_number": "13087A",
		
            "line1": null,
            "line2": null,
            "city": "KrakówWarszawa",
            "post_code": "3000-624718",
            "country_code": "PL"
        }
    },
    
        }
    },
    "receiver":  {
        
        "id": 123 2798165703,
        
        "name": "Name",
         null,
        "company_name":  "Company nameCompany name",
        
        "first_name":  "Jan",
        
        "last_name":  "Kowalski",
        
        "email":  "receiver@exampletest@inpost.compl",
        
        "phone":  "888000000111222333",
        "address": {             "id": 123,             "street": "Cybernetyki",             "building_number": "10",             "line1": null,             "line2": null,             "city": "Warszawa",             "post_code": "02-677",             "country_codeaddress": "PL"
        }
     null
    },
        "selected_offer": null null,
        "offers":  [],
        "transactions":  [],
        "parcels": [
        {
            "id": 123,
             [
        {
            "id": 1404049260,
            "identify_number": null,
            "tracking_number": null,
             null,
            "is_non_standard": false,
            "template": null,
             false,
            "template": "small",
            "dimensions": {
                 {
                "length": 800 380.0,
                
                "width": 800 640.0,
                
                "height": 800 80.0,
                
                "unit": "mm"
            },
            "weight": {
                 "mm"
            },
            "weight": {
                "amount": 50 25.0,
                
                "unit":  "kg"
            }
        }
    ],
    
            }
        }
    ],
    "created_at":  "20212023-12-13T1219T00:4202:2905.071991+01:00",
        "updated_at":  "20212023-12-13T1219T00:4202:2905.071991+01:00"
}

Przesyłka Paczkomat®

standard

- Podaj Dalej

Code Block
languagejson
curl -X-location POST 'https://api-shipx-pl.easypack24.net/v1/organizations/1115/shipments' \
-H-header 'Authorization: Bearer tokeneyJhbGciOiJSUzI1NiIsInR5cCI...' \
--Hheader 'Content-Type: application/json' -d '{ 
    "receiver":  \
--data-raw '{
        "namesender": "Name",{
        "company_name": "Company _name",
        "first_name": "Janfirst_name",
        "last_name": "Kowalskilast_name",
        "email": "test@inposttest@grupainteger.pl",
        "phone": "111222333321321321",
    },     "parcelsaddress": {
          {  "street": "Czerniakowska",
            "templatebuilding_number": "small87A",
    },        "insurancecity": {"Warszawa",
            "amountpost_code": 25"00-718",
        "currency    "country_code": "PLNPL"
    },     "cod":}
{    },
    "amountreceiver": 12.50,{
        "currencycompany_name": "PLNCompany name",
    },     "customfirst_attributesname": {"Jan",
        	"sendinglast_methodname": "dispatch_orderKowalski",
        "target_pointemail": "KRA012test@inpost.pl",
    },     "servicephone": "inpost_locker_standard111222333",
    "reference": "Test"},
    "external_customer_idparcels": "8877xxx"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201 CREATED
Content-Type: application/json
{{
        "hreftemplate": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890",large"
    "id": 1234567890},
    "statusinsurance": "created",{
        "tracking_numberamount": null25,
        "servicecurrency": "inpost_locker_standard"PLN"
    },
    "referencecod": "Test", {
        "is_returnamount": false12.50,
        "application_idcurrency": 123,"PLN"
    "created_by_id": null},
    "externalcustom_customer_idattributes": "8877xxx",{
        "sending_method": "dispatchparcel_orderlocker",
 
  "mpk": null,     "commentstarget_point": null"BTO02M",
    "additional_services": [],     "customdropoff_attributespoint": {"BTO02M"
    },
    "sending_methodservice": "dispatch_orderinpost_locker_pass_thru",
        "target_point"reference": "KRA012Test"
    },
    "cod": {
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json
{
       "amounthref": 12.5"https://api-shipx-pl.easypack24.net/v1/shipments/1399066065",
    "id": 1399066065,
    "currencystatus": "PLNcreated",
    } "tracking_number": null,
    "insurancereturn_tracking_number": {
   null,
    "amountservice": 25.0,
   "inpost_locker_pass_thru",
    "currencyreference": "PLN"
    }Test",
    "senderis_return": {
 false,
      "application_id": "123"25,

       "name"created_by_id": "Nazwa",
   null,
    "companyexternal_customer_nameid": "InPost S.A.",
   null,
    "firstsending_namemethod": "Janparcel_locker",

       "last_name"end_of_week_collection": "Nowak"false,
    "comments": null,
    "emailmpk": "sender@email.com",
   null,
    "phoneadditional_services": "888000000"[],

       "address"custom_attributes": {
 
          "idtarget_point": "123BTO02M",

           "street"dropoff_point": "MalborskaBTO02M",
            "buildingsending_numbermethod": "130"parcel_locker"
    },
		    "line1cod": null,
 {
          "line2amount": null12.5,
            "citycurrency": "Kraków",
       PLN"
    "post_code": "30-624"},
    "insurance": {
        "country_codeamount": "PL" 25.0,
         }"currency": "PLN"
    },
    "receiversender": {
        "id": 1232798170636,
        "name": "Name"null,
        "company_name": "Company _name",
        "first_name": "Janfirst_name",
        "last_name": "Kowalskilast_name",
        "email": "test@inposttest@grupainteger.pl",
        "phone": "111222333321321321",
        "address": null{
    },     "selected_offer": null,     "offersid": []1970675960,
    "transactions": [],        "parcelsstreet": [
        {
            "idCzerniakowska": 123,
            "trackingbuilding_number": null"87A",
            "is_non_standardline1": falsenull,
            "templateline2": "small"null,
            "dimensionscity": {
   "Warszawa",
            "lengthpost_code": 380.0"00-718",
                "width": 640.0,"country_code": "PL"
        }
    },
    "heightreceiver": 80.0, {
        "id": 2798170635,
        "unitname": "mm"null,
        "company_name":    }"Company name",
            "weight": {"first_name": "Jan",
        "last_name": "Kowalski",
        "amountemail": 25"test@inpost.0,
       pl",
        "unitphone": "kg111222333",
        "address": null
  }  },
      }
    ]"selected_offer": null,
    "end_of_week_collectionoffers": false[],
    "created_attransactions": "2020-02-23T18:17:40.073+01:00"[],
    "updated_atparcels": "2020-02-23T18:17:40.073+01:00"
}

Przesyłka Paczkomat® - Podaj Dalej

Code Block
languagejson
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ź

Code Block
languagejson
HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "href": " [
        {
            "id": 1404051726,
            "identify_number": null,
            "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": "2023-12-19T00:03:52.099+01:00",
    "updated_at": "2023-12-19T00:03:52.099+01:00"
}

Przesyłka Allegro Paczkomat® 24/7 InPost

Code Block
languagejson
curl --location 'https://api-shipx-pl.easypack24.net/v1/organizations/1/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 Paczkomat® 24/7 InPost

Code Block
languagejson
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ 
    "receiver": {' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sender": {
        "company_name": "Company_name",
        "first_name": "first_name",
        "last_name": "last_name",
        "email": "test@grupainteger.pl",
        "phone": "321321321",
        "address": {
            "street": "Czerniakowska",
            "building_number": "87A",
            "city": "Warszawa",
            "post_code": "00-718",
            "country_code": "PL"
        }
    },
    "receiver": {
        "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": "BTO02M",
        "sending_method": "dispatch_order"
    },
    "service": "inpost_locker_allegro",
    "reference": "Test"
}'

Odpowiedź

Code Block
languagejson
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": "NameNazwa",
        "company_name": "Company nameInPost S.A.",
        "first_name": "Jan",
        "last_name": "KowalskiNowak",
        "email": "123abc+123abc@user.allegrogroup.plsender@email.com",
        "phone": "111222333888000000",
    },     "parcelsaddress": {
          {  "id": "123",
            "templatestreet": "smallMalborska",
         }    "building_number": "130",
		    "custom_attributes": {"line1": null,
            "target_pointline2": null
"KRA012", 		"sending_method": "dispatch_order"     },     "servicecity": "inpost_locker_allegroKraków"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201 CREATED
Content-Type: application/json
{,
            "hrefpost_code": "https://api-shipx-pl.easypack24.net/v1/shipments/123456789030-624",
    "id": 1234567890,        "statuscountry_code": "createdPL",
      "tracking_number": null, }
   "service": "inpost_locker_allegro" },
    "referencereceiver": null,
{
   "is_return": false,     "application_id": 123,
    "created_by_id    "name": null,"Name",
        "externalcompany_customer_idname": "Company null,name",
        "sendingfirst_methodname": "dispatch_orderJan",
        "mpklast_name": null"Kowalski",
        "commentsemail": null,"123abc+123abc@user.allegrogroup.pl",
     "additional_services   "phone": []"111222333",
    "custom_attributes    "address": {null
    },
    "sendingselected_methodoffer": "dispatch_order"null,

       "target_point"offers": "KRA012" [],
     }"transactions": [],
    "codparcels": [
 {       {
 "amount": null,           "currencyid": null123,
       },     "insurancetracking_number": null,
  {          "amountis_non_standard": 5000false,
            "currencytemplate": "PLNsmall",
    },        "senderdimensions": {

       "id": "123",         "namelength": "Nazwa",
380.0,
       "company_name": "InPost S.A.",         "first_namewidth": "Jan",
640.0,
       "last_name": "Nowak",         "emailheight": "sender@email80.com"0,
        "phone": "888000000",         "addressunit": {"mm"
            "id": "123"},
            "streetweight": "Malborska",{
                "building_numberamount": "130"10.0,
		    "line1": null,             "line2unit": null"kg"
            "city": "Kraków",}
        }
   "post_code": "30-624" ],
      "end_of_week_collection": false,
     "countrycreated_codeat": "PL"2020-02-23T18:52:25.100+01:00",
    "updated_at":    }
    },
    "receiver": {
        "id": 123,
  "2020-02-23T18:52:25.100+01:00"
}

Przesyłka Allegro miniKurier24 InPost

Code Block
languagejson
curl --location 'https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI...' \
--header 'Content-Type: application/json' \
--data-raw '{
     "namesender": "Name",{
        "company_name": "Company _name",
        "first_name": "Janfirst_name",
        "last_name": "Kowalskilast_name",
        "email": "123abc+123abc@user.allegrogroup.pl",
        "phone": "111222333",
        "address": null
    },
    "selected_offer": nulltest@grupainteger.pl",
    "offers": [],     "transactionsphone": [],"321321321",
        "parcelsaddress": {
   [         {"street": "Czerniakowska",
            "idbuilding_number": 123"87A",
            "tracking_numbercity": null"Warszawa",
            "ispost_non_standardcode": false"00-718",
            "templatecountry_code": "small",PL"
        }
    },
    "dimensionsreceiver": {
        "company_name": "Company name",
        "lengthfirst_name": 380.0"Jan",
        "last_name": "Kowalski",
        "widthemail": 640.0,"123abc+123abc@user.allegrogroup.pl",
        "phone": "312312321",
        "height": 80.0,
  address": {
             "unitstreet": "mmCybernetyki",
             }"building_number": "10",
            "weightcity": {
 "Warszawa",
              "amountpost_code": 10.0,
   "02-677",
            "unitcountry_code": "kgPL"
        }
    },
    "parcels": {
       } "template": "letter_a"
    ]},
    "end_of_week_collectioncustom_attributes": false, {
        "createdsending_atmethod": "2020-02-23T18:52:25.100+01:00"dispatch_order"
    },
    "updated_atservice": "2020-02-23T18:52:25.100+01:00inpost_letter_allegro",
    "reference": "Test"
}
Przesyłka Allegro miniKurier24 InPost
'

Odpowiedź

Code Block
languagejson
curl -X POST HTTP/1.1 201 CREATED
Content-Type: application/json
{
    "href": "https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ 
    "receiver": {
   shipments/1234567890",
    "id": 1234567890
    "status": "created",
    "tracking_number": null,
    "nameservice": "Nameinpost_letter_allegro",
    "reference": null,
    "companyis_namereturn": "Company name"false,
    	"firstapplication_nameid": "Jan",
   123,
    "lastcreated_by_nameid": "Kowalski"null,
    "external_customer_id": null,
    "emailsending_method": "123abc+123abc@user.allegrogroup.pldispatch_order",
 
      "phonempk": "888000000"null,

       "addresscomments": {null,
      "additional_services": [],
     "streetcustom_attributes": "Cybernetyki",{
            "buildingsending_numbermethod": "10dispatch_order",
      },
     "citycod": "Warszawa",
{
           "post_code"amount": "02-677",
   null,
        "country_codecurrency": "PL"
 null
      }
	},
    "parcelsinsurance": {
        {
   "amount": 5000,
        "templatecurrency": "letter_aPLN"
    },
  
     "custom_attributessender": {
        	"sending_methodid": "dispatch_order123"
,
   },     "servicename": "inpost_letter_allegro"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201 CREATED
Content-Type: application/json
{Nazwa",
        "hrefcompany_name": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890InPost S.A.",
    "id": 1234567890     "statusfirst_name": "createdJan",
    "tracking_number": null,     "servicelast_name": "inpost_letter_allegroNowak",
        "referenceemail": null"sender@email.com",

   "is_return": false,     "application_idphone": 123"888000000",
     "created_by_id   "address": null,{
      "external_customer_id": null,     "sending_methodid": "dispatch_order123",
      "mpk": null,     "commentsstreet": null,     "additional_services": []"Malborska",
    "custom_attributes": {         "sendingbuilding_methodnumber": "dispatch_order130",
		    "line1": }null,
    "cod": {         "amountline2": null,
            "currencycity": "Kraków",
  null     },     "insurancepost_code": { "30-624",
            "amountcountry_code": 5000,"PL"
        "currency": "PLN"}
    },
    "senderreceiver": {
        "id": "123",
        "name": "NazwaName",
        "company_name": "InPost S.A.Company name",
        "first_name": "Jan",
        "last_name": "NowakKowalski",
        "email": "sender@email.com123abc+123abc@user.allegrogroup.pl",
        "phone": "888000000",
        "address": {
            "id": "123",
            "street": "MalborskaCybernetyki",
            "building_number": "13010",
		
            "line1": null,
            "line2": null,
            "city": "KrakówWarszawa",
            "post_code": "3002-624677",
            "country_code": "PL"
        }
    },
    "receiver": {
        "id": 123,
        "name": "Name",
        "company_name": "Company name",
   selected_offer": null,
    "first_nameoffers": "Jan",
        "last_name": "Kowalski",[],
    "transactions": [],
    "emailparcels": "123abc+123abc@user.allegrogroup.pl",[
        {
  "phone": "888000000",         "addressid": {123,
            "idtracking_number": 123null,
            "streetis_non_standard": "Cybernetyki"false,
            "building_numbertemplate": "10letter_a",
            "line1dimensions": null,{
                "line2length": null,380.0,
                "citywidth": "Warszawa",640.0,
                "post_codeheight": "02-677",80.0,
                "country_codeunit": "PLmm"

       }     },
     "selected_offer": null,       "offersweight": [], {
         "transactions": [],       "parcelsamount": [10.0,
        {        "unit": "kg"
   "id": 123,        }
    "tracking_number": null,   }
    ],
    "isend_of_nonweek_standardcollection": false,
  
         "template"created_at": "letter_a2020-02-23T19:24:51.120+01:00",
    "updated_at": "2020-02-23T19:24:51.120+01:00"
}

Przesyłka Allegro Kurier24 InPost:

Code Block
languagejson
curl      "dimensions": {
           --location 'https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI...' \
--header 'Content-Type: application/json' \
--data-raw '{
    "lengthsender": 380.0,
   {
            "width"company_name": 640.0,
 "Company_name",
              "height"first_name": 80.0,
       "first_name",
        "unitlast_name": "mm"
            }last_name",
            "weightemail": {
                "amount": 10.0 "test@grupainteger.pl",
        "phone": "321321321",
        "unitaddress": "kg"{
             }"street": "Czerniakowska",
        }     ]"building_number": "87A",
    "end_of_week_collection": false,        "created_atcity": "2020-02-23T19:24:51.120+01:00Warszawa",
     "updated_at": "2020-02-23T19:24:51.120+01:00" }

Przesyłka Allegro Kurier24 InPost:

Code Block
languagejson
curl -X POST https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments -H 'Authorization: Bearer token' -H 'Content-Type: application/json' -d '{ "post_code": "00-718",
            "receivercountry_code": { "PL"
        }
    },
    "namereceiver": "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",
    "reference": "Test"
}'

Odpowiedź

Code Block
languagejson
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"
}

Warning

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 polu details,

  • 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 atrybucie service