Skip to main content

Create Jobs (Packages)

Creating a job for an ePostage label only

In this section, you 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.dps.io/api
APIVersion: v1
route: jobs
path:
Method
POST
URL
https://api.dps.io/api/v1/jobs
Request Headers
{
"Content-Type": "application/json",
"x-api-key": "<YOUR_API_KEY>",
"ShipperHash": "<YOUR_SHIPPER_HASH>"
}
Request Body
{
"TopicHash": "",
"ShipperHash": "{{ShipperHash}}",
"IsHazardous": false,
"HazardousMaterial": "Gases,Flammable Solids,Explosives,Flammable and Combustible Liquids,Oxidizing Substances, Organic Peroxides",
"PostageType": "PRIL",
"Unit": "Lb",
"FromName": "John Doe",
"FromCompany": "MyCompany",
"FromAddressLine1": "12575 Placida RD",
"FromAddressLine2": "Placida",
"FromCity": "Placida",
"FromState": "FL",
"FromZip": "33946",
"FromPhone": "987****210",
"FromCountry": "united states",
"Weight": "10.5",
"ExtraInfo": "",
"COMCode": "COM",
"StorageClass": "1Year",
"ApiService": "ePostage "
}
Curl request
curl --location --request POST 'https://api.dps.io/api/v1/jobs' \
--header 'x-api-key: xxxxxxdfjbdjdfjdhfxxxxxxx' \
--header 'ShipperHash: 7z2PC****************************bzAg' \
--header 'Content-Type: application/json' \
--data-raw ' {
"TopicHash": "",
"ShipperHash": "7z2PC****************************bzAg",
"IsHazardous": false,
"HazardousMaterial": "Gases,Flammable Solids,Explosives,Flammable and Combustible Liquids,Oxidizing Substances, Organic Peroxides",
"PostageType": "PRIL",
"Unit": "Lb",
"FromName": "John Doe",
"FromCompany": "MyCompany",
"FromAddressLine1": "12575 Placida RD",
"FromAddressLine2": "Placida",
"FromCity": "Placida",
"FromState": "FL",
"FromZip": "33946",
"FromPhone": "987****210",
"FromCountry": "united states",
"Weight": "10.5",
"ExtraInfo": "",
"COMCode": "COM",
"StorageClass": "1Year",
"ApiService": "ePostage "
}'
Response Body
{
"UniqueJobId": "DPS-00051-00004",
"TopicHash": "",
"DocumentHashList": [],
"NotarizedDocumentHash": "",
"AttachmentHash": "",
"ExtraWeight": "",
"CreatedDate": "2022-11-14T18:51:33.555099",
"LastModified": "2022-11-14T18:51:33.555099",
"ShipperHash": "7z2PC****************************bzAg",
"ExtraInfo": "",
"DoubleSided": false,
"FromName": "John Doe",
"FromCompany": "MyCompany",
"FromAddressLine1": "12575 Placida RD",
"FromAddressLine2": "Placida",
"FromCity": "Placida",
"FromState": "FL",
"FromZip": "33946",
"FromCountry": "united states",
"FromPhone": "987****210",
"Provider": "USPS",
"PostageType": "PRIL",
"DispatchStatus": "Draft",
"IsHazardous": false,
"HazardousMaterial": "",
"Weight": 0.66,
"PageCount": 3,
"Mode": "Draft",
"IsDocumentVerified": true,
"Stage": "dev",
"Color": false,
"COMType": "COM",
"IsCom": true,
"StorageClass": "1Year",
"ReturnEnvelope": false,
"ProviderJobInfo": "",
"ApiService": "ePostage ",
"JobHash": "77oA******dM1I7W"
}