Method: https://oms.tpl.com.br/api/get/freight

Objective: Performs BID quoting through tables – Depends on FREIGHT contract
          
            
Quantity field in items
For freight rules that consider quantity per SKU (for example, free shipping from a minimum quantity), each object in the items array may send the quantity using one of these numeric attributes: quantity, qty, qtd, or productQty. If none is sent, the item quantity is treated as 1.

JSON composition for sending:


{

*"auth" : key obtained in get/auth method
,"identification": text(20) – cnpj/cpf only 0..9
*,"to" : destination Zip Code (numbers only)
*,"weight" : weight in grams
*,"value" : total purchase value (without freight)
,"dimensions" : object with dimensions for cubed weight calculation
{

"width" : width in millimeters
,"height" : height in millimeters
,"length" : length in millimeters
,"qty" : volume quantity
}
,"items" : object containing product SKU or KIT code to compose freight rule
{

"sku" : product SKU
,"kit" : KIT code
,"supplier" : supplier name
,"collection" : product group or collection name
,"quantity" : item quantity
}
,"products" : object containing product SKU for cubed weight calculation based on dimensions registered in OMS (per product)
}



Notes:
Fields with * are mandatory


Returns with (SUCCESS):
[

{

"shipmentCompany": Carrier Name + "(N days)"
,"deadline": integer with delivery days
,"value": quotation value
,"originalValue" : quotation value without rules or tax
,"observation": text containing delivery info (if any)
,"safe": insurance value
,"cost": advalorem value
,"safecost": insurance + advalorem value
,"role": internal rule code used
,"extra": extra value
,"extraWeight": extra weight in grams
,"extraValue": extra value
,"icms": icms value
,"iss": iss value
,"aplicou": 0/1 to know if tax was applied to calculation
,"weightm3": cubed weight calculated by method
,"shipmentId": internal carrier code
,"state": State (UF) referring to the informed zip code
,"cubageFactor": Cubage factor
}
]

http code
200: BID returned successfully
402: no data received
406: mandatory fields not informed
407: origin not defined check client registration
408: invalid destination zip code
409: weight in grams not provided
410: zip code not served / weight not served / no active freight rule
411: zip code / weight not served
412: no carriers available - check freight rule
500: invalid auth
501: invalid credentials
502: client blocked