TratowAPI
API aberta · Estoque

Alterar configurações de estoque

put/api/open/v1/stock/settings

Em resumo

  • PUT /api/open/v1/stock/settings
  • Precisa de chave read_write.
  • 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_write.

Corpo

application/json
  • allowNegativeboolean

    Permite negative.

  • useWeightedAvgboolean
  • inventoryPrefillboolean
  • suggestionPctinteger

    1 a 500

  • deductOnenum<string>

    Data de deduct (AAAA-MM-DD).

    Valores aceitos:completedcheckout

Resposta 200

application/json
  • allowNegativebooleanobrigatório

    Permite negative.

  • useWeightedAvgbooleanobrigatório
  • inventoryPrefillbooleanobrigatório
  • suggestionPctintegerobrigatório

    1 a 500

  • deductOnenum<string>obrigatório

    Data de deduct (AAAA-MM-DD).

    Valores aceitos:completedcheckout

curl --request PUT \  --url 'https://qa-tratow.ips.app.br/api/open/v1/stock/settings' \  --header 'Authorization: Bearer <chave>' \  --header 'Content-Type: application/json' \  --data '{    "allowNegative": false,    "useWeightedAvg": true,    "inventoryPrefill": true,    "suggestionPct": 1,    "deductOn": "completed"  }'
Resposta
{  "allowNegative": false,  "useWeightedAvg": true,  "inventoryPrefill": true,  "suggestionPct": 1,  "deductOn": "completed"}

Os valores são ilustrativos.