Loingsithe
Faigh lipéad loingsithe
Íoslódáil an lipéad loingsithe do loingsiú UPS, DHL Express, DHL Paket nó GO! mar PDF
GET
/
api
/
v1
/
shipments
/
{id}
/
label
curl --request GET \
--url https://anivahealth.com/api/v1/shipments/P261202KXTW/label \
--header 'x-api-key: YOUR_API_KEY' \
--output label-P261202KXTW.pdf
{
"error": "This shipment has no label to print: the DHL driver brings it to the pickup."
}
Íoslódáil lipéad seolta loingsithe. Priontáil é agus cuir ar an mbeartán é sula mbailíonn an t-iompróir é.
Tá an scóip
Ní theastaíonn ach an lipéad seo do bheartán UPS nó DHL Express a théann trí chustam. Seolaimid na sonraí custaim chuig an iompróir. Féach Custam.
shipments_view nó shipments_manage ag teastáil.
| Táirge iompróra | An méid a dhéanann tú |
|---|---|
| UPS agus DHL Express | Priontáil an lipéad. Le request_pickup, bailíonn an t-iompróir an beartán laistigh den fhuinneog bhailithe. Gan é, tabhair an beartán chuig an iompróir. |
| GO! | Priontáil an lipéad agus cuir ar an mbeartán é. Bailíonn an t-iompróir é laistigh den fhuinneog bhailithe. |
Bailiú DHL (dhl_parcel.retoure_pickup) | Níl aon rud le priontáil. Tugann an tiománaí an lipéad leis. Tugann an glao seo 404 ar ais. |
| Táirgí DHL eile (DHL Paket, Warenpost) | Priontáil an lipéad agus tabhair an beartán chuig DHL. |
| Cúiréirí Rotrunner agus Rapido | Níl aon rud le priontáil. Tugann an glao seo 404 ar ais. |
Iarratas
Paraiméadair chosáin
ID tagartha lastais, mar a thugann Cruthaigh lastas ar ais é
(m.sh.
P261202KXTW).Freagra
Nuair a éiríonn leis, tugann an API200 OK ar ais leis an lipéad mar application/pdf, 100 × 150 mm. Is é label-{id}.pdf
ainm an chomhaid.
Freagraí earráide
| Stádas | Cur síos |
|---|---|
400 | Ní tagairt bhailí loingsithe é an ID. |
403 | Tá an loingsiú lasmuigh de chomhthéacs rochtana d’eochrach API. |
404 | Níl an loingsiú ann, nó níl aon lipéad le priontáil aige. |
500 | Earráid inmheánach freastalaí. |
curl --request GET \
--url https://anivahealth.com/api/v1/shipments/P261202KXTW/label \
--header 'x-api-key: YOUR_API_KEY' \
--output label-P261202KXTW.pdf
{
"error": "This shipment has no label to print: the DHL driver brings it to the pickup."
}
⌘I
curl --request GET \
--url https://anivahealth.com/api/v1/shipments/P261202KXTW/label \
--header 'x-api-key: YOUR_API_KEY' \
--output label-P261202KXTW.pdf
{
"error": "This shipment has no label to print: the DHL driver brings it to the pickup."
}