International Authorization

Overview

This endpoint enables carriers to approve international shipments (between two countries). *** It interfaces with the carrier systems to verify that a package has been accepted and to retrieve tracking numbers. It handles the additional complexity of international shipping including customs, tariffs, CIF information, ***among others.

Key Features

  • Idempotency: Sending the same request twice returns the same tracking number
  • OAuth 2.0: Secure authentication with bearer tokens
  • Performance: Average response time under 1 second
  • Scalability: Handles high-volume shipment requests
  • Future authorization of cancelled shipments: We should consider the possibility of a cancelled shipment being authorized again in the future.
  • Variable Data Length and Carrier Responsibility: Mercado Libre will send data fields with variable lengths, which may change over time. It is the carrier's responsibility to truncate this data as necessary to meet their specific storage requirements.

Consideraciones generales: identifica el flujo de integración entre sistemas.

Mercado Libre is expected to receive a result, based on the "Status Code" section, that reflects whether the authorization was successful. If an error occurs, the system will automatically retry the communication following the retry schema established during the integration process.

Important:

The Tracking Number of any shipment must only change on “n” authorizations if, and only if, a cancellation was previously requested.

HTTP Request

bash
1POST {url}/shipments/shipment_id/authorization 2--header 'Content-Type: application/json' 3--header 'Authorization: Bearer <access_token>' 4 --data-raw '{ 5  "id": 2000005041469149431, 6 "transport_order_id": "ec4beec0-54d8-5066-a82d-3baa1164945", 7 "direction": "forward", 8 "test": false, 9 "carrier_information": { ... }, 10 "shipment_information": { ... }, 11 "authorization_information": { ... } 12 }'

All requests require OAuth 2.0 Bearer token authentication. Include your access token in the Authorization header:

bash
1Authorization: Bearer YOUR_ACCESS_TOKEN

Request Parameters

Headers parameters

NameValueDescription
Content-Typeapplication/jsonExpected media type of the resource.
AuthorizationBearer <access_token>Token generated (see OAuth 2.0 )

Body Parameters

Root level fields

These are the top-level fields in the authorization request:

NameData typeDescriptionField presence in every request
idLongUnique identifier of the shipment used by Mercado Libre, required to authorize. This ID will later be used to notify the events that occur in the operational flow of the shipment.Always present in the request
transport_order_idStringUnique identifier for the transport leg. This field is used to guarantee idempotencyAlways present in the request
directionStringShipment direction. Values: forward (seller→buyer) or return (buyer→seller)Optional
testBooleanIndicates that the request sent is for testingOptional
keywordStringThe HASH (SHA256) of a secret word. The value of this parameter can be empty. If a value is present, the Carrier must request the secret word from the receiver of the package.Conditional
carrier_informationObjectCarrier contract and agency informationOptional
shipment_informationObjectSender, receiver, and package detailsOptional
requirementsObjectPickup and delivery requirements, among othersConditional

Carrier Information

Carrier contract and agency details for the shipment:

NameData typeDescriptionField presence in every request
contractStringIdentifies the contract / service defined by the carrier with which the shipment is to be authorized. For example, home delivery from XD, shipment to DS agency, etc.Optional
agencyObjectContains information related to the destination agency. Mandatory only when it is a shipment to a carrier agency.Optional

Agency Object

NameData typeDescriptionField presence in every request
idStringId given by Mercado Libre to the agency.Optional

Shipment Information

Container object for sender, receiver, and package details:

NameTypeDescriptionField presence in every request
senderObjectShipment sender information (name, phone, address)Always present in the request
receiverObjectShipment receiver information (name, phone, address)Always present in the request
package_informationObjectItems, dimensions, and package valueAlways present in the request
international_informationObjectInternational-specific fields (customs, taxes, pickup address)Always present in the request

Sender & Receiver

Complete user information for both sender and receiver. All fields are set when the user object exists:

NameData typeDescriptionField presence in every request
full_nameStringFull name or company nameAlways present in the request
first_nameStringFirst nameAlways present in the request
last_nameStringLast nameAlways present in the request
phoneObjectContact phone information (number)Always present in the request
addressObjectComplete address detailsAlways present in the request
birthdateStringBirthdate in format dd/MM/yyyy - for UruguayOptional
regimeStringTax regime or business classification - for UruguayOptional

