Creates a new postcard object
POST {{baseUrl}}/postcards
Creates a new postcard given information
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
idempotency_key | null | (optional) |
Request Body
[{"name"=>"description", "value"=>"Sample Postcard", "datatype"=>"string"}, {"name"=>"to", "value"=>"adr_58088d858a815c66", "datatype"=>"string"}, {"name"=>"from", "value"=>"", "datatype"=>"null"}, {"name"=>"billing_group_id", "value"=>"", "datatype"=>"null"}, {"name"=>"send_date", "value"=>"2021-06-01", "datatype"=>"string"}, {"name"=>"front", "value"=>"<html><body><h1>Hello World</h1></body></html>", "datatype"=>"string"}, {"name"=>"back", "value"=>"<html><body><h1>Goodbye</h1></body></html>", "datatype"=>"string"}, {"name"=>"size", "value"=>"4x6", "datatype"=>"string"}, {"name"=>"mail_type", "value"=>"usps_first_class", "datatype"=>"string"}, {"name"=>"merge_variables", "value"=>"{\"name\": \"Harry\"}", "datatype"=>"string"}, {"name"=>"metadata", "value"=>"{\"customer_id\": \"987654\"}", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Idempotency-Key | string | A string of no longer than 256 characters that uniquely identifies this resource. For more help integrating idempotency keys, refer to our implementation guide. | |
Content-Type | string |
RESPONSES
status: OK
{"id":"psc_208e45e48d271294","description":null,"metadata":{},"to":{"id":"adr_210a8d4b0b76d77b","description":null,"name":null,"company":"LOB","phone":null,"email":null,"address_line1":"185 BERRY ST STE 6100","address_line2":null,"address_city":"SAN FRANCISCO","address_state":"CA","address_zip":"94107-1741","address_country":"UNITED STATES","metadata":{},"date_created":"2018-12-08T03:01:07.651Z","date_modified":"2018-12-08T03:01:07.651Z","object":"address"},"url":"https://lob-assets.com/postcards/psc_208e45e48d271294.pdf?version=v1\u0026expires=1619218302\u0026signature=NfHHLBSr5tOHA_Z4kij4dKqZG8f3vMDtwvuFVeeF9pV_lylcjLsVVODhNCE5hR6-2slUr6t9WMNsi429Pj7_DA","carrier":"USPS","front_template_id":null,"back_template_id":null,"front_template_version_id":null,"back_template_version_id":null,"date_created":"2021-03-24T22:51:42.838Z","date_modified":"2021-03-24T22:51:42.838Z","send_date":"2021-03-24T22:51:42.838Z","object":"postcard"}