Skip to main content

Update an Account Tax

Endpoint Overview​

This API endpoint provides a detailed overview of the endpoint responsible for updating an existing account tax within the Accounting module of the Juleb ERP. Unlike some other update endpoints in this API, this one uses a dedicated partial-update DTO — every field, including name, is optional, so you only need to send the fields you want to change.

Endpoint Details​

  • Method: PATCH
  • URL: /api/v1/accounting/account_tax/{id}

Parameters​

  • Path Parameters:
    • id (string, required): The ID of the account tax to update.
  • Query Parameters: None

Request Body​

Accepts any subset of the same fields documented on Create an Account Tax: name, type_tax_use, amount_type, active, company_id, sequence, amount, description, price_include, include_base_amount, is_base_affected, analytic, hide_tax_exigibility, tax_exigibility, cash_basis_transition_account_id, invoice_repartition_line_ids, refund_repartition_line_ids, country_id, country_code, tax_group_id.

{
"amount": number,
"active": boolean
}

Response​

  • 202 Accepted: Successfully updated the record.
  • 400 Bad Request: Bad request.
  • 401 Unauthorized: Unauthorized.
  • 404 Not Found: Record with the provided ID not found.

Response Body​

{
"data": {
...record fields
}
}

Example​

Request​

const axios = require('axios');
const accountName = process.env.ACCOUNT_NAME;
const apiKey = process.env.API_KEY;

axios.patch(`https://${accountName}.juleb.com/api/v1/accounting/account_tax/15`, {
amount: 16
}, {
headers: {
accept: '*/*',
Authorization: `TOKEN`,
'Content-Type': 'application/json'
}
})
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});

Response​

{
"data": {
"id": 15,
"name": "VAT 15%",
"amount": 16
}
}