OK
Category removed successfully
Category created successfully
Category updated successfully
const response = await fetch('https://api.zydon.com.br/api/sales/categories/{id}', { method: 'GET', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "id": "text", "root_id": "text", "name": "text", "active": false }
const response = await fetch('https://api.zydon.com.br/api/sales/categories/{id}', { method: 'DELETE', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "id": "text" }
const response = await fetch('https://api.zydon.com.br/api/sales/categories', { method: 'POST', headers: { "Authorization": "Bearer JWT", "Content-Type": "application/json" }, body: JSON.stringify({ "active": false, "name": "text", "root_id": "text" }), }); const data = await response.json();
const response = await fetch('https://api.zydon.com.br/api/sales/categories', { method: 'GET', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "items": [ { "id": "text", "root_id": "text", "name": "text", "active": false } ] }
const response = await fetch('https://api.zydon.com.br/api/sales/categories/{id}', { method: 'PUT', headers: { "Authorization": "Bearer JWT", "Content-Type": "application/json" }, body: JSON.stringify({ "active": false, "name": "text", "root_id": "text" }), }); const data = await response.json();