• Home
  • Managing Invoice Prefixes

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

Returns a list of invoice prefixes available in your organization.

bash
GET /organizations/{organizationId}/invoice-prefixes

Request Headers

bash
Authorization: Bearer
Content Type: application/json

Example

javascript
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'
  }
});

Request Response

This is just a preview, additional fields may appear depending on organization settings.

json
{
  "data": [
    {
      "id": "org_invpfx_dummy",
      "organization_id": "org_dummy",
      "name": "Prefix name",
      "alias": "prefix_name",
      "description": "Prefix description.",
      "current_number": 1,
      "type": "standard"
    }
  ],
  "meta": {
    "navigation": {
      "active": 2,
      "trash": 0
    },
    "pagination": {
      "total": 2,
      "count": 2,
      "per_page": 20,
      "current_page": 1,
      "total_pages": 1,
      "links": {}
    }
  }
}

Get an Invoice Prefix

Fetch detailed information about a single invoice prefix by ID.

bash
GET /organizations/{organizationId}/invoice-prefixes/{prefixId}

Request Headers

bash
Authorization: Bearer
Content Type: application/json

Example

javascript
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'
  }
});

Request Response

This is just a preview, additional fields may appear depending on organization settings.

json
{
  "data": {
    "id": "org_invpfx_dummy",
    "organization_id": "org_dummy",
    "name": "Prefix name",
    "alias": "prefix_name",
    "description": null,
    "current_number": 1,
    "type": "standard",
  }
}

Add a New Invoice Prefix

Add a new prefix configuration to your organization for future invoices.

bash
GET /organizations/{organizationId}/invoice-prefixes/{prefixId}

Request Headers

bash
Authorization: Bearer
Content Type: application/json

Example

javascript
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: 
});

Request Response

This is just a preview, additional fields may appear depending on organization settings.

json
{
  "data": {
    "id": "org_invpfx_dummy",
    "organization_id": "org_dummy",
    "name": "Prefix name",
    "alias": "prefix_name",
    "description": null,
    "current_number": 1,
    "type": "standard",
  }
}

Edit an Invoice Prefix

Update the details of an existing invoice prefix (e.g., description or starting number). The actual prefix value may be locked if already in use.

bash
PUT /organizations/{organizationId}/invoice-prefixes/{prefixId}

Request Headers

bash
Authorization: Bearer
Content Type: application/json

Example

javascript
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: 
});

Request Response

This is just a preview, additional fields may appear depending on organization settings.

json
{
  "data": {
    "id": "org_invpfx_dummy",
    "organization_id": "org_dummy",
    "name": "Prefix",
    "alias": "prefix",
    "description": null,
    "current_number": 2,
    "type": "standard",
  }
}