Skip to content
On this page

Create shipment

Endpoint: /v1/shipments

Method: POST

To create shipments you must use the POST method on the endpoint /v1/shipments.

Example:

http
POST /v1/shipments HTTP/1.1
Host: sandbox.tristarexpress.com
Content-Type: application/json
Accept: application/json
Authorization: {{ token }}

{ json }

Parameters

PropertyRequiredTypeDescription
bag_codeNStringMAWB bag identification
order_numberNStringInvoice Number
integration_codeNStringYour system ID
from_person_typeYIntegerSender person type, 1 for Individual, 2 for Legal
from_nameYStringSender complete name
from_document_typeYIntegerSender document type 1 for TAX_ID, 2 for PASSPORT
from_documentYStringSender Tax ID or Passport
from_company_nameYStringSender company name, required if from_person_type equals 2
from_trading_nameYStringSender company trading name, required if from_person_type equals 2
from_br_ieYStringSender company “Inscrição estadual”, required only if company has one
from_address_1YStringSender address line 1
from_address_2NStringSender address line 2
from_address_numberYStringSender address number
from_address_complementNStringSender address number complement
from_cityYStringSender city name
from_country_idYIntegerSender country ID, use BR = 32, CH = 46, PT = 179, US = 236
from_country_codeYIntegerSender country Code (US or USA), (BR or BRA), (PT or PRT) ISO3166
from_state_idYIntegerSender State ID, See States API
from_state_codeYStringSender State Code
from_postcodeYStringSender postcode, only numbers when possible
from_emailYStringSender contact email
from_phoneYStringSender contact phone
to_person_typeYIntegerDestination person type, 1 for Individual, 2 for Legal
to_nameYStringDestination complete name
to_document_typeYIntegerDestination document type 1 for TAX_ID, 2 for PASSPORT
to_documentYStringDestination Tax ID or Passport
to_company_nameYStringDestination company name, required if from_person_type equals 2
to_trading_nameYStringDestination company trading name, required if from_person_type equals 2
to_br_ieYStringDestination company “Inscrição estadual”, required only if company has one
to_address_1YStringDestination address line 1
to_address_2NIntegerDestination address line 2
to_address_numberYStringDestination address number
to_address_complementNStringDestination address complement
to_cityYStringDestination city name
to_country_idNIntegerDestination country ID, use BR = 32, CH = 46, PT = 179, US = 236 (Required if to_country_code not present)
to_country_codeNString (2)Destination country Code, alpha 2 or 3, ISO3166
to_state_idYIntegerDestination State ID, See States API
to_state_codeNString (2)Destination State Code, Required if to_state_id is not present
to_postcodeYStringDestination postcode, only numbers when possible
to_emailYStringDestination contact email
to_phoneYStringDestination contact phone
supervisory_organNIntegerSee Supervisory Organ List
currency_idNIntegerCurrency ID, default is USD (1)
package_widthYIntegerPackage width in centimeters
package_heightYIntegerPackage height in centimeters
package_lengthYIntegerPackage lenght in centimeters
package_weightYDecimal (6.3)Package weight in Kilograms (use dot . as decimal separator)
anvisa_import_authorization_numberNStringAnvisa Import Authorization Number
anvisa_product_commercial_nameNStringAnvisa Product Commercial Name Authorizated
total_insuranceNDecimal (6.3)Total Insurance paid, (use dot . as decimal separator)
prc_iiNDecimal (6.3)PRC Total II paid, (use dot . as decimal separator)
prc_icmsNDecimal (6.3)PRC Total ICMS paid, (use dot . as decimal separator)
payment_ccNStringCredit Card Last 4 digits
payment_cc_brandNStringCredit Card Brand (Visa, Master, ...)
payment_cc_typeNStringC for Credit, D for Debit
totalYDecimal (12.2)Total declared value, (use dot . as decimal separator)
total_freightYDecimal (12.2)Total charged and declared value, (use dot . as decimal separator)
total_taxYDecimal (12.2)Total declared value, (use dot . as decimal separator)
with_insuranceYBooleanIf you want to add insurance
itemsYArraySee ShipmentItem Type

Shipment Item

PropertyRequiredTypeDescription
shipment_item_typeYInteger10 for Products, 20 for Books, 30 for Medicine, 40 for CBD, 90 for other immune
skuNStringProduct SKU
hscodeNStringRequired for Medicine, CDB, THC
descriptionYStringProduct description
quantityYStringQuantity
unit_priceYStringProduct unit price
expiration_dateNStringExpiration date
lotNStringLot number (for fullfillment)
immune_codeNStringRequired for shipment_item_type 90 (Other immune) get the code list with tristar staff (Same BR SISCOMEX)
currency_idNStringCurrency ID, default is USD (1)

Supervisory Organ

IdDescription
3Receita Federal do Brasil
1Anvisa
6Anvisa e Receita Federal do Brasil
2Vigiagro / MAPA
4Vigiagro / MAPA e Anvisa
5Vigiagro / MAPA e Receita Federal do Brasil
7Vigiagro / MAPA, Anvisa e Receita Federal do Brasil
8Ibama
9Ibama e Anvisa
10Ibama e Vigiagro / MAPA
11Ibama e Receita Federal do Brasil
12Ibama, Vigiagro / MAPA e Anvisa
13Ibama, Vigiagro / MAPA e Receita Federal do Brasil
14Ibama, Anvisa e Receita Federal do Brasil
15Ibama, Vigiagro / MAPA, Anvisa e Receita Federal do Brasil

TIP


Complete example:

http
POST /v1/shipments/1/attachments HTTP/1.1
Host: sandbox.tristarexpress.com
Content-Type: application/json
Accept: application/json
Authorization: {{ token }}

{
    "integration_code": "1",
    "order_number": "1",
    "from_person_type" : 1,
    "from_name": "Sender name",
    "from_document_type": 1,
    "from_country_code" : "US", 
    "from_postcode" : "33013",
    "from_state_code" : "FL", 
    "from_address_1" : "Av. Test",
    "from_address_2" : "",
    "from_city" : "Miami",
    "to_person_type": 1,
    "to_name": "Jane Doe",
    "to_document_type": 1,
    "to_document": "07173967970",
    "to_company_name": null,
    "to_trading_name": null,
    "to_br_ie": null,
    "to_address_1": "Avenida Presidente Kennedy",
    "to_address_2": "",
    "to_address_number": "759",
    "to_city": "São Paulo",
    "to_country_id": "BR",
    "to_state_code": "SP",
    "to_postcode": "13334170",
    "to_email": "janedoe@tristarexpress.com",
    "to_phone": "+5511999999999",
    "package_width": 12,
    "package_height": 14,
    "package_length": 13,
    "package_weight": 1.100,
    "freight": 0.01,
    "insurance": 10,
    "total": 100,
    "anvisa_import_authorization_number":null,
    "anvisa_product_commercial_name":null,
    "prc_darf": 1,
    "prc_gnre": 1,
    "other_services": 1,
    "with_insurance":false,
    "items": [
        {
            "shipment_item_type": 10,
            "hscode": "85177099",
            "description": "PROTECTION FILM",
            "quantity": 1,
            "unit_price": 10,
            "expiration_date":"2021-01-01",
            "lot":"123456",
            "immune_code": null,
            "total": 10,
            "is_book": false,
            "currency_id": 1
        }
    ]
}