Phone Object

NameData typeDescriptionField presence in every request
numberStringPhone number. Only numbers.Always present in the request

Identification

NameData typeDescriptionField presence in every request
typeStringUser Identification Type (it may vary depending on the country)Always present in the request
numberStringUser identification numberAlways present in the request

Address Fields

Complete address information for sender and receiver.

FieldData typeDescriptionField presence in every request
street_nameStringStreet name. Example: Main StreetOptional
street_numberStringStreet number. Example: 123Optional
intersectionStringSecondary street, intersection or additional referenceOptional
address_lineStringContains the street_name and street_number fields dataAlways present in the request
commentStringSpecial delivery instructions. Example: Ring bell 3 timesOptional
zip_codeStringRequired in: Argentina, Brazil, Mexico, Peru. Optional in: Colombia, Uruguay, Chile, EcuadorAlways present in the request (for detailed countries)
cityObjectCity localization (id, name)Always present in the request
stateObjectState/Province localization (id, name)Always present in the request
countryObjectCountry localization (id, name)Always present in the request
neighborhoodObjectNeighborhood/locality localization (id, name)Optional
municipalityObjectMunicipality localization (id, name)Optional
geolocationObjectGeographic coordinates (latitude, longitude, source)Optional
facility_idStringFacility identifier (for pickups or delivery at facilities)Optional

Localization Object

Used for city, state, country, neighborhood, municipality:

NameData typeDescriptionField presence in every request
idStringLocalization identifier provided by Mercado Libre. Format ISO 3166.Optional
nameStringLocalization nameOptional

Geolocation Object

FieldTypeDescriptionField presence in every request
geolocation_typeStringIt can be one of the following values: APPROXIMATE: approximate geolocation. GEOMETRIC_CENTER: locates the center of a region that is used as a reference. RANGE_INTERPOLATED: restricts precision to the midpoint of 2 nearby reference points. ROOFTOP: indicates that the location is exact. UNKNOWN: indicates that the location was not validated.Always present in the request
latitudeDoubleGeographic latitude in number format with 8 decimal places.Always present in the request
longitudeDoubleGeographic longitude in number format with 8 decimal places.Always present in the request
sourceStringSource of geolocation dataAlways present in the request

Package Information

Details about the shipment package:

NameData typeDescriptionField presence in every request
itemsArrayArray of items in the packageAlways present in the request
dimensionsObjectPackage dimensions (height, width, length, weight)Always present in the request
amountDecimalPackage total value/amount. Example: 150.00Always present in the request

Items

Individual items contained in the shipment package:

FieldData typeDescriptionField presence in every request
item_idStringUnique item identifier on MercadolibreAlways present in the request
descriptionStringItem description on MercadlibreAlways present in the request
quantityLongItem quantityAlways present in the request

Dimensions

Package dimensions and weight specifications:

NameData typeDescriptionUnitField presence in every request
heightDecimalPackage heightCentimeters (cm)Always present in the request
widthDecimalPackage widthCentimeters (cm)Always present in the request
lengthDecimalPackage lengthCentimeters (cm)Always present in the request
weightDecimalTotal package weightGrams (g)Always present in the request
volumetric_weightDecimalCalculated volumetric weight (optional)Grams (g)Always present in the request

International Information

International-specific shipment details including customs, tariffs, and taxes:

NameData typeDescriptionField presence in every request
tax_modalityStringTax modality for international shipment.Always present in the request
cifObjectCost, Insurance, Freight informationAlways present in the request
destination_addressObjectFinal delivery address in destination countryAlways present in the request
pick_up_addressObjectInternational carrier pickup locationAlways present in the request
drop_off_informationObjectWarehouse or drop-off detailsAlways present in the request
taxesObjectTax information including payer and amountAlways present in the request
exchange_rateDecimalCurrency exchange rate if different currencies usedAlways present in the request
remessa_conformeBooleanRemessa conforme status (Brazilian customs)Always present in the request
sender_code_eceStringSender ECE code (customs exporter code)Always present in the request
deliver_toObjectDeliver-to information (importer details)Always present in the request
receiver_emailStringReceiver's email address for customs notificationsAlways present in the request
paymentsObjectPayment information for international shipmentAlways present in the request

CIF Object

