Inicio
Documentação
Recursos
Certificações
Comunidade
Criar pedido - Pedidos presenciais v2 - Mercado Pago Developers

Busca inteligente powered by OpenAI 

Criar pedido

PUT

https://api.mercadopago.com/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. Se a requisição for bem-sucedida, a resposta será: código 204 - The server successfully processed the request, but is not returning any content.
Parâmetros de requisição
PATH
user_id
string

OBRIGATÓRIO

Encontre a ID do usuário no painel do desenvolvedor em nosso site de desenvolvedores
external_store_id
string

OBRIGATÓRIO

Custom Store ID associated to the order.
external_pos_id
string

OBRIGATÓRIO

Custom POS ID associated to the order.
BODY
external_reference
string
ID de pedido personalizado que você pode sincronizar com seu sistema de vendas. Importante: Este campo deve ter no máximo 64 caracteres e deve conter apenas números, letras, hífens (-) e sublinhados (_). Caracteres espec...Ver mais
title
string
Título de compra
description
string
Descrição de compra
notification_url
string
URL where you'd like to receive a payment or merchant_order notification.
Parâmetros de resposta
This request has no response
Erros

400Erro

invalid_collectorId

user_id must be a number.

invalid_externalPosId

externalPosId must be present.

invalid_external_reference

external_reference must be present.

invalid_total_amount

total_amount must be present.

invalid_items.sku_number

items.sku_number must be string.

invalid_items.category

items.category must be string.

invalid_items.title

items.title must be string.

invalid_items.description

items.description must be string.

invalid_items.unit_measure

items.unit_measure must be string.

invalid_items.quantity

items.quantity must be number.

invalid_items.currency_id

items.currency_id must be string.

invalid_items.unit_price

items.unit_price must be number.

invalid_items.total_amount

items.total_amount must be number.

invalid_title

title must be string.

invalid_unit_measure

unit_measure must be present.

invalid_quantity

quantity must be present.

invalid_unit_price

unit_price must be present.

invalid_description

description must be present.

invalid_sponsor.id

sponsor.id must be number.

invalid_id

sponsor.id must be present.

invalid_cash_out.amount

cash_out.amount must be number.

invalid_amount

cash_out.amount must be present.

error_creating_seller_qr_order

The cash out is required when order has no items.

invalid_expiration_date

Expiration date must be a valid and future date.

500Erro

in_store_order_creation_error

Failed to create order.

Requisição
curl -X PUT \
    'https://api.mercadopago.com/instore/qr/seller/collectors/{user_id}/stores/{external_store_id}/pos/{external_pos_id}/orders'\
    -H 'Content-Type: application/json' \
       -H 'Authorization: Bearer TEST-3322*********190-03031*********46528954c*********0339910-1*********' \
    -d '{
  "external_reference": "12345",
  "title": "Product order",
  "description": "Purchase description.",
  "notification_url": "http://www.yourserver.com/notification",
  "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
    }
  ],
  "sponsor": {
    "id": 662208785
  },
  "cash_out": {
    "amount": 0
  }
}'
Resposta de exemplo
// Esta requisição não tem resposta.