Returns
Retrieve Next Open Return Artifact – REST
Summary
Name: | Retrieve Next Open Return Artifact |
---|---|
Reason to Call: | Used to retrieve the next available artifact (label) associated with an open return template. |
Input: | None – the endpoint href is a direct link to invoke this service for a specific template. |
Output: | PDF or ZPL II document |
Typical Next Call: | Repeat this call to retrieve another label. |
Version history: | Release notes |
Request Details
Request – Structure for Retrieve Next Open Return Artifact
Endpoint
Invoke the link returned from a prior call to Create Open Return Template where the value of the attribute “rel” is “nextArtifact”.
HTTP Headers
HTTP Header Variable |
Value |
---|---|
Accept |
application/pdf or application/zpl (Note: */* in place of the header value will return an error) |
Content-Type |
application/vnd.cpc.openreturn+xml (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
Note: This service is called with a POST to align with the REST approach of using POST when results are different from call to call (i.e. every time this service is called, a different artifact will be returned).
Request – Elements
The Retrieve Next Open Return Artifact service does not require any input XML data.
Response Details
The Retrieve Next Open Return Artifact does not respond with any XML data elements. Rather, it responds with ZPL II programming commands or a binary representation of the PDF file.
Response – Possible Error Responses
In the case of an application error, an HTTP 400 level status code error response will be generated and the XML body will have an error message structure rather than the success response. For more information, see HTTP status codes.
Possible error messages for this service include the following:
HTTP Status Code | Application Error | Message |
---|---|---|
500 | N/A | Detailed schema validation error is provided. |
412 | 9999 |
Examples
Sample REST XML Request – Retrieve Next Open Return Artifact
POST https://XX/PROVIDED LINK
Accept:application/pdf
Authorization:Basic s7HD7gwsennesc==
Note: Do not hard-code the HTTP endpoint link. The link is provided as an output from Create Open Return Template.
Sample REST XML Response – Retrieve Next Open Return Artifact
The Retrieve Next Open Return Artifact does not respond with any XML data elements, but provides an HTTP response of ZPL II programming commands or a binary representation of the PDF file.