Welcome to the Apilo Help Center.
[API] How to notify Apilo about a shipment created outside of Apilo
To inform Apilo about a shipment created outside the Apilo system, you need to use the endpoint:
POST http://{{apilo_client_account}}.apilo.com/rest/api/orders/{{example_order_id}}/shipment/
and send the content:
{r
"idExternal": "AL240800063",r
"tracking": "521000019901900018413826",r
"carrierProviderId": 144,r
"postDate": "2024-09-05T15:19:22+0200",r
"media": "2dcb6011-5d20-4af6-bc73-659538569b9e"r
}
where:
idExternal – External shipment number (e.g. in InPost)
tracking – Shipment tracking number (may change, e.g., when we redirect the package with the courier)
carrierProviderId – Carrier identifier
postDate – Shipment date (optional; defaults to today’s date)
media – UUID of the label file
How to obtain carrierProvideId? (context of informing about a shipment created outside of Apilo)
GET https://{{apilo_client_account}}.apilo.com/rest/api/orders/carrier/map/
NOTE: The above query will return a list of objects that should be carefully evaluated, especially the property “isBroker”:
Standard carriers such as: GLS, DPD, InPost will have the value false for this field.
On the other hand, carriers such as: Apaczka, Bliska Paczka, Wysyłam z Allegro will have the value true for this field.
What does this change? For Apilo and external integrations with which it is connected, the most important factor is who ultimately delivers the package, not who intermediates in this process.
Therefore, in the endpoint for informing Apilo about the shipment you should provide the IDs of those carriers, which have the field value “isBroker” = false.
[r
r
{r
"id": 3,r
"key": "CARRIER_253",r
"name": "Inpost (Courier, Parcel Lockers, Allegro)",333r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 143,r
"key": "CARRIER_258",r
"name": "Wysyłam z Allegro",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 5,r
"key": "CARRIER_257",r
"name": "Poczta Polska",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 25,r
"key": "CARRIER_249",r
"name": "DPD Polska",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 6,r
"key": "CARRIER_252",r
"name": "GLS Polska",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 111,r
"key": "CARRIER_265",r
"name": "UPS",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 110,r
"key": "CARRIER_256",r
"name": "ORLEN Paczka",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 160,r
"key": "CARRIER_375",r
"name": "ShipCenter",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 145,r
"key": "CARRIER_236",r
"name": "Furgonetka",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 142,r
"key": "CARRIER_245",r
"name": "Apaczka",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 28,r
"key": "CARRIER_231",r
"name": "DHL Polska",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 115,r
"key": "CARRIER_250",r
"name": "Fedex Polska",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 149,r
"key": "CARRIER_251",r
"name": "Global24",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 141,r
"key": "CARRIER_246",r
"name": "Bliska Paczka (SendIT)",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 146,r
"key": "CARRIER_235",r
"name": "Dostawy Erli.pl",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 140,r
"key": "CARRIER_232",r
"name": "Eurohermes",r
"description": null,r
"isBroker": truer
},r
r
{r
"id": 119,r
"key": "CARRIER_233",r
"name": "Geodis",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 112,r
"key": "CARRIER_254",r
"name": "External Courier",r
"description": null,r
"isBroker": falser
},r
r
{r
"id": 144,r
"key": "CARRIER_144",r
"name": "AllegroOneBox",r
"description": null,r
"isBroker": falser
}r
...r
]
Note: Allegro appeared on the list twice.
Besides being a broker, Allegro also has its own shipping method, i.e., Allegro One Box.
How to obtain media UUID? (context of informing about a shipment created outside of Apilo)
UUID is assigned to the file at the moment of its creation, in this case when sending an HTTP request with a header informing about the file name and the file in the body of the request
POST http://{{apilo_client_account}}.apilo.com/rest/api/media/
Authorization: Bearer {{access_token}}
Content-Disposition: filename=inpost-label-nr-987654.pdf
The response will include, among other things, the UUID.
{
“uuid”: “f419bdcf-1a4c-56bf-b28c-15a59a32fbad”,
“name”: “inpost-label-nr-987654.pdf”,
“type”: “application/pdf”,
“expiresAt”: “2024-09-25T16:07:44+0200”
}
