SuportePainel
Impressões

Criar impressão

Cria uma ordem de impressão a partir de uma imagem em Base64.

POST/commands/print/create

Authorization

bearerAuth gatewayKey
AuthorizationBearer <token>

Token JWT no formato: Bearer {token}

In: header

ocp-apim-subscription-key<token>

Gateway Token recebido na criacao da loja.

In: header

Request Body

application/json

Corpo da requisição.

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.smarttef.mobi/commands/print/create" \  -H "Content-Type: application/json" \  -d '{    "order_type": "CRD_UNICO",    "user_id": 24,    "has_details": true,    "print_id": "189",    "file": {      "name": "cupom-189",      "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQImWP4z8AAAAMBAQAY3Y20AAAAASUVORK5CYII="    }  }'
{
  "print_identifier": "019c9618-0d2f-7405-8e07-2a3e75b20172",
  "print_status": "PDT",
  "order_type": "CRD_UNICO",
  "file": "https://storage.blob.com/smart-tef/68ab8366-29db-438e-9a39-8ca72691c0b7-SR4YK.png",
  "print_id": "189"
}

{
  "status": 400,
  "data": {
    "message": [
      {
        "validation": "base64",
        "code": "invalid_string",
        "message": "Invalid base64",
        "path": [
          "file",
          "data"
        ]
      },
      {
        "code": "custom",
        "message": "Only one of serial_pos or user_id should be sent, not both.",
        "path": [
          "serial_pos",
          "user_id"
        ]
      }
    ],
    "timestamp": "2026-02-09T12:00:00.000Z",
    "path": "/commands/print/create"
  }
}

{
  "status": 401,
  "data": {
    "message": [
      "Unauthorized",
      "Token não e do tipo loja, verifique se o token está correto.",
      "token not corresponds",
      "Store not found",
      "Store is not active or is blocked",
      "Store is blocked. <cache>"
    ],
    "timestamp": "2026-02-09T12:00:00.000Z",
    "path": "/commands/print/create"
  }
}

{
  "status": 404,
  "data": {
    "message": [
      "Terminal is not active",
      "User not found",
      "User is blocked"
    ],
    "timestamp": "2026-02-09T12:00:00.000Z",
    "path": "/commands/print/create"
  }
}

{
  "status": 500,
  "data": {
    "message": "Falha ao enviar a imagem para o storage",
    "timestamp": "2026-02-09T12:00:00.000Z",
    "path": "/commands/print/create"
  }
}