Versions Compared

Key

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

Webhook is used to send the user information about changes in the status of the shipment.

Info


For a production environment, the webhook address can be added on the page https://manager.paczkomaty.pl/zaloguj  in the My Account> API tab.

For a sandbox environment, the webhook address can be added on the page https://sandbox-manager.paczkomaty.pl/  in the My Account> API tab.


On this page

Table of Contents


Structure

The provided address must match 3 conditions.

  • Correct URL structure

  • access to the resource to which the entered URL points

  • resource should respond with HTTP 200 on request GET


URL structure example:

Code Block
http://www.serwer.pl:8080/catalog1/catalog2/file.xxx
where:
  • https (protocol)

  • www.serwer.pl (address)

  • 8080 (port)

  • /catalog1/catalog2/file.xxx (file path, please use lower case)

Info

Please note that the webhooks are sent from the IP address range 91.216.25.0/24. This IP address range is applicable for webhooks sent in both production and sandbox environments.


Data example when the shipment has been created:

Code Block
languagejson
{
  "event_ts": "2020-03-20 15:08:06 +0100",
  "event": "shipment_confirmed",
  "organization_id": 1,
  "payload": {
    "shipment_id": 49,
    "tracking_number": null"602677439331630337653846"
  }
}

Data example when the shipment status has been changed:

Code Block
languagejson
{
  "event_ts": "2020-03-20 15:08:42 +0100",
  "event": "shipment_status_changed",
  "organization_id": 1,
  "payload": {
    "shipment_id": 49,
    "status": "delivered",
    "tracking_number": null"602677439331630337653846"
  }
}

Data example when the shipment status has been changed to offers_prepared:

