Skip to content

Send a PCM order

POST
/api/v1/pcm/orders
curl --request POST \
--url https://digize.com/api/v1/pcm/orders \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "product": "postcard", "designId": 1, "listId": "example", "tag": "example", "mailClass": "first_class", "color": true, "bothSides": false }'

Sends a postcard or a letter, made from one of the PCM Integrations account’s designs, to everyone on a LeadsPlease list who can still be mailed or to the CRM contacts with a tag and a whole mailing address (others are skipped), from the workspace’s return address. PCM prints and mails it and charges the account, unless it’s cancelled by 11:30 PM Eastern; a sandbox connection’s order is only accepted. Standard (Marketing Mail) under 200 pieces goes First-Class.

Needs the crm:write permission. It can’t be undone.

Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
product
required
string
Allowed values: postcard letter
designId
required

The design, from pcm.designs.list.

integer
> 0 <= 9007199254740991
listId

A LeadsPlease list to mail. Give this or tag.

string
>= 1 characters <= 64 characters
tag

A CRM tag: its contacts are mailed. Give this or listId.

string
>= 1 characters <= 100 characters
mailClass
string
default: first_class
Allowed values: first_class standard
color

A letter: printed in color.

boolean
default: true
bothSides

A letter: printed on both sides of each sheet.

boolean

Done

Media typeapplication/json
object
orderId
required
string | null
batchId
required
string | null
reference
required
string
recipients
required
integer
>= -9007199254740991 <= 9007199254740991
skipped
required

Contacts with the tag but without a whole mailing address.

integer
>= -9007199254740991 <= 9007199254740991
mailClass
required
string
Allowed values: first_class standard
sandbox
required
boolean

Example

{
"mailClass": "first_class"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}