NameData typeDescription
costDecimalCost of goods (C in CIF). Example: 100.00
freightDecimalFreight/shipping cost (I in CIF). Example: 50.00
insuranceDecimalInsurance cost (F in CIF). Example: 10.00

Pick-Up Address (International)

FieldData typeDescription
address_lineStringFull address line
zip_codeStringPostal code in origin country
cityObjectCity information (id, name)
stateObjectState/province information (id, name)
countryObjectCountry information (id, name)
phoneStringContact phone number
additional_infoStringAdditional instructions or notes

Drop-Off Information

NameData typeDescription
warehouse_codeStringWarehouse or drop-off location code

Taxes Object

NameDate typeDescription
payerObjectTax payer information (name, identification, withholding flag)
total_amountDecimalTotal tax amount due
detailStringTax detail/description

Payer Information

NameData typeDescription
nameStringPayer full name
identificationObjectPayer identification (type, number)
apply_tax_withholdingBooleanWhether to apply tax withholding

Deliver-To Information

NameData typeDescription
full_nameStringImporter/final receiver full name
is_importer_final_receiverBooleanWhether importer is the final receiver

Requirements (Optional)

Additional shipment requirements (pickup and delivery schedules and special treatments):

NameDate typeDescriptionField presence in every request
special_treatmentsArrayArray of special treatment codes (groupable, has_battery, special_goods, etc)Optional
pickupObjectPickup schedule and location metadata requirementsOptional
deliveryObjectDelivery schedule, strategy, and location metadata requirementsOptional

Pickup Object

NameData typeDescription
scheduleObjectTime window for pickup
location_metadataObjectLocation details and access information

Delivery Object

FieldTypeDescription
scheduleObjectTime window for delivery
affinity_groupStringDelivery affinity group (for grouping deliveries together)
delivery_strategyStringOperational strategy for delivery. E.g. "joint_delivery" (indicate that it must be delivered together with other shipments with the same affinity_group ).
location_metadataObjectLocation details and access information

Schedule Object

FieldTypeDescription
fromDateTimeWindow start time (ISO 8601 format)
toDateTimeWindow end time (ISO 8601 format)

Location Metadata Object

FieldTypeDescription
location_idStringUnique location identifier
has_receptionBooleanWhether location has reception desk available
typesArrayArray of location types (residence, commercial, etc)
nameStringLocation name or description
sourceStringSource of location data
timetableObjectOperating hours/timetable information
external_dataObjectExternal reference data (external_id, phone)
is_presentBooleanWhether location is currently present/active
  • Note: Requirements are optional and only included under certain flows

Request Examples

Complete domestics shipment

