This request will create a postcard and perform a mail merge to put the address and any variable data in place.
Parameter | Type | Description |
---|---|---|
size | mandatory | Either "4x6" or "6x9" or "6x11". Download our 4x6 design guide. Download our 6x9 design guide. Download our 6x11 design guide. |
curl "https://ca.stannp.com/api/v1/postcards/create" \
-u {API_KEY}: \
{ "success": true, "data": { "pdf": "https://www.stannp.com/assets/samples/a6-postcard-sample.pdf", "id": "0", "created": "2020-12-17T15:42:22+00:00", "format": "A6", "cost": "0.78", "status": "test" } }
Obtain the mailpiece object for the postcard id specified.
Parameter | Type | Description |
---|---|---|
id | mandatory | The ID of the postcard to retrieve. |
curl "https://ca.stannp.com/api/v1/postcards/get/:id" \
-u {API_KEY}:
{ "success": true, "data": { "id": "16818211", "timestamp": "2019-10-30 00:14:04", "status": "cancelled", "type": "postcard", "format": "A6", "pdf_file": "https://dash.stannp.com/api/v1/storage/get/port/1550016843/pdfs/sample.pdf", "dispatched": null, "country": "GB", "cost": "0.00", "addons": "", "tags": "", "postcode": "AB12 3CD", "address": "123 Sample Street" } }
You can cancel a postcard if we haven't started processing it yet.
Parameter | Type | Description |
---|---|---|
id | mandatory | The ID of the postcard to cancel. |
curl "https://ca.stannp.com/api/v1/postcards/cancel" \
-u {API_KEY}: \
{ "success": true }