Code Block
languagejson
{
     "event_ts": "20202023-0312-1318 1012:4831:0158 +0100",
     "event": "offers_prepared",
     "organization_id": 1,
     "payload": {
          "shipment_id": 3491234567890,
           "offers": [
                {
                      "id": 4811421884561,
                     "status": "unavailable",
                      "expires_at": null,
                     "rate": null,
                   "  "currency": null,
                     "additional_services": [],
          "email",
               "carriersms":
{        ],
        "carrier": {
               "id": "inpost_locker",
          "name": "InPost Paczkomaty",
                  "namedescription": "InPost Paczkomaty", - Przesyłki paczkomatowe"
        },
        "service": {
           "descriptionid": "InPost Paczkomaty - Przesyłki paczkomatowe"
                },
                "service": {
                    "id": "inpost_locker_standard_smart",
                    "name": "Paczkomatowa standardowa",
                    "description": "Przesyłka paczkomatowa standardowa"
                },
                "unavailability_reasons": [
                    {
                        inpost_locker_allegro",
          "name": "Allegro Paczkomaty24/7 InPost",
          "description": "Przesyłka paczkomatowa Allegro Paczkomat 24/7 InPost"
        },
        "unavailability_reasons": [
          {
            "key": "additional_service_email_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          },
          {
            "key": "sending_method_required",
            "message": "sending_method_required"
          },
          {
            "key": "allegro_email_invalid",
                                "message": "allegro_email_invalid"
          }
        ]
      },
      {
  }      "id": 1421884563,
        "status": "unavailable",
        "expires_at": null,
]        "rate": null,
           }"currency": null,
        "additional_services": [
          "email",
{          "sms"
        ],
          "idcarrier": 480,{
          "id": "inpost_locker",
              "statusname": "unavailableInPost Paczkomaty",
          "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
        "expires_at": null  },
        "service": {
               "rateid": null"inpost_locker_pass_thru",
          "name": "Podaj dalej",
             "currencydescription": null,"Przesyłka paczkomatowa Podaj Dalej"
        },
            "additionalunavailability_servicesreasons": [],
          {
               "carrier": {
                    "id": "inpost_locker",
                    "name": "InPost Paczkomaty",
                    "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
                },
                "service": {
                    "id": "inpost_locker_allegro_smart",
                    "name": "Allegro Paczkomaty24/7 InPost",
                    "description": "Przesyłka paczkomatowa Allegro Paczkomaty24/7 InPost"
                },
                "unavailability_reasons": [
                    {
                        "key": "invalid_target_point_function",
                        "message": "Invalid target point function."
                    },
                    {
                        "message": "allegro_email_invalid"
                    }
                ]
            },
            {
                "id": 479,
                "status": "available",
                "expires_at": "2020-03-13T10:53:01.852+01:00",
                "rate": null,
                "currency": "PLN",
                "additional_services": [],
                "carrier": {
                    "id": "inpost_courier",
                    "name": "InPost Kurier",
                    "description": "InPost Express - Przesyłki kurierskie"
                },
                "service": {
                    "id": "inpost_courier_c2c",
                    "name": "Kurier standard",
                    "description": "Przesyłka kurierska standardowa"
                },
                "unavailability_reasons": null
            },
            {
                "id": 478,
                "status": "available",
                "expires_at": "2020-03-13T10:53:01.674+01:00",
                "rate": null,
                "currency": "PLN",
                "additional_services": [],
                "carrier": {
                    "id": "inpost_courier",
                    "name": "InPost Kurier",
                    "description": "InPost Express - Przesyłki kurierskie"
                },
                "key": "allegro_email_invalid",
                "service": {
                    "id": "inpost_courier_local_super_express",
                    "name": "Kurier lokalny SuperExpress",
                    "description": "Przesyłka kurierska lokalna super expresowa"
                },
                "unavailability_reasons": null
            },
            {
                "id": 477,
                 "key": "additional_service_email_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          },
          {
            "key": "dropoff_and_target_points_must_be_equal",
            "message": "Dropoff point and target point must be equal for selected service."
          }
        ]
      },
      {
        "id": 1421884564,
        "status": "unavailable",
        "expires_at": null,
        "rate": null,
        "currency": null,
        "additional_services": [
          "email",
          "sms"
        ],
        "carrier": {
          "id": "inpost_locker",
          "name": "InPost Paczkomaty",
          "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
        },
        "service": {
          "id": "inpost_locker_standard",
          "name": "Paczkomatowa standardowa",
          "description": "Przesyłka paczkomatowa standardowa"
        },
        "unavailability_reasons": [
          {
            "key": "additional_service_email_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          }
        ]
      },
      {
        "id": 1421884566,
        "status": "unavailable",
        "expires_at": null,
        "rate": null,
        "currency": null,
        "additional_services": [
          "email",
          "sms"
        ],
        "carrier": {
          "id": "inpost_letter",
          "name": "InPost Listy",
          "description": "Inpost Letter - Przesyłki listowe"
        },
        "service": {
          "id": "inpost_letter_allegro",
          "name": "Allegro miniKurier24 InPost",
          "description": "Przesyłka listowa Allegro miniKurier24 InPost"
        },
        "unavailability_reasons": [
          {
            "key": "additional_service_email_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          },
          {
            "key": "parcels_size_invalid",
            "message": "Parcel is too large or too heavy."
          },
          {
            "key": "sending_method_required",
            "message": "sending_method_required"
          },
          {
            "key": "allegro_email_invalid",
            "message": "allegro_email_invalid"
          }
        ]
      },
      {
        "id": 1421884567,
        "status": "unavailable",
        "expires_at": null,
        "rate": null,
        "currency": null,
        "additional_services": [
          "email",
          "sms"
        ],
        "carrier": {
          "id": "inpost_locker",
          "name": "InPost Paczkomaty",
          "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
        },
        "service": {
          "id": "inpost_courier_allegro",
          "name": "Allegro Kurier24 InPost",
          "description": "Przesyłka kurierska Allegro Kurier24 InPost"
        },
        "unavailability_reasons": [
          {
            "key": "additional_service_email_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          },
          {
            "key": "parcels_size_invalid",
            "message": "Parcel is too large or too heavy."
          },
          {
            "key": "sending_method_required",
            "message": "sending_method_required"
          },
          {
            "key": "allegro_email_invalid",
            "message": "allegro_email_invalid"
          }
        ]
      },
      {
        "id": 1421884568,
        "status": "available",
        "expires_at": "2023-12-18T12:36:58.279+01:00",
        "rate": null,
        "currency": "PLN",
        "additional_services": [
          "email",
          "sms"
        ],
        "carrier": {
          "id": "inpost_courier",
          "name": "InPost Kurier",
          "description": "InPost Express - Przesyłki kurierskie"
        },
        "service": {
          "id": "inpost_courier_standard",
          "name": "Kurier standard",
          "description": "Przesyłka kurierska standardowa"
        },
        "unavailability_reasons": null
      },
      {
        "id": 1421884569,
        "status": "available",
                     "expires_at": "20202023-0312-13T1018T12:5336:0058.941279+01:00",
                      "rate": null,
                     "currency": "PLN",
        "additional_services": [
               "additional_services": []"email",
          "sms"
        ],
         "carrier": {
                          "id": "inpost_courier",
                          "name": "InPost Kurier",
                          "description": "InPost Express - Przesyłki kurierskie"
                     },
                     "service": {
                           "id": "inpost_courier_localexpress_express1000",
                           "name": "Kurier lokalnydoręczenie Express10:00",
                          "description": "Przesyłka kurierska lokalnaz expresowa"doręczeniem do godziny 10:00 następnego dnia"
        },
         },
                "  "unavailability_reasons": null
                },
                {
                      "id": 4761421884570,
                      "status": "available",
                    "expires_at": "2020-03-13T10:53:00.344"expires_at": "2023-12-18T12:36:58.279+01:00",
                     "rate": null,
                      "currency": "PLN",
                     "additional_services": [],
          "email",
               "carriersms":
{        ],
        "carrier": {
               "id": "inpost_courier",
                          "name": "InPost Kurier",
                          "description": "InPost Express - Przesyłki kurierskie"
        },
        "service": {
         }  "id": "inpost_courier_express_1200",
          "name": "Kurier doręczenie 12:00",
            "servicedescription": {"Przesyłka kurierska z doręczeniem do godziny 12:00 następnego dnia"
        },
           "id"unavailability_reasons": "inpost_courier_local_standard",
                    "name": "Kurier lokalny Standard",
                    "description": "Przesyłka kurierska lokalna standardowa"
                },
                "unavailability_reasons": null
            },
            {
                "id": 475,
                "status": "available",
                "expires_at": "2020-03-13T10:52:59.408+01:00",
                "rate": null,
                "currency": "PLN",
                null
      },
      {
        "id": 1421884572,
        "status": "available",
        "expires_at": "2023-12-18T12:36:58.279+01:00",
        "rate": null,
        "currency": "PLN",
        "additional_services": [
          "email",
          "sms"
        ],
        "carrier": {
          "id": "inpost_courier",
          "name": "InPost Kurier",
          "description": "InPost Express - Przesyłki kurierskie"
        },
        "service": {
          "id": "inpost_courier_express_1700",
          "name": "Kurier doręczenie 17:00",
          "description": "Przesyłka kurierska z doręczeniem do godziny 17:00 następnego dnia"
        },
        "unavailability_reasons": null
      },
      {
        "id": 1421884574,
        "status": "unavailable",
        "expires_at": null,
        "rate": null,
        "currency": null,
        "additional_services": [],
          "email",
               "carriersms":
{        ],
        "carrier": {
               "id": "inpost_courierlocker",
                           "name": "InPost KurierPaczkomaty",
                           "description": "InPost ExpressPaczkomaty - Przesyłki kurierskiepaczkomatowe"
                      },
                     "service": {
                          "id": "inpost_courier_express_1700c2c",
                          "name": "Kurier doręczenie 17:00standard",
          "description": "Przesyłka kurierska standardowa"
        },
          "descriptionunavailability_reasons": "Przesyłka[
kurierska  z  doręczeniem  do  godziny  17:00{
następnego  dnia"          "key": "additional_service_email_unavailable",
            "message": "translation missing:  },
                "unavailability_reasons": null
            },
            {
                "id": 474,
                "status": "available",
                "expires_at": "2020-03-13T10:52:59.054+01:00",
               keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          },
          {
            "key": "sending_method_required",
            "message": "sending_method_required"
          }
        ]
      },
      {
        "id": 1421884576,
        "status": "unavailable",
        "expires_at": null,
        "rate": null,
                     "currency": "PLN"null,
        "additional_services": [
               "additional_services": []"email",
          "sms"
        ],
         "carrier": {
                        "  "id": "inpost_courierlocker",
                          "name": "InPost KurierPaczkomaty",
                          "description": "InPost ExpressPaczkomaty - Przesyłki kurierskiepaczkomatowe"
        },
        "service": {
         },
                "service": {
                    "id": "inpost_courier_express_1200",
                    "name": "Kurier doręczenie 12:00",
                    "description": "Przesyłka kurierska z doręczeniem do godziny 12:00 następnego dnia"
                },
                "unavailability_reasons": null
            },
            {
                "id": 473,
                "status": "available",
                "expires_at": "2020-03-13T10:52:57.679+01:00",
                "rate": null,
                "currency": "PLN",
                "additional_services": [],
                "carrier": {
                    "id": "inpost_courier",
                    "name": "InPost Kurier",
                    "description": "InPost Express - Przesyłki kurierskie"
                },
                "service": {
                    "id": "inpost_courier_express_1000",
                    "name": "Kurier doręczenie 10:00",
                    "description": "Przesyłka kurierska z doręczeniem do godziny 10:00 następnego dnia"
                },
                "unavailability_reasons": null
            },
            {
                "id": 472,
                "status": "unavailable",
                "expires_at": null,
                "rate": null,
                "currency": null,
                "additional_services": [],
                "carrier": {
                    "id": "inpost_courier",
                    "name": "InPost Kurier",
                    "description": "InPost Express - Przesyłki kurierskie"
                },
                "service": {
                    "id": "inpost_courier_allegro",
                    "name": "Allegro Kurier24 InPost",
                    "description": "Przesyłka kurierska Allegro Kurier24 InPost"
                },
                "unavailability_reasons": [
                    {
                        "key": "parcels_size_invalid",
                        "message": "Parcel is too large or too heavy."
                    },
                    {
                        "message": "allegro_email_invalid"
                    }
                ]
            },
            {
                "id": 471,
                "status": "available",
                "expires_at": "2020-03-13T10:52:57.115+01:00",
                "rate": null,
                "currency": "PLN",
                "additional_services": [],
                "carrier": {
                    "key": "allegro_email_invalid",
                    "id": "inpost_courier",
                    "name": "InPost Kurier",
                    "description": "InPost Express - Przesyłki kurierskie"
                },
                "service": {
                    "id": "inpost_courier_standard",
                    "name": "Kurier standard",
                    "description": "Przesyłka kurierska standardowa"
                },
                "unavailability_reasons": null
            },
            {
                "id": 470,
                "status": "unavailable",
                "expires_at": null,
                "rate": null,
                "currency": null,
                "additional_services": [],
                "carrier": {
                    "id": "inpost_letter",
                    "name": "InPost Listy",
                    "description": "Inpost Letter - Przesyłki listowe"
                },
                "service": {
                    "id": "inpost_letter_allegro",
                    "name": "Allegro miniKurier24 InPost",
                    "description": "Przesyłka listowa Allegro miniKurier24 InPost"
                },
                "unavailability_reasons": [
                    {
                        "key": "parcels_size_invalid",
                        "message": "Parcel is too large or too heavy."
                    },
                    {
                        "message": "allegro_email_invalid"
                    }
                ]
            },
            {
                "id": 469,
                "status": "unavailable",
                "expires_at": null,
                "rate": null,
                "currency": null,
                "additional_services": [],
                "key": "allegro_email_invalid",
                "carrier": {
                    "id": "inpost_locker",
                    "name": "InPost Paczkomaty",
                    "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
                },
                "service": {
                    "id": "inpost_locker_pass_thru",
                    "name": "Podaj dalej",
                    "description": "Przesyłka paczkomatowa Podaj Dalej"
                },
                "unavailability_reasons": [
                    {
                        "key": "dropoff_and_target_points_must_be_equal",
                        "message": "Dropoff point and target point must be equal for selected service."
                    }
                ]
            },
            {
                "id": 468,
                "status": "unavailable",
                "expires_at": null,
                "rate": null,
                "currency": null,
                "additional_services": [],
                "carrier": {
                    "id": "inpost_locker",
                    "name": "InPost Paczkomaty",
                    "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
                },
                "service": {
                    "id": "inpost_locker_allegro",
                    "name": "Allegro Paczkomaty24/7 InPost",
                    "description": "Przesyłka paczkomatowa Allegro Paczkomaty24/7 InPost"
                },
                "unavailability_reasons": [
                    {
                        "key": "invalid_target_point_function",
                        "message": "Invalid target point function."
                    },
                    {
                        "message": "allegro_email_invalid"
                    }
                ]
            },
            {
                "key": "allegro_email_invalid",
                "id": 467,
                "status": "unavailable",
                "expires_at": null,
                "rate": null,
                "currency": null,
                "additional_services": [],
                "carrier": {
                    "id": "inpost_locker",
                    "name": "InPost Paczkomaty",
                    "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
                },
                "service": {
                    "id": "inpost_locker_standard",
                    "name": "Paczkomatowa standardowa",
                    "description": "Przesyłka paczkomatowa standardowa"
                },
                "unavailability_reasons": [
                    {
                        "target_point": "translation missing: keys.errors.attributes.target_point.invalid"
                    }
                ]
            }
        ]
    }
}  "id": "inpost_locker_standard_smart",
          "name": "Paczkomatowa standardowa",
          "description": "Przesyłka paczkomatowa standardowa"
        },
        "unavailability_reasons": [
          {
            "key": "additional_service_email_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          },
          {
            "key": "allegro_email_invalid",
            "message": "allegro_email_invalid"
          }
        ]
      },
      {
        "id": 1421884577,
        "status": "unavailable",
        "expires_at": null,
        "rate": null,
        "currency": null,
        "additional_services": [
          "email",
          "sms"
        ],
        "carrier": {
          "id": "inpost_locker",
          "name": "InPost Paczkomaty",
          "description": "InPost Paczkomaty - Przesyłki paczkomatowe"
        },
        "service": {
          "id": "inpost_locker_allegro_smart",
          "name": "Allegro Paczkomaty24/7 InPost",
          "description": "Przesyłka paczkomatowa Allegro Paczkomat 24/7 InPost"
        },
        "unavailability_reasons": [
          {
            "key": "additional_service_email_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_email_unavailable"
          },
          {
            "key": "additional_service_sms_unavailable",
            "message": "translation missing: keys.errors.messages.additional_service_sms_unavailable"
          },
          {
            "key": "sending_method_required",
            "message": "sending_method_required"
          },
          {
            "key": "allegro_email_invalid",
            "message": "allegro_email_invalid"
          }
        ]
      }
    ]
  }
}

Data example when the shipment receives the ZDN status (Return to Sender - returned_to_sender)

 

Code Block
languagejson
{
"event_ts": "2023-05-23 14:56:01 +0200",
"event": "shipment_status_changed",
"organization_id": 12345,
"payload": {
"shipment_id": 709709700,
"status": "returned_to_sender",
"tracking_number": "630055758325001130630004",
"return_tracking_number": "520107015145404000176000"