Criar caixa - Caixas - Mercado Pago Developers
Criar caixa

POST

/pos
Gerar um ponto de venda em uma loja. Cada caixa registradora terá um código QR exclusivo vinculado a ela.
Parâmetros de requisição
category
number
Localização: bodyCódigo MCC que indica a categoria do ponto de venda. Se não especificado, ele permanece como uma categoria genérica
Gastronomy:
621102: Argentina
5611203: Brazil
5812: Mexico
5611: Colombia
5520: Peru
56101: Uruguay
561000: Chile
Gas station:
473000: Argentina
4731300: Brazil
468419: Mexico
4731: Colombia
5050: Peru
47300: Uruguay
473001: Chile
external_id
string
Localização: bodyIdentificador único da caixa definido pelo sistema integrador
external_store_id
string
Localização: bodyExternal_id da loja a que a caixa pertence, definido pelo sistema integrador
fixed_amount
boolean
Localização: bodyDetermine se o cliente pode inserir o valor a ser pago
Parâmetros de resposta
id
number
Localização: bodyid
qr
object
Localização: bodyqr
status
string
Localização: bodystatus
date_created
string
Localização: bodydate_created
Solicitação
curl
curl -X POST \
    'https://api.mercadopago.com/pos' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
  "name": "First POS",
  "fixed_amount": false,
  "store_id": 1234567,
  "external_store_id": "SUC001",
  "external_id": "SUC001POS001",
  "category": 621102
}'
Resposta
json
{
  "id": 2711382,
  "qr": {
    "image": "https://www.mercadopago.com/instore/merchant/qr/2711382/0977011a027c4b4387e52069da4264deae2946af4dcc44ee98a8f1dbb376c8a1.png",
    "template_document": "https://www.mercadopago.com/instore/merchant/qr/2711382/template_0977011a027c4b4387e52069da4264deae2946af4dcc44ee98a8f1dbb376c8a1.pdf",
    "template_image": "https://www.mercadopago.com/instore/merchant/qr/2711382/template_0977011a027c4b4387e52069da4264deae2946af4dcc44ee98a8f1dbb376c8a1.png"
  },
  "status": "active",
  "date_created": "2019-08-22T14:11:12.000Z",
  "date_last_updated": "2019-08-22T14:11:12.000Z",
  "uuid": "0977011a027c4b4387e52069da4264deae2946af4dcc44ee98a8f1dbb376c8a1",
  "user_id": 446566691,
  "name": "First POS",
  "fixed_amount": false,
  "category": 621102,
  "store_id": 1234567,
  "external_store_id": "SUC001",
  "external_id": "SUC001POS001"
}
Erros
400bad_request
MISSING_BODYMISSING_BODY--HTTP body is required to create pos.
UNKNOWN_FIELD_EXCEPTIONUNKNOWN_FIELD_EXCEPTION--The indicated field is not allowed for this operation or is unknown.
INVALID_NAMEINVALID_NAME--NAME must be string.
NAME_TOO_LONGNAME_TOO_LONG--The NAME must be less than 45 characters.
INVALID_FIXED_AMOUNTINVALID_FIXED_AMOUNT--FIXED_AMOUNT must be boolean.
INVALID_CATEGORYINVALID_CATEGORY--CATEGORY must be numeric.
UNKNOWN_MCCUNKNOWN_MCC--The CATEGORY must be valid for the user's site.
INVALID_STORE_IDINVALID_STORE_ID--STORE_ID must be numeric.
INVALID_EXTERNAL_STORE_IDINVALID_EXTERNAL_STORE_ID--EXTERNAL_STORE_ID muste be string.
EXTERNAL_STORE_ID_NOT_MATCHEXTERNAL_STORE_ID_NOT_MATCH--The EXTERNAL_STORE_ID does not refer to the indicated STORE_ID.
INEXISTENT_EXTERNAL_STORE_IDINEXISTENT_EXTERNAL_STORE_ID--The EXTERNAL_STORE_ID does not refer to any existing store.
INVALID_EXTERNAL_IDINVALID_EXTERNAL_ID--The EXTERNAL_ID field must be alphanumeric, only letters and numbers. No spaces or hyphens, or special characters.
EXTERNAL_ID_TOO_LONGEXTERNAL_ID_TOO_LONG--The EXTERNAL_ID must be less than 40 characters.
INVALID_URLINVALID_URL--The URL must be string and muste have the format of a valid url
URL_TOO_LONGURL_TOO_LONG--The URL must be less than 300 characters.
FIXED_AMOUNT_FALSEFIXED_AMOUNT_FALSE--If the URL field is indicated, the FIXED_AMOUNT field must be true. We do not support the open amount modality in this case.
403bad_request
11--If you are using the URL field, the host must be enabled by Mercado Pago. If it is not, you will receive this error. Please contact your assigned technical advisor.
404bad_request
11--If the POS does not exist for an indicated ID or EXTERNAL_ID and user.
409bad_request
11--A pos with the same EXTERNAL_ID already exists.