# Search merchant orders Find all the information of the orders generated through specific filters and within a specific date range. Only data from the last 90 days (3 months) will be brought, and if you want to search for older data, use the GET for "Get order". **GET** `/merchant_orders/search` ## Request parameters ### Query - `status` (string, optional) Merchant order state. - `preference_id` (string, optional) Payment preference identifier associated to the merchant order. - `application_id` (string, optional) application identifier. - `payer_id` (string, optional) Payer ID. - `sponsor_id` (string, optional) Sponsor ID in Mercado Pago. - `external_reference` (string, optional) Reference you can synchronize with your payment system. - `site_id` (string, optional) Country identifier that merchant order belongs to. - `marketplace` (string, optional) Origin of the payment. Default value: 'NONE' - `date_created_from` (string, optional) Order´s creation date (start search) - `date_created_to` (string, optional) Order´s creation date (end search) - `last_updated_from` (string, optional) Order´s last update date (start search) - `last_updated_to` (string, optional) Order´s last update date (end search) - `items` (string, optional) items information. - `limit` (string, optional) Maximum quantity of items to be returned - `offset` (string, optional) Maximum quantity of items to offset ## Response parameters - `elements` (array, optional) Contains the order data. - `elements[].id` (number, optional) id - `elements[].status` (string, optional) Show the current merchant order state. Possible enum values: - `opened` Order without payments. - `closed` Order with payments covering total amount. - `expired` Canceled order that does not have approved or pending payments (all rejected or returned). - `elements[].external_reference` (string, optional) Unique identifier sent by the seller to relate the order_id generated by Mercado Pago, with the id of their payment system - `elements[].preference_id` (string, optional) Identifier of the payment preference associated to the order - `elements[].payments` (array, optional) Payment Attributes associated with the Order - `elements[].payments[].id` (number, optional) Unique Payment Identifier, automatically generated by Mercado Pago - `elements[].payments[].transaction_amount` (number, optional) Total amount of the payment attempt. It is the amount of money that is deposited to the seller. Numeric field. - `elements[].payments[].total_paid_amount` (number, optional) Total amount charged to the payer - `elements[].payments[].shipping_cost` (number, optional) Shipping cost, if applicable - `elements[].payments[].currency_id` (string, optional) ID of the currency used in the payment. Possible enum values: - `ARS` Argentine peso. - `BRL` Brazil real. - `CLP` Chilean peso. - `MXN` Mexican peso. - `COP` Colombian peso. - `PEN` Peruvian sol. - `UYU` Uruguayan peso. - `elements[].payments[].status` (string, optional) Payment status. Possible enum values: - `pending` The user has not yet completed the payment process. - `approved` The payment has been approved and accredited. - `authorized` The payment has been authorized but not captured yet. - `in_process` Payment is being reviewed. - `in_mediation` Users have initiated a dispute. - `rejected` Payment was rejected. The user may retry payment. - `canceled` Payment was canceled by one of the parties or because time for payment has expired. - `refunded` Payment was refunded to the user. - `charged_back` Was made a chargeback in the buyer's credit card. - `elements[].payments[].status_detail` (string, optional) Detail in which the Collection resulted Possible enum values: - `Accredited` credited payment. - `pending_contingency` the payment is being processed. - `pending_review_manual` the payment is under review to determine its approval or rejection. - `cc_rejected_bad_filled_date` incorrect expiration date. - `cc_rejected_bad_filled_other` incorrect card details. - `cc_rejected_bad_filled_security_code` incorrect CVV. - `cc_rejected_blacklist` the card is on a black list for theft/complaints/fraud. - `cc_rejected_call_for_authorize` the means of payment requires prior authorization of the amount of the operation. - `cc_rejected_card_disabled` the card is inactive. - `cc_rejected_duplicated_payment` transacción duplicada. - `cc_rejected_high_risk` rechazo por Prevención de Fraude. - `cc_rejected_insufficient_amount` insufficient amount. - `cc_rejected_invalid_installments` invalid number of installments. - `cc_rejected_max_attempts` exceeded maximum number of attempts. - `cc_rejected_other_reason` generic error. - `elements[].payments[].operation_type` (string, optional) Operation data_type. Possible enum values: - `regular_payment` Typification by default of a purchase being paid using Mercado Pago. - `payment_addition` Addition of money to an existing payment, made through a Mercado Pago account. - `money_transfer` Funds transfer between two users. - `recurring_payment` Automatic recurring payment due to an active user subscription. - `account_fund` Money income in the user's account. - `cellphone_recharge` Recharge of a user's cellophone account. - `pos_payment` Payment done through a Point of Sale. - `elements[].payments[].date_approved` (string, optional) Payment approval date - `elements[].payments[].date_created` (string, optional) Payment creation date - `elements[].payments[].last_modified` (string, optional) Date of last update of the order. The format is YYYY-MM-DDThh:mm:ss.dcm-GMT, for example 2021-12-29T20:19:17.000-04:00. - `elements[].payments[].amount_refunded` (number, optional) Amount refunded. It cannot be an amount larger than total_amount. - `elements[].shipments` (array, optional) Shipment Attributes - `elements[].shipments[].id` (number, optional) Unique shipment identifier - `elements[].shipments[].shipment_type` (string, optional) Shipment type - `elements[].shipments[].shipping_mode` (string, optional) Shipping mode. - `elements[].shipments[].picking_type` (string, optional) Package pickup mode - `elements[].shipments[].status` (string, optional) Shipping status - `elements[].shipments[].substatus` (string, optional) Secondary shipping status - `elements[].shipments[].items` (array, optional) Shipped object attributes - `elements[].shipments[].items[].id` (string, optional) Item code. - `elements[].shipments[].items[].description` (string, optional) Item description. - `elements[].shipments[].items[].quantity` (number, optional) Number of items. - `elements[].shipments[].items[].dimensions` (string, optional) Item dimensions - `elements[].shipments[].items[].dimensions_source` (string, optional) Item dimensions - `elements[].shipments[].date_created` (string, optional) Shipment creation date - `elements[].shipments[].last_modified` (string, optional) Shipment last modified date - `elements[].shipments[].date_first_printed` (string, optional) First printed date - `elements[].shipments[].service_id` (number, optional) Shipment service identifier - `elements[].shipments[].sender_id` (number, optional) Sender identifier - `elements[].shipments[].receiver_id` (number, optional) Receiver Identifier - `elements[].shipments[].receiver_address` (object, optional) Receiver address attributes - `elements[].shipments[].receiver_address.id` (number, optional) Address ID. - `elements[].shipments[].receiver_address.address_line` (string, optional) Receiver address - `elements[].shipments[].receiver_address.city` (object, optional) Attributes of the city associated with the receiver´s Address - `elements[].shipments[].receiver_address.city.id` (string, optional) City ID. - `elements[].shipments[].receiver_address.city.name` (string, optional) City name. - `elements[].shipments[].receiver_address.state` (object, optional) Attributes of the state associated with the receiver´s Address - `elements[].shipments[].receiver_address.state.id` (string, optional) State ID. - `elements[].shipments[].receiver_address.state.name` (string, optional) State name. - `elements[].shipments[].receiver_address.country` (object, optional) Attributes of the country associated with the receiver´s Address - `elements[].shipments[].receiver_address.country.id` (string, optional) Country ID. - `elements[].shipments[].receiver_address.country.name` (string, optional) Country name. - `elements[].shipments[].receiver_address.latitude` (string, optional) Latitude. - `elements[].shipments[].receiver_address.longitude` (string, optional) Longitude. - `elements[].shipments[].receiver_address.comment` (string, optional) Comment or additional information about the address - `elements[].shipments[].receiver_address.contact` (string, optional) Contact information. - `elements[].shipments[].receiver_address.phone` (string, optional) Phone number. - `elements[].shipments[].receiver_address.zip_code` (string, optional) Zip Code. - `elements[].shipments[].receiver_address.street_name` (string, optional) Street name. - `elements[].shipments[].receiver_address.street_number` (string, optional) Street number. - `elements[].shipments[].receiver_address.floor` (string, optional) Floor - `elements[].shipments[].receiver_address.apartment` (string, optional) Apartment. - `elements[].shipments[].shipping_option` (object, optional) Attributes associated with the shipping option - `elements[].shipments[].shipping_option.id` (number, optional) Shipping option identifier. - `elements[].shipments[].shipping_option.cost` (number, optional) Shipping cost. - `elements[].shipments[].shipping_option.currency_id` (string, optional) ID of the currency used in the payment. Possible enum values: - `ARS` Argentine peso. - `BRL` Brazil real. - `CLP` Chilean peso. - `MXN` Mexican peso. - `COP` Colombian peso. - `PEN` Peruvian sol. - `UYU` Uruguayan peso. - `elements[].shipments[].shipping_option.shipping_method_id` (number, optional) Shipping method identifier. - `elements[].shipments[].shipping_option.estimated_delivery` (object, optional) Estimated delivery date. - `elements[].shipments[].shipping_option.estimated_delivery.date` (string, optional) Estimated delivery date. - `elements[].shipments[].shipping_option.estimated_delivery.time_from` (string, optional) Estimated timeframe start for delivery - `elements[].shipments[].shipping_option.estimated_delivery.time_to` (string, optional) Estimated timeframe end for delivery - `elements[].shipments[].shipping_option.name` (string, optional) Shipping option name - `elements[].shipments[].shipping_option.list_cost` (number, optional) Shipping option listing cost - `elements[].shipments[].shipping_option.speed` (object, optional) Delivery option speed ​​attributes - `elements[].shipments[].shipping_option.speed.handling` (number, optional) Handling time - `elements[].shipments[].shipping_option.speed.shipping` (number, optional) Shipping time - `elements[].collector` (object, optional) Attributes of the Mercado Pago account collecting the payment - `elements[].collector.id` (number, optional) Identifier of the collecting Mercado Pago account - `elements[].collector.nickname` (string, optional) Collector nickname. - `elements[].marketplace` (string, optional) Indicates if it is a Mercado Libre (MELI) or Mercado Pago (NONE) Marketplace payment - `elements[].notification_url` (string, optional) URL where you'd like to receive a payment or merchant_order notification. - `elements[].date_created` (string, optional) Order creation date. The format is YYYY-MM-DDThh:mm:ss.dcm-GMT, for example 2021-12-29T20:19:17.000-04:00. - `elements[].last_updated` (string, optional) Date of last update of the order. The format is YYYY-MM-DDThh:mm:ss.dcm-GMT, for example 2021-12-29T20:19:17.000-04:00. - `elements[].sponsor_id` (string, optional) Identifier of the Partners Mercado Pago account. It is used to identify if the integration was performed by a partner. - `elements[].shipping_cost` (number, optional) Shipping cost, if applicable - `elements[].total_amount` (number, optional) Total amount of the transaction in local currency. - `elements[].site_id` (string, optional) Site ID. Possible enum values: - `MLA` Mercado Libre Argentina - `MLB` Mercado Libre Brasil - `MLM` Mercado Libre México - `MLC` Mercado Libre Chile - `MLU` Mercado Libre Uruguay - `MCO` Mercado Libre Colombia - `MPE` Mercado Libre Perú - `elements[].paid_amount` (number, optional) Paid amount - `elements[].refunded_amount` (number, optional) Refunded amount - `elements[].payer` (object, optional) Buyer's information. - `elements[].payer.id` (number, optional) Payer ID. - `elements[].payer.email` (string, optional) Payer’s email address. - `elements[].items` (array, optional) Order item attributes - `elements[].items[].id` (string, optional) Item id. - `elements[].items[].category_id` (string, optional) This is a free string where the item category can be added. - `elements[].items[].currency_id` (string, optional) ID of the currency used in the payment. Possible enum values: - `ARS` Argentine peso. - `BRL` Brazil real. - `CLP` Chilean peso. - `MXN` Mexican peso. - `COP` Colombian peso. - `PEN` Peruvian sol. - `UYU` Uruguayan peso. - `elements[].items[].description` (string, optional) Item description. - `elements[].items[].picture_url` (string, optional) Item image URL. - `elements[].items[].title` (string, optional) Item title. It will be displayed in the payment process. - `elements[].items[].quantity` (number, optional) Item quantity. - `elements[].items[].unit_price` (number, optional) Item unit price. - `elements[].canceled` (boolean, optional) Boolean value that indicates if the order was canceled - `elements[].additional_info` (string, optional) Additional information. - `elements[].application_id` (string, optional) application identifier. - `elements[].order_status` (string, optional) Current merchant order status given the payments status. Possible enum values: - `payment_required` Order without payments or with all payments "rejected" or "canceled". - `reverted` Order with all payments "refunded" or "chargeback". - `paid` Order with the sum of all payments "approved", "chargeback" or "in_mediation", covers the order total amount. - `partially_reverted` Order with at least one payment "refunded" or "chargeback". - `partially_paid` Order with at least one payment "approved" and not covering order total amount. - `payment_in_process` Order with payments "in_process", "pending" or "authorized". - `undefined` Order created before the existence of the order_status status. - `expired` Canceled order that does not have approved or pending payments (all rejected or returned). - `next_offset` (number, optional) Numeric field used to paginate the response. - `total` (number, optional) Total search results. ## Errors | Status | Error | Description | | ------- | ------- | ----------- | | 400 | ds_search_query | invalid query. | | 401 | invalid_token | invalid_token. | | 401 | invalid_caller_id | invalid caller_id | ## Request example ### cURL ```bash curl -X GET \ 'https://api.mercadopago.com/merchant_orders/search?status=&preference_id=&application_id=&payer_id=&sponsor_id=&external_reference=&site_id=&marketplace=&date_created_from=&date_created_to=&last_updated_from=&last_updated_to=&items=&limit=&offset=' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' ``` ## Response example ```json { "elements": [ { "id": 9999999999, "status": "closed", "external_reference": "default", "preference_id": "Preference identification", "payments": [ { "id": null, "transaction_amount": null, "total_paid_amount": null, "shipping_cost": null, "currency_id": null, "status": null, "status_detail": null, "operation_type": null, "date_approved": null, "date_created": null, "last_modified": null, "amount_refunded": null } ], "shipments": [ { "id": null, "shipment_type": null, "shipping_mode": null, "picking_type": null, "status": null, "substatus": null, "items": null, "date_created": null, "last_modified": null, "date_first_printed": null, "service_id": null, "sender_id": null, "receiver_id": null, "receiver_address": null, "shipping_option": null } ], "collector": { "id": 999999999, "nickname": "string" }, "marketplace": "NONE", "notification_url": "string", "date_created": "2018-09-14T17:11:31.000Z", "last_updated": "2018-09-14T17:11:43.000Z", "sponsor_id": "string", "shipping_cost": 0, "total_amount": 5, "site_id": "MLA", "paid_amount": 5, "refunded_amount": 0, "payer": { "id": 999999999, "email": "test@testuser.com" }, "items": [ { "id": null, "category_id": null, "currency_id": null, "description": null, "picture_url": null, "title": null, "quantity": null, "unit_price": null } ], "canceled": false, "additional_info": "additional information", "application_id": "10000000000000000", "order_status": "paid" } ], "next_offset": 1, "total": 1 } ```