Versions Compared

Key

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

Dodanie możliwości przekazywania serwisów SMART przy tworzeniu przesylek (inpost_locker_standard_smartprzesyłek inpost_locker_allegro_smart)

PanelbgColor#f0f0f0

titleBGColor#f0f0f0title

Na tej stronie

Table of Contents
minLevel2
 

Struktura

Zasób Shipment dla przesyłek Allegro Smart posiada takie same atrybuty jak

w Tworzenie przesyłki w trybie

w trybie uproszczonym. Jedyną różnicą jest parametr cod:

Parametr

Typ

Opis

Walidacja

cod

CodForm

Cod

Wartość pobrania.

Atrybut nie jest wymagany.


Uwierzytelnianie

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


Dotychczasowe paczki allegro

W przypadku przesyłek allegro nie ma już wymagania wysyłania w custom_attributes parametrów allegro_transaction_id oraz allegro_user_id, wystarczy wysłać kompletny zamaskowany email allegro,  e-mail będzie mieć

postać 

postać stałykodnadawcy+identyfikatortransakcji@allegromail.com, na

przykład 

przykład 8awgqyk6a5+cub31c122@allegromail.com.


Tworzenie paczek SMART

Paczki z serwisami SMART można tworzyć jedynie na email z domeny allegro:

W przypadku gdy na dany email został już wykorzystany limit SMART, serwis zostanie automatycznie zmieniony na jego odpowiednik bez _smart.

W przypadku podania emaila z domeny allegro i

serwisu 

serwisu  inpost_locker

_standard lub inpost

_

locker_

allegro, gdy na dany email przysługuje klientowi limit SMART, serwis zostanie automatycznie zmieniony na jego odpowiednik ze _smart


Poniżej przedstawiamy jakich serwisów należy użyć dla dostępnych metod dostawy:

Metoda dostawy - Allegro

Paczkomaty

Paczkomat® 24/7 InPost:

  • bez Allegro Smart   -   używamy serwisu inpost_locker_allegro

  • z Allegro Smart  -   używamy serwisu inpost_locker_allegro serwis zostanie zmieniony na inpost_locker_allegro_

smart gdy title
  • smart gdy na dany email przysługuje klientowi limit SMART

Info

Note

Uwaga!

Błędny serwis dla metody dostawy

W przypadku podania nieodpowiedniego serwisu dla metody dostawy (np. serwisu inpost_locker_standard dla metody Allegro

Paczkomaty

Paczkomat® 24/7), usługa SMART nie będzie dostępna.


Przykładowe zapytania dostępne są na stronie [1.9.0] Tworzenie przesyłki w trybie uproszczonym.


Przykładowe zapytanie do tworzenia paczki dla

metody

metody dostawy - Allegro

Paczkomaty

Paczkomat® 24/7 InPost:

Code Block

POST /

languagejson
curl --location 'https://api-shipx-pl.easypack24.net/v1/organizations/

123

115/shipments

HTTP/1.1 Host: api-shipx-pl.easypack24.net

' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 

lkfjasd9f70y43ohriw

eyJhbGciOiJSUzI...

[ommited

' 

for brevity]...

\
--data-raw '{
    "

comments

sender": {
  

"dowolny

 

komentarz",

     "

receiver

company_name": 

{

"Company_name",
        "first_name": "

Jan

first_name",
        "last_name": "

Kowalski

last_name",
        "

name

email": "

Nazwa

test@grupainteger.pl",
        "

email

phone": "

jinfq3pjv+4c5547c60@user.allegrogroup.pl

321321321",
        

"phone

"address": {
            "street": "

888000000

Czerniakowska",
            "

address

building_number": 

{

"87A",
            "

id

city": "

123

Warszawa",
            "

street

post_code": "

Malborska

00-718",
            "

building

country_

number

code": "

130"

PL"
        }
    },
    "receiver": {
        "

city

company_name": "

Kraków

company_name",
        "first_name": "first_name",
        "

post

last_

code

name": "

30-624

last_name",
        "email": "kz9576590l+378a831e0@user.allegrogroup.pl",
  

"country_code

      "phone": "

PL

888000000"

       

}


    },
    "parcels": [
        {
            "template": "medium"
        }
    ],
    "custom_attributes": {
        "sending_method": "dispatch_order",
        "target_point": "

BBI01A

KRA012"
    },
    "service": "inpost_locker_allegro",
    "reference": "Numer_zamówienia"
}'

W odpowiedzi serwer zwróci status 201

Code Block
languagejson
HTTP/1.1 201 CREATED
Content-Type: application/json
  
{
    "href": "https://api-shipx-pl.easypack24.net/v1/organizations/1/shipments/
1234567890
12280001",
    "id": 
"1234567890"
12280001,
    "status": "created",
    "tracking_number": null,
    "return_tracking_number": null,
    "service": "inpost_locker_allegro_smart",
    "reference": 
null
"Numer_zamówienia",
    "is_return": false,
    "application_id": 
1
1070,
    "created_by_id": null,
    "external_customer_id": null,
    "sending_method": 
null
"dispatch_order",
    "
mpk
end_of_week_collection": 
null
false,
    "comments": null,
    "
dowolny komentarz"
mpk": null,
    "additional_services": [],
    "custom_attributes": {
        "target_point": "KRA012",
        "sending_method": "
BBI01A
dispatch_order"
    },
    "cod": {
        "amount": null,
        "currency": null
    },
    "insurance": {
        "amount": 
null
5000,
        "currency": 
null
"PLN"
    },
    "sender": {
        "id": 
2860
24563418,
        "name": null,
        "company_name": "
Inittec Sp. z o.o. (API Tests)
Company_name",
        "first_name": "
Robert
first_name",
        "last_name": "
Dzikowski
last_name",
        "email": "
rdzikowski@grupainteger
test@grupainteger.pl",
        "phone": "
121323123
321321321",
        "address": {
            "id": 
2824
23260657,
            "street": "
Zawiła
Czerniakowska",
            "building_number": "
65 L
87A",
            "line1": null,
            "line2": null,
            "city": "
Kraków
Warszawa",
            "post_code": "
30
00-
390
718",
            "country_code": "PL"
        }
    },
    "receiver": {
        "id": 
2859
24563417,
        "name": 
"Nazwa"
null,
        "company_name": 
null
"company_name",
        "first_name": "
Jan
first_name",
        "last_name": "
Kowalski
last_name",
        "email": "
jinfq3pjv
kz9576590l+
4c5547c60@user
378a831e0@user.allegrogroup.pl",
        "phone": "888000000",
        "address": 
{
null
    
"id": 2823,
},
    
"
street
selected_offer": 
"Malborska"
null,
    
"building_number
"offers": 
"130"
[],
    
"line1
"transactions": 
null
[],
    
"line2
"parcels": 
null,
[
        
"city": "Kraków",
{
            
"
post_code
id": 
"30-624"
13041562,
            "
country
identify_
code
number": 
"PL" } }, "selected_offer":
null
, "offers": []
,
    
"transactions":
 
[],
     
"parcels":
 
[
 
{ "id": 1494,
"tracking_number": null,
            "is_non_standard": false,
            "template": "medium",
            "dimensions": {
                "length": 380.0,
                "width": 640.0,
                "height": 190.0,
                "unit": "mm"
            },
            "weight": {
                "amount": 25.0,
                "unit": "kg"
            }
        }
    ],
    "created_at": "2023-10-25T15:13:40.761+02:00",
    "updated_at": "2023-10-25T15:13:40.761+02:00"
}