# Get order by shipment ID Retrieve the information of an order by its shipment ID. **GET** `/proximity-integration/v1/orders/{shipment_id}` ## Request parameters ### Header - `x-time-zone` (string, required) Timezone of the times shown on the JSON. For example: GMT-3. ### Path - `shipment_id` (string, required) Shipment ID of the order. ## Response parameters - `id` (string, optional) Shipment ID of the order. - `type` (string, optional) This field refers to the way in which the order will be delivered. Possible enum values: - `DELIVERY` the restaurant will be responsible for delivering the order. - `TAKEOUT` the buyer will pick up the order from the restaurant. - `displayId` (string, optional) Order Id shown in the Ordering Application interface for the Buyer. - `createdAt` (string, optional) Order creation time. - `orderTiming` (string, optional) Scheduled time to start preparing an order. By now, only the start immediately is implemented, and the value of this field will always be INSTANT. - `preparationStartDateTime` (string, optional) Value referring to the start of preparation of an order. For now, the value contained in this field will be the time when the order changed its state to ready_to_ship/ready_to_print. - `merchant` (object, optional) Informations about the seller. - `merchant.id` (string, optional) User ID of the restaurant account linked to Mercado Pago. - `merchant.name` (string, optional) Name of the restaurant. - `items` (array, optional) Array of objects that contain the item information for an order. - `items[].id` (string, optional) ID of the item. - `items[].name` (string, optional) Name of the item. - `items[].externalCode` (string, optional) External code for an item which can be used by point of sale. - `items[].unit` (string, optional) Measure unit of the item. By now, only the UNIT value is available. - `items[].quantity` (number, optional) The quantity of the item. - `items[].specialInstructions` (string, optional) Comment about the ordered item inserted by the buyer. - `items[].options` (array, optional) Field referring to the complements of an item. If the ordered item has no complements, this field will be empty. - `items[].options[].id` (string, optional) ID of the complement item. - `items[].options[].name` (string, optional) Name of the complement item. - `items[].options[].externalCode` (string, optional) External code for a complement item which can be used by a point of sale. - `items[].options[].unit` (string, optional) Measure unit of the complement item. By now, only the UNIT value is available. - `items[].options[].quantity` (number, optional) The quantity of the complement item. - `items[].options[].unitPrice` (object, optional) Unit price of a complement item. - `items[].options[].unitPrice.value` (number, optional) Unit price of a complement item. - `items[].options[].unitPrice.currency` (string, optional) Unit price of a complement item. - `items[].options[].totalPrice` (object, optional) The total price of a complement item. - `items[].options[].totalPrice.value` (number, optional) The total price of a complement item (unitPrice * quantity). - `items[].options[].totalPrice.currency` (string, optional) Currency related to price. - `items[].options[].extension` (object, optional) - `items[].options[].extension.group` (string, optional) Name of the group that the complement item selected belongs to. - `items[].unitPrice` (object, optional) Unit price of the selected item. - `items[].unitPrice.value` (number, optional) Unit price of the selected item. - `items[].unitPrice.currency` (string, optional) Currency related to price. - `items[].optionsPrice` (object, optional) Sum of the prices of the complements of an item. - `items[].optionsPrice.value` (number, optional) Sum of the prices of the complements of an item. - `items[].optionsPrice.currency` (string, optional) Currency related to price. - `items[].totalPrice` (object, optional) Total price of an item, considering its quantity and complements. - `items[].totalPrice.value` (number, optional) Total price of an item, considering its quantity and complements ((unityPrice + optionsPrice) * quantity). - `items[].totalPrice.currency` (string, optional) Currency related to price. - `items[].extension` (object, optional) Additional information about the item - `items[].extension.unitNetPrice` (object, optional) In case of the product have a discount, this field will show the information of the value of the product with the applied discount - `items[].extension.unitNetPrice.value` (number, optional) Value of the product with discount. - `items[].extension.unitNetPrice.currency` (string, optional) Currency related to price. - `otherFees` (array, optional) Array of objects with amounts of fees charged by the order. Fees like shipping and operation of the marketplace are included. - `otherFees[].name` (string, optional) Name of the fee. - `otherFees[].type` (string, optional) Field that specifies the type of the fee. Possible enum values: - `DELIVERY_FEE` fee charged for shipping the product. - `SERVICE_FEE` fee for the using of Marketplace - `TIP` Value of the tip. - `otherFees[].receivedBy` (string, optional) Field that specifies who will receive the fee amount. Possible enum values: - `MERCHANT` the fee amount that will be received by the merchant. - `MARKETPLACE` the fee amount that will be received by the marketplace. - `LOGISTIC_SERVICES` the fee amount that will be received by the Service of Logistic. - `otherFees[].receiverDocument` (string, optional) Document of receiver of the fee amount. - `otherFees[].price` (object, optional) - `otherFees[].price.value` (number, optional) Price of the fee. - `otherFees[].price.currency` (string, optional) Currency related to price. - `discounts` (array, optional) Information about the discounts that can be applied on cart, items or on delivery fee. - `discounts[].amount` (object, optional) - `discounts[].amount.value` (number, optional) Value of discount. - `discounts[].amount.currency` (string, optional) Currency related to price. - `discounts[].target` (string, optional) Where the discount will be applied. Possible enum values: - `CART` The discount wil be applied on the cart. - `DELIVERY_FEE` The discount will be applied on the delivery fee. - `ITEM` The discount will be applien on an Item - `discounts[].targetId` (string, optional) If the target of the discount is an Item, this field will show the ID of the Item that the discount has been applied. - `discounts[].sponsorshipValues` (array, optional) Values sponsored by either party. The sum of the amounts listed in this attribute must match the value informed in the amount atribute above. - `discounts[].sponsorshipValues[].name` (string, optional) Who sponsored the discount. Possible enum values: - `MARKETPLACE` The Marketplace will sponsor the discount. - `MERCHANT` The Merchant will sponsor the discount. - `discounts[].sponsorshipValues[].amount` (object, optional) - `discounts[].sponsorshipValues[].amount.value` (number, optional) Value of the discount. - `discounts[].sponsorshipValues[].amount.currency` (string, optional) Currency related to value. - `discounts[].extension` (object, optional) Discount coupon information. - `discounts[].extension.id` (string, optional) ID of the coupon. - `discounts[].extension.name` (string, optional) ID of the coupon. - `total` (object, optional) Object that contains information about all amounts charged. - `total.itemsPrice` (object, optional) Total price of the selected items. - `total.itemsPrice.value` (number, optional) Total price of the selected items. - `total.itemsPrice.currency` (string, optional) Currency related to price. - `total.otherFees` (object, optional) Sum of all fees. - `total.otherFees.value` (number, optional) Sum of all fees. - `total.otherFees.currency` (string, optional) Currency related to value of sum of all fees. - `total.discount` (object, optional) Sum of all discounts. - `total.discount.value` (number, optional) Sum of all discounts. - `total.discount.currency` (string, optional) Currency related to value of sum of all discounts. - `total.orderAmount` (object, optional) Total value paid on the order. - `total.orderAmount.value` (number, optional) Total value paid on the order (itemsPrice + otherFees - discounts). - `total.orderAmount.currency` (string, optional) Currency related to price paid. - `payments` (object, optional) Payment method information. - `payments.prepaid` (number, optional) Amount that has already been paid. - `payments.pending` (number, optional) Amount for which payment is still pending. - `payments.methods` (array, optional) Payment methods used. - `payments.methods[].value` (number, optional) Value paid. - `payments.methods[].currency` (string, optional) Currency related to the payment. - `payments.methods[].type` (string, optional) Time when the payment was or will be made. By now, the only possible value for this field is PREPAID. - `payments.methods[].method` (string, optional) Method used for payment. Possible enum values: - `DIGITAL_WALLET` amount paid using the Digital Wallet of Mercado Pago. - `customer` (object, optional) Information about the buyer. - `customer.id` (string, optional) User ID of the buyer. - `customer.name` (string, optional) Name of the buyer. - `customer.phone` (object, optional) - `customer.phone.number` (string, optional) Buyer´s phone number. - `customer.documentNumber` (string, optional) Buyer´s ID number. - `delivery` (object, optional) Information about the location where the order should be delivered. - `delivery.deliveredBy` (string, optional) Responsible for order delivery. Possible enum values: - `MERCHANT` The restaurant is responsible for the order delivery. - `MARKETPLACE` Mercado Pago is responsible for the order delivery. - `delivery.deliveryAddress` (object, optional) - `delivery.deliveryAddress.country` (string, optional) Name of the country. - `delivery.deliveryAddress.state` (string, optional) Name of the state. - `delivery.deliveryAddress.city` (string, optional) Name of the city. - `delivery.deliveryAddress.street` (string, optional) Name of the street. - `delivery.deliveryAddress.number` (string, optional) Number of the delivery location. If there is no number, the value will be SN. - `delivery.deliveryAddress.complement` (string, optional) Additional information about the place of delivery. - `delivery.deliveryAddress.reference` (string, optional) References about the delivery location. - `delivery.deliveryAddress.formattedAddress` (string, optional) Concatenation of street name and number. - `delivery.deliveryAddress.postalCode` (string, optional) Zipcode of the delivery location. - `delivery.deliveryAddress.coordinates` (object, optional) - `delivery.deliveryAddress.coordinates.latitude` (number, optional) Latitude of the delivery location. - `delivery.deliveryAddress.coordinates.longitude` (number, optional) Longitude of the delivery location. - `delivery.estimatedDeliveryDateTime` (string, optional) Estimated delivery time. - `delivery.deliveryDateTime` (string, optional) Delivery completion time. This information will be setted once the order was delivered. - `extension` (object, optional) - `extension.status` (string, optional) Status of an order. Possible enum values: - `ready_to_ship` order created. - `shipped` order sent for delivery. - `not_delivered` order not delivered. - `delivered` order delivered. - `canceled` order canceled. - `extension.substatus` (string, optional) Substatus of an order, along with the status they define the current state of an order. Possible enum values: - `ready_to_print` order awaiting acceptance. - `printed` order accepted. - `out_for_delivery` order went out for delivery. - `delivery_failed` delivery not completed. - `extension.store` (object, optional) - `extension.store.id` (string, optional) Internal ID of the store used by Mercado Pago. - `extension.store.externalCode` (string, optional) An optional field that refeers to a external code that can be used on a point of sale. This external code can be set by the Mercado Pago Delivery API. - `extension.store.brandId` (number, optional) Value referring to the Brand ID that is linked to the store. If there is not any brand linked to the store, this field will not be shown. - `extension.store.brandName` (string, optional) Brand name that is linked to the store. If there is not any Brand linked to the store, this field will not be shown. - `extension.qr` (object, optional) Through the information contained in this Object, it is possible to assemble the QR code that is read through the "Mercado Envios Flex" APP for the continuation of the delivery flow of an order. In this way it is possible to develop a personalized coupon for an order. To test the operation of this QR code, simply read it through the "Mercado Envios Flex" App. For restaurants with Dropoff in your logistics, this field will not be shown. - `extension.qr.id` (string, optional) ID of the Order. - `extension.qr.sender_id` (number, optional) ID of the seller. - `extension.qr.hash_code` (string, optional) Hash code. - `extension.qr.security_digit` (string, optional) Security information code. - `extension.estimatedPickupDate` (string, optional) Estimated time that the courier will arrive at the restaurant to take the order. This attribute is only shown from the moment a courier is assigned to the order, and this occurs in the status (ready_to_ship/on_route_to_pickup) of the Dropoff delivery flow. - `extension.paymentsInfo` (array, optional) Array with payment ids. Each order item has its own payment_id and, for this reason, multiple payments may appear. In addition, the shipping cost also has its own payment_id. - `extension.paymentsInfo[].id` (number, optional) Payment ID. - `extension.paymentsInfo[].entity` (string, optional) Payment ID. Possible enum values: - `ORDER` Payment of an item of the order. - `SHIPMENT` Payment for the shipping cost. - `extension.paymentsInfo[].entityId` (number, optional) ID referring to the entity. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 401 | 401 | Unauthorized - Access Token is invalid | | 403 | 403 | Forbidden - User cannot access this resource | | 404 | 404 | Not Found - Failed to search shipment | | 424 | 424 | Not Found - Failed to get some information of the order | | 500 | 500 | Internal server error | ## Request example ### cURL ```bash curl -X GET \ 'https://api.mercadopago.com/proximity-integration/v1/orders/{shipment_id}' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' ``` ## Response example ```json { "id": "41034141533", "type": "DELIVERY", "displayId": "9129", "createdAt": "2022-02-16T21:20:15.227Z", "orderTiming": "INSTANT", "preparationStartDateTime": "2022-02-16T21:20:47.755Z", "merchant": { "id": "1070421029", "name": "Doc's Store" }, "items": [ { "id": "MLA1122759502", "name": "Burrito Combo Refrigerante", "externalCode": "1215451", "unit": "UNIT", "quantity": 2, "specialInstructions": "No quiero cebolla.", "options": [ { "id": null, "name": null, "externalCode": null, "unit": null, "quantity": null, "unitPrice": null, "totalPrice": null, "extension": null } ], "unitPrice": { "value": 300, "currency": "ARS" }, "optionsPrice": { "value": 200, "currency": "ARS" }, "totalPrice": { "value": 1000, "currency": "ARS" }, "extension": { "unitNetPrice": { "value": null, "currency": null } } } ], "otherFees": [ { "name": "Name of the Fee", "type": "DELIVERY_FEE", "receivedBy": "MERCHANT", "receiverDocument": "3124123141", "price": { "value": 119, "currency": "ARS" } } ], "discounts": [ { "amount": { "value": 119, "currency": "ARS" }, "target": "ITEM", "targetId": "MLA1122759502", "sponsorshipValues": [ { "name": null, "amount": null } ], "extension": { "id": "21515164-001", "name": "coupon_off" } } ], "total": { "itemsPrice": { "value": 1000, "currency": "ARS" }, "otherFees": { "value": 119, "currency": "ARS" }, "discount": { "value": 0, "currency": "ARS" }, "orderAmount": { "value": 1119, "currency": "ARS" } }, "payments": { "prepaid": 1119, "pending": 0, "methods": [ { "value": 0, "currency": "ARS", "type": "PREPAID", "method": "DIGITAL_WALLET" } ] }, "customer": { "id": "1071059933", "name": "Test User", "phone": { "number": "011 123456789" }, "documentNumber": "2731234567894" }, "delivery": { "deliveredBy": "MERCHANT", "deliveryAddress": { "country": "Argetina", "state": "Capital Federal", "city": "Santos Lugares", "street": "Calle 01", "number": "1523", "complement": "APTO 58", "reference": "Referencia: Next to bakery", "formattedAddress": "Calle 01 1523", "postalCode": "1428", "coordinates": { "latitude": -34.55864, "longitude": -58.457982 } }, "estimatedDeliveryDateTime": "2022-02-21T21:49:55Z", "deliveryDateTime": "2022-02-21T21:52:55Z" }, "extension": { "status": "ready_to_ship", "substatus": "printed", "store": { "id": "44905357", "externalCode": "UNID01", "brandId": 2641, "brandName": "Brand Name" }, "qr": { "id": "41382089428", "sender_id": 1068595961, "hash_code": "v3Xtt15eewkj3Eu2lZt+cJQgDj3H6AHb04y1cMO4nPI=", "security_digit": "0" }, "estimatedPickupDate": "2022-02-21T22:00:55Z", "paymentsInfo": [ { "id": 58096990331, "entity": "ORDER", "entityId": 2000005654919550 } ] } } ```