API aberta · Estoque
Alterar configurações de estoque
put
/api/open/v1/stock/settingsEm resumo
PUT /api/open/v1/stock/settings- Precisa de chave
read_write. - Sucesso:
200.
AuthorizationstringheaderobrigatórioChave 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/jsonallowNegativebooleanPermite negative.
useWeightedAvgbooleaninventoryPrefillbooleansuggestionPctinteger1 a 500
deductOnenum<string>Data de deduct (AAAA-MM-DD).
Valores aceitos:
completedcheckout
Resposta 200
application/jsonallowNegativebooleanobrigatórioPermite negative.
useWeightedAvgbooleanobrigatórioinventoryPrefillbooleanobrigatóriosuggestionPctintegerobrigatório1 a 500
deductOnenum<string>obrigatórioData 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"
}'{
"allowNegative": false,
"useWeightedAvg": true,
"inventoryPrefill": true,
"suggestionPct": 1,
"deductOn": "completed"
}Os valores são ilustrativos.
