/merchant_orders

BASE URI https://api.mercadopago.com/merchant_orders

HTTP Request

curl

 curl -X POST \
  'https://api.mercadopago.com/merchant_orders?access_token=ACCESS_TOKEN_ENV' \
  -d '{
    "preference_id": "preference_id",
    "items": [
        {
            "id": "item_id",
            "category_id": "category_id",
            "currency_id": "[FAKER][CURRENCY][ACRONYM]",
            "description": "item description",
            "picture_url": "picture_url",
            "title": "item title",
            "quantity": 1,
            "unit_price": 5
        }
    ],
    "marketplace": "",
    "external_reference": "default",
    "additional_info": "additional information"
}'
 

Request Params

ParameterTypeDescription
preference_id String(UUID) Identificação da preferência de pagamento associados à ordem.
application_id String Id do aplicativo.
site_id String Identificador do país a que pertence a ordem.
payer Object Informação do comprador.
id Integer Id do comprador.
email String(256) E-mail do comprador.
nickname String(256) Nick do comprador.
sponsor_id Integer Sponsor ID in Mercado Pago.
items Array(Object) Informação do item.
id String Id do anúncio.
put Required in PUT
category_id String Categoria do item.
currency_id String(3) Identificador da moeda utilizada no preço do item.
ARS Argentine peso.
BRL Brasil real.
CLP Chilean peso.
MXN Mexican peso.
COP Colombian peso.
PEN Peruvian sol.
UYU Uruguayan peso.
description String Descrição do anúncio.
picture_url String URL da imagem do anúncio.
quantity Integer Item quantity.
put This is the only field of item that can be modified in put
unit_price Float Preço unitário do item.
title String Título do item.
notification_url String(500) URL em que você gostaria de receber uma notificação de status de pagamento.
additional_info String(600) Informações adicionais do pagamento.
external_reference String(256) Referência que pode sincronizar com seu sistema de pagamentos.
marketplace String(256) Origem do pagamento. Valor padrão: 'NONE'

HTTP Response

json

 {
  "id": 9999999999,
  "status": "closed",
  "external_reference": "default",
  "preference_id": "Preference identification",
  "payments": [],
  "shipments": [],
  "collector": {
    "id": 999999999,
    "email": "collector@email.com",
    "nickname": null
  },
  "marketplace": "NONE",
  "notification_url": null,
  "date_created": "2018-09-14T13:11:31.000-04:00",
  "last_updated": "2018-09-14T13:11:43.000-04:00",
  "sponsor_id": null,
  "shipping_cost": 0,
  "total_amount": 5,
  "site_id": "[FAKER][GLOBALIZE][SITE_ID]",
  "paid_amount": 5,
  "refunded_amount": 0,
  "payer": {
    "id": 999999999,
    "email": "payer@email.com"
  },
  "items": [
    {
      "id": "item id",
      "category_id": "item category",
      "currency_id": "[FAKER][CURRENCY][ACRONYM]",
      "description": "item description",
      "picture_url": "item picture url",
      "title": "item title",
      "quantity": 1,
      "unit_price": 5
    }
  ],
  "cancelled": false,
  "additional_info": "additional information",
  "application_id": 9999999999999999,
  "order_status": "payment_required"
}
 

Error Codes

CodeDescription
400 BAD_REQUEST
invalid_user_id invalid users involved.
invalid_order_state the action requested is not valid for the current merchant order state.
invalid_string string too long.
invalid_application_id internal server error.
invalid_items title cannot be null for the given item.
invalid_items quantity cannot be null for the given item.
invalid_items invalid item quantity.
invalid_items unit_price cannot be null for the given item.
invalid_items currency_id cannot be null for the given item.
invalid_items cannot operate with this currency code.
invalid_items invalid unit_price.
user_not_allowed user not allowed to operate.
invalid_operation_type invalid operation type.
invalid_payer invalid payer identifier.
invalid_id invalid preference_id.
invalid_expired the preference_id has expired.
invalid_sponsor_id invalid sponsor_id.
invalid_marketplace invalid marketplace.
unmarshal_error could not unmarshal request body into merchant order struct.
invalid_url invalid URL. Isn't HTTP or HTTPS.
communication_error Error when calling...
401 UNAUTHORIZED
invalid_token access denied.
invalid_caller_id invalid caller_id

La búsqueda no arrojó ningún resultado.

Verifica la la ortografía de los términos de búsqueda o prueba con otras palabras clave.