Invoice prefixes in Enlivy allow organizations to customize the numbering scheme of invoices.
By assigning prefixes, you can categorize or segment invoices by department, region, fiscal year, or any custom logic.
The Enlivy API provides endpoints to list, create, update, and retrieve invoice prefixes with full control and flexibility.
Operations Covered
- List all invoice prefixes
- Retrieve a specific invoice prefix
- Create a new invoice prefix
- Edit an existing invoice prefix
List All Invoice Prefixes
const organizationId = "your_org_id";
const token = "YOUR_TOKEN_HERE";
fetch(`https://api.enlivy.com/organizations/${organizationId}/invoice-prefixes?page=1&limit=20&include_meta=navigation`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
});Get an Invoice Prefix
const organizationId = "your_org_id";
const prefixId = "prefix_id_1";
const token = "YOUR_TOKEN_HERE";
fetch(`https://api.enlivy.com/organizations/${organizationId}/invoice-prefixes/${prefixId}`, {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
});Add a New Invoice Prefix
const organizationId = "your_org_id";
const token = "YOUR_TOKEN_HERE";
fetch(`https://api.enlivy.com/organizations/${organizationId}/invoice-prefixes`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
prefix: "INV",
name: "Standard Invoices"
})
});Edit an Invoice Prefix
const organizationId = "your_org_id";
const prefixId = "prefix_id_1";
const token = "YOUR_TOKEN_HERE";
fetch(`https://api.enlivy.com/organizations/${organizationId}/invoice-prefixes/${prefixId}`, {
method: 'PUT',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: "Updated Prefix Name"
})
});