Rating
The Rating API is used when rating or shopping a shipment. For more information on the Rating API, please visit the Product Overview page.
path Parameters
query Parameters
header Parameters
Request Body schema: application/json
Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
successful operation
Invalid Request
Unauthorized Request
Blocked Merchant
Rate Limit Exceeded
- Payload
- curl
- Node.js
- JavaScript
- PHP
- Python
- C#
- Java
{- "RateRequest": {
- "Request": {
- "TransactionReference": {
- "CustomerContext": "CustomerContext"
}
}, - "Shipment": {
- "Shipper": {
- "Name": "ShipperName",
- "ShipperNumber": "ShipperNumber",
- "Address": {
- "AddressLine": [
- "ShipperAddressLine",
- "ShipperAddressLine",
- "ShipperAddressLine"
], - "City": "TIMONIUM",
- "StateProvinceCode": "MD",
- "PostalCode": "21093",
- "CountryCode": "US"
}
}, - "ShipTo": {
- "Name": "ShipToName",
- "Address": {
- "AddressLine": [
- "ShipToAddressLine",
- "ShipToAddressLine",
- "ShipToAddressLine"
], - "City": "Alpharetta",
- "StateProvinceCode": "GA",
- "PostalCode": "30005",
- "CountryCode": "US"
}
}, - "ShipFrom": {
- "Name": "ShipFromName",
- "Address": {
- "AddressLine": [
- "ShipFromAddressLine",
- "ShipFromAddressLine",
- "ShipFromAddressLine"
], - "City": "TIMONIUM",
- "StateProvinceCode": "MD",
- "PostalCode": "21093",
- "CountryCode": "US"
}
}, - "PaymentDetails": {
- "ShipmentCharge": [
- {
- "Type": "01",
- "BillShipper": {
- "AccountNumber": ""
}
}
]
}, - "Service": {
- "Code": "03",
- "Description": "Ground"
}, - "NumOfPieces": "1",
- "Package": {
- "SimpleRate": {
- "Description": "SimpleRateDescription",
- "Code": "XS"
}, - "PackagingType": {
- "Code": "02",
- "Description": "Packaging"
}, - "Dimensions": {
- "UnitOfMeasurement": {
- "Code": "IN",
- "Description": "Inches"
}, - "Length": "5",
- "Width": "5",
- "Height": "5"
}, - "PackageWeight": {
- "UnitOfMeasurement": {
- "Code": "LBS",
- "Description": "Pounds"
}, - "Weight": "1"
}
}
}
}
}
- 200
- 400
- 401
- 403
- 429
{- "RateResponse": {
- "Response": {
- "ResponseStatus": {
- "Code": "s",
- "Description": "string"
}, - "Alert": [
- {
- "Code": "string",
- "Description": "string"
}
], - "AlertDetail": [
- {
- "Code": "string",
- "Description": "string",
- "ElementLevelInformation": {
- "Level": "s",
- "ElementIdentifier": [
- {
- "Code": null,
- "Value": null
}
]
}
}
], - "TransactionReference": {
- "CustomerContext": "string"
}
}, - "RatedShipment": [
- {
- "Disclaimer": [
- {
- "Code": "st",
- "Description": "string"
}
], - "Service": {
- "Code": "str",
- "Description": "string"
}, - "RateChart": "s",
- "Zone": "stri",
- "RatedShipmentAlert": [
- {
- "Code": "string",
- "Description": "string"
}
], - "BillableWeightCalculationMethod": "st",
- "RatingMethod": "st",
- "BillingWeight": {
- "UnitOfMeasurement": {
- "Code": "str",
- "Description": "string"
}, - "Weight": "strin"
}, - "TransportationCharges": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "BaseServiceCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "ItemizedCharges": [
- {
- "Code": "str",
- "Description": "string",
- "CurrencyCode": "str",
- "MonetaryValue": "string",
- "SubType": "string"
}
], - "FRSShipmentData": {
- "TransportationCharges": {
- "GrossCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "DiscountAmount": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "DiscountPercentage": "st",
- "NetCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}
}, - "FreightDensityRate": {
- "Density": "strin",
- "TotalCubicFeet": "string"
}, - "HandlingUnits": [
- {
- "Quantity": "string",
- "Type": {
- "Code": null,
- "Description": null
}, - "Dimensions": {
- "UnitOfMeasurement": null,
- "Length": null,
- "Width": null,
- "Height": null
}, - "AdjustedHeight": {
- "Value": null,
- "UnitOfMeasurement": null
}
}
]
}, - "ServiceOptionsCharges": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "TaxCharges": [
- {
- "Type": "string",
- "MonetaryValue": "string"
}
], - "TotalCharges": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "TotalChargesWithTaxes": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "NegotiatedRateCharges": {
- "BaseServiceCharge": [
- {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}
], - "RateModifier": [
- {
- "ModifierType": "str",
- "ModifierDesc": "string",
- "Amount": "string"
}
], - "ItemizedCharges": [
- {
- "Code": "str",
- "Description": "string",
- "CurrencyCode": "str",
- "MonetaryValue": "string",
- "SubType": "string"
}
], - "TaxCharges": [
- {
- "Type": "string",
- "MonetaryValue": "string"
}
], - "TotalCharge": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "TotalChargesWithTaxes": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}
}, - "RatedPackage": [
- {
- "BaseServiceCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "TransportationCharges": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "ServiceOptionsCharges": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "TotalCharges": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "Weight": "string",
- "BillingWeight": {
- "UnitOfMeasurement": {
- "Code": null,
- "Description": null
}, - "Weight": "string"
}, - "Accessorial": [
- {
- "Code": null,
- "Description": null
}
], - "ItemizedCharges": [
- {
- "Code": null,
- "Description": null,
- "CurrencyCode": null,
- "MonetaryValue": null,
- "SubType": null
}
], - "NegotiatedCharges": {
- "RateModifier": [
- null
], - "ItemizedCharges": [
- null
]
}, - "SimpleRate": {
- "Code": "st"
}, - "RateModifier": [
- {
- "ModifierType": null,
- "ModifierDesc": null,
- "Amount": null
}
]
}
], - "TimeInTransit": {
- "PickupDate": "stringst",
- "DocumentsOnlyIndicator": "string",
- "PackageBillType": "st",
- "ServiceSummary": {
- "Service": {
- "Description": "string"
}, - "GuaranteedIndicator": "string",
- "Disclaimer": "string",
- "EstimatedArrival": {
- "Arrival": {
- "Date": null,
- "Time": null
}, - "BusinessDaysInTransit": "strin",
- "Pickup": {
- "Date": null,
- "Time": null
}, - "DayOfWeek": "string",
- "CustomerCenterCutoff": "string",
- "DelayCount": "str",
- "HolidayCount": "st",
- "RestDays": "st",
- "TotalTransitDays": "strin"
}, - "SaturdayDelivery": "string",
- "SaturdayDeliveryDisclaimer": "string",
- "SundayDelivery": "string",
- "SundayDeliveryDisclaimer": "string"
}, - "AutoDutyCode": "st",
- "Disclaimer": "string"
}, - "GuaranteedDelivery": {
- "BusinessDaysInTransit": "string",
- "DeliveryByTime": "string",
- "ScheduledDeliveryDate": "string"
}, - "ScheduledDeliveryDate": "string",
- "RoarRatedIndicator": "string"
}
]
}
}
RatingDeprecated
The Rating API is used when rating or shopping a shipment.
path Parameters
deprecatedVersion required | string >= 1 Default: "v1" Indicates Rate API to display the new release features in Rate API response based on Rate release. See the New section for the latest Rate release. Valid values:
|
requestoption required | string <= 10 characters >= 1 Valid Values:
Rate is the only valid request option for UPS Ground Freight Pricing requests. |
query Parameters
header Parameters
Request Body schema: application/json
Generate sample code for popular API requests by selecting an example below. To view a full sample request and response, first click "Authorize" and enter your application credentials, then populate the required parameters above and click "Try it out".
required | object (RateRequest) <= 1 Rate Request container. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
successful operation
Invalid Request
Unauthorized Request
Blocked Merchant
Rate Limit Exceeded
- Payload
- curl
- Node.js
- JavaScript
- PHP
- Python
- C#
- Java
{- "RateRequest": {
- "Request": {
- "TransactionReference": {
- "CustomerContext": "CustomerContext"
}
}, - "Shipment": {
- "Shipper": {
- "Name": "ShipperName",
- "ShipperNumber": "ShipperNumber",
- "Address": {
- "AddressLine": [
- "ShipperAddressLine",
- "ShipperAddressLine",
- "ShipperAddressLine"
], - "City": "TIMONIUM",
- "StateProvinceCode": "MD",
- "PostalCode": "21093",
- "CountryCode": "US"
}
}, - "ShipTo": {
- "Name": "ShipToName",
- "Address": {
- "AddressLine": [
- "ShipToAddressLine",
- "ShipToAddressLine",
- "ShipToAddressLine"
], - "City": "Alpharetta",
- "StateProvinceCode": "GA",
- "PostalCode": "30005",
- "CountryCode": "US"
}
}, - "ShipFrom": {
- "Name": "ShipFromName",
- "Address": {
- "AddressLine": [
- "ShipFromAddressLine",
- "ShipFromAddressLine",
- "ShipFromAddressLine"
], - "City": "TIMONIUM",
- "StateProvinceCode": "MD",
- "PostalCode": "21093",
- "CountryCode": "US"
}
}, - "PaymentDetails": {
- "ShipmentCharge": [
- {
- "Type": "01",
- "BillShipper": {
- "AccountNumber": ""
}
}
]
}, - "Service": {
- "Code": "03",
- "Description": "Ground"
}, - "NumOfPieces": "1",
- "Package": {
- "SimpleRate": {
- "Description": "SimpleRateDescription",
- "Code": "XS"
}, - "PackagingType": {
- "Code": "02",
- "Description": "Packaging"
}, - "Dimensions": {
- "UnitOfMeasurement": {
- "Code": "IN",
- "Description": "Inches"
}, - "Length": "5",
- "Width": "5",
- "Height": "5"
}, - "PackageWeight": {
- "UnitOfMeasurement": {
- "Code": "LBS",
- "Description": "Pounds"
}, - "Weight": "1"
}
}
}
}
}
- 200
- 400
- 401
- 403
- 429
{- "RateResponse": {
- "Response": {
- "ResponseStatus": {
- "Code": "s",
- "Description": "string"
}, - "Alert": [
- {
- "Code": "string",
- "Description": "string"
}
], - "AlertDetail": [
- {
- "Code": "string",
- "Description": "string",
- "ElementLevelInformation": {
- "Level": "s",
- "ElementIdentifier": [
- {
- "Code": null,
- "Value": null
}
]
}
}
], - "TransactionReference": {
- "CustomerContext": "string"
}
}, - "RatedShipment": [
- {
- "Disclaimer": [
- {
- "Code": "st",
- "Description": "string"
}
], - "Service": {
- "Code": "str",
- "Description": "string"
}, - "RateChart": "s",
- "Zone": "stri",
- "RatedShipmentAlert": [
- {
- "Code": "string",
- "Description": "string"
}
], - "BillableWeightCalculationMethod": "st",
- "RatingMethod": "st",
- "BillingWeight": {
- "UnitOfMeasurement": {
- "Code": "str",
- "Description": "string"
}, - "Weight": "strin"
}, - "TransportationCharges": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "BaseServiceCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "ItemizedCharges": [
- {
- "Code": "str",
- "Description": "string",
- "CurrencyCode": "str",
- "MonetaryValue": "string",
- "SubType": "string"
}
], - "FRSShipmentData": {
- "TransportationCharges": {
- "GrossCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "DiscountAmount": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "DiscountPercentage": "st",
- "NetCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}
}, - "FreightDensityRate": {
- "Density": "strin",
- "TotalCubicFeet": "string"
}, - "HandlingUnits": [
- {
- "Quantity": "string",
- "Type": {
- "Code": null,
- "Description": null
}, - "Dimensions": {
- "UnitOfMeasurement": null,
- "Length": null,
- "Width": null,
- "Height": null
}, - "AdjustedHeight": {
- "Value": null,
- "UnitOfMeasurement": null
}
}
]
}, - "ServiceOptionsCharges": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "TaxCharges": [
- {
- "Type": "string",
- "MonetaryValue": "string"
}
], - "TotalCharges": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "TotalChargesWithTaxes": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "NegotiatedRateCharges": {
- "BaseServiceCharge": [
- {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}
], - "RateModifier": [
- {
- "ModifierType": "str",
- "ModifierDesc": "string",
- "Amount": "string"
}
], - "ItemizedCharges": [
- {
- "Code": "str",
- "Description": "string",
- "CurrencyCode": "str",
- "MonetaryValue": "string",
- "SubType": "string"
}
], - "TaxCharges": [
- {
- "Type": "string",
- "MonetaryValue": "string"
}
], - "TotalCharge": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "TotalChargesWithTaxes": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}
}, - "RatedPackage": [
- {
- "BaseServiceCharge": {
- "CurrencyCode": "str",
- "MonetaryValue": "string"
}, - "TransportationCharges": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "ServiceOptionsCharges": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "TotalCharges": {
- "CurrencyCode": "string",
- "MonetaryValue": "string"
}, - "Weight": "string",
- "BillingWeight": {
- "UnitOfMeasurement": {
- "Code": null,
- "Description": null
}, - "Weight": "string"
}, - "Accessorial": [
- {
- "Code": null,
- "Description": null
}
], - "ItemizedCharges": [
- {
- "Code": null,
- "Description": null,
- "CurrencyCode": null,
- "MonetaryValue": null,
- "SubType": null
}
], - "NegotiatedCharges": {
- "RateModifier": [
- null
], - "ItemizedCharges": [
- null
]
}, - "SimpleRate": {
- "Code": "st"
}, - "RateModifier": [
- {
- "ModifierType": null,
- "ModifierDesc": null,
- "Amount": null
}
]
}
], - "TimeInTransit": {
- "PickupDate": "stringst",
- "DocumentsOnlyIndicator": "string",
- "PackageBillType": "st",
- "ServiceSummary": {
- "Service": {
- "Description": "string"
}, - "GuaranteedIndicator": "string",
- "Disclaimer": "string",
- "EstimatedArrival": {
- "Arrival": {
- "Date": null,
- "Time": null
}, - "BusinessDaysInTransit": "strin",
- "Pickup": {
- "Date": null,
- "Time": null
}, - "DayOfWeek": "string",
- "CustomerCenterCutoff": "string",
- "DelayCount": "str",
- "HolidayCount": "st",
- "RestDays": "st",
- "TotalTransitDays": "strin"
}, - "SaturdayDelivery": "string",
- "SaturdayDeliveryDisclaimer": "string",
- "SundayDelivery": "string",
- "SundayDeliveryDisclaimer": "string"
}, - "AutoDutyCode": "st",
- "Disclaimer": "string"
}, - "GuaranteedDelivery": {
- "BusinessDaysInTransit": "string",
- "DeliveryByTime": "string",
- "ScheduledDeliveryDate": "string"
}, - "ScheduledDeliveryDate": "string",
- "RoarRatedIndicator": "string"
}
]
}
}