Shipping
Get Artifact – REST
Summary
Name: | Get Artifact |
---|---|
Reason to Call: | To retrieve a shipping label, a return label, or the paperwork required for shipment pickup or drop-off (manifest). Note: For labels, you can call Get Artifact a second time if the original label is destroyed, but the same label with the original barcode is returned each time. You cannot use copies on separate parcels. |
Input: | Invoke the link returned from a prior call where the href contains "/ers/artifact" or "/rs/artifact" and the rel value has the desired type. |
Output: | PDF or ZPL II document |
Error Examples: | Invalid / Expired Link |
Typical Prior Call: | Create Shipment, Get Shipment, Get Manifest or Create Authorized Return |
Typical Next Call: | Get Shipment Price, Get Manifest Details |
Optional Next Call: | Get Shipment Details or Create Shipment (to continue creating shipments) |
Version history: | Release notes |
Request Details
Request – Structure for Get Artifact
Endpoint
Invoke the link returned from a prior call where the href contains /ers/artifact or /rs/artifact and the rel value has the desired label type (see Provided endpoints).
HTTP Headers
HTTP Header Variable |
Value |
---|---|
Accept |
application/pdf or application/zpl (Note: */* in place of the header value will return an error) |
Authorization |
Basic {Base64 encoding of userid:password} |
Accept-language |
en-CA or fr-CA |
Body
None
Request – Elements
The Get Artifact service does not require any input XML data.
Response Details
The Get Artifact does not respond with any XML data elements. (Rather, it responds with ZPL II commands or binary data of the PDF file.)
Response – Possible Error Responses
No errors are expected for invocation of this link, but you will receive a 404 error if you invoke Get Artifact more than 90 days after the link was provided. If you are using Get Artifact to retrieve an authorized return label, you have only 5 calendar days to retrieve the label.
See HTTP status codes for more information.
Examples
Sample REST XML Request – Get Artifact
GET https://XX/ers/artifact/0456cd17e32a0039/3584/0
Accept:application/pdf
Authorization:Basic s7HD7gwsennesc==
Note: The HTTP endpoint link and "Accept" value should not be hardcoded. Rather, these values are provided as outputs from Create Shipment, Get Shipment, Get Manifest or Create Authorized Return.
Sample REST XML Response – Get Artifact
The Get Artifact does not respond with any XML data elements.
(Rather, it provides an HTTP response of ZPL II programming commands or a binary representation of the PDF file.)