Create Print2Mail Jobs
In this section we will learn about creating a job using DPS API. It is simple but your job status will remain in draft until you submit the job for checkout.
URL Config
Method: POST
Endpoint: https://api-stage.dps.io/api
APIVersion: v1
route: jobs
path:
Method
POST
URL
https://api-stage.dps.io/api/v1/jobs
Request Headers
{
"Content-Type": "application/json",
"x-api-key": "<YOUR_API_KEY>",
"ShipperHash": "<YOUR_SHIPPER_HASH>"
}
Request Body
{
"TopicHash": "<YOU TOPIC HASH>",
"NotarizedDocumentHash": "<YOUR TIMESTAMPED DOCUMENT HASH>",
"PostageType": "PRIL",
"FromPhone": "+179*****68",
"FromName": "JOHN WICK",
"FromCompany": "XYZ",
"FromAddressLine1": "1120 Sills Ct",
"FromAddressLine2": "4",
"FromCity": "Capitola",
"FromState": "CA",
"FromZip": "93950",
"FromCountry": "united states",
"ExtraInfo": "",
"DoubleSided": "True",
"COMCode": "COM",
"Color": "True",
"StorageClass": "1Year",
"ReturnEnvelope": "True",
"ApiService": "Print2Mail"
}
Curl request
curl --location --request POST 'https://api-stage.dps.io/api/v1/jobs' \
--header 'x-api-key: <YOUR API KEY>' \
--header 'ShipperHash: <YOU SHIPPER HASH> \
--header 'Content-Type: application/json' \
--data-raw ' {
"TopicHash": "<YOU TOPIC HASH>",
"NotarizedDocumentHash": "<YOUR TIMESTAMPED DOCUMENT HASH>",
"PostageType": "PRIL",
"FromPhone": "+179*****68",
"FromName": "JOHN WICK",
"FromCompany": "XYZ",
"FromAddressLine1": "1120 Sills Ct",
"FromAddressLine2": "4",
"FromCity": "Capitola",
"FromState": "CA",
"FromZip": "93950",
"FromCountry": "united states",
"ExtraInfo": "",
"DoubleSided": "True",
"COMCode": "COM",
"Color": "True",
"StorageClass": "1Year",
"ReturnEnvelope": "True",
"ApiService": "Print2Mail"
}'
Response Body
{
"UniqueJobId": "DPS-00051-00004",
"TopicHash": "<YOU TOPIC HASH>",
"NotarizedDocumentHash": "<YOUR TIMESTAMPED DOCUMENT HASH>",
"PostageType": "PRIL",
"FromPhone": "+179*****68",
"FromName": "JOHN WICK",
"FromCompany": "XYZ",
"FromAddressLine1": "1120 Sills Ct",
"FromAddressLine2": "4",
"FromCity": "Capitola",
"FromState": "CA",
"FromZip": "93950",
"FromCountry": "united states",
"ExtraInfo": "",
"DoubleSided": "True",
"COMCode": "COM",
"Color": "True",
"StorageClass": "1Year",
"ReturnEnvelope": "True",
"ApiService": "Print2Mail"
"JobHash": "77oA4R*****avdM1I7W"
}