Alternative Unit removed successfully
OK
Alternative Unit created successfully
Alternative Unit updated successfully
const response = await fetch('https://api.zydon.com.br/api/sales/products/alternative-units/{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/products/alternative-units/{id}', { method: 'GET', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "id": "text", "product_id": "text", "unit_id": "text", "unit_name": "text", "unit_abbreviation": "text", "decimals_for_quantity": 0, "value_multiplier": 0, "quantity": 0 }
const response = await fetch('https://api.zydon.com.br/api/sales/products/alternative-units', { method: 'GET', headers: { "Authorization": "Bearer JWT" }, }); const data = await response.json();
{ "id": "text", "product_id": "text", "unit_id": "text", "decimals_for_quantity": 0, "value_multiplier": 0, "quantity": 0 }
const response = await fetch('https://api.zydon.com.br/api/sales/products/alternative-units', { method: 'POST', headers: { "Authorization": "Bearer JWT", "Content-Type": "application/json" }, body: JSON.stringify({ "decimals_for_quantity": 0, "product_id": "text", "quantity": 0, "unit_id": "text", "value_multiplier": 0 }), }); const data = await response.json();
const response = await fetch('https://api.zydon.com.br/api/sales/products/alternative-units/{id}', { method: 'PUT', headers: { "Authorization": "Bearer JWT", "Content-Type": "application/json" }, body: JSON.stringify({ "decimals_for_quantity": 0, "product_id": "text", "quantity": 0, "unit_id": "text", "value_multiplier": 0 }), }); const data = await response.json();