FlavorCloud Partner API Documentation
  1. Rates
FlavorCloud Partner API Documentation
  • Authentication
    • Get Auth Token
      POST
  • Rates
    • Get Rates
      POST
  • Shipments
    • Create Shipments
      POST
    • Get Shipments
      GET
    • Cancel Shipments
      PUT
  • Tracking
    • Get Tracking Detail
      GET
  • Classifications
    • Get Classification
      POST
  • Landed Cost
    • Get Landed Cost
      POST
  • Webhooks
    • Subscribe Webhooks
      POST
    • Unsubscribe Webhooks
      POST
  • Invoices
    • Get Invoice Detail
      GET
    • Get Invoices
      GET
  1. Rates

Get Rates

POST
/Rates
Rates
This API call is used to return the rates for a shipment. All the details of the shipment should be provided to the api. Our route optimization engine determines the best available route based on cost, service level and historical performance.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
CustomerKey
string 
optional
Customer key
Example:
12345
Reference
string 
required
This field is for your reference. A good use of it would be to provide your order number here.
>= 1 characters<= 30 characters
Example:
test-rates-001
LabelFormat
string 
optional
Label Format
Default:
PDF
Examples:
PDFZPL
WeightUnit
string 
required
Unit for weight of the shipment.
Default:
LB
Examples:
LBKG
Currency
string 
required
currency for the rate
Default:
USD
Examples:
USDCADAUDGBPEURINR
DimensionUnit
string 
required
Unit for dimensions of the shipment.
Default:
IN
Examples:
INCM
Insurance
string 
required
Specify if insurance is required. Default is N.
Default:
N
Examples:
NY
ServiceCode
array[string]
optional
Allowed values:
STANDARDEXPRESSSTANDARD-ECONOMYEXPRESS-ECONOMY
TermsOfTrade
array[string]
optional
Allowed values:
DDPDDU
IsReturn
string 
optional
You can easily create return labels. All you need to do is set the IsReturn parameter to "Y", leave the addresses the same as the initial Shipment's creation request and we switch the To and From Addresses for the return Shipment.
Default:
N
Examples:
NY
IncludeLandedCost
boolean 
optional
Include Landed cost for DDP rates. Default is true
Default:
true
ShipFromAddress
object (Address) 
required
Name
string 
required
Name of person. Both name and company can be included
AttentionName
string 
required
Name of attention, if person
AddressLine1
string 
required
First line of the address
AddressLine2
string 
optional
Second line of the address
AddressLine3
string 
optional
Third line of the address
City
string 
required
Full city name
State
string 
optional
State or province
Country
string 
required
ISO 3166 country code for the country the address is located in
Zip
string 
optional
ZIP or postal code
Phone
string 
required
Phone number to reach the person or organization
Email
string 
required
Email to reach the person or organization
ShipToAddress
object (Address) 
required
ReasonForExport
string 
required
State the key reason for the shipment. Possible values could be 'documents', 'gift', 'merchandise', 'returned_goods', 'sample', or 'other'
Default:
merchandise
Pieces
array[object (Piece) {12}] 
required
Quantity
number 
required
Number of items
Weight
number 
required
weight of the piece
Length
number 
optional
Length of the parcel
Default:
1
Width
number 
optional
Width of the parcel
Default:
1
Height
number 
optional
Height of the parcel
Default:
1
SalePrice
number 
required
Price of the item
HSCode
string 
required
HS Code for the item
OriginCountryCode
string 
optional
Origin country of the item
Description
string 
required
Description of the item
SKU
string 
optional
Product SKU
Material
string 
optional
Material the item is made of
Category
array[string]
optional
Package
object (Package) 
required
Weight
number 
required
Total actual (scaled) weight of the package
Length
number 
optional
Length of the parcel when empty
Width
number 
optional
Width of the parcel when empty
Height
number 
optional
Height of the parcel when empty
Example
{
    "Reference": "test-rates-001",
    "LabelFormat": "PDF",
    "WeightUnit": "LB",
    "Currency": "USD",
    "DimensionUnit": "IN",
    "Insurance": "Y",
    "ServiceCode": [
        "STANDARD",
        "EXPRESS"
    ],
    "TermsOfTrade": [
        "DDP",
        "DDU"
    ],
    "IsReturn": "N",
    "IncludeLandedCost": true,
    "ShipFromAddress": {
        "Name": "FC Rates",
        "AttentionName": "",
        "AddressLine1": "1562 Washington St",
        "AddressLine2": "",
        "AddressLine3": "",
        "City": "San Francisco",
        "State": "CA",
        "Country": "US",
        "Zip": "94109",
        "Phone": "1111111111",
        "Email": "test@test.com"
    },
    "ShipToAddress": {
        "Name": "FC Rates",
        "AttentionName": "FC Rates",
        "AddressLine1": "49 Montcalm Ave",
        "AddressLine2": "",
        "AddressLine3": "",
        "City": "York",
        "State": "ON",
        "Country": "CA",
        "Zip": "M6E 4N8",
        "Phone": "1111111111",
        "Email": "test@test.com"
    },
    "ReasonForExport": "merchandise",
    "Pieces": [
        {
            "Quantity": 1,
            "Weight": 0.1,
            "Length": 1,
            "Width": 1,
            "Height": 1,
            "SalePrice": 10,
            "HSCode": "610910",
            "OriginCountryCode": "US",
            "Description": "T-SHIRT",
            "SKU": "1234567890",
            "Material": "",
            "Category": [
                "merchandise"
            ]
        }
    ],
    "Package": {
        "Weight": 0.5,
        "Length": 1,
        "Width": 1,
        "Height": 1
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://partnerapi.flavorcloud.com/Rates' \
--header 'Content-Type: application/json' \
--data-raw '{
    "Reference": "test-rates-001",
    "LabelFormat": "PDF",
    "WeightUnit": "LB",
    "Currency": "USD",
    "DimensionUnit": "IN",
    "Insurance": "Y",
    "ServiceCode": [
        "STANDARD",
        "EXPRESS"
    ],
    "TermsOfTrade": [
        "DDP",
        "DDU"
    ],
    "IsReturn": "N",
    "IncludeLandedCost": true,
    "ShipFromAddress": {
        "Name": "FC Rates",
        "AttentionName": "",
        "AddressLine1": "1562 Washington St",
        "AddressLine2": "",
        "AddressLine3": "",
        "City": "San Francisco",
        "State": "CA",
        "Country": "US",
        "Zip": "94109",
        "Phone": "1111111111",
        "Email": "test@test.com"
    },
    "ShipToAddress": {
        "Name": "FC Rates",
        "AttentionName": "FC Rates",
        "AddressLine1": "49 Montcalm Ave",
        "AddressLine2": "",
        "AddressLine3": "",
        "City": "York",
        "State": "ON",
        "Country": "CA",
        "Zip": "M6E 4N8",
        "Phone": "1111111111",
        "Email": "test@test.com"
    },
    "ReasonForExport": "merchandise",
    "Pieces": [
        {
            "Quantity": 1,
            "Weight": 0.1,
            "Length": 1,
            "Width": 1,
            "Height": 1,
            "SalePrice": 10,
            "HSCode": "610910",
            "OriginCountryCode": "US",
            "Description": "T-SHIRT",
            "SKU": "1234567890",
            "Material": "",
            "Category": [
                "merchandise"
            ]
        }
    ],
    "Package": {
        "Weight": 0.5,
        "Length": 1,
        "Width": 1,
        "Height": 1
    }
}'

Responses

🟢200Rate Response
application/json
Body
RateId
string 
required
Unique id that can be used to retrieve rate later if needed
Reference
string 
required
The reference id that was sent in the request. The intent of this id is for you to correlate the requests and responses
Currency
string 
required
currency for the rate
Standard
object (TradeModel) 
optional
DDU
object (RateDetailDDU) 
required
DDP
object (RateDetailDDP) 
required
Express
object (TradeModel) 
optional
StandardEconomy
object (TradeModel) 
optional
ExpressEconomy
object (TradeModel) 
optional
Pieces
object 
optional
HScode
string 
required
6 digit HSCode
HSLong
string 
required
Country specific long HS code (10/12/13 digit)
Example
{
    "RateId": 25911009,
    "Reference": "test-rates-001",
    "Currency": "USD",
    "Express": {
        "DDP": {
            "HashKey": "a0fd5b74-1a62-4ce6-8935-7ad9d5b3a2ff",
            "ShippingCost": 51.3,
            "ActualShippingCost": 51.3,
            "Insurance": 0,
            "DiscountedShippingCost": 51.3,
            "Days": "2-3 business days",
            "Carrier": "FlavorCloud",
            "LandedCostDetail": {
                "AIT": 0,
                "Duty": 0,
                "SalesTax": 0,
                "LandedCost": 0,
                "DutyHashKey": "6ae9af3a-d0a3-47b3-ab32-397165f356b7",
                "ActualAIT": 0,
                "ActualDuty": 0,
                "ActualSalesTax": 0,
                "ActualLandedCost": 0
            }
        },
        "DDU": {
            "HashKey": "ed3a2915-85b5-41fe-a884-72e944e7beb0",
            "ShippingCost": 29.2,
            "ActualShippingCost": 29.2,
            "Insurance": 0,
            "DiscountedShippingCost": 29.2,
            "Days": "2-3 business days",
            "Carrier": "FlavorCloud"
        }
    },
    "Standard": {
        "DDP": {
            "HashKey": "1be086b4-42a2-4c74-9c94-2aea0644a40f",
            "ShippingCost": 7.01,
            "ActualShippingCost": 7.01,
            "Insurance": 0,
            "DiscountedShippingCost": 7.01,
            "Days": "2-9 business days",
            "Carrier": "FlavorCloud",
            "LandedCostDetail": {
                "AIT": 0,
                "Duty": 0,
                "SalesTax": 0,
                "LandedCost": 0,
                "DutyHashKey": "d1588ae8-795c-4b79-9077-b392aae9d1fa",
                "ActualAIT": 0,
                "ActualDuty": 0,
                "ActualSalesTax": 0,
                "ActualLandedCost": 0
            }
        },
        "DDU": {
            "HashKey": "54eb85ba-10b2-45bd-9cc1-df11c7716cf5",
            "ShippingCost": 7.9,
            "ActualShippingCost": 7.9,
            "Insurance": 0,
            "DiscountedShippingCost": 7.9,
            "Days": "6-14 business days",
            "Carrier": "FlavorCloud"
        }
    },
    "Pieces": [
        {
            "HSCode": "610910",
            "HSLong": "6109100019"
        }
    ],
    "RootRequestId": "ad67c716-b83a-44bb-b0ac-b41be13c0bf0"
}
🟠401Authentication Error
🟠422Validation Error
🔴500Error Response
Modified at 2025-06-30 17:51:35
Previous
Get Auth Token
Next
Create Shipments
Built with