This method calculates the shipping costs for a shipment, or multiple permutations of a shipment, to allow your customers to select the best rate.
Most carrier apps should implement this method, unless you don't support rating shipments.
service_code | string or null If present, a specific service is being requested, and that is the only rate required to fulfill the request. The service code uniquely identifies a shipping service that you offer. Which service codes can be passed to you will be configured in ShipEngine. |
ship_datetime required | string <date-time> When the package is expected to ship. Not guaranteed to be in the future. Formatted per the https://tools.ietf.org/html/rfc3339 spec. Will always be in UTC. |
confirmation | string (ConfirmationTypes) Enum: "None" "Delivery" "Signature" "AdultSignature" "DirectSignature" |
object (AdvancedOptions) This is a schemaless object. It is for open ended customizations unique to particular carriers. The documented keys are some common options shared by many carriers, but are not definitive. Advanced options you support will be defined in ShipEngine. If the field is absent it should be interpreted as the default value for any applicable options, e.g. false for booleans. | |
insurance_provider | string (InsuranceProviders) Enum: "None" "ShipStation" "Carrier" "External" "XCover" "ParcelGuard" |
is_return_label required | boolean Whether this label is to return a previously shipped package. If the field is absent it should be interpreted as false. |
required | Array of objects or null (Package) All the packages that make up this shipment. There will always be at least one package defined. |
object (Customs) | |
required | object (ShipTo) |
required | object (ShipFrom) The shipment sender's address. It may or may not have been validated. |
object (PudoLocation) Pickup/Dropoff Location used by carriers that offer this service. | |
international | boolean or null Whether this shipment is deemed international. |
next_day | boolean or null Whether this shipment is expected to use a next day service class. If the field is absent it should be interpreted as false |
object (FulfillmentPlanDetails) This model contains information about the fulfillment plan. | |
object (BillTo) Bill to is a generic object used for billing a part of the shipment, duties, taxes, or otherwise to a party other than the shipper (the shipper is considered the default party responsible). CarrierApi.Common.Request.CarrierApi.Common.Models.BillTo extends CarrierApi.Common.Models.Addresses.AddressWithContact since address fields are often required when associating billing to another account. Additionally, this allows for a contact to be specified, if necessary. | |
object (TimeWindow) | |
transaction_id required | string <uuid> The transaction ID uniquely represents this request. If the request is retried then this transaction ID will be the same. You should only perform the requested action once per given transaction ID. |
object (Authorization) | |
object or null | |
connection_name | string or null The name of the connection to use, if this app has connection names defined |
This object model represents the response from a successful get rates request.
{- "service_code": "string",
- "ship_datetime": "2019-08-24T14:15:22Z",
- "confirmation": "None",
- "advanced_options": {
- "contains_alcohol": true,
- "no_postage": true,
- "nonmachineable": true,
- "saturday_delivery": true,
- "tip": {
- "amount": "string",
- "currency": "string"
}, - "additional_handling": true,
- "collect_on_delivery": {
- "payment_amount": {
- "amount": "string",
- "currency": "string"
}, - "payment_type": "any"
}, - "own_document_upload": true,
- "dangerous_goods": true,
- "dangerous_goods_contact": {
- "name": "string",
- "phone": "string"
}, - "limited_quantity": true,
- "event_notification": true,
- "windsor_framework_details": {
- "movement_indicator": "b2c",
- "not_at_risk": true
}, - "property1": null,
- "property2": null
}, - "insurance_provider": "None",
- "is_return_label": true,
- "packages": [
- {
- "package_code": "string",
- "content_description": "string",
- "dimension_details": {
- "dimensions_in_centimeters": {
- "length": 0,
- "width": 0,
- "height": 0
}, - "dimensions_in_inches": {
- "length": 0,
- "width": 0,
- "height": 0
}, - "source_dimensions": {
- "length": 0,
- "width": 0,
- "height": 0
}, - "source_dimension_unit": "inches"
}, - "weight_details": {
- "weight_in_ounces": 0,
- "weight_in_grams": 0,
- "source_weight": 0,
- "source_weight_unit": "grams"
}, - "insured_value": {
- "amount": "string",
- "currency": "string"
}, - "label_messages": {
- "reference1": "string",
- "reference2": "string",
- "reference3": "string"
}, - "products": [
- {
- "description": "string",
- "quantity": 0,
- "value": {
- "amount": "string",
- "currency": "string"
}, - "country_of_origin": "string",
- "harmonized_tariff_code": "string",
- "sku": "string",
- "sku_description": "string",
- "item_weight": {
- "weight_in_ounces": 0,
- "weight_in_grams": 0,
- "source_weight": 0,
- "source_weight_unit": "grams"
}, - "product_url": "string",
- "vat_rate": 0,
- "mid_code": "string",
- "dangerous_goods": [
- {
- "id_number": "string",
- "shipping_name": "string",
- "technical_name": "string",
- "product_class": "string",
- "product_class_subsidiary": "string",
- "packaging_group": "i",
- "dangerous_amount": {
- "amount": null,
- "unit": null
}, - "quantity": 0,
- "packaging_instruction": "string",
- "packaging_instruction_section": "section_1",
- "packaging_type": "string",
- "transport_mean": "ground",
- "transport_category": "string",
- "regulation_authority": "string",
- "regulation_level": "lightly_regulated",
- "radioactive": true,
- "reportable_quantity": true,
- "tunnel_code": "string",
- "additional_description": "string"
}
], - "property1": null,
- "property2": null
}
]
}
], - "customs": {
- "contents": "merchandise",
- "non_delivery": "return_to_sender",
- "buyer_shipping_amount_paid": {
- "amount": "string",
- "currency": "string"
}, - "duties_paid": {
- "amount": "string",
- "currency": "string"
}, - "bill_duties_to": {
- "bill_to_party": "shipper",
- "account_number": "string",
- "name": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone_number": "string",
- "company_name": "string",
- "address_residential_indicator": "unknown",
- "instructions": "string",
- "address_metadata": {
- "property1": "string",
- "property2": "string"
}, - "address_lines": [
- "string"
], - "city_locality": "string",
- "state_province": "string",
- "postal_code": "string",
- "country_code": "string"
}, - "declaration": "string",
- "terms_of_trade_code": "exw",
- "importer_of_record": {
- "tax_identifiers": [
- {
- "id": "string",
- "type": "tin",
- "registration_country": "string",
- "description": "string"
}
], - "name": "string",
- "company_name": "string",
- "address_line1": "string",
- "address_line2": "string",
- "city_locality": "string",
- "state_province": "string",
- "postal_code": "string",
- "country_code": "string",
- "phone": "string",
- "email": "string"
}, - "invoice_additional_details": {
- "freight_charge": {
- "amount": "string",
- "currency": "string"
}, - "other_charge": {
- "amount": "string",
- "currency": "string"
}, - "other_charge_description": "string",
- "insurance_charge": {
- "amount": "string",
- "currency": "string"
}, - "discount": {
- "amount": "string",
- "currency": "string"
}
}, - "contents_explanation": "string",
- "export_declaration_number": "string"
}, - "ship_to": {
- "tax_identifiers": [
- {
- "id": "string",
- "type": "tin",
- "registration_country": "string",
- "description": "string"
}
], - "geolocation": [
- {
- "type": "what3words",
- "value": "string"
}
], - "name": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone_number": "string",
- "company_name": "string",
- "address_residential_indicator": "unknown",
- "instructions": "string",
- "address_metadata": {
- "property1": "string",
- "property2": "string"
}, - "address_lines": [
- "string"
], - "city_locality": "string",
- "state_province": "string",
- "postal_code": "string",
- "country_code": "string"
}, - "ship_from": {
- "tax_identifiers": [
- {
- "id": "string",
- "type": "tin",
- "registration_country": "string",
- "description": "string"
}
], - "name": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone_number": "string",
- "company_name": "string",
- "address_residential_indicator": "unknown",
- "instructions": "string",
- "address_metadata": {
- "property1": "string",
- "property2": "string"
}, - "address_lines": [
- "string"
], - "city_locality": "string",
- "state_province": "string",
- "postal_code": "string",
- "country_code": "string"
}, - "pickup_location": {
- "carrier_code": "string",
- "location_id": "string",
- "name": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone_number": "string",
- "company_name": "string",
- "address_residential_indicator": "unknown",
- "instructions": "string",
- "address_metadata": {
- "property1": "string",
- "property2": "string"
}, - "address_lines": [
- "string"
], - "city_locality": "string",
- "state_province": "string",
- "postal_code": "string",
- "country_code": "string"
}, - "international": true,
- "next_day": true,
- "fulfillment_plan_details": {
- "external_sales_order_identifiers": [
- {
- "type": "string",
- "value": "string"
}
], - "items": [
- {
- "external_sales_order_identifiers": [
- {
- "type": "string",
- "value": "string"
}
], - "external_product_identifiers": [
- {
- "type": "string",
- "value": "string"
}
], - "name": "string",
- "quantity": 0
}
], - "raw_external_source": {
- "marketplace_code": "string"
}
}, - "bill_shipping_to": {
- "bill_to_party": "shipper",
- "account_number": "string",
- "name": "string",
- "first_name": "string",
- "last_name": "string",
- "email": "string",
- "phone_number": "string",
- "company_name": "string",
- "address_residential_indicator": "unknown",
- "instructions": "string",
- "address_metadata": {
- "property1": "string",
- "property2": "string"
}, - "address_lines": [
- "string"
], - "city_locality": "string",
- "state_province": "string",
- "postal_code": "string",
- "country_code": "string"
}, - "carrier_pickup_window": {
- "time_zone_iana": "America/Chicago",
- "start_window": "2021-08-20T14:38:36.859237-05:00",
- "end_window": "2021-08-20T18:38:36.859237-05:00"
}, - "transaction_id": "0fec1e58-b197-4052-99cf-2218496c5482",
- "authorization": {
- "access_token": "string",
- "connection_context": {
- "property1": "string",
- "property2": "string"
}
}, - "metadata": {
- "property1": { },
- "property2": { }
}, - "connection_name": "string"
}
{- "rates": [
- {
- "service_code": "string",
- "package_type": "string",
- "ship_datetime": "2019-08-24T14:15:22Z",
- "estimated_delivery_datetime": "2019-08-24T14:15:22Z",
- "billing_line_items": [
- {
- "billing_category": "uncategorized",
- "carrier_description": "string",
- "carrier_billing_code": "string",
- "memo": "string",
- "amount": {
- "amount": "string",
- "currency": "string"
}
}
], - "error_messages": [
- "string"
], - "warning_messages": [
- "string"
], - "negotiated_rate": true,
- "carrier_pickup_window": {
- "time_zone_iana": "America/Chicago",
- "start_window": "2021-08-20T14:38:36.859237-05:00",
- "end_window": "2021-08-20T18:38:36.859237-05:00"
}, - "delivery_window": {
- "time_zone_iana": "America/Chicago",
- "start_window": "2021-08-20T14:38:36.859237-05:00",
- "end_window": "2021-08-20T18:38:36.859237-05:00"
}, - "carrier_rate_id": "string",
- "expiration_datetime": "2021-08-20T14:38:36.859237-05:00",
- "estimated_delivery_text": "string"
}
], - "metadata": {
- "property1": { },
- "property2": { }
}
}