AI resources
Create order for multiple items
To create an order with multiple items, include them as a list in the items array when sending the request to the Create orderAPI endpoint.
The
total_amount value must equal the sum of unit_price multiplied by quantity for all items included in the order.curlcurl -X POST \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \ -H 'X-Idempotency-Key: UNIQUE_KEY' \ 'https://api.mercadopago.com/v1/orders' \ -d '{ "type": "online", "processing_mode": "manual", "total_amount": "250.00", "external_reference": "order_pro_123", "payer": { "email": "buyer@email.com" }, "items": [ { "title": "My product 1", "unit_price": "100.00", "quantity": 1, "unit_measure": "unit", "total_amount": "100.00" }, { "title": "My product 2", "unit_price": "75.00", "quantity": 2, "unit_measure": "unit", "total_amount": "150.00" } ] }'