json
1{ 2 "id": "10101033319242", 3 "transport_order_id": "5c81e696e69190a58c13d4de71816b743", 4 "direction": "forward", 5 "carrier_information": { 6 "contract": "contract", 7 "agency": { 8 "id": "id" 9 } 10 }, 11 "shipment_information": { 12 "sender": { 13 "full_name": "John Doe", 14 "first_name": "John", 15 "last_name": "Doce", 16 "phone": { 17 "number": "123456789" 18 }, 19 "address": { 20 "address_line": "Route 36 1234", 21 "street_name": "Route 36", 22 "street_number": "1234", 23 "intersection": "intersection", 24 "comment": "comment", 25 "city": { 26 "id": "TUVDQ1BVRXJ0b3F1aQ", 27 "name": "Puerto Quito" 28 }, 29 "state": { 30 "id": "EC-P", 31 "name": "Pichincha" 32 }, 33 "country": { 34 "id": "EC", 35 "name": "Ecuador" 36 }, 37 "neighborhood": { 38 "name": "Puerto Quito" 39 }, 40 "municipality": {}, 41 "geolocation": { 42 "geolocation_type": "GEOMETRIC_CENTER", 43 "latitude": -0.12345, 44 "longitude": -78.123456 45 } 46 } 47 }, 48 "receiver": { 49 "full_name": "John Doe", 50 "first_name": "John", 51 "last_name": "Doe", 52 "phone": { 53 "number": "123456789" 54 }, 55 "address": { 56 "address_line": "Route 1 SN", 57 "street_name": "Route 1", 58 "street_number": "SN", 59 "intersection": "intersection", 60 "comment": "comment", 61 "city": { 62 "id": "TUVDQ0VMWmMyZWRj", 63 "name": "El Carmen" 64 }, 65 "state": { 66 "id": "EC-M", 67 "name": "Manabí" 68 }, 69 "country": { 70 "id": "EC", 71 "name": "Ecuador" 72 }, 73 "neighborhood": { 74 "name": "El Carmen" 75 }, 76 "municipality": {}, 77 "geolocation": { 78 "geolocation_type": "GEOMETRIC_CENTER", 79 "latitude": -0.123456, 80 "longitude": -79.123456789 81 } 82 } 83 }, 84 "package": { 85 "items": [ 86 { 87 "item_id": "MEC656877602", 88 "description": "Lamp", 89 "quantity": 1 90 } 91 ], 92 "dimensions": { 93 "height": 13, 94 "width": 26, 95 "length": 37, 96 "weight": 1100 97 }, 98 "amount": 13.5 99 }, 100 "international_information": { 101 "tax_modality": "taxModality", 102 "exchange_rate": 5.5, 103 "remessa_conforme": true, 104 "sender_code_ece": "senderCode", 105 "receiver_email": "receiver@email.com", 106 "cif": { 107 "cost": 20.0, 108 "freight": 10.0, 109 "insurance": 30.0 110 }, 111 "destination_address": { 112 "street_name": "Street Name", 113 "street_number": "123", 114 "zip_code": "12345", 115 "city": { 116 "id": "cityId", 117 "name": "cityName" 118 }, 119 "geolocation": { 120 "geolocation_type": "ROOFTOP", 121 "latitude": 10.0, 122 "longitude": 20.0 123 } 124 }, 125 "pick_up_address": { 126 "address_line": "Address Line", 127 "zip_code": "12345", 128 "city": { 129 "id": "cityId", 130 "name": "cityName" 131 }, 132 "state": { 133 "id": "cityId", 134 "name": "cityName" 135 }, 136 "country": { 137 "id": "cityId", 138 "name": "cityName" 139 }, 140 "phone": "123456789", 141 "additional_info": "Additional Info" 142 }, 143 "drop_off_information": { 144 "warehouse_code": "warehouseCode" 145 }, 146 "deliver_to": { 147 "full_name": "Deliver To Full Name", 148 "is_importer_final_receiver": true 149 }, 150 "taxes": { 151 "total_amount": 10.0, 152 "detail": { 153 "tax1": 1, 154 "tax2": 10 155 }, 156 "payer": { 157 "name": "Payer Name", 158 "identification": { 159 "type": "payerType", 160 "number": "payerId" 161 }, 162 "apply_tax_withholding": true 163 } 164 } 165 } 166 }, 167 "test": false, 168 "keyword": "3bc405c30cadb4e6eefdf0cff899abcf8234d761c9a3ea1b2f510601ae5fc504" 169}

Successful Response (HTTP 200)

bash
1HTTP 200 OK 2--header 'Content-Type: application/json' 3{ 4 "id": "10101033319242", 5 "status":"AUTHORIZED", 6 "status_message":"OK", 7 "tracking_number": "ASDfgh123asd", 8 "authorization_information": { 9 "date": "2001-07-04T12:08:56.235-07:00", 10 "custom_data":{ 11 "ruta_1":"RUTA" 12 } 13 } 14}
NameData typeDescriptionMandatory
statusStringAUTHORIZED (when successful)Mandatory
status_messageStringDescriptive messageMandatory
tracking_numberStringGenerated tracking numberMandatory
authorization_informationObjectAuthorization informationMandatory

Authorization information object

NameData typeDescriptionMandatory
dateDate (ISO 8601)Authorization dateMandatory
custom_dataObjectCustom data agreed during integration for labelingMandatory

Failed Response (HTTP 400)

bash
1HTTP 400 OK 2--header 'Content-Type: application/json' 3{ 4 "error_code": "invalid_user_information.buyer", 5 "status_message":"Missing receiver information", 6 "status": "FAILED" 7}

Error Response (HTTP 500)

bash
1HTTP 500 OK 2--header 'Content-Type: application/json' 3{ 4 "status_message":"Internal server error", 5 "status": "ERROR" 6}

HTTP Status Codes & Errors

HTTPStatusDescription
200AUTHORIZEDAuthentication with success.
400FAILEDWhenever the request is invalid.
500ERRORAny authentication server issue.