Criar pedido - Pedidos presenciais v2 - Mercado Pago Developers
Criar pedido

PUT

/instore/qr/seller/collectors/{user_id}/stores/{external_store_id}/pos/{external_pos_id}/orders
Gerar uma ordem para associar com a preferência de pagamento e obter a URL necessária para iniciar o fluxo de pagamento.
Parâmetros de requisição
user_id

OBRIGATÓRIO

string
Localização: pathEncontre a ID do usuário no painel do desenvolvedor em nosso site de desenvolvedores
external_store_id

OBRIGATÓRIO

string
Localização: pathCustom Store ID associated to the order.
external_pos_id

OBRIGATÓRIO

string
Localização: pathCustom POS ID associated to the order.
cash_out
object
Localização: bodyRetirada de dinheiro (contato comercial requerido)
Parâmetros de resposta
Esta requisição não tem resposta.
Solicitação
curl
curl -X PUT \
    'https://api.mercadopago.com/instore/qr/seller/collectors/{user_id}/stores/{external_store_id}/pos/{external_pos_id}/orders' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
  "external_reference": 12345,
  "title": "Product order",
  "notification_url": "www.yourserver.com",
  "total_amount": 100,
  "items": [
    {
      "sku_number": "A123K9191938",
      "category": "marketplace",
      "title": "Point Mini",
      "description": "This is the Point Mini",
      "unit_price": 100,
      "quantity": 1,
      "unit_measure": "unit",
      "total_amount": 100
    }
  ],
  "taxes": [
    {
      "value": 19,
      "type": "IVA"
    }
  ],
  "sponsor": {
    "id": 446566691
  },
  "cash_out": {}
}'
Resposta
json
{}
Erros
400bad_request
invalid_collectorIdinvalid_collectorId--user_id must be a number.
invalid_externalPosIdinvalid_externalPosId--externalPosId must be present.
invalid_external_referenceinvalid_external_reference--external_reference must be present.
invalid_total_amountinvalid_total_amount--total_amount must be present.
invalid_items.sku_numberinvalid_items.sku_number--items.sku_number must be string.
invalid_items.categoryinvalid_items.category--items.category must be string.
invalid_items.titleinvalid_items.title--items.title must be string.
invalid_items.descriptioninvalid_items.description--items.description must be string.
invalid_items.unit_measureinvalid_items.unit_measure--items.unit_measure must be string.
invalid_items.quantityinvalid_items.quantity--items.quantity must be number.
invalid_items.currency_idinvalid_items.currency_id--items.currency_id must be string.
invalid_items.unit_priceinvalid_items.unit_price--items.unit_price must be number.
invalid_items.total_amountinvalid_items.total_amount--items.total_amount must be number.
invalid_titleinvalid_title--title must be string.
invalid_unit_measureinvalid_unit_measure--unit_measure must be present.
invalid_quantityinvalid_quantity--quantity must be present.
invalid_unit_priceinvalid_unit_price--unit_price must be present.
invalid_descriptioninvalid_description--description must be present.
invalid_sponsor.idinvalid_sponsor.id--sponsor.id must be number.
invalid_idinvalid_id--sponsor.id must be present.
invalid_cash_out.amountinvalid_cash_out.amount--cash_out.amount must be number.
invalid_amountinvalid_amount--cash_out.amount must be present.
error_creating_seller_qr_ordererror_creating_seller_qr_order--The cash out is required when order has no items.
invalid_expiration_dateinvalid_expiration_date--Expiration date must be a valid and future date.
500bad_request
in_store_order_creation_errorin_store_order_creation_error--Failed to create order.