Orders
Update order
Updates an existing order by its ID.
Orders are the central resource in the API. Updating an order may also update related order sub-resources when they are included in the request payload, according to server-side validations.
Only fields supported by the API can be modified.
put/orders/{id}
Path parameters
idstring required
Identifier of the resource
Headers
Accept-Language'es' | 'en'
Use for knowing which language to use
Request body
Example request
{
"currency": "MXN",
"customer_info": {
"customer_id": "cus_23874283647",
"name": "DevTest",
"email": "test@femsa.com",
"phone": "5522997233"
},
"line_items": [
{
"name": "Box of Cohiba",
"unit_price": 20000,
"quantity": 1,
"sku": "XYZ12345",
"brand": "Cohiba",
"description": "Imported From Mex.",
"metadata": {
"key": "value"
}
}
],
"charges": [
{
"amount": 40000,
"payment_method": {
"expires_at": 1789928542,
"type": "cash",
"payment_source_id": "src_2tLkkyfMPh6v7pFry"
},
"reference_id": "ref_2tN73UdUSNrYRPD9r"
}
],
"discount_lines": [
{
"amount": 500,
"code": "123",
"type": "loyalty"
}
],
"tax_lines": [
{
"amount": 100,
"description": "testing",
"metadata": {
"key": "value"
}
}
],
"shipping_contact": {
"phone": "+525511223344",
"receiver": "Marvin Fuller",
"between_streets": "Ackerman Crescent",
"address": {
"street1": "Nuevo Leon 254",
"street2": "Departamento 404",
"postal_code": "06100",
"city": "Ciudad de Mexico",
"state": "Ciudad de Mexico",
"country": "MX",
"residential": true
}
},
"shipping_lines": [
{
"amount": 100,
"carrier": "FEDEX",
"tracking_number": "TRACK123",
"method": "Same day",
"description": "Shipping line",
"metadata": {
"key": "value"
}
}
],
"fiscal_entity": {
"address": {
"street1": "Nuevo Leon 254",
"street2": "Departamento 404",
"postal_code": "06100",
"city": "Ciudad de Mexico",
"state": "Ciudad de Mexico",
"country": "MX",
"external_number": "123"
},
"email": "test@gmail.com",
"name": "Femsa Inc",
"phone": "+525511223344",
"tax_id": "AAA010101AAA"
}
}Response
successful operation