TratowAPI
API aberta · Estoque

Detalhar inventário

get/api/open/v1/inventories/{id}

Em resumo

  • GET /api/open/v1/inventories/{id}
  • Chave read ou read_write.
  • Obrigatórios: id.
  • Sucesso: 200.
  • Authorizationstringheaderobrigatório

    Chave de API no formato Bearer ttw_live_<prefixo>_<segredo>, criada em Integrações → Chaves de API. Este endpoint precisa de chave read ou read_write.

  • idstringobrigatório

    Id do registro (UUID).

Resposta 200

application/json
  • idstring<uuid>obrigatório

    Identificador único (UUID).

  • statusenum<string>obrigatório

    Situação do registro. Os valores aceitos estão no tipo.

    Valores aceitos:opendonecanceled

  • categoryIdstring<uuid>pode ser nuloobrigatório

    Id de categoria (UUID).

  • categoryNamestringpode ser nuloobrigatório

    Nome de categoria (só leitura).

  • notesstringpode ser nuloobrigatório

    Observações livres.

  • openedAtstring<date-time>obrigatório

    Data e hora em que foi aberto (ISO 8601, UTC).

  • completedAtstring<date-time>pode ser nuloobrigatório

    Data e hora em que foi concluído (ISO 8601, UTC).

  • productCountintegerobrigatório

    Quantidade de produto.

    -9007199254740991 a 9007199254740991

  • countedCountintegerobrigatório

    Quantidade de counted.

    -9007199254740991 a 9007199254740991

  • countsobject[]obrigatório
    Mostrar 9 atributos
    • productIdstring<uuid>obrigatório

      Id de produto (UUID).

    • productNamestringobrigatório

      Nome de produto (só leitura).

    • unitenum<string>obrigatório

      Unidade de medida.

      Valores aceitos:unmlgkglcmmcxpct

    • countedQtystringpode ser nuloobrigatório

      Quantidade counted.

    • countedAtstring<date-time>pode ser nuloobrigatório

      Data e hora em que foi counted (ISO 8601, UTC).

    • systemQtystringobrigatório

      Quantidade system.

    • diffQtystringpode ser nuloobrigatório

      Quantidade diff.

    • diffCostCentsintegerpode ser nuloobrigatório

      Diff custo em centavos (100 = R$ 1,00).

      -9007199254740991 a 9007199254740991

    • movedAfterCountQtystringpode ser nuloobrigatório

      Quantidade moved after count.

  • diffTotalCentsintegerpode ser nuloobrigatório

    Diff total em centavos (100 = R$ 1,00).

    -9007199254740991 a 9007199254740991

curl --request GET \  --url 'https://qa-tratow.ips.app.br/api/open/v1/inventories/{id}' \  --header 'Authorization: Bearer <chave>'
Resposta
{  "id": "3f6c1b2a-4c7a-4d9e-8b1f-2e5d6a7b4c9d",  "status": "open",  "categoryId": "3f6c1b2a-4c7a-4d9e-8b1f-2e5d6a7b4c9d",  "categoryName": "texto",  "notes": "Prefere atendimento pela manhã.",  "openedAt": "2026-11-03T17:30:00.000Z",  "completedAt": "2026-11-03T17:30:00.000Z",  "productCount": 1,  "countedCount": 1,  "counts": [    {      "productId": "3f6c1b2a-4c7a-4d9e-8b1f-2e5d6a7b4c9d",      "productName": "texto",      "unit": "un",      "countedQty": "texto",      "countedAt": "2026-11-03T17:30:00.000Z",      "systemQty": "texto",      "diffQty": "texto",      "diffCostCents": 8000,      "movedAfterCountQty": "texto"    }  ],  "diffTotalCents": 8000}

Os valores são ilustrativos.