Get Pricing
In this section, we will learn about how you can get the list of pricing for a job.
URL Config
Method: POST
Endpoint: https://api.dps.io/api
APIVersion: v1
route: postage
path: pricing
Method
POST
URL
https://api.dps.io/api/v1/postage/pricings
Request Headers
{
"Content-Type": "application/json",
"x-api-key": "<YOUR_API_KEY>",
"ShipperHash": "<YOUR_SHIPPER_HASH>"
}
Request Body
{
"OriginZip": "93951",
"DestinationZip": "93950",
"Weight": "5",
"PriceType": "commercial",
"Width": 0,
"Length": 0,
"Height": 0,
"Container": "MD FLAT RATE BOX",
"IsHazardous": true,
"Unit": "oz, lb",
"PackageType": "SOFT PACK ENVELOPE"
}
Curl request
curl --location --request POST 'https://api.dps.io/api/v1/postage/pricings' \
--header 'x-api-key: xxxxxxdfjbdjdfjdhfxxxxxxx' \
--header 'ShipperHash: 05K9*************BJG6a' \
--header 'Content-Type: application/json' \
--data-raw '{
"OriginZip": "93951",
"DestinationZip": "93950",
"Weight": "5",
"PriceType": "commercial",
"Width": 0,
"Length": 0,
"Height": 0,
"Container": "MD FLAT RATE BOX",
"IsHazardous": true,
"Unit": "oz, lb",
"PackageType": "SOFT PACK ENVELOPE"
}'
Response Body
[
{
"Zone": "1",
"ServiceCode": "FC",
"DisplayName": {
"name": "FIRST CLASS",
"info": "Includes Certificate of Mailing, Certificate of Delivery"
},
"MailingService": "First-Class Package Service - Retail<sup>\\u2122</sup>",
"CommercialRate": 4.01,
"RegularPrice": 5.4,
"Title": "",
"SpecialServices": [],
"Container": "VARIABLE",
"DPSPrice": 4.01,
"SpecialServiceTitle": "Free Tracking"
},
{
"Zone": "1",
"ServiceCode": "Parcel Select",
"DisplayName": {
"name": "Parcel Select Ground",
"info": "Parcel Select Ground"
},
"MailingService": "Parcel Select Ground<sup>\\u2122</sup>",
"CommercialRate": 7.47,
"RegularPrice": 8.8,
"Title": "Parcel Select Ground Cubic",
"SpecialServices": [],
"Container": "VARIABLE",
"DPSPrice": 7.47,
"SpecialServiceTitle": "Free Tracking"
},
{
"Zone": "1",
"ServiceCode": "PMAIL",
"DisplayName": {
"name": "PRIORITY MAIL",
"info": "Includes Certificate of Mailing, USPS ( Proof of Delivery)"
},
"MailingService": "Priority Mail<sup>\\u00ae</sup>",
"CommercialRate": 7.62,
"RegularPrice": 9.0,
"Title": "Priority Mail Cubic",
"SpecialServices": [],
"Container": "VARIABLE",
"DPSPrice": 7.62,
"SpecialServiceTitle": "Free Tracking \\u2022 $100 insurance included"
},
{
"Zone": "1",
"ServiceCode": "PRIL",
"DisplayName": {
"name": "PRIORITY MAIL EXPRESS",
"info": "Includes Certificate of Mailing, USPS ( Proof of Delivery)"
},
"MailingService": "Priority Mail Express 2-Day<sup>\\u00ae</sup>",
"CommercialRate": 23.75,
"RegularPrice": 27.25,
"Title": "",
"SpecialServices": [],
"Container": "VARIABLE",
"DPSPrice": 23.75,
"SpecialServiceTitle": "Free Tracking \\u2022 $100 insurance included"
}
]
Note
ServiceCode the value of ServiceCode you need to pass to job API while creating a job as "PostageType"