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

_number
  • , receiver.company_name i/lub receiver.first_name i receiver.last_name oraz obiekt address

  • Jeśli ma być przedstawiona oferta

paczkomatowa
  • Paczkomat® należy podać receiver.phone

_number
  •  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

1000
  • 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

paczkomatu
  • Paczkomat® w przypadku przesyłki

paczkomatowej
  • 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

nie jest wymagany

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

  • Minimalnie 3 znaki

  • 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' \
--data-draw '{
    "receiversender": {
        "company_name": "NameCompany_name",
        "companyfirst_name": "Company first_name",
     	   "firstlast_name": "Jan",
        "last_name": "Kowalski", last_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": {
            "widthstreet": "360Cybernetyki",
   
            "heightbuilding_number": "64010",
   
            "unitcity": "mmWarszawa",
             }"post_code": "02-677",
            "weightcountry_code": {"PL"
        }
    },
    "amountparcels": "25", [
        {
            "unitid": "kg"small package",
            "dimensions": {
},                "is_non_standardlength": false"80",
        }     ],     "insurancewidth": {"360",
        "amount": 25,         "currencyheight": "PLN640",
     },           "codunit": {"mm"
           "amount": 12.50, },
            "currencyweight": "PLN"{
     },     "service": "inpost_courier_standard",     "additional_servicesamount": ["email25",
"sms"],      "reference": "Test",         "commentsunit": "dowolny komentarzkg",
    "external_customer_id": "8877xxx",     "mpk": "Nazwa miejsca},
powstania kosztów" }'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201 CREATED Content-Type: application/json {     "hrefis_non_standard": "https://api-shipx-pl.easypack24.net/v1/shipments/1",false
      "id": 1234567890, }
   "status": "created" ],
    "tracking_numberinsurance": null,{
        "serviceamount": "inpost_courier_standard"25,
        "referencecurrency": "Test"PLN"
    },
    "is_return": false,
    "application_id": 123,
    "created_by_id": null,
    "external_customer_id": "8877xxx",
    "sending_method": null,
    "mpk"cod": {
        "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": "InPost S.A."null,
      "end_of_week_collection": false,
 "first_name   "comments": "Jandowolny komentarz",
    "mpk": null,
    "lastadditional_nameservices": "Nowak",[
        "email": "sender@email.com",
        "phonesms":
"888000000",    ],
    "addresscustom_attributes": {},
    "cod": {
        "idamount": "123"12.5,
            "streetcurrency": "Malborska"PLN"
    },
    "insurance": {
        "building_numberamount": "130",
		25.0,
        "line1currency": null,"PLN"
    },
       "line2sender": null{
            "cityid": "Kraków"2798153592,
            "post_code": "30-624",
            "country_code": "PL"
        }
    },
    "receiver": {
        "id": 123,
        "name": "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_standard"email": false"receiver@example.com",
            "templatephone": null"888000000",
            "dimensionsaddress": {
 
              "lengthid": 80.01970664223,

               "widthstreet": 360.0"Cybernetyki",
                "height"building_number": 640.0,
 "10",
              "unitline1": "mm"null,
            "line2": }null,
            "weightcity": {"Warszawa",
             "post_code": "02-677",
            "amountcountry_code": 25.0, "PL"
        }
    },
    "unitselected_offer": null,
    "kgoffers": [],
    "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 '{ "receiver": {
     "is_non_standard": false,
            "template": null,
            "
name
dimensions": 
"Name",
{
         
"company_name":
 
"Company
 
name",
     
"
first_name
length": 
"Jan",
80.0,
       
"last_name":
 
"Kowalski",
        
"email"
"width": 
"receiver@example
360.
com"
0,
      
"phone":
 
"888000000",
         "
address
height":
{
 640.0,
                "
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": { "length": "80",
"updated_at": "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",
            "amountbuilding_number": "2587A",
  
             "unitcity": "kgWarszawa",
             }"post_code": "00-718",
             "iscountry_non_standardcode": true"PL"
        },
    },
