Rate - JSON Specification

Summary

Use this format to send a rate to chain.io
When receiving a rate from chain.io the same format will be used
NameDescription
RootThe top level document
RateThe standard rates JSON schema used in communication from/to chain.io
NoteA textual message
RateSegmentA Rate Segment
AddressA physical location.
RateLineA Rate Line
RateItemA Rate Item
WeightBreakA breakup of weight data
NameData TypeDescriptionRequired
doc_typeStringAlways chainio_rate
ratesArray<Rate>Array of Standard Rate objects
versionStringThe version of the specification being used.
NameData TypeDescriptionRequired
commodity_typeStringA code for a type of goods being transported
company_codeStringThe internal company account in the source system that owns the rate
containerization_typeStringThe explanation of how the consolidation is containerized. Can be any of the following values: LSE (Loose Freight), FCL (Full Container), LCL (Less Than Container), FTL (Full Truckload), or LTL (Less Than Truckload).
contract_numberStringThe contract number for the rate.
customer_numberStringThe seller's ID for the customer. Do not populate for public / general rates.
destination_typeStringThe type of destination service provided (CFS, Door, Port, etc)
freight_payment_termsStringThe payment terms for shipment. For example, Prepaid or Collect. This is different from the purchase_order document's inco_term and payment_term fields.
inco_termsStringThe type of payment method that the shipper will use to complete payment for the shipment or customs clearance.
notesArray<Note>optional notes that need to be added
origin_typeStringThe type of origin service provided (CFS, Door, Port, etc)
payment_termsStringThe terms of payment.
quote_referenceStringThe reference number for the quote associated with the shipment.
rate_nameStringDescriptive name of the rate
rate_segmentsArray<RateSegment>An array of rate segments
service_levelStringThe level of service provided by the consolidation's mode of transportation.
source_system_idStringRecord identifier in the system that hosts the master copy of this record.
transport_modeStringThe mode of transportation for the Main rate segment. Recommended values: AIR, SEA, TRUCK, RAIL
type_codeStringRate type code of the rates. Eg: MKT, PRO, CTR, BUY, CXX.
valid_endDateTimeThis rate is valid before this moment.
valid_startDateTimeThis rate is valid at or after this moment.
NameData TypeDescriptionRequired
bodyStringThe note body.
note_typeStringThe type of note.
NameData TypeDescriptionRequired
carrier_codeStringThe SCAC code for the carrier performing the movement for this segment
carrier_nameStringThe name of the carrier responsible for the physical movement of the goods.
destinationAddressThe address of the port of destination
destination_viaAddressthe address of the ports through with the shipment travels
maximum_transit_timeDecimalThe maximum number of hours the shipment will take
minimum_transit_timeDecimalThe minimum number of hours the shipment will take
originAddressThe address of the port of origin
origin_viaAddressthe address of the ports through with the shipment travels
rate_linesArray<RateLine>Array of rate lines
segment_nameStringDescriptive name of the segment. USLAX-->USCHI
segment_typeStringThe type of segment: One of Precarriage, Main, Oncarriage
transit_time_uomStringTransit time unit of measure, example Days
transport_modeStringThe mode of transportation for the shipment. This is the TMS system's code, not the customs authorities code
valid_endDateTimeThis rate is valid before this moment.
valid_startDateTimeThis rate is valid at or after this moment.
NameData TypeDescriptionRequired
address_1StringThe first line of the address.
address_2StringThe second line of the address.
address_typeStringThe type of address represented by this element. Specific types may be defined on a per specification basis
cityStringThe city.
countryStringThe 2-Digit ISO 3166 Alpha-2 Country Code. Like 'US'
country_nameStringThe full name of the country like “United States”
iata_codeStringThe International Air Transport location identifier is a unique 3 letter code used in aviation and also in logistics to identify an airport
nameStringThe name associated with the address.
postal_codeStringThe postal or ZIP code.
stateStringThe state, province, or administrative division code
unlocodeStringThe UN/LOCODE associated with the address. Like 'USCHI'
NameData TypeDescriptionRequired
buy_rateRateItemThe amount for each increment in the rate calculation. If the rate is "$1 / 1000 KG" then this value is 1. If the rate is "10% per MainLeg" then this value is 10
conversion_factor_denominatorStringThe denominator unit of measure when perfoming volumetric conversions
conversion_factor_numeratorStringThe numerator unit of measure when performing volumetric conversions.
conversion_factor_valueDecimalA volumetric conversion factor for a charge line.
equipment_typeStringThe type of equipment for which this rate applies. If null, apply the line for all equipment types.
notesArray<Note>Notes about rate line
optionalStringWhether rate is optional. When associated with rate quotes, an optional rate typically outlines amounts for services that are available but not required as part of the freight movement (such as Storage fees). Optional lines should not affect invoicing totals for quotes.
rate_group_codeStringHow this rate should be grouped when presented to the customer like ORIGIN, DESTINATION, FREIGHT, etc.
sell_rateRateItemThe amount for each increment in the rate calculation. If the rate is "$1 / 1000 KG" then this value is 1. If the rate is "10% per MainLeg" then this value is 10
valid_fromDateTimeThis rate is valid at or after this moment.
valid_untilDateTimeThis rate is valid before this moment.
NameData TypeDescriptionRequired
base_amountDecimalWhen sending information regarding a compound rate, this represents the base amount of the rate. For example, in a rate representing $1000 + $100/per container the base amount is 100.
calculation_typeStringThe type of calculation to use to determine the buy amount for this rate like FLAT, PERKG, or any other value supported by the rate management system.
charge_codeStringThe charge code that will be used on the invoices
charge_descriptionStringThe charge description that should be displayed
conditional_typeStringAn optional filter code to indicate to the rating engine whether a chargecode is applicable or not. An example use case may be sending a code of 'BRK' to indicate to the rating engine to only include the charge if the forwarder is responsible for import / export clearances.
currencyStringThe 3-character ISO 4217 currency code in which the rate is displayed
drop_modeStringThe drop mode for the rate, if applicable to this calculation method. This is only applicable on sell rates, it will be ignored on buy rates.
geographic_zone_codeStringA code uniquely identifying the geographic zone that the rate will be applicable to. The rating engine should then only utilize this rate when the shipment aligns with this zone.
markup_baseFloatA set amount value, based on cost, used to markup a sell rate.
markup_percentageFloatA percentage value based on cost used to markup a sell rate.
markup_sell_calculation_orderStringA set value indicator for calculation order when both percentage and base unit markups are present. This indicator is used to determine which markups are calculated first, percentage or base.
markup_sell_minimumFloatA minimum set amount value based on cost used to markup a sell rate.
markup_sell_unit_priceFloatA set amount value based on cost per unit on measure that is used to markup a sell rate.
markup_unit_percentageFloatA percentage value based on cost per unit that used to markup a sell rate.
maximum_amountDecimalThe maximum amout that is/can be charged
minimum_amountDecimalThe minium amout that is/can be charged
unit_amountDecimalThe amount for each increment in the rate calculation. If the rate is "$1/1000 KG" then this value is 1. If the rate is "10% per MainLeg" then this value is 10
unit_of_measureStringThe unit of measure used to calculate the rate line
units_per_incrementDecimalThe number of units for each increment in the rate calculation. If the rate is "$1 / 1000 KG" then this value is 1000.
volumetric_factorDecimalThe volume component of the dimensional weight calculation ratio
weight_breaksArray<WeightBreak>The breakup of weights
weight_measure_indicatorStringIndicates to the rating engine the type of weight measure calculation to execute for this rate. An example might be sending a value of 'actual' to indicate to the rating engine to use the actual weight instead of the chargeable weight.
NameData TypeDescriptionRequired
amountStringThe amount to apply in the calculation if this is the appropriate rate break
greater_than_or_equal_toStringweight should be greater than or equal to
less_thanStringweight should be less than or equal to

Example