Job Submission
This is the final stage of a job, where it will be submitted for final checkout.
URL Config
Method: POST
Endpoint: https://api.dps.io/api
APIVersion: v1
route: jobs
path: package-checkout
Request Headers
{
"Content-Type": "application/json",
"x-api-key": "<YOUR_API_KEY>",
"ShipperHash": "7z2PC**********bzAg"
}
note
An object Checkout could have the following attributes
Key | Type | Length | Description |
---|---|---|---|
JobHash | String | 150 | Your newly created JobHash and it is required for checkout. |
Mode | String | 150 | Mode of checkout, it could be either Preview or Live |
ShipDate | String | 150 | This would be estimated ShipDate and format should be 'mm/dd/yyyy' |
Container | String | 150 | Pass valid container string, for more check here |
Width | String | 150 | Width will be required, if container is not VARIABLE |
Length | String | 150 | Length will be required, if container is not VARIABLE |
Height | String | 150 | Height will be required, if container is not VARIABLE |
info
If the container is not equal to VARIABLE, use Request Body (1).
Request Body (1)
{
"JobHash": "77oA******dM1I7W",
"Mode": "Preview",
"ShipDate": "mm/dd/yyyy",
"Container": "MD FLAT RATE BOX"
}
info
If the container is equal to VARIABLE, use Request Body (2).
Request Body (2)
{
"JobHash":"77oA******dM1I7W",
"Mode": "Preview",
"ShipDate": "mm/dd/yyyy",
"Container": "VARIABLE",
"Width": 5,
"Length": 1,
"Height": 1
}
tip
Use Preview mode to create a preview label before Live checkout/submission.
Use Live mode to create a live label (a charge will be deducted).
Response
{
"JobHash": "77oA******dM1I7W",
"ShipperHash": "7z2PC**********bzAg",
"TrackingHash": "Gzwz5*******JSn3yal9",
"ArticleNumber": "42093950******9992544",
"LabelPreviewUrl": "Label Preview Url",
"LabelKey": "Label Path",
"Charged": 34.95,
"Postage": "PRIL",
"Weight": 0.66,
"Mode": "Preview",
"SubscriptionName": "custom",
"LabelType": "4X6LABEL",
"ShipDate": "12/22/2022",
"Container": "VARIABLE",
"StorageCost": 0.0,
"CertificateCost": 1.0,
"PostageCost": 34.95,
"StorageYears": 1
}
info
Field | DataType | Description |
---|---|---|
JobHash | String | An unique job hash of your order. |
ShipperHash | String | Your identification hash. |
TrackingHash | Int | It will be your Tracking Id. |
ArticleNumber | Int | It will be your tracking number(you can use it track your order on USPS) |
LabelPreviewUrl | String | It will be your Generated ePostage label url, you can download it by using this url. |
LabelKey | String | Storage path your label. |
Charged | String | It would be the total charged amount from you. |
Postage | String | It will be your selected package. |
Weight | String | This is the weight of your package. |
Mode | String | This would be your checkout Mode. |
SubscriptionName | String | This will be the name of your subscription. |
LabelType | String | Default or applied label type. |
ShipDate | String | It would be your estimated ShipDate. |
Container | String | Your selected container |
StorageCost | String | Cost of storage based on your storage class. |
PostageCost | String | Total postage cost calculated by us including certificate and storage cost. |
CertificateCost | String | It would be your certificate cost, if you have already selected it otherwise it will be 0. |
StorageYears | String | It will be the number of storage years that you have selected while creating jobs. |
Curl request
curl --location --request POST 'https://api.dps.io/api/v1/jobs/package-checkout' \
--header 'x-api-key: <your-api-key>' \
--header 'ShipperHash: 7z2P****************zAg' \
--header 'Content-Type: application/json' \
--data-raw '{
'JobHash': '77oA******dM1I7W',
'Mode': 'Preview',
'ShipDate': 'mm/dd/yyyy',
'Container': 'MD FLAT RATE BOX'
}'