"receiver": {
  {      "company_name": "Company name",
    	"idfirst_name": "big packageJan",
  
         "dimensionslast_name": {"Kowalski",  
              "length"email": "80receiver@example.com",
    
           "widthphone": "360888000000",
        "address": {
            "heightstreet": "640Cybernetyki",
   
            "unitbuilding_number": "mm10",
             }"city": "Warszawa",
            "weightpost_code": {
"02-677",
               "amount"country_code": "25PL",
        }
    },
    "unitparcels": "kg"[
            },{
             "is_non_standardid": true
   "small package",
    }     ],     "insurancedimensions": {
 
      "amount": 25,         "currencylength": "PLN"80",
           },     "codwidth": {
"360",
       "amount": 12.50,         "currencyheight": "PLN640",
     },     "service": "inpost_courier_standard",     "additional_servicesunit": ["emailmm",
 "sms"],     "reference": "Test",     "comments": "dowolny komentarz",},
      "external_customer_id": "8877xxx",     "mpkweight": {
  "Nazwa miejsca powstania kosztów" }'

Odpowiedź

Code Block
languagejson
HTTP/1.1

 

201

 

CREATED

 

Content-Type:

 

application/json

 

{

     "

href

amount": "

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

25",
     

"id": 1234567890,

           "

status

unit": "

created

kg"

,


     

"tracking_number":

 

null,

     

"service": "inpost_courier_standard"

 },
    

"reference": "Test",

         "is_

return

non_standard":

false

 true
        },
    

"application_id": 123,

    {
      

"created_by_id":

 

null,

     "

external_customer_

id": "

8877xxx

big package",
      

"sending_method":

 

null,

     "

mpk

dimensions": {
       

"id": 1,

         "

name

length": "

Nazwa miejsca powstania kosztów"

80",
           

},

     "

comments

width": "

dowolny komentarz

360",
    

"additional_services": [

            "height": "

email

640",
        

"sms"

   

],

     "

custom_attributes

unit": 

{},

"mm"
     

"cod":

 

{

      },
  

"amount":

 

12.5,

         "

currency

weight": 

"PLN"

{
 

},

     

"insurance":

 

{

         "amount": "25

.0,

",
                "

currency

unit": "

PLN"

kg"
            },
    

"sender": {

         "

id

is_non_standard": 

"123",

true
        

"name": "Nazwa",

}
    ],
    "

company_name

insurance": 

"InPost S.A.",

{
        "

first_name

amount": 

"Jan"

25,
        "

last_name

currency": "

Nowak

PLN"

,


    },
    "

email

cod": 

"sender@email.com",

{
        "

phone

amount": 

"888000000"

12.50,
        "

address

currency": 

{

"PLN"
    

},
    

"

id

service": "

123

inpost_courier_standard",
    "additional_services": 

["email", "sms"],
    "

street

reference": "

Malborska

Test",
    "comments": "dowolny komentarz"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json
{
    "building_numberhref": "130https://api-shipx-pl.easypack24.net/v1/shipments/12345",
		    "line1id": null12345,
      "status": "created",
     "line2tracking_number": null,
       "return_tracking_number": null,
    "cityservice": "Krakówinpost_courier_standard",
    "reference": "Test",
    "is_return": false,
    "postapplication_codeid": "30-624"25,
    "created_by_id": null,
      "countryexternal_customer_codeid": null,
    "PLsending_method": null,
    "end_of_week_collection": false,
 }   "comments": "dowolny }komentarz",
    "receivermpk": {
 null,
      "idadditional_services": 123,[
        "nameemail": "Name",
        "company_namesms":
"Company name",    ],
    "firstcustom_nameattributes": "Jan"{},
        "last_name"cod": "Kowalski",{
        "emailamount": "receiver@example12.com"5,
        "phonecurrency": "888000000PLN",
    },
    "addressinsurance": {
  
         "idamount": 50957683725.0,
 
          "streetcurrency": "CybernetykiPLN",
    },
       "building_number"sender": "10",{
            "line1id": null2798157080,
            "line2name": null,

           "city"company_name": "WarszawaCompany_name",
            "postfirst_codename": "02-677first_name",
 
          "countrylast_codename": "PLlast_name",
        }
"email": "test@grupainteger.pl",
   },     "selected_offerphone": null"321321321",
 
  "offers": [],     "transactionsaddress": [],{
    "parcels": [       "id": 1970666604,
{
            "idstreet": 123"Czerniakowska",
            "trackingbuilding_number": null"87A",
            "is_non_standardline1": truenull,
            "templateline2": null,
            "dimensionscity": {
"Warszawa",
               "length"post_code": 80.0"00-718",
                "width": 360.0,"country_code": "PL"
        }
    },
    "heightreceiver": 640.0,{
        "id": 2798157079,
        "unitname": "mm"null,
        "company_name":    }"Company name",
            "weight": {"first_name": "Jan",
        "last_name": "Kowalski",
        "amountemail": 25"receiver@example.0,
    com",
           "unitphone": "kg888000000",
        "address": {
  }         },       "id": 1970666603,
 {             "idstreet": 123"Cybernetyki",
            "trackingbuilding_number": null"10",
            "is_non_standardline1": truenull,
            "templateline2": null,
            "dimensionscity": {
   "Warszawa",
            "lengthpost_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",
            "tracking_number": null,
     "unit": "kg"
       "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": "30-624",
   00-718",
            "country_code": "PL"
        }
    },
    "receiver": {
        "country_codeid": "PL"
        }
    },
    "receiver": {
        "id": 123,
        2798165703,
        "name": "Name",
         null,
        "company_name":  "Company nameCompany 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"
        }
    },
    
        "last_name": "Kowalski",
        "email": "test@inpost.pl",
        "phone": "111222333",
        "address": null
    },
    "selected_offer": null,
     null,
    "offers":  [],
        "transactions":  [],
        "parcels":  [
        {
            "id": 123,
            
        {
            "id": 1404049260,
            "identify_number": null,
            "tracking_number": null,
             null,
            "is_non_standard": false,
             false,
            "template": null,
             "small",
            "dimensions": {
                 {
                "length": 800 380.0,
                
                "width": 800 640.0,
                
                "height": 800.0,
                 80.0,
                "unit":  "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

paczkomatowa standard

Paczkomat® - Podaj Dalej

Code Block
languagejson
curl --Xlocation POST 'https://api-shipx-pl.easypack24.net/v1/organizations/1115/shipments' \
-H-header 'Authorization: Bearer tokeneyJhbGciOiJSUzI1NiIsInR5cCI...' \
-H-header 'Content-Type: application/json' \
--data-draw '{
     "receiversender": {
        "name":
"Name",
        "company_name": "Company _name",
        "first_name": "Janfirst_name",
        "last_name": "Kowalskilast_name",
        "email": "test@inposttest@grupainteger.pl",
        "phone": "111222333321321321",
    },
    "parcelsaddress": 
        {
            "templatestreet": "small"
    }Czerniakowska",
    "insurance": {
        "amountbuilding_number": 25,"87A",
            "currencycity": "PLNWarszawa",
       },     "codpost_code": {
    "00-718",
   "amount": 12.50,         "currencycountry_code": "PLNPL"
        },
    "custom_attributes": {},
     	"sending_methodreceiver": "dispatch_order",{
        "targetcompany_pointname": "KRA012Company name"
,
   },     "servicefirst_name": "inpost_locker_standardJan",
    "reference": "Test",     "externallast_customer_idname": "8877xxx"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 201 CREATED
Content-Type: application/json
{Kowalski",
        "hrefemail": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890",
test@inpost.pl",
   "id": 1234567890,
    "statusphone": "created111222333",
    "tracking_number": null },
    "serviceparcels": "inpost_locker_standard", {
        "referencetemplate": "Testlarge",
    "is_return": false},
    "application_idinsurance": 123, {
        "created_by_idamount": null25,
        "external_customer_idcurrency": "8877xxx"PLN"
    },
    "sending_methodcod": "dispatch_order",{
        "mpkamount": null12.50,
        "commentscurrency": null,"PLN"
    "additional_services": []},
    "custom_attributes": {
        "sending_method": "dispatchparcel_orderlocker",
        "target_point": "KRA012BTO02M",
    },    "dropoff_point": "codBTO02M":
{    },
    "amountservice": 12.5"inpost_locker_pass_thru",
        "currencyreference": "PLN"
    },Test"
}'

Odpowiedź

Code Block
languagejson
HTTP/1.1 200 OK 
Content-Type: application/json
{
    "insurancehref": {"https://api-shipx-pl.easypack24.net/v1/shipments/1399066065",
        "amountid": 25.01399066065,
        "currencystatus": "PLNcreated",
    } "tracking_number": null,
    "senderreturn_tracking_number": {null,
        "idservice": "123inpost_locker_pass_thru",
 
      "namereference": "NazwaTest",
  
     "companyis_namereturn": "InPost S.A.",
   false,
     "firstapplication_nameid": "Jan"25,
    "created_by_id": null,
    "lastexternal_customer_nameid": "Nowak",
   null,
    "emailsending_method": "sender@email.comparcel_locker",
        "phone"end_of_week_collection": "888000000"false,

       "addresscomments": {null,
       "mpk": null,
    "idadditional_services": "123"[],
    "custom_attributes": {
        "streettarget_point": "MalborskaBTO02M",
   
        "buildingdropoff_numberpoint": "130BTO02M",
    		    "line1sending_method": null,"parcel_locker"
       },
    "line2cod": null
   {
        "cityamount": "Kraków",
 12.5,
          "post_codecurrency": "30-624",PLN"
    },
    "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_offerid": null1970675960,
            "offersstreet": [],"Czerniakowska",
            "transactionsbuilding_number": []"87A",
    "parcels": [       "line1": null,
{
            "idline2": 123null,
            "tracking_numbercity": null"Warszawa",
            "ispost_non_standardcode": false"00-718",
            "templatecountry_code": "smallPL",
        }
   "dimensions": { },
       "receiver": {
        "lengthid": 380.02798170635,
        "name": null,
        "widthcompany_name": 640.0, "Company name",
        "first_name": "Jan",
        "heightlast_name": 80.0"Kowalski",
        "email": "test@inpost.pl",
        "unitphone": "mm111222333",
        "address": null
    },
       "selected_offer": null,
    "weightoffers": {[],
    "transactions": [],
    "parcels": [
    "amount": 25.0,    {
            "unitid": "kg"1404051726,
            }
 "identify_number": null,
      }     ],     "end_of_week_collectiontracking_number": falsenull,
      "created_at": "2020-02-23T18:17:40.073+01:00",     "updatedis_non_atstandard": "2020-02-23T18:17:40.073+01:00"
}

Przesyłka paczkomatowa - 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": "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 Paczkomaty24/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": "888000000",
        "address": {
            "id": "123",
            "street": "111222333"Malborska",
            }"building_number": "130",
		    "parcelsline1": null,
         {    "line2": null
            "templatecity": "smallKraków"
,
       },     "custompost_attributescode": { "30-624",
          "target_point": "KRA012", 		"sendingcountry_methodcode": "dispatch_orderPL"
 
  },     "service": "inpost_locker_allegro" }'

Odpowiedź

Code Block
languagejson
HTTP/1.1
201 CREATED Content-Type: application/json {},
    "hrefreceiver": "https://api-shipx-pl.easypack24.net/v1/shipments/1234567890", {
        "id": 1234567890123,
        "statusname": "createdName",
        "trackingcompany_numbername": null, "Company name",
        "servicefirst_name": "inpost_locker_allegroJan",
    "reference": null,     "islast_returnname": false"Kowalski",

   "application_id": 123,     "created_by_idemail": null,
 "123abc+123abc@user.allegrogroup.pl",
  "external_customer_id": null,     "sending_methodphone": "dispatch_order111222333",
        "mpkaddress": null
    },
    "commentsselected_offer": null,
    "additional_servicesoffers": [],
    "custom_attributestransactions": {[],
        "sending_method"parcels": "dispatch_order",[
        {
 "target_point": "KRA012"     },     "codid": {
123,
       "amount": null,         "currencytracking_number": null
    },
    "insurance": {         "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": "2020-02-23T18:52:25.100+01:00"
}
 }
    },
    "receiver": {
        "id": 123,
  

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",
        "heightaddress": 80.0,
  {
             "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:00"
}
Przesyłka Allegro miniKurier24 InPost:
"inpost_letter_allegro",
    "reference": "Test"
}'

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