Tracking

Code Samples for Tracking: Java (.zip) | PHP (.zip) | C# (.zip)

Get Signature Image – REST

xNote: As part of our ongoing efforts to ensure enhanced privacy and security for our customers, the signature image is no longer available.

Summary

Name: Get Signature Image
Reason to Call: To retrieve the image of the signature provided for a specific parcel.
Input: PIN
Output: JPG image encoded as a string of bytes
Error Examples: PIN not found, signature not available
Typical Prior Calls: Get Tracking Summary, Get Tracking Details
Possible Next Call: Get Delivery Confirmation Certificate
Version history: Release notes

Request Details

Request – Structure for Get Signature Image

Endpoint

GET https://XX/vis/signatureimage/{pin number}

Replace... With...

XX (Development)

ct.soa-gw.canadapost.ca

XX (Production)

soa-gw.canadapost.ca

{pin number}

the parcel PIN

HTTP Headers

HTTP Header Variable

Value

Accept

application/vnd.cpc.track-v2+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

Request – Elements

There are no inputs other than the PIN, which is the only parameter required or allowed for this service.

Response Details

Response – Elements

There are no inputs other than the PIN, which is the only parameter required or allowed for this service.

Get Signature Image – REST – Detailed View of Response Elements
signature-image The top level element of the XML structure.

filename

Represents the filename of the image file.

image

64-bit encoded content of the file.

mime-type

Represents the MIME type of the file (type/subtype).

Response – Possible Error Responses

A correctly structured request may receive one of the following application error responses:

Code Description

004

No PIN History

002

Duplicate PIN

003

No Signature Image Available

Response – XML Diagram

Only one of the messages or signature-image structure will be returned.

XML diagram for Get Signature Image Response

XML diagram for Get Signature Image Response Message diagram

Examples

Sample REST XML Request – Get Signature Image

GET https://XX/vis/signatureimage/7253760000072566

Sample REST XML Response – Get Signature Image

<signature-image>
<filename>1371134583769923.jpg</filename>
<image>/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGB gcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICI sIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgND RgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI yMjIyMjIyMjIyMjIyMjIyMjL/wAARCABfAZADASIAAhEBAxEB8 QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBka </image>
<mime-type>image/jpg</mime-type>
</signature-image>