Versions Compared

Key

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

Added possibility to provide SMART services when creating shipments (inpost_locker_standard_smart, inpost_locker_allegro_smart)

PanelbgColor#f0f0f0titleBGColor#f0f0f0title

Adding the option of sending Allegro SMART services during inpost_locker_allegro_smart shipment creation.


On this page

Table of Contents
minLevel2
 

Structure

Shipment resource for Allegro SMART has the same attributes

as Shipment

as Shipment simplified mode. The only difference is in cod parameter:

Parameter

Type

Description

Validation

cod

CodForm

Cod

Cash collection amount.

The attribute is

optional

not required.


Authentication

Resource access requires an

active 

active access token.


Allegro parcels before

Allegro parcels no longer require custom_attributes to include allegro_transaction_id and allegro_user_id, sending a full masked allegro email is sufficient. The e-mail will have the following structure permanentsendercode+

transactionidenntifier@allegromail

transactionidenntifier@allegromail.com, example: 8awgqyk6a5+cub31c122@allegromail.com.


Creating Allegro SMART shipments

 SMART shipments can be created only for emails within the allegro domain:

In case of the given email reaching the SMART limit, the service will be automatically changed to the equivalent service without _smart.

In case an allegro domain email and

inpost_locker_standard or

service inpost_locker_allegro, when the email has an available SMART limit, service will automatically change to the equivalent _smart  service.


Beneath, you can see which services should be used for each delivery option:

1.) Delivery Option - Paczkomaty 24/7:

without Allegro SMART  -  use inpost_locker_standard2.)

  • with Allegro SMART  -  use inpost_locker_standard (service will be changed to inpost_locker_standard_smart if the email has available SMART limit).
  • Delivery Option - Allegro

    Paczkomaty title

    Paczkomat® 24/7 InPost:

    • with Allegro Smart  -  use inpost_locker_allegro

    • without Allegro Smart  -  use inpost_locker_allegro (service will be changed to inpost_locker_allegro_smart if the email has available SMART limit)

    Info


    Note

    Attention! Wrong service for the delivery method

    In case the wrong service is specified for the

    deliver

    delivery method (e.g. inpost_locker_standard service for Allegro

    Paczkomaty

    Paczkomat® 24/7), SMART will not be available.

    Sample

    Examples of inquiries are available

    on the website parcel for Delivery Option - Allegro Paczkomaty

    package for Allegro Paczkomat® 24/7 InPost delivery method:

    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",
            "address": {
                "
    phone
    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"
    }

    In response the server will return status 201

    code
    '

    Response

    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": 
    "dowolny komentarz"
    null,
        "mpk": null,
        "additional_services": [],
        "custom_attributes": {
            "target_point": "KRA012",
            
    "BBI01A
    "sending_method": "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"
    }