Perfex CRM REST API

Connect anything to your Perfex CRM. Read and write your customers, invoices, leads, projects and tasks over a clean HTTP/JSON API - or let AI assistants and automation tools do it for you.

Browse the API Postman & code examples

Endpoints
146
Sections
31
MCP tools
148
Webhook events
124
  • MCP
  • Webhooks
  • Automation
  • Batch
  • Customers
  • Contacts
  • Leads
  • Invoices
  • Estimates
  • Payments
  • Proposals
  • Projects
  • Tasks
  • Tickets
  • Subscriptions
  • Items
  • Notes
  • Knowledge Base
  • Custom Fields
🚀 Fastest way to start: import our Postman collection and code examples (cURL, PHP, Python, JavaScript) - set your token and send your first request in minutes.

👋 Welcome

This is the complete reference for the Perfex CRM REST API - and it is friendlier than it looks. If you have ever sent an HTTP request, you already know enough to get started.

Everything runs over plain HTTP/HTTPS and speaks JSON, using the standard verbs (GET, POST, PUT, DELETE) and standard HTTP status codes. Every endpoint lives under your installation's base URL:

https://yoursite.com/api/

🔑 Authentication

Send your token with every request - either way works:

  • Header (recommended)
    authtoken: YOUR_API_TOKEN
  • 🔁 Query parameter
    ?authtoken=YOUR_API_TOKEN

Write operations (POST / PUT) are sent as multipart/form-data.

👨‍💻 Installation

  1. Upload the module under Modules in your Perfex CRM installation.
  2. Press Activate to activate the product.
  3. Enter your license key.

✏️ Create an API token

  1. Sign in to your Perfex backend as an administrator.
  2. Go to API > API Management and create a new token.
  3. Copy the token and set its permissions - grant only what each integration needs.

📄 Lists and pagination

Every list endpoint accepts these, and all of them are optional:

  • ?page=1&per_page=25 - paginate. per_page sizes the page (default 25, max 100).
  • ?sort=-datecreated,company - sort, - for descending.
  • ?fields=id,company - pick columns.
  • ?created_after=2026-01-01 - date range.

Note on limit: it acts as an alias for per_page only when page is sent too. A bare ?limit=5 keeps its older meaning and does not paginate, so use ?page=1&per_page=5.

⬆️ Upgrading from 2.x

There are no breaking changes. Every v3 list feature is opt-in: send none of the parameters above and the response is the same plain array 2.x returned.

  • The { data, meta } envelope appears only when you send page or per_page.
  • No endpoint was renamed. Customers have always been at /api/customers.
  • Unknown fields on PUT are ignored rather than rejected.

Custom tables live under /api/thirdparty/customtable/{table_name} - the customtable segment is required, and the table must be allowlisted in Setup > API > Settings.

🚀 What's new in v3.0

🤖 MCP Server for AI agents

POST /api/mcp speaks the Model Context Protocol and exposes 148 permission-filtered CRM tools to Claude Desktop, ChatGPT, Cursor, n8n AI Agent and any MCP-compatible client.

🪝 Webhooks 2.0

124 events across 22 resource groups, REST management, optional async delivery with retries, SSRF protection and HMAC-signed requests.

🔌 Automation platforms

Polling triggers under /api/zapier/* for Zapier, Make.com and n8n.

📄 Smarter lists

Opt-in pagination, field selection, sorting and date-range filters, with the legacy response shape preserved by default.

🧮 Server-side invoice math

Totals calculated automatically from line items, taxes, discounts and adjustments.

🛡️ Safe writes

Idempotency-Key replay, tolerant PUT, and rate-limit headers on every response.

⚡ Batch operations

Up to 50 operations in one request via POST /api/batch.

🧾 Machine-readable spec

GET /api/openapi.json for Postman, Insomnia or Stoplight.

MCP

MCP Server (AI Agents)

POST/api/mcp

Model Context Protocol server over Streamable HTTP (JSON-RPC 2.0). Exposes 148 permission-filtered CRM tools (list/get/search/create/update/delete across 22 resources, plus lookups and utilities) to Claude Desktop, ChatGPT, Cursor, n8n AI Agent and any MCP client. Supported methods: initialize, ping, tools/list (single page), tools/call. Batches and notifications follow the JSON-RPC spec. Tool errors are returned as isError results so agents can react. Disabled by default - enable it under Setup > API > Settings. Configure your MCP client with this URL and the authtoken header.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X POST "https://yoursite.com/api/mcp" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

tools/list:

HTTP/1.1 200 OK
{
  "jsonrpc": "2.0",
  "result": {
    "tools": [
      {
        "name": "customers_list",
        "description": "List customers. Supports limit/offset and optional date range.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "limit": { "type": "integer", "description": "Max rows (default 25, max 100)" },
            "offset": { "type": "integer", "description": "Rows to skip" },
            "created_after": { "type": "string", "description": "ISO date lower bound" },
            "created_before": { "type": "string", "description": "ISO date upper bound" }
          }
        }
      },
      {
        "name": "customers_search",
        "description": "Search customers by keyword (matches company, vat, phonenumber).",
        "inputSchema": {
          "type": "object",
          "properties": {
            "q": { "type": "string", "description": "Search keyword" },
            "limit": { "type": "integer", "description": "Max rows (default 25, max 100)" }
          },
          "required": ["q"]
        }
      },
      {
        "name": "invoices_create",
        "description": "Create a invoice. Pass the record fields as the \"data\" object (same field names as the REST API).",
        "inputSchema": {
          "type": "object",
          "properties": {
            "data": { "type": "object", "description": "Field map for the new record" }
          },
          "required": ["data"]
        }
      }
    ]
  },
  "id": 1
}

tools/call:

HTTP/1.1 200 OK
{
  "jsonrpc": "2.0",
  "result": {
    "content": [
      {
        "type": "text",
        "text": "[\n    {\n        \"userid\": \"12\",\n        \"company\": \"Acme Corporation\",\n        \"vat\": \"GB123456789\",\n        \"phonenumber\": \"+1 415 555 0132\",\n        \"city\": \"San Francisco\",\n        \"zip\": \"94103\",\n        \"state\": \"California\",\n        \"country\": \"231\",\n        \"datecreated\": \"2026-02-14 09:21:45\",\n        \"active\": \"1\"\n    }\n]"
      }
    ],
    "isError": false
  },
  "id": 2
}

Unknown method:

HTTP/1.1 200 OK
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32601,
    "message": "Method not found: tools/get"
  },
  "id": 3
}

Automation

Automation Route Handler

GET/api/zapier/{method}/{resource}

This is a routing method that maps to specific Zapier endpoints. Use the direct endpoints (poll_get, test_get, resources_get) instead.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
Authorization String optional Bearer token (alternative to authtoken header)

Parameters

FieldTypeDescription
method String Method name (poll, test, resources)
resource String optional Resource name (customers, invoices, leads, tasks, tickets) - required for poll and test methods
curl -X GET "https://yoursite.com/api/zapier/poll/customers" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "data": [
    { "key": "customers", "label": "Customers", "description": "New or updated customers" },
    { "key": "invoices", "label": "Invoices", "description": "New or updated invoices" },
    { "key": "leads", "label": "Leads", "description": "New or updated leads" },
    { "key": "tasks", "label": "Tasks", "description": "New or updated tasks" },
    { "key": "tickets", "label": "Tickets", "description": "New or updated support tickets" }
  ]
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "error": "Method not found: invalid_get"
}

Poll for New Data

GET/api/zapier/poll/{resource}

Polling endpoint used by automation platforms (Zapier, Make.com, n8n) to retrieve new or updated records. Returns records that were created or modified after the specified timestamp.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
Authorization String optional Bearer token (alternative to authtoken header)

Parameters

FieldTypeDescription
resource String Resource name. Must be one of: customers, invoices, leads, tasks, tickets
since Number optional Unix timestamp to filter records created/updated after this time. Default: last 24 hours
limit Number optional Maximum number of records to return. Default: 50
curl -X GET "https://yoursite.com/api/zapier/poll/customers" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "data": [
    {
      "id": "1",
      "company": "Example Company",
      "datecreated": "2024-01-15 10:30:00"
    }
  ],
  "meta": {
    "since": 1705312200,
    "count": 1,
    "next_poll": 1705315800
  }
}

Error-Response:

HTTP/1.1 400 Bad Request
{
  "status": false,
  "message": "Resource parameter required"
}

List Available Resources

GET/api/zapier/resources

Returns a list of all available resources that can be used for polling and testing. This endpoint is used by automation platforms to discover available triggers.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
Authorization String optional Bearer token (alternative to authtoken header)
curl -X GET "https://yoursite.com/api/zapier/resources" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "data": [
    {
      "key": "customers",
      "label": "Customers",
      "description": "New or updated customers"
    },
    {
      "key": "invoices",
      "label": "Invoices",
      "description": "New or updated invoices"
    },
    {
      "key": "leads",
      "label": "Leads",
      "description": "New or updated leads"
    },
    {
      "key": "tasks",
      "label": "Tasks",
      "description": "New or updated tasks"
    },
    {
      "key": "tickets",
      "label": "Tickets",
      "description": "New or updated support tickets"
    }
  ]
}

Test Trigger

GET/api/zapier/test/{resource}

Returns sample data for testing automation triggers. Used by automation platforms to validate trigger configuration and show sample data structure to users.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
Authorization String optional Bearer token (alternative to authtoken header)

Parameters

FieldTypeDescription
resource String Resource name. Must be one of: customers, invoices, leads, tasks, tickets
curl -X GET "https://yoursite.com/api/zapier/test/customers" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "data": {
    "id": 1,
    "company": "Sample Company",
    "email": "sample@example.com",
    "phone": "+1234567890"
  }
}

Error-Response:

HTTP/1.1 400 Bad Request
{
  "status": false,
  "message": "Resource parameter required"
}

Batch

Batch Operations

POST/api/batch

Execute up to 50 operations in one request, in order, with continue-on-error. Operations use the same names, arguments and per-operation permission rules as the MCP tools (e.g. customers_create, invoices_get, leads_search). Each item returns status plus result or error, with completed/failed counters in the envelope.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X POST "https://yoursite.com/api/batch" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "completed": 3,
  "failed": 0,
  "results": [
    {
      "index": 0,
      "tool": "customers_create",
      "status": true,
      "result": { "status": true, "record_id": 142 }
    },
    {
      "index": 1,
      "tool": "invoices_get",
      "status": true,
      "result": {
        "id": "5",
        "clientid": "142",
        "number": "1000",
        "prefix": "INV-",
        "date": "2026-07-21",
        "duedate": "2026-08-20",
        "currency": "1",
        "subtotal": "1200.00",
        "total_tax": "0.00",
        "total": "1200.00",
        "status": "1"
      }
    },
    {
      "index": 2,
      "tool": "leads_update",
      "status": true,
      "result": { "status": true, "record_id": 88 }
    }
  ]
}

Partial-Failure-Response:

HTTP/1.1 200 OK
{
  "status": false,
  "completed": 2,
  "failed": 1,
  "results": [
    {
      "index": 0,
      "tool": "customers_create",
      "status": true,
      "result": { "status": true, "record_id": 142 }
    },
    {
      "index": 1,
      "tool": "invoices_get",
      "status": false,
      "error": "Invoice not found"
    },
    {
      "index": 2,
      "tool": "leads_update",
      "status": true,
      "result": { "status": true, "record_id": 88 }
    }
  ]
}

Validation-Error:

HTTP/1.1 422 Unprocessable Entity
{
  "status": false,
  "error": "validation_failed",
  "message": "Batch validation failed",
  "errors": {
    "operations": "Provide an operations array: [{\"tool\": \"...\", \"arguments\": {...}}]"
  }
}

Leads

Delete a Lead

DELETE/api/delete/leads/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number lead unique ID.
curl -X DELETE "https://yoursite.com/api/delete/leads/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Lead Delete Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Lead Delete Fail."
}

Add New Lead

POST/api/leads

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
source String Mandatory Lead source.
status String Mandatory Lead Status.
name String Mandatory Lead Name.
assigned String Mandatory Lead assigned.
client_id String optional Optional Lead From Customer.
tags String optional Optional Lead tags.
contact String optional Optional Lead contact.
title String optional Optional Position.
email String optional Optional Lead Email Address.
website String optional Optional Lead Website.
phonenumber String optional Optional Lead Phone.
company String optional Optional Lead company.
address String optional Optional Lead address.
city String optional Optional Lead City.
zip String optional Optional Zip code.
state String optional Optional Lead state.
country String optional Optional Lead Country.
default_language String optional Optional Lead Default Language.
description String optional Optional Lead description.
custom_contact_date String optional Optional Lead From Customer.
contacted_today String optional Optional Lead Contacted Today.
is_public String optional Optional Lead google sheet id.
curl -X POST "https://yoursite.com/api/leads" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "source": "...", "status": "...", "name": "...", "assigned": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Lead add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Lead add fail."
}

Request all Leads

GET/api/leads/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/leads/" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
    "id": "17",
    "hash": "c6e938f8b7a40b1bcfd98dc04f6eeee0-60d9c039da373a685fc0f74d4bfae631",
    "name": "Lead name",
    "contact": "",
    "title": "",
    "company": "Themesic Interactive",
    "description": "",
    "country": "243",
    "zip": null,
    "city": "London",
    "zip": "WC13KJ",
    "state": "London",
    "address": "1a The Alexander Suite Silk Point",
    "assigned": "5",
    "dateadded": "2019-07-18 08:59:28",
    "from_form_id": "0",
    "status": "0",
    "source": "4",
    ...
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Request Lead information

GET/api/leads/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Lead unique ID.
curl -X GET "https://yoursite.com/api/leads/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
    "id": "17",
    "hash": "c6e938f8b7a40b1bcfd98dc04f6eeee0-60d9c039da373a685fc0f74d4bfae631",
    "name": "Lead name",
    "contact": "",
    "title": "",
    "company": "Themesic Interactive",
    "description": "",
    "country": "243",
    "zip": null,
    "city": "London",
    "zip": "WC13KJ",
    "state": "London",
    "address": "1a The Alexander Suite Silk Point",
    "assigned": "5",
    "dateadded": "2019-07-18 08:59:28",
    "from_form_id": "0",
    "status": "0",
    "source": "4",
    ...
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a lead

PUT/api/leads/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
source String Mandatory Lead source.
status String Mandatory Lead Status.
name String Mandatory Lead Name.
assigned String Mandatory Lead assigned.
client_id String optional Optional Lead From Customer.
tags String optional Optional Lead tags.
contact String optional Optional Lead contact.
title String optional Optional Position.
email String optional Optional Lead Email Address.
website String optional Optional Lead Website.
phonenumber String optional Optional Lead Phone.
company String optional Optional Lead company.
address String optional Optional Lead address.
city String optional Optional Lead City.
zip String optional Optional Zip Code.
state String optional Optional Lead state.
country String optional Optional Lead Country.
default_language String optional Optional Lead Default Language.
description String optional Optional Lead description.
lastcontact String optional Optional Lead Last Contact.
is_public String optional Optional Lead google sheet id.
curl -X PUT "https://yoursite.com/api/leads/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "source": "...", "status": "...", "name": "...", "assigned": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Lead Update Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Lead Update Fail."
}

Invoices

Add New invoice

POST/api/invoices

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
clientid Number Mandatory. Customer id
number Number Mandatory. Invoice Number
date Date Mandatory. Invoice Date
currency Number Mandatory. currency field
newitems Array Mandatory. New Items to be added
subtotal Decimal Mandatory. calculation based on item Qty, Rate and Tax
total Decimal Mandatory. calculation based on subtotal, Discount and Adjustment
billing_street String Mandatory. Street Address
allowed_payment_modes Array Mandatory. Payment modes
billing_city String optional Optional. City Name for billing
billing_state String optional Optional. Name of state for billing
billing_zip Number optional Optional. Zip code
billing_country Number optional Optional. Country code
include_shipping boolean optional Optional. set yes if you want add Shipping Address

default: no

show_shipping_on_invoice boolean optional Optional. Shows shipping details in invoice.
shipping_street String optional Optional. Address of shipping
shipping_city String optional Optional. City name for shipping
shipping_state String optional Optional. Name of state for shipping
shipping_zip Number optional Optional. Zip code for shipping
shipping_country Number optional Optional. Country code
duedate Date optional Optional. Due date for Invoice
cancel_overdue_reminders boolean optional Optional. Prevent sending overdue remainders for invoice
tags String optional Optional. TAGS comma separated
sale_agent Number optional Optional. Sale Agent name
recurring String optional Optional. recurring 1 to 12 or custom
discount_type String optional Optional. before_tax / after_tax discount type
repeat_every_custom Number optional Optional. if recurring is custom set number gap
repeat_type_custom String optional Optional. if recurring is custom set gap option day/week/month/year
cycles Number optional Optional. number of cycles 0 for infinite
adminnote String optional Optional. notes by admin
removed_items Array optional Optional. Items to be removed
clientnote String optional Optional. client notes
terms String optional Optional. Terms
curl -X POST "https://yoursite.com/api/invoices" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "clientid": "...", "number": "...", "date": "...", "currency": "...", "newitems": "...", "subtotal": "...", "total": "...", "billing_street": "...", "allowed_payment_modes": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Invoice Added Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Invoice Add Fail"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"number":"The Invoice number is already in use"
		},
		"message": "The Invoice number is already in use"
    }

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "allowed_payment_modes[]": "The Allow Payment Mode field is required."
	    },
	    "message": "<p>The Allow Payment Mode field is required.</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "billing_street": "The Billing Street field is required"
	    },
	    "message": "<p>The Billing Street field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "newitems[]": "The Items field is required"
	    },
	    "message": "<p>The Items field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "subtotal": "The Sub Total field is required"
	    },
	    "message": "<p>The Sub Total field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "total": "The Total field is required"
	    },
	    "message": "<p>The Total field is required</p>\n"
	}

Delete invoice

DELETE/api/invoices/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/invoices/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Invoice Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Invoice Delete Fail"
}

Request invoice information

GET/api/invoices/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Contact unique ID
curl -X GET "https://yoursite.com/api/invoices/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

  HTTP/1.1 200 OK
  {
      "id": "2",
      "sent": "0",
      "datesend": null,
      "clientid": "1",
      "deleted_customer_name": null,
      "number": "2",
      "prefix": "INV-",
      "number_format": "1",
      "datecreated": "2020-05-26 19:53:11",
      "date": "2020-05-26",
      "duedate": "2020-06-25",
      "currency": "1",
      "subtotal": "5.00",
      "total_tax": "0.00",
      "total": "5.00",
      "adjustment": "0.00",
      "addedfrom": "0",
      "hash": "7bfac86da004df5364407574d4d1dbf2",
      "status": "1",
      "clientnote": null,
      "adminnote": null,
      "last_overdue_reminder": null,
      "cancel_overdue_reminders": "0",
      "allowed_payment_modes": "['1']",
      "token": null,
      "discount_percent": "0.00",
      "discount_total": "0.00",
      "discount_type": "",
      "recurring": "0",
      "recurring_type": null,
      "custom_recurring": "0",
      "cycles": "0",
      "total_cycles": "0",
      "is_recurring_from": null,
      "last_recurring_date": null,
      "terms": null,
      "sale_agent": "0",
      "billing_street": "",
      "billing_city": "",
      "billing_state": "",
      "billing_zip": "",
      "billing_country": null,
      "shipping_street": null,
      "shipping_city": null,
      "shipping_state": null,
      "shipping_zip": null,
      "shipping_country": null,
      "include_shipping": "0",
      "show_shipping_on_invoice": "1",
      "show_quantity_as": "1",
      "project_id": "0",
      "subscription_id": "0",
      "symbol": "$",
      "name": "USD",
      "decimal_separator": ".",
      "thousand_separator": ",",
      "placement": "before",
      "isdefault": "1",
      "currencyid": "1",
      "currency_name": "USD",
      "total_left_to_pay": "5.00",
      "items": [
       {
          "id": "2",
          "rel_id": "2",
          "rel_type": "invoice",
          "description": "12MP Dual Camera with cover",
          "long_description": "The JBL Cinema SB110 is a hassle-free soundbar",
          "qty": "1.00",
          "rate": "5.00",
          "unit": "",
          "item_order": "1"
          }
      ],
      "attachments": [],
      "visible_attachments_to_customer_found": false,
      "client": {
      "userid": "1",
      "company": "trueline",
      "vat": "",
      "phonenumber": "",
      "country": "0",
      "city": "",
      "zip": "",
      "state": "",
      "address": "",
      "website": "",
      "datecreated": "2020-05-19 20:07:49",
      "active": "1",
      "leadid": null,
      "billing_street": "",
      "billing_city": "",
      "billing_state": "",
      "billing_zip": "",
      "billing_country": "0",
      "shipping_street": "",
      "shipping_city": "",
      "shipping_state": "",
      "shipping_zip": "",
      "shipping_country": "0",
      "longitude": null,
      "latitude": null,
      "default_language": "english",
      "default_currency": "0",
      "show_primary_contact": "0",
      "stripe_id": null,
      "registration_confirmed": "1",
      "addedfrom": "1"
  },
  "payments": [],
  "scheduled_email": null
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update invoice

PUT/api/invoices/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
clientid Number Mandatory Customer id.
number Number Mandatory. Invoice Number
date Date Mandatory. Invoice Date
currency Number Mandatory. currency field
newitems Array Mandatory. New Items to be added
subtotal Decimal Mandatory. calculation based on item Qty, Rate and Tax
total Decimal Mandatory. calculation based on subtotal, Discount and Adjustment
billing_street String Mandatory. Street Address
allowed_payment_modes Array Mandatory. Payment modes
billing_city String optional Optional. City Name for billing
billing_state String optional Optional. Name of state for billing
billing_zip Number optional Optional. Zip code
billing_country Number optional Optional. Country code
include_shipping boolean optional Optional. set yes if you want add Shipping Address

default: no

show_shipping_on_invoice boolean optional Optional. Shows shipping details in invoice.
shipping_street String optional Optional. Address of shipping
shipping_city String optional Optional. City name for shipping
shipping_state String optional Optional. Name of state for shipping
shipping_zip Number optional Optional. Zip code for shipping
shipping_country Number optional Optional. Country code
duedate Date optional Optional. Due date for Invoice
cancel_overdue_reminders boolean optional Optional. Prevent sending overdue remainders for invoice
tags String optional Optional. TAGS comma separated
sale_agent Number optional Optional. Sale Agent name
recurring String optional Optional. recurring 1 to 12 or custom
discount_type String optional Optional. before_tax / after_tax discount type
repeat_every_custom Number optional Optional. if recurring is custom set number gap
repeat_type_custom String optional Optional. if recurring is custom set gap option day/week/month/year
cycles Number optional Optional. number of cycles 0 for infinite
adminnote String optional Optional. notes by admin
items Array optional Optional. Existing items with Id
removed_items Array optional Optional. Items to be removed
clientnote String optional Optional. client notes
terms String optional Optional. Terms
curl -X PUT "https://yoursite.com/api/invoices/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "clientid": "...", "number": "...", "date": "...", "currency": "...", "newitems": "...", "subtotal": "...", "total": "...", "billing_street": "...", "allowed_payment_modes": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": false,
  "message": "Invoice Updated Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Invoice Update Fail"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"number":"The Invoice number is already in use"
		},
		"message": "The Invoice number is already in use"
    }

Send invoice by email

POST/api/invoices/{id}/send

Emails the invoice to the customer using Perfex's own invoice email template, PDF attachment and SMTP configuration, and marks the invoice as sent. Requires the Invoices "Send email" permission. Send an Idempotency-Key header to make retries safe. The customer must have at least one contact flagged to receive invoice emails, and Setup -> Email (SMTP) must be configured or nothing is sent.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
cc String optional Optional comma-separated CC email addresses.
curl -X POST "https://yoursite.com/api/invoices/123/send" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "invoice_id": "847",
  "invoice_number": "INV-000832",
  "sent": true,
  "datesend": "2026-07-30 14:05:11",
  "message": "Invoice sent to the customer."
}

Not-Sent:

HTTP/1.1 500 Internal Server Error
{
  "status": false,
  "invoice_id": "847",
  "sent": false,
  "message": "Invoice could not be sent. Check SMTP settings and that the customer has a contact set to receive invoice emails."
}

Customers

Add New Customer

POST/api/customers

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
company String Mandatory Customer company.
vat String optional Optional Vat.
phonenumber String optional Optional Customer Phone.
website String optional Optional Customer Website.
groups_in Number[] optional Optional Customer groups.
default_language String optional Optional Customer Default Language.
default_currency String optional Optional default currency.
address String optional Optional Customer address.
city String optional Optional Customer City.
state String optional Optional Customer state.
zip String optional Optional Zip Code.
partnership_type String optional Optional Customer partnership type.
country String optional Optional country.
billing_street String optional Optional Billing Address: Street.
billing_city String optional Optional Billing Address: City.
billing_state Number optional Optional Billing Address: State.
billing_zip String optional Optional Billing Address: Zip.
billing_country String optional Optional Billing Address: Country.
shipping_street String optional Optional Shipping Address: Street.
shipping_city String optional Optional Shipping Address: City.
shipping_state String optional Optional Shipping Address: State.
shipping_zip String optional Optional Shipping Address: Zip.
shipping_country String optional Optional Shipping Address: Country.
curl -X POST "https://yoursite.com/api/customers" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "company": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Customer add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Customer add fail."
}

Request customer information

GET/api/customers/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number customer unique ID.
curl -X GET "https://yoursite.com/api/customers/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
     "id": "28",
     "name": "Test1",
     "description": null,
     "status": "1",
     "clientid": "11",
     "billing_type": "3",
     "start_date": "2019-04-19",
     "deadline": "2019-08-30",
     "customer_created": "2019-07-16",
     "date_finished": null,
     "progress": "0",
     "progress_from_tasks": "1",
     "customer_cost": "0.00",
     "customer_rate_per_hour": "0.00",
     "estimated_hours": "0.00",
     "addedfrom": "5",
     "rel_type": "customer",
     "potential_revenue": "0.00",
     "potential_margin": "0.00",
     "external": "E",
    ...
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a Customer

PUT/api/customers/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
company String Mandatory Customer company.
vat String optional Optional Vat.
phonenumber String optional Optional Customer Phone.
website String optional Optional Customer Website.
groups_in Number[] optional Optional Customer groups.
default_language String optional Optional Customer Default Language.
default_currency String optional Optional default currency.
address String optional Optional Customer address.
city String optional Optional Customer City.
state String optional Optional Customer state.
zip String optional Optional Zip Code.
country String optional Optional country.
billing_street String optional Optional Billing Address: Street.
billing_city String optional Optional Billing Address: City.
billing_state Number optional Optional Billing Address: State.
billing_zip String optional Optional Billing Address: Zip.
billing_country String optional Optional Billing Address: Country.
shipping_street String optional Optional Shipping Address: Street.
shipping_city String optional Optional Shipping Address: City.
shipping_state String optional Optional Shipping Address: State.
shipping_zip String optional Optional Shipping Address: Zip.
shipping_country String optional Optional Shipping Address: Country.
curl -X PUT "https://yoursite.com/api/customers/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "company": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Customer Update Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Customer Update Fail."
}

Delete a Customer

DELETE/api/delete/customers/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Customer unique ID.
curl -X DELETE "https://yoursite.com/api/delete/customers/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Customer Delete Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Customer Delete Fail."
}

Calendar Events

Get All Calendar Events

GET/api/calendar/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/calendar/" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
    {
        "eventid": "1",
        "title": "Hello",
        "description": "test",
        "userid": "1",
        "start": "2023-12-12 07:00:00",
        "end": 2023-12-12 07:00:00,
        "public": "1",
        "color": "#03a9f4",
        "isstartnotified": "0",
        "reminder_before": "30",
        "reminder_before_type": "minutes"
    },
    {
        "eventid": "2",
        "title": "Hello2",
        "description": "test2",
        "userid": "2",
        "start": "2022-12-12 07:00:00",
        "end": 2022-12-12 07:00:00,
        "public": "0",
        "color": "#03a9f4",
        "isstartnotified": "0",
        "reminder_before": "3",
        "reminder_before_type": "hours"
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "No data were found"
}

Create a new Calendar Event

POST/api/calendar/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
title String Required event title.
description String Optional event description.
start Date Required event start date.
reminder_before_type String Required value of reminder before type.
reminder_before Number Required value of reminder before.
color String Optional event color.
userid Number Required user id.
isstartnotified Number Required isstartnotified status.
public Number Required public status.
curl -X POST "https://yoursite.com/api/calendar/" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "title": "...", "description": "...", "start": "...", "reminder_before_type": "...", "reminder_before": "...", "color": "...", "userid": "...", "isstartnotified": "...", "public": "..." }'

Success-Response:

HTTP/1.1 200 OK
 {
     "status": true,
     "message": "Data Added Successfully"
 }

Error-Response:

   HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "Data Creation Failed"
}

Delete a Calendar Event

DELETE/api/calendar/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
ID Number ID for data deletion.
curl -X DELETE "https://yoursite.com/api/calendar/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Data Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Data Delete Fail"
}

Request Specific Event Information

GET/api/calendar/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id id Event data by id.
curl -X GET "https://yoursite.com/api/calendar/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
    {
        "eventid": "1",
        "title": "Hello",
        "description": "test",
        "userid": "1",
        "start": "2023-12-12 07:00:00",
        "end": 2023-12-12 07:00:00,
        "public": "1",
        "color": "#03a9f4",
        "isstartnotified": "0",
        "reminder_before": "30",
        "reminder_before_type": "minutes"
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "No data were found"
}

Update a Calendar Event

PUT/api/calendar/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
unique id ID for update data.
curl -X PUT "https://yoursite.com/api/calendar/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "unique": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Data Update Successful."
}

Error-Response:

   HTTP/1.1 404 Not Found
{
     "status": false,
     "message": "Data Update Fail"
}

Common

Get Common Data

GET/api/common/{type}

Retrieves common system data based on the specified type. This is a routing method that calls the appropriate helper method.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
type String Data type. Must be one of: expense_category, payment_mode, tax_data
curl -X GET "https://yoursite.com/api/common/tax_data" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response (expense_category):

HTTP/1.1 200 OK
[
  {
    "id": "1",
    "name": "cloud server",
    "description": "AWS server"
  }
]

Success-Response (payment_mode):

HTTP/1.1 200 OK
[
  {
    "id": "1",
    "name": "Bank",
    "description": null,
    "show_on_pdf": "0",
    "invoices_only": "0",
    "expenses_only": "0",
    "selected_by_default": "1",
    "active": "1"
  }
]

Success-Response (tax_data):

HTTP/1.1 200 OK
[
  {
    "id": "1",
    "name": "CGST",
    "taxrate": "9.00"
  }
]

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Not valid data"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Contacts

Add New Contact

POST/api/contacts/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
customer_id Number Mandatory Customer id.
firstname String Mandatory First Name
lastname String Mandatory Last Name
email String Mandatory E-mail
title String optional Optional Position
phonenumber String optional Optional Phone Number
direction String optional Optional Direction (rtl or ltr)

default: rtl

password String optional Optional password (only required if you pass send_set_password_email parameter)
is_primary String optional Optional Primary Contact (set on or don't pass it)

default: on

donotsendwelcomeemail String optional Optional Do Not Send Welcome Email (set on or don't pass it)
send_set_password_email String optional Optional Send Set Password Email (set on or don't pass it)
permissions Array optional Optional Permissions for this contact(["1", "2", "3", "4", "5", "6" ]) [ "1", // Invoices permission "2", // Estimates permission "3", // Contracts permission "4", // Proposals permission "5", // Support permission "6" // Projects permission ]
invoice_emails String optional Optional E-Mail Notification for Invoices (set value same as name or don't pass it)

default: invoice_emails

estimate_emails String optional Optional E-Mail Notification for Estimate (set value same as name or don't pass it)

default: estimate_emails

credit_note_emails String optional Optional E-Mail Notification for Credit Note (set value same as name or don't pass it)

default: credit_note_emails

project_emails String optional Optional E-Mail Notification for Project (set value same as name or don't pass it)

default: project_emails

ticket_emails String optional Optional E-Mail Notification for Tickets (set value same as name or don't pass it)

default: ticket_emails

task_emails String optional Optional E-Mail Notification for Task (set value same as name or don't pass it)

default: task_emails

contract_emails String optional Optional E-Mail Notification for Contract (set value same as name or don't pass it)

default: contract_emails

curl -X POST "https://yoursite.com/api/contacts/" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "customer_id": "...", "firstname": "...", "lastname": "...", "email": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Contact added successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Contact add fail"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"email":"This Email is already exists"
		},
		"message": "This Email is already exists"
    }

List all Contacts of a Customer

GET/api/contacts/{customer_id}/{contact_id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
customer_id Number Mandatory Customer unique ID
contact_id Number Optional Contact unique ID Note : if you don't pass Contact id then it will list all contacts of the customer
curl -X GET "https://yoursite.com/api/contacts/123/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

    HTTP/1.1 200 OK
	{
		"id": "6",
		"userid": "1",
		"company": "xyz",
		"vat": "",
		"phonenumber": "1234567890",
		"country": "0",
		"city": "",
		"zip": "360005",
		"state": "",
		"address": "",
		"website": "",
		"datecreated": "2020-08-19 20:07:49",
		"active": "1",
		"leadid": null,
		"billing_street": "",
		"billing_city": "",
		"billing_state": "",
		"billing_zip": "",
		"billing_country": "0",
		"shipping_street": "",
		"shipping_city": "",
		"shipping_state": "",
		"shipping_zip": "",
		"shipping_country": "0",
		"longitude": null,
		"latitude": null,
		"default_language": "english",
		"default_currency": "0",
		"show_primary_contact": "0",
		"stripe_id": null,
		"registration_confirmed": "1",
		"addedfrom": "1"
	}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update Contact Information

PUT/api/contacts/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Mandatory Customer Contact id.
firstname String Mandatory First Name
lastname String Mandatory Last Name
email String Mandatory E-mail
title String optional Optional Position
phonenumber String optional Optional Phone Number
direction String optional Optional Direction (rtl or ltr)

default: rtl

password String optional Optional password (only required if you pass send_set_password_email parameter)
is_primary String optional Optional Primary Contact (set on or don't pass it)

default: on

donotsendwelcomeemail String optional Optional Do Not Send Welcome Email (set on or don't pass it)
send_set_password_email String optional Optional Send Set Password Email (set on or don't pass it)
permissions Array optional Optional Permissions for this contact(["1", "2", "3", "4", "5", "6" ]) [ "1", // Invoices permission "2", // Estimates permission "3", // Contracts permission "4", // Proposals permission "5", // Support permission "6" // Projects permission ]
invoice_emails String optional Optional E-Mail Notification for Invoices (set value same as name or don't pass it)

default: invoice_emails

estimate_emails String optional Optional E-Mail Notification for Estimate (set value same as name or don't pass it)

default: estimate_emails

credit_note_emails String optional Optional E-Mail Notification for Credit Note (set value same as name or don't pass it)

default: credit_note_emails

project_emails String optional Optional E-Mail Notification for Project (set value same as name or don't pass it)

default: project_emails

ticket_emails String optional Optional E-Mail Notification for Tickets (set value same as name or don't pass it)

default: ticket_emails

task_emails String optional Optional E-Mail Notification for Task (set value same as name or don't pass it)

default: task_emails

contract_emails String optional Optional E-Mail Notification for Contract (set value same as name or don't pass it)

default: contract_emails

curl -X PUT "https://yoursite.com/api/contacts/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "firstname": "...", "lastname": "...", "email": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Contact Updated Successfully"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"email":"This Email is already exists"
		},
		"message": "This Email is already exists"
    }

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Contact Update fail"
}

Delete Contact

DELETE/api/delete/contacts/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
customer_id Number unique Customer id
curl -X DELETE "https://yoursite.com/api/delete/contacts/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Contact Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Contact Delete Fail"
}

Contracts

Add New Contract

POST/api/contracts

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
subject String Mandatory. Contract subject
datestart Date Mandatory. Contract start date
client Number Mandatory. Customer ID
dateend Date Optional. Contract end date
contract_type Number Optional. Contract type
contract_value Number Optional. Contract value
description String Optional. Contract description
content String Optional. Contract content
curl -X POST "https://yoursite.com/api/contracts" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "subject": "...", "datestart": "...", "client": "...", "dateend": "...", "contract_type": "...", "contract_value": "...", "description": "...", "content": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Contract Added Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Contract ID Exists"
}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "newitems[]": "The Start date field is required"
	    },
	    "message": "<p>The Start date field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "subtotal": "The Subject field is required"
	    },
	    "message": "<p>The Subject field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "total": "The Customer ID is required"
	    },
	    "message": "<p>The Customer ID is required</p>\n"
	}

Delete Contract

DELETE/api/contracts/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/contracts/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Contract Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Contract Delete Fail"
}

Request Contract information

GET/api/contracts/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Contact unique ID
curl -X GET "https://yoursite.com/api/contracts/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

  HTTP/1.1 200 OK
	    {
	    "id": "1",
	    "content": "",
	    "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
	    "subject": "New Contract",
	    "client": "9",
	    "datestart": "2022-11-21",
	    "dateend": "2027-11-21",
	    "contract_type": "1",
	    "project_id": "0",
	    "addedfrom": "1",
	    "dateadded": "2022-11-21 12:45:58",
	    "isexpirynotified": "0",
	    "contract_value": "13456.00",
	    "trash": "0",
	    "not_visible_to_client": "0",
	    "hash": "31caaa36b9ea1f45a688c7e859d3ae70",
	    "signed": "0",
	    "signature": null,
	    "marked_as_signed": "0",
	    "acceptance_firstname": null,
	    "acceptance_lastname": null,
	    "acceptance_email": null,
	    "acceptance_date": null,
	    "acceptance_ip": null,
	    "short_link": null,
	    "name": "Development Contracts",
	    "userid": "9",
	    "company": "8web",
	    "vat": "",
	    "phonenumber": "",
	    "country": "0",
	    "city": "",
	    "zip": "",
	    "state": "",
	    "address": "",
	    "website": "",
	    "datecreated": "2022-08-11 14:07:26",
	    "active": "1",
	    "leadid": null,
	    "billing_street": "",
	    "billing_city": "",
	    "billing_state": "",
	    "billing_zip": "",
	    "billing_country": "0",
	    "shipping_street": "",
	    "shipping_city": "",
	    "shipping_state": "",
	    "shipping_zip": "",
	    "shipping_country": "0",
	    "longitude": null,
	    "latitude": null,
	    "default_language": "",
	    "default_currency": "0",
	    "show_primary_contact": "0",
	    "stripe_id": null,
	    "registration_confirmed": "1",
	    "type_name": "Development Contracts",
	    "attachments": [],
	    "customfields": [],
	    }

Credit Notes

Add New Credit Notes

POST/api/credit_notes

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
clientid Number Mandatory. Customer id
date Date Mandatory. Credit Note Date
number Number Mandatory. Credit Note Number
currency Number Mandatory. currency field
newitems Array Mandatory. New Items to be added
billing_street String Optional. Street Address
billing_city String optional Optional. City Name for billing
billing_state String optional Optional. Name of state for billing
billing_zip Number optional Optional. Zip code
billing_country Number optional Optional. Country code
shipping_street String optional Optional. Address of shipping
shipping_city String optional Optional. City name for shipping
shipping_state String optional Optional. Name of state for shipping
shipping_zip Number optional Optional. Zip code for shipping
shipping_country Number optional Optional. Country code
discount_type String optional Optional. before_tax / after_tax discount type
Admin String optional Note] Optional. Admin Note
subtotal Decimal Mandatory. calculation based on item Qty, Rate and Tax
total Decimal Mandatory. calculation based on subtotal, Discount and
clientnote String optional Optional. client notes
terms String optional Optional. Terms
curl -X POST "https://yoursite.com/api/credit_notes" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "clientid": "...", "date": "...", "number": "...", "currency": "...", "newitems": "...", "billing_street": "...", "subtotal": "...", "total": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Credit Note Added Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Credit Note Add Fail"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"number":"The Credit Note number is already in use"
		},
		"message": "The Credit Note number is already in use"
    }

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "newitems[]": "The Items field is required"
	    },
	    "message": "<p>The Items field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "subtotal": "The Sub Total field is required"
	    },
	    "message": "<p>The Sub Total field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "total": "The Total field is required"
	    },
	    "message": "<p>The Total field is required</p>\n"
	}

Update a Credit Note

PUT/api/credit_notes

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
clientid Number Mandatory. Customer id
date Date Mandatory. Credit Note Date
number Number Mandatory. Credit Note Number
currency Number Mandatory. currency field
newitems Array Mandatory. New Items to be added
items Array Mandatory. Existing items with Id
removed_items Array Optional. Items to be removed
billing_street String Optional. Street Address
billing_city String optional Optional. City Name for billing
billing_state String optional Optional. Name of state for billing
billing_zip Number optional Optional. Zip code
billing_country Number optional Optional. Country code
shipping_street String optional Optional. Address of shipping
shipping_city String optional Optional. City name for shipping
shipping_state String optional Optional. Name of state for shipping
shipping_zip Number optional Optional. Zip code for shipping
shipping_country Number optional Optional. Country code
discount_type String optional Optional. before_tax / after_tax discount type
Admin String optional Note] Optional. Admin Note
subtotal Decimal Mandatory. calculation based on item Qty, Rate and Tax
total Decimal Mandatory. calculation based on subtotal, Discount and
clientnote String optional Optional. client notes
terms String optional Optional. Terms
curl -X PUT "https://yoursite.com/api/credit_notes" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "clientid": "...", "date": "...", "number": "...", "currency": "...", "newitems": "...", "items": "...", "removed_items": "...", "billing_street": "...", "subtotal": "...", "total": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Credit Note Updated Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Credit Note Update Fail"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"number":"The Credit Note number is already in use"
		},
		"message": "The Credit Note number is already in use"
    }

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "newitems[]": "The Items field is required"
	    },
	    "message": "<p>The Items field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "subtotal": "The Sub Total field is required"
	    },
	    "message": "<p>The Sub Total field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "total": "The Total field is required"
	    },
	    "message": "<p>The Total field is required</p>\n"
	}

Delete Credit Note

DELETE/api/credit_notes/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/credit_notes/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Credit Note Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Credit Note Delete Fail"
}

Request Credit notes information

GET/api/credit_notes/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/credit_notes/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

    HTTP/1.1 200 OK
    {
	        "id": "2",
	        "clientid": "1",
	        "deleted_customer_name": null,
	        "number": "2",
        "prefix": "CN-",
	        "number_format": "1",
	        "datecreated": "2021-07-30 16:29:46",
	        "date": "2021-08-02",
	        "adminnote": "adminnote2",
        "terms": "",
	        "clientnote": "",
	        "currency": "1",
	        "subtotal": "1200.00",
	        "total_tax": "0.00",
	        "total": "1200.00",
	        "adjustment": "0.00",
	        "addedfrom": "1",
	        "status": "1",
	        "project_id": "0",
	        "discount_percent": "0.00",
	        "discount_total": "0.00",
	        "discount_type": "",
	        "billing_street": "Test",
	        "billing_city": "Test",
	        "billing_state": "Test",
	        "billing_zip": "3000",
	        "billing_country": "102",
	        "shipping_street": "Test",
	        "shipping_city": "Test",
	        "shipping_state": "Test",
	        "shipping_zip": "3000",
	        "shipping_country": "102",
	        "include_shipping": "1",
	        "show_shipping_on_credit_note": "1",
	        "show_quantity_as": "1",
	        "reference_no": "",
	        "userid": "1",
	        "company": "Test",
	        "vat": "",
	        "phonenumber": "01324568903",
	        "country": "102",
	        "city": "Test",
	        "zip": "3000",
	        "state": "Test",
	        "address": "Test",
	        "website": "",
	        "active": "1",
	        "leadid": null,
	        "longitude": null,
	        "latitude": null,
	        "default_language": "",
	        "default_currency": "0",
	        "show_primary_contact": "0",
	        "stripe_id": null,
	        "registration_confirmed": "1",
	        "credit_note_id": "2",
	        "customfields": []
	    }

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Estimates

Add New Estimates

POST/api/estimates

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
clientid Number Mandatory. Customer id
number Number Mandatory. Estimates Number
date Date Mandatory. Estimates Date
duedate Date optional Optional. Expiry Date of Estimates
currency Number Mandatory. currency field
newitems Array Mandatory. New Items to be added
subtotal Decimal Mandatory. calculation based on item Qty, Rate and Tax
total Decimal Mandatory. calculation based on subtotal, Discount and Adjustment
billing_street String Optional. Street Address
billing_city String optional Optional. City Name for billing
billing_state String optional Optional. Name of state for billing
billing_zip Number optional Optional. Zip code
billing_country Number optional Optional. Country code
shipping_street String optional Optional. Address of shipping
shipping_city String optional Optional. City name for shipping
shipping_state String optional Optional. Name of state for shipping
shipping_zip Number optional Optional. Zip code for shipping
shipping_country Number optional Optional. Country code
tags String optional Optional. TAGS comma separated
status Number optional Optional. Status id (default status is Accepted)
Reference String optional Optional. Reference name
sale_agent Number optional Optional. Sale Agent name
adminnote String optional Optional. notes by admin
clientnote String optional Optional. client notes
terms String optional Optional. Terms
curl -X POST "https://yoursite.com/api/estimates" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "clientid": "...", "number": "...", "date": "...", "currency": "...", "newitems": "...", "subtotal": "...", "total": "...", "billing_street": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Estimates Added Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Estimates Add Fail"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"number":"The Estimates number is already in use"
		},
		"message": "The Estimates number is already in use"
    }

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "newitems[]": "The Items field is required"
	    },
	    "message": "<p>The Items field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "subtotal": "The Sub Total field is required"
	    },
	    "message": "<p>The Sub Total field is required</p>\n"
	}

Error-Response:

  HTTP/1.1 404 Not Found
   {
	    "status": false,
	    "error": {
	        "total": "The Total field is required"
	    },
	    "message": "<p>The Total field is required</p>\n"
	}

Delete Estimate

DELETE/api/estimates/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/estimates/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Estimate Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Estimate Delete Fail"
}

Request Estimate information

GET/api/estimates/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Contact unique ID
curl -X GET "https://yoursite.com/api/estimates/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

  HTTP/1.1 200 OK
  {
	    "id": "1",
	    "sent": "0",
	    "datesend": null,
	    "clientid": "1",
	    "deleted_customer_name": null,
	    "project_id": "0",
	    "number": "1",
	    "prefix": "EST-",
	    "number_format": "1",
	    "hash": "b12ae9de6471d0cf153d7846f05128af",
	    "datecreated": "2021-07-31 11:06:49",
	    "date": "2021-07-31",
	    "expirydate": "2021-08-07",
	    "currency": "1",
	    "subtotal": "1200.00",
	    "total_tax": "0.00",
	    "total": "1200.00",
	    "adjustment": "0.00",
	    "addedfrom": "1",
	    "status": "1",
	    "clientnote": "",
	    "adminnote": "",
	    "discount_percent": "0.00",
	    "discount_total": "0.00",
	    "discount_type": "",
	    "invoiceid": null,
	    "invoiced_date": null,
	    "terms": "",
	    "reference_no": "",
	    "sale_agent": "0",
	    "billing_street": "Thangadh, Gujarat, India<br />\r\nShipping",
	    "billing_city": "Thangadh",
	    "billing_state": "Gujarat",
	    "billing_zip": "363630",
	    "billing_country": "102",
	    "shipping_street": "Thangadh, Gujarat, India<br />\r\nShipping",
	    "shipping_city": "Thangadh",
	    "shipping_state": "Gujarat",
	    "shipping_zip": "363630",
	    "shipping_country": "102",
	    "include_shipping": "1",
	    "show_shipping_on_estimate": "1",
	    "show_quantity_as": "1",
	    "pipeline_order": "0",
	    "is_expiry_notified": "0",
	    "acceptance_firstname": null,
	    "acceptance_lastname": null,
	    "acceptance_email": null,
	    "acceptance_date": null,
	    "acceptance_ip": null,
	    "signature": null,
	    "short_link": null,
	    "symbol": "$",
	    "name": "USD",
	    "decimal_separator": ".",
	    "thousand_separator": ",",
	    "placement": "before",
	    "isdefault": "1",
	    "currencyid": "1",
	    "currency_name": "USD",
	    "attachments": [],
	    "visible_attachments_to_customer_found": false,
	    "items": [
	        {
	            "id": "2",
	            "rel_id": "1",
	            "rel_type": "estimate",
	            "description": "test",
	            "long_description": "test",
	            "qty": "1.00",
	            "rate": "1200.00",
	            "unit": "1",
	            "item_order": "1"
	        }
	    ],
	    "client": {
	        "userid": "1",
	        "company": "test",
	        "vat": "",
	        "phonenumber": "01324568903",
	        "country": "102",
	        "city": "test",
	        "zip": "3000",
	        "state": "Test",
	        "address": "Test",
	        "website": "",
	        "datecreated": "2021-07-30 16:29:46",
	        "active": "1",
	        "leadid": null,
	        "billing_street": "Test",
	        "billing_city": "Test",
	        "billing_state": "Test",
	        "billing_zip": "3000",
	        "billing_country": "102",
	        "shipping_street": "Test",
	        "shipping_city": "Test",
	        "shipping_state": "Test",
	        "shipping_zip": "3000",
	        "shipping_country": "102",
	        "longitude": null,
	        "latitude": null,
	        "default_language": "",
	        "default_currency": "0",
	        "show_primary_contact": "0",
	        "stripe_id": null,
	        "registration_confirmed": "1",
	        "addedfrom": "1"
	    },
	    "scheduled_email": null,
	    "customfields": []
	}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a estimate

PUT/api/estimates/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
clientid String Mandatory. Customer.
billing_street String Mandatory. Street Address
billing_city String optional Optional. City Name for billing
billing_state String optional Optional. Name of state for billing
billing_zip Number optional Optional. Zip code
billing_country Number optional Optional. Country code
include_shipping boolean optional Optional. set yes if you want add Shipping Address

default: no

show_shipping_on_estimate boolean optional Optional. Shows shipping details in estimate.
shipping_street String optional Optional. Address of shipping
shipping_city String optional Optional. City name for shipping
shipping_state String optional Optional. Name of state for shipping
shipping_zip Number optional Optional. Zip code for shipping
shipping_country Number optional Optional. Country code
number Number Mandatory. Estimate Number
date Date Mandatory. Estimate Date
expirydate Date optional Optional. Expiry Date of Estimate
tags String optional Optional. TAGS comma separated
currency Number Mandatory. currency field
status Number Mandatory. Estimate Status(eg. Draft, Sent)
reference_no String optional Optional. Reference #
sale_agent Number optional Optional. Sale Agent name
discount_type String optional Optional. before_tax / after_tax discount type
adminnote String optional Optional. notes by admin
items Array optional Mandatory. Existing items with Id
removed_items Array optional Optional. Items to be removed
newitems Array optional Optional. New Items to be added
subtotal Decimal Mandatory. calculation based on item Qty, Rate and Tax
total Decimal Mandatory. calculation based on subtotal, Discount and Adjustment
clientnote String optional Optional. client notes
terms String optional Optional. Terms
curl -X PUT "https://yoursite.com/api/estimates/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "clientid": "...", "billing_street": "...", "number": "...", "date": "...", "currency": "...", "status": "...", "subtotal": "...", "total": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": false,
  "message": "Estimate Updated Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Estimate Update Fail"
}

Error-Response:

    HTTP/1.1 409 Conflict
    {
      "status": false,
      "error": {
			"number":"The Estimate number is already in use"
		},
		"message": "The Estimate number is already in use"
    }

Expense Categories

Request Expense category

GET/api/common/expense_category

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/common/expense_category" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{

   [
       {
           "id": "1",
           "name": "cloud server",
           "description": "AWS server"
       },
       {
           "id": "2",
           "name": "website domain",
           "description": "domain Managment and configurations"
       }
   ]

}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Expenses

Add Expense

POST/api/expenses

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
expense_name String optional Optional. Expanse Name
note String optional Optional. Expanse Note
category Number Mandatory. Expense Category
amount Decimal Mandatory. Expense Amount
date Date Mandatory. Expense Date
clientid Number Optional. Customer id
currency Number Mandatory. Currency Field
tax Number Optional. Tax 1
tax2 Number Optional. Tax 2
paymentmode Number Optional. Payment mode
reference_no String optional Optional. Reference #
recurring String optional Optional. recurring 1 to 12 or custom
repeat_every_custom Number optional Optional. if recurring is custom set number gap
repeat_type_custom String optional Optional. if recurring is custom set gap option day/week/month/year
curl -X POST "https://yoursite.com/api/expenses" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "category": "...", "amount": "...", "date": "...", "clientid": "...", "currency": "...", "tax": "...", "tax2": "...", "paymentmode": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Expense Added Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Expense Add Fail"
}

Error-Response:

HTTP/1.1 409 Conflict
{
  "status": false,
  "error": {
     "category":"The Expense Category is not found"
 },
 "message": "The Expense Category is not found"
}

Error-Response:

HTTP/1.1 409 Conflict
{
  "status": false,
  "error": {
     "date":"The Expense date field is required."
 },
 "message": "The Expense date field is required."
}

Error-Response:

HTTP/1.1 409 Conflict
{
  "status": false,
  "error": {
     "amount":"The Amount field is required."
 },
 "message": "The Amount field is required."
}

Update a Expense

PUT/api/expenses

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
expense_name String optional Optional. Name
note String optional Optional. Note
category Number Mandatory. Expense Category
amount Decimal Mandatory. Expense Amount
date Date Mandatory. Expense Date
clientid Number Optional. Customer id
currency Number Mandatory. currency field
tax Number Optional. Tax 1
tax2 Number Optional. Tax 2
paymentmode Number Optional. Payment mode
reference_no String optional Optional. Reference #
recurring String optional Optional. recurring 1 to 12 or custom
repeat_every_custom Number optional Optional. if recurring is custom set number gap
repeat_type_custom String optional Optional. if recurring is custom set gap option day/week/month/year
curl -X PUT "https://yoursite.com/api/expenses" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "category": "...", "amount": "...", "date": "...", "clientid": "...", "currency": "...", "tax": "...", "tax2": "...", "paymentmode": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Expense Updated Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Expense Update Fail"
}

Error-Response:

HTTP/1.1 409 Conflict
{
  "status": false,
  "error": {
     "category":"The Expense Category is not found"
 },
 "message": "The Expense Category is not found"
}

Error-Response:

HTTP/1.1 409 Conflict
{
  "status": false,
  "error": {
     "date":"The Expense date field is required."
 },
 "message": "The Expense date field is required."
}

Error-Response:

HTTP/1.1 409 Conflict
{
  "status": false,
  "error": {
     "amount":"The Amount field is required."
 },
 "message": "The Amount field is required."
}

Delete Expense

DELETE/api/expenses/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/expenses/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Expense Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Expense Delete Fail"
}

Request Expense information

GET/api/expenses/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Expense unique ID.
curl -X GET "https://yoursite.com/api/expenses/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

[
    {
        "id": "1",
        "category": "1",
        "currency": "1",
        "amount": "50.00",
        "tax": "0",
        "tax2": "0",
        "reference_no": "012457893",
        "note": "AWS server hosting charges",
        "expense_name": "Cloud Hosting",
        "clientid": "1",
        "project_id": "0",
        "billable": "0",
        "invoiceid": null,
        "paymentmode": "2",
        "date": "2021-09-01",
        "recurring_type": "month",
        "repeat_every": "1",
        "recurring": "1",
        "cycles": "12",
        "total_cycles": "0",
        "custom_recurring": "0",
        "last_recurring_date": null,
        "create_invoice_billable": "0",
        "send_invoice_to_customer": "0",
        "recurring_from": null,
        "dateadded": "2021-09-01 12:26:34",
        "addedfrom": "1",
        "is_expense_created_in_xero": "0",
        "userid": "1",
        "company": "Company A",
        "vat": "",
        "phonenumber": "",
        "country": "0",
        "city": "",
        "zip": "",
        "state": "",
        "address": "",
        "website": "",
        "datecreated": "2020-05-25 22:55:49",
        "active": "1",
        "leadid": null,
        "billing_street": "",
        "billing_city": "",
        "billing_state": "",
        "billing_zip": "",
        "billing_country": "0",
        "shipping_street": "",
        "shipping_city": "",
        "shipping_state": "",
        "shipping_zip": "",
        "shipping_country": "0",
        "longitude": null,
        "latitude": null,
        "default_language": "",
        "default_currency": "0",
        "show_primary_contact": "0",
        "stripe_id": null,
        "registration_confirmed": "1",
        "name": "Hosting Management",
        "description": "server space and other settings",
        "show_on_pdf": "0",
        "invoices_only": "0",
        "expenses_only": "0",
        "selected_by_default": "0",
        "taxrate": null,
        "category_name": "Hosting Management",
        "payment_mode_name": "Paypal",
        "tax_name": null,
        "tax_name2": null,
        "taxrate2": null,
        "expenseid": "1",
        "customfields": []
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Items

Delete an Item

DELETE/api/delete/items/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Item unique ID
curl -X DELETE "https://yoursite.com/api/delete/items/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Item deleted successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Item deletion failed"
}

Create New Item

POST/api/items

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
description String Mandatory item description/name
rate Number Mandatory item rate/price
long_description String optional Optional long description
tax Number optional Optional primary tax ID
tax2 Number optional Optional secondary tax ID
group_id Number optional Optional item group ID (default: 0)
unit String optional Optional unit of measurement
curl -X POST "https://yoursite.com/api/items" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "description": "...", "rate": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Item created successfully",
  "item_id": 123
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Item creation failed"
}

Request Item information

GET/api/items/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number optional Optional Item unique ID. If not provided, returns all items
curl -X GET "https://yoursite.com/api/items/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response (Single Item):

    HTTP/1.1 200 OK
    {
	      "id": "1",
       "description": "JBL Soundbar",
       "long_description": "The JBL Cinema SB110 is a hassle-free soundbar",
       "rate": "100.00",
       "tax": 1,
       "tax2": 2,
       "unit": "pcs",
       "group_id": 0
    }

Success-Response (All Items with Pagination):

HTTP/1.1 200 OK
{
  "data": [{...}, {...}],
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total": 137,
    "last_page": 7
  }
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update an Item

PUT/api/items/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Item unique ID (in URL)
description String optional Optional item description/name
rate Number optional Optional item rate/price
long_description String optional Optional long description
tax Number optional Optional primary tax ID
tax2 Number optional Optional secondary tax ID
group_id Number optional Optional item group ID
unit String optional Optional unit of measurement
curl -X PUT "https://yoursite.com/api/items/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Item updated successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Item update failed"
}

Knowledge Base

List Knowledge Base Articles

GET/api/knowledge_base

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
group_id Number optional Filter articles by group.
curl -X GET "https://yoursite.com/api/knowledge_base" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "data": [
    {
      "articleid": "12",
      "articlegroup": "3",
      "subject": "How to reset your account password",
      "slug": "how-to-reset-your-account-password",
      "description": "<p>Open Settings &gt; Security and click Reset password.</p>",
      "active": "1",
      "datecreated": "2026-02-14 09:32:10",
      "article_order": "1",
      "staff_article": "0"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 8,
    "total_pages": 1,
    "has_more": false,
    "current_page": 1,
    "last_page": 1
  }
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Add New Article

POST/api/knowledge_base

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
subject String Article subject (slug auto-generated, unique).
articlegroup Number Existing knowledge base group id.
description String optional Article body (HTML allowed).
active Number optional 1 published / 0 hidden.

default: 1

staff_article Number optional 1 = internal (staff only).

default: 0

curl -X POST "https://yoursite.com/api/knowledge_base" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "subject": "...", "articlegroup": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Article added successfully",
  "record_id": 12
}

Error-Response:

HTTP/1.1 422 Unprocessable Entity
{
  "status": false,
  "error": "validation_failed",
  "message": "Article validation failed",
  "errors": {
    "subject": "The subject field is required.",
    "articlegroup": "A valid articlegroup id is required."
  }
}

Delete an Article

DELETE/api/knowledge_base/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/knowledge_base/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Article deleted successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Article not found"
}

Request Article Information

GET/api/knowledge_base/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/knowledge_base/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "articleid": "12",
  "articlegroup": "3",
  "subject": "How to reset your account password",
  "slug": "how-to-reset-your-account-password",
  "description": "<p>Open Settings &gt; Security and click Reset password.</p>",
  "active": "1",
  "datecreated": "2026-02-14 09:32:10",
  "article_order": "1",
  "staff_article": "0"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Article not found"
}

Update an Article

PUT/api/knowledge_base/{id}

Partial update - unknown fields are ignored.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X PUT "https://yoursite.com/api/knowledge_base/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Article updated successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Article not found"
}

List Knowledge Base Groups

GET/api/knowledge_base/groups

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/knowledge_base/groups" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "data": [
    {
      "groupid": "3",
      "name": "Billing & Payments",
      "group_slug": "billing-payments",
      "description": "Invoices, subscriptions and refunds",
      "active": "1",
      "color": "#28B8DA",
      "group_order": "2"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 20,
    "total": 5,
    "total_pages": 1,
    "has_more": false,
    "current_page": 1,
    "last_page": 1
  }
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Add New Group

POST/api/knowledge_base/groups

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
name String Group name (slug auto-generated, unique).
description String optional Group description.
color String optional Group color.

default: #28B8DA

curl -X POST "https://yoursite.com/api/knowledge_base/groups" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Group added successfully",
  "record_id": 3
}

Error-Response:

HTTP/1.1 422 Unprocessable Entity
{
  "status": false,
  "error": "validation_failed",
  "message": "Group validation failed",
  "errors": {
    "name": "The name field is required."
  }
}

Delete a Group

DELETE/api/knowledge_base/groups/{id}

Returns 409 while articles are still attached to the group.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/knowledge_base/groups/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Group deleted successfully"
}

Error-Response:

HTTP/1.1 409 Conflict
{
  "status": false,
  "message": "Group has 4 article(s); move or delete them first"
}

Update a Group

PUT/api/knowledge_base/groups/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X PUT "https://yoursite.com/api/knowledge_base/groups/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Group updated successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Group not found"
}

Milestones

Delete a Milestone

DELETE/api/delete/milestones/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Milestone unique ID.
curl -X DELETE "https://yoursite.com/api/delete/milestones/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Milestone Delete Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Milestone Delete Fail."
}

Add New Milestone

POST/api/milestones

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
project_id String Mandatory project id.
name String Mandatory Milestone Name.
due_date Date Mandatory Milestone Due date.
description String optional Optional Milestone Description.
description_visible_to_customer String optional Show description to customer.
milestone_order String optional Optional Milestone Order.
curl -X POST "https://yoursite.com/api/milestones" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "...", "name": "...", "due_date": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Milestone add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Milestone add fail."
}

Request Milestones information

GET/api/milestones/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Milestones unique ID.
curl -X GET "https://yoursite.com/api/milestones/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

  HTTP/1.1 200 OK
{
    "id": "5",
    "name": "MIlestone A",
    "description": "",
    "description_visible_to_customer": "0",
    "due_date": "2019-09-30",
    "project_id": "2",
    "color": null,
    "milestone_order": "1",
    "datecreated": "2019-07-19",
    "total_tasks": "0",
    "total_finished_tasks": "0"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a Milestone

PUT/api/milestones/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
project_id String Mandatory project id.
name String Mandatory Milestone Name.
due_date Date Mandatory Milestone Due date.
description String optional Optional Milestone Description.
description_visible_to_customer String optional Show description to customer.
milestone_order String optional Optional Milestone Order.
curl -X PUT "https://yoursite.com/api/milestones/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "project_id": "...", "name": "...", "due_date": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Milestone Update Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Milestone Update Fail."
}

Notes

Add New Note

POST/api/notes

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
rel_type String Entity type the note attaches to (12 supported types).
rel_id Number The related record id.
description String Note text.
curl -X POST "https://yoursite.com/api/notes" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "rel_type": "...", "rel_id": "...", "description": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
    "status": true,
    "message": "Note added successfully",
    "record_id": 143
}

Validation-Error:

HTTP/1.1 422 Unprocessable Entity
{
    "status": false,
    "error": "validation_failed",
    "message": "Note validation failed",
    "errors": {
        "rel_type": "rel_type must be one of: customer, lead, contract, ticket, invoice, estimate, credit_note, staff, expense, proposal, project, task",
        "description": "The description field is required."
    }
}

Delete a Note

DELETE/api/notes/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/notes/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
    "status": true,
    "message": "Note deleted successfully"
}

Not-Found:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "Note not found"
}

Request Note Information

GET/api/notes/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/notes/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
    "id": "142",
    "description": "Called the client to confirm the renewal date. They will send the signed contract by Friday.",
    "date_contacted": null,
    "dateadded": "2026-03-14 15:42:07",
    "addedfrom": "3",
    "rel_id": "18",
    "rel_type": "customer"
}

Not-Found:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "Note not found"
}

Update a Note

PUT/api/notes/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
description String New note text.
curl -X PUT "https://yoursite.com/api/notes/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "description": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
    "status": true,
    "message": "Note updated successfully"
}

Validation-Error:

HTTP/1.1 422 Unprocessable Entity
{
    "status": false,
    "error": "validation_failed",
    "message": "Note validation failed",
    "errors": {
        "description": "The description field is required."
    }
}

List Notes of an Entity

GET/api/notes/{rel_type}/{rel_id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
rel_type String One of: customer, lead, contract, ticket, invoice, estimate, credit_note, staff, expense, proposal, project, task.
rel_id Number The related record id.
curl -X GET "https://yoursite.com/api/notes/customer/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
    {
        "id": "142",
        "description": "Called the client to confirm the renewal date. They will send the signed contract by Friday.",
        "date_contacted": null,
        "dateadded": "2026-03-14 15:42:07",
        "addedfrom": "3",
        "rel_id": "18",
        "rel_type": "customer"
    },
    {
        "id": "128",
        "description": "Client requested a follow-up call regarding the outstanding invoice.",
        "date_contacted": null,
        "dateadded": "2026-03-02 09:18:55",
        "addedfrom": "1",
        "rel_id": "18",
        "rel_type": "customer"
    }
]

Not-Found:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "No data were found"
}

Payment Modes

Request Payment Modes

GET/api/common/payment_mode

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/common/payment_mode" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

 HTTP/1.1 200 OK
[
    {
        "id": "1",
        "name": "Bank",
        "description": null,
        "show_on_pdf": "0",
        "invoices_only": "0",
        "expenses_only": "0",
        "selected_by_default": "1",
        "active": "1"
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Payments

Add New Payment

POST/api/payments

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
invoiceid String Mandatory Invoice ID associated with the payment.
amount String Mandatory Payment amount.
paymentmode String Mandatory Payment mode (e.g., cash, credit card, etc.).
paymentmethod String optional Optional Payment method details.
note String optional Optional Additional payment note.
transactionid String optional Optional Transaction ID.
custom_fields String optional Optional Custom fields data.
curl -X POST "https://yoursite.com/api/payments" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "invoiceid": "...", "amount": "...", "paymentmode": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "paymentmode": true,
  "message": "Payment add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "paymentmode": false,
  "message": "Payment add fail."
}

List all Payments

GET/api/payments/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
payment_id Number Optional payment unique ID Note : if you don't pass Payment id then it will list all payments records
curl -X GET "https://yoursite.com/api/payments/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

  HTTP/1.1 200 OK
[
    {
        "id": "3",
        "invoiceid": "7",
        "amount": "1000.00",
        "paymentmode": "3",
        "paymentmethod": "",
        "date": "2020-06-08",
        "daterecorded": "2020-06-08 20:29:54",
        "note": "",
        "transactionid": "000355795931",
        "invoiceid": "UPI",
        "description": "",
        "show_on_pdf": "0",
        "invoices_only": "0",
        "expenses_only": "0",
        "selected_by_default": "0",
        "active": "1",
        "paymentid": "1"
    },
    {
        "id": "4",
        "invoiceid": "12",
        "amount": "-3.00",
        "paymentmode": "4",
        "paymentmethod": "",
        "date": "2020-07-04",
        "daterecorded": "2020-07-04 15:32:59",
        "note": "",
        "transactionid": "P228210122733439",
        "invoiceid": "Stripe",
        "description": "",
        "show_on_pdf": "0",
        "invoices_only": "0",
        "expenses_only": "0",
        "selected_by_default": "0",
        "active": "1",
        "paymentid": "2"
    },
    {
        "id": "1",
        "invoiceid": "14",
        "amount": "8.00",
        "paymentmode": "1",
        "paymentmethod": "",
        "date": "2020-07-04",
        "daterecorded": "2020-07-04 15:47:30",
        "note": "",
        "transactionid": "000360166374",
        "invoiceid": "Bank",
        "description": null,
        "show_on_pdf": "0",
        "invoices_only": "0",
        "expenses_only": "0",
        "selected_by_default": "1",
        "active": "1",
        "paymentid": "3"
    },
    {
        "id": "2",
        "invoiceid": "13",
        "amount": "3.00",
        "paymentmode": "2",
        "paymentmethod": "Credit card",
        "date": "2020-07-04",
        "daterecorded": "2020-07-04 15:49:56",
        "note": "",
        "transactionid": "0124875873",
        "invoiceid": "paypal",
        "description": "",
        "show_on_pdf": "0",
        "invoices_only": "0",
        "expenses_only": "0",
        "selected_by_default": "0",
        "active": "1",
        "paymentid": "4"
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
  "paymentmode": false,
  "message": "No data were found"
}

Projects

Delete a Project

DELETE/api/delete/projects/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number project unique ID.
curl -X DELETE "https://yoursite.com/api/delete/projects/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Project Delete Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Project Delete Fail."
}

Add New Project

POST/api/projects

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
name String Mandatory Project Name.
rel_type string Mandatory Project Related.
clientid Number Mandatory Related ID.
billing_type Number Mandatory Billing Type.
start_date Date Mandatory Project Start Date.
status Number Mandatory Project Status.
progress_from_tasks String optional Optional on or off progress from tasks.
project_cost String optional Optional Project Cost.
progress String optional Optional project progress.
project_rate_per_hour String optional Optional project rate per hour.
estimated_hours String optional Optional Project estimated hours.
project_members Number[] optional Optional Project members.
deadline Date optional Optional Project deadline.
tags String optional Optional Project tags.
description String optional Optional Project description.
curl -X POST "https://yoursite.com/api/projects" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "rel_type": "...", "clientid": "...", "billing_type": "...", "start_date": "...", "status": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Project add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Project add fail."
}

Request project information

GET/api/projects/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number project unique ID.
curl -X GET "https://yoursite.com/api/projects/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
     "id": "28",
     "name": "Test1",
     "description": null,
     "status": "1",
     "clientid": "11",
     "billing_type": "3",
     "start_date": "2019-04-19",
     "deadline": "2019-08-30",
     "project_created": "2019-07-16",
     "date_finished": null,
     "progress": "0",
     "progress_from_tasks": "1",
     "project_cost": "0.00",
     "project_rate_per_hour": "0.00",
     "estimated_hours": "0.00",
     "addedfrom": "5",
     "rel_type": "lead",
     "potential_revenue": "0.00",
     "potential_margin": "0.00",
     "external": "E",
    ...
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a project

PUT/api/projects/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
name String Mandatory Project Name.
rel_type string Mandatory Project Related.
clientid Number Mandatory Related ID.
billing_type Number Mandatory Billing Type.
start_date Date Mandatory Project Start Date.
status Number Mandatory Project Status.
progress_from_tasks String optional Optional on or off progress from tasks.
project_cost String optional Optional Project Cost.
progress String optional Optional project progress.
project_rate_per_hour String optional Optional project rate per hour.
estimated_hours String optional Optional Project estimated hours.
project_members Number[] optional Optional Project members.
deadline Date optional Optional Project deadline.
tags String optional Optional Project tags.
description String optional Optional Project description.
curl -X PUT "https://yoursite.com/api/projects/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "rel_type": "...", "clientid": "...", "billing_type": "...", "start_date": "...", "status": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Project Update Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Project Update Fail."
}

Proposals

Update a proposal

PUT/api/proposal/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
subject String Mandatory. Proposal Subject Name.
Mandatory. string Proposal Related.
rel_id Number Mandatory. Related ID.
proposal_to string Mandatory. Lead / Customer name.
date Date Mandatory. Proposal Start Date.
open_till Date Optional. Proposal Open Till Date.
currency string Mandatory. currency id.
discount_type string Optional. Proposal Open Till Date.
status string Optional. status id.
Assigned string Optional. Assignee id.
Email string Mandatory. Email id.
newitems Array Mandatory. New Items to be added.
items Array Optional. Existing items with Id
removed_items Array Optional. Items to be removed
curl -X PUT "https://yoursite.com/api/proposal/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "subject": "...", "Mandatory.": "...", "rel_id": "...", "proposal_to": "...", "date": "...", "open_till": "...", "currency": "...", "discount_type": "...", "status": "...", "Assigned": "...", "Email": "...", "newitems": "...", "items": "...", "removed_items": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": false,
  "message": "Proposal Updated Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Proposal Update Fail"
}

Request Proposal information

GET/api/proposals

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Proposal unique ID
curl -X GET "https://yoursite.com/api/proposals" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

  HTTP/1.1 200 OK
  {
	    "id": "1",
	    "subject": "Test Proposal",
	    "content": "{proposal_items}",
	    "addedfrom": "1",
	    "datecreated": "2021-08-01 13:38:08",
	    "total": "10.00",
	    "subtotal": "10.00",
	    "total_tax": "0.00",
	    "adjustment": "0.00",
	    "discount_percent": "0.00",
	    "discount_total": "0.00",
	    "discount_type": "",
	    "show_quantity_as": "1",
	    "currency": "1",
	    "open_till": "2021-08-08",
	    "date": "2021-08-01",
	    "rel_id": "1",
	    "rel_type": "customer",
	    "assigned": "0",
	    "hash": "9fc38e5ad2f8256b1b8430ee41069f75",
	    "proposal_to": "test",
	    "country": "102",
	    "zip": "30000202",
	    "state": "Test",
	    "city": "Test",
	    "address": "Test",
	    "email": "test@gmail.com",
	    "phone": "01324568903",
	    "allow_comments": "1",
	    "status": "6",
	    "estimate_id": null,
	    "invoice_id": null,
	    "date_converted": null,
	    "pipeline_order": "0",
	    "is_expiry_notified": "0",
	    "acceptance_firstname": null,
	    "acceptance_lastname": null,
	    "acceptance_email": null,
	    "acceptance_date": null,
	    "acceptance_ip": null,
	    "signature": null,
	    "short_link": null,
	    "symbol": "$",
	    "name": "USD",
	    "decimal_separator": ".",
	    "thousand_separator": ",",
	    "placement": "before",
	    "isdefault": "1",
	    "currencyid": "1",
	    "currency_name": "USD",
	    "attachments": [],
	    "items": [
	        {
	            "id": "4",
	            "rel_id": "1",
	            "rel_type": "proposal",
	            "description": "item 1",
	            "long_description": "item 1 description",
	            "qty": "1.00",
	            "rate": "10.00",
	            "unit": "1",
	            "item_order": "1"
	        }
	    ],
	    "visible_attachments_to_customer_found": false,
	    "customfields": [
	        {
	            "label": "Custom Field",
	            "value": "Custom Field value"
	        }
	    ]
	}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Add New Proposals

POST/api/proposals

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
subject String Mandatory. Proposal Subject Name.
Related string Mandatory. Proposal Related.
rel_id Number Mandatory. Related ID.
proposal_to string Mandatory. Lead / Customer name.
date Date Mandatory. Proposal Start Date.
open_till Date Optional. Proposal Open Till Date.
currency string Mandatory. currency id.
discount_type string Optional. Proposal Open Till Date.
status string Optional. status id.
Assigned string Optional. Assignee id.
Email string Mandatory. Email id.
newitems Array Mandatory. New Items to be added.
curl -X POST "https://yoursite.com/api/proposals" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "subject": "...", "Related": "...", "rel_id": "...", "proposal_to": "...", "date": "...", "open_till": "...", "currency": "...", "discount_type": "...", "status": "...", "Assigned": "...", "Email": "...", "newitems": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Proposal add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Proposal add fail."
}

Delete Proposal

DELETE/api/proposals/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Proposal unique ID.
curl -X DELETE "https://yoursite.com/api/proposals/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Proposals Deleted Successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Proposal Delete Fail"
}

Staffs

Delete a Staff

DELETE/api/delete/staffs/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Staff unique ID.
curl -X DELETE "https://yoursite.com/api/delete/staffs/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Staff Delete."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Staff Not Delete."
}

Add New Staff

POST/api/staffs

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
firstname String Mandatory Staff Name.
email String Mandatory Staff Related.
password String Mandatory Staff password.
hourly_rate Number optional Optional hourly rate.
phonenumber String optional Optional Staff phonenumber.
facebook String optional Optional Staff facebook.
linkedin String optional Optional Staff linkedin.
skype String optional Optional Staff skype.
default_language String optional Optional Staff default language.
email_signature String optional Optional Staff email signature.
direction String optional Optional Staff direction.
send_welcome_email String optional Optional Staff send welcome email.
departments Number[] optional Optional Staff departments.
curl -X POST "https://yoursite.com/api/staffs" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "firstname": "...", "email": "...", "password": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Staff add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Staff add fail."
}

Request Staff information

GET/api/staffs/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Staff unique ID.
curl -X GET "https://yoursite.com/api/staffs/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
     "staffid": "8",
     "email": "data1.gsts@gmail.com",
     "firstname": "Đào Quang Dân",
     "lastname": "",
     "facebook": "",
     "linkedin": "",
     "phonenumber": "",
     "skype": "",
     "password": "$2a$08$ySLokLAM.AqmW9ZjY2YREO0CIrd5K4Td\/Bpfp8d9QJamWNUfreQuK",
     "datecreated": "2019-02-25 09:11:31",
     "profile_image": "8.png",
    ...
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a Staff

PUT/api/staffs/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
firstname String Mandatory Staff Name.
email String Mandatory Staff Related.
password String Mandatory Staff password.
hourly_rate Number optional Optional hourly rate.
phonenumber String optional Optional Staff phonenumber.
facebook String optional Optional Staff facebook.
linkedin String optional Optional Staff linkedin.
skype String optional Optional Staff skype.
default_language String optional Optional Staff default language.
email_signature String optional Optional Staff email signature.
direction String optional Optional Staff direction.
departments Number[] optional Optional Staff departments.
curl -X PUT "https://yoursite.com/api/staffs/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "firstname": "...", "email": "...", "password": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Staff Update Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Staff Update Fail."
}

Subscriptions

Request all Subscriptions

GET/api/subscriptions/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/subscriptions/" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
    {
     'name' => varchar 'New  subscription'
     'description' => text 'This is a detailed description of subscription'
     'description_in_item' => tinyint '1'
     'clientid' => int '123'
     'date' => date '2024-01-31'
     'terms' => text 'subscription payment is due'
     'currency ' => int '4'
     'tax_id ' => int '456'
     'stripe_tax_id_2' => varchar 'tax-789' 
     'stripe_plan_id' => text 'subscription_ABC'
     'stripe_subscription_id' => text 'subscription_ABC'
     'tax_id_2': int '12',
     'stripe_subscription_id' => text 'sub_123456789'
     'next_billing_cycle' => bigint '1643808000'
     'ends_at' => bigint '1646486400'
     'status' => varchar 'active'
     'quantity' => int '5'
     'project_id' => int '789'
     'hash' => varchar 'a1b2c3' 
     'created' => datetime '2024-01-31 12:34:56'
     'created_from' => int '1' 
     'date_subscribed' => datetime '2024-01-31 10:00:00'
     'in_test_environment' => int '1' 
     'last_sent_at' => datetime '2024-01-31 14:45:00'
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "No data were found"
}

Add New Subscription

POST/api/subscriptions/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
name String New subscription name.
description Text Detailed description of the subscription.
description_in_item TinyInt Indicates if the description is included in the item (1 or 0).
clientid Int Client ID.
date Date Subscription start date (YYYY-MM-DD).
terms Text Subscription terms.
currency Int Currency ID.
tax_id Int Tax ID.
stripe_tax_id_2 Varchar Stripe tax ID.
stripe_plan_id Text Stripe plan ID.
stripe_subscription_id Text Stripe Subscription ID.
tax_id_2 Int Second tax ID.
next_billing_cycle BigInt Next billing cycle timestamp.
ends_at BigInt Subscription end timestamp.
status Varchar Subscription status (e.g., active).
quantity Int Subscription quantity.
project_id Int Associated project ID.
hash Varchar Unique hash identifier.
created DateTime Creation timestamp (YYYY-MM-DD HH:MM:SS).
created_from Int ID of the creator.
date_subscribed DateTime Subscription date (YYYY-MM-DD HH:MM:SS).
in_test_environment Int Indicates if the subscription is in a test environment (1 or 0).
last_sent_at DateTime Last sent timestamp (YYYY-MM-DD HH:MM:SS).
curl -X POST "https://yoursite.com/api/subscriptions/" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "description": "...", "description_in_item": "...", "clientid": "...", "date": "...", "terms": "...", "currency": "...", "tax_id": "...", "stripe_tax_id_2": "...", "stripe_plan_id": "...", "stripe_subscription_id": "...", "tax_id_2": "...", "next_billing_cycle": "...", "ends_at": "...", "status": "...", "quantity": "...", "project_id": "...", "hash": "...", "created": "...", "created_from": "...", "date_subscribed": "...", "in_test_environment": "...", "last_sent_at": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
    "status": true,
    "message": "Data Added Successfully"
}

Error-Response:

HTTP/1.1 400 Bad Request
{
    "status": false,
    "error": "Data not Added"
}

Delete a Subscription

DELETE/api/subscriptions/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id id ID for data Deletion.
curl -X DELETE "https://yoursite.com/api/subscriptions/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
 {
     "status": true,
     "message": "Delete Successful."
 }

Error-Response:

   HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "Delete Fail."
}

Request Subscription Information

GET/api/subscriptions/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id id Data id ID.
curl -X GET "https://yoursite.com/api/subscriptions/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
    {
     'name' => varchar 'New  subscription'
     'description' => text 'This is a detailed description of subscription'
     'description_in_item' => tinyint '1'
     'clientid' => int '123'
     'date' => date '2024-01-31'
     'terms' => text 'subscription payment is due'
     'currency ' => int '4'
     'tax_id ' => int '456'
     'stripe_tax_id_2' => varchar 'tax-789' 
     'stripe_plan_id' => text 'subscription_ABC'
     'stripe_subscription_id' => text 'subscription_ABC'
     'tax_id_2': int '12',
     'stripe_subscription_id' => text 'sub_123456789'
     'next_billing_cycle' => bigint '1643808000'
     'ends_at' => bigint '1646486400'
     'status' => varchar 'active'
     'quantity' => int '5'
     'project_id' => int '789'
     'hash' => varchar 'a1b2c3' 
     'created' => datetime '2024-01-31 12:34:56'
     'created_from' => int '1' 
     'date_subscribed' => datetime '2024-01-31 10:00:00'
     'in_test_environment' => int '1' 
     'last_sent_at' => datetime '2024-01-31 14:45:00'
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "No data were found"
}

Update a Subscription

PUT/api/subscriptions/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id id ID for update data.
curl -X PUT "https://yoursite.com/api/subscriptions/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Data Update Successful."
}

Error-Response:

    HTTP/1.1 404 Not Found
 {
      "status": false,
      "message": "Data Not Acceptable OR Not Provided"
 }

{
   "status": false,
   "message": "Data Update Fail."
}

Tasks

Delete a Task

DELETE/api/delete/tasks/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Task unique ID.
curl -X DELETE "https://yoursite.com/api/delete/tasks/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Task Delete Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Task Delete Fail."
}

Add New Task

POST/api/tasks

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
name String Mandatory Task Name.
startdate Date Mandatory Task Start Date.
is_public String optional Optional Task public.
billable String optional Optional Task billable.
hourly_rate String optional Optional Task hourly rate.
milestone String optional Optional Task milestone.
duedate Date optional Optional Task deadline.
priority String optional Optional Task priority.
repeat_every String optional Optional Task repeat every.
repeat_every_custom Number optional Optional Task repeat every custom.
repeat_type_custom String optional Optional Task repeat type custom.
cycles Number optional Optional cycles.
rel_type string Mandatory Task Related.
rel_id Number Optional Related ID.
tags String optional Optional Task tags.
description String optional Optional Task description.
assignees Mixed optional Optional Task assignees. Can be: array of staff IDs, comma-separated string "1,2,3", or JSON array "[1,2,3]".
curl -X POST "https://yoursite.com/api/tasks" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "startdate": "...", "rel_type": "...", "rel_id": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Task add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Task add fail."
}

Request Task information

GET/api/tasks/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Task unique ID.
curl -X GET "https://yoursite.com/api/tasks/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
    "id": "10",
    "name": "This is a task",
    "description": "",
    "priority": "2",
    "dateadded": "2019-02-25 12:26:37",
    "startdate": "2019-01-02 00:00:00",
    "duedate": "2019-01-04 00:00:00",
    "datefinished": null,
    "addedfrom": "9",
    "is_added_from_contact": "0",
    "status": "4",
    "recurring_type": null,
    "repeat_every": "0",
    "recurring": "0",
    "is_recurring_from": null,
    ...
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a task

PUT/api/tasks/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
name String optional Optional Task Name.
startdate Date optional Optional Task Start Date.
status Number optional Optional Task status (0-5).
is_public String optional Optional Task public.
billable String optional Optional Task billable.
hourly_rate String optional Optional Task hourly rate.
milestone String optional Optional Task milestone.
duedate Date optional Optional Task deadline.
priority String optional Optional Task priority.
repeat_every String optional Optional Task repeat every.
repeat_every_custom Number optional Optional Task repeat every custom.
repeat_type_custom String optional Optional Task repeat type custom.
cycles Number optional Optional cycles.
rel_type string Optional Task Related.
rel_id Number Optional Related ID.
tags String optional Optional Task tags.
description String optional Optional Task description.
assignees Mixed optional Optional Task assignees. Can be: array of staff IDs, comma-separated string "1,2,3", or JSON array "[1,2,3]".
curl -X PUT "https://yoursite.com/api/tasks/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "rel_type": "...", "rel_id": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Task Update Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Task Update Fail."
}

Get Task Checklist Items

GET/api/tasks/{id}/checklist

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Task unique ID.
curl -X GET "https://yoursite.com/api/tasks/123/checklist" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "1",
    "taskid": "10",
    "description": "Review documentation",
    "finished": "0",
    "dateadded": "2025-01-23 10:30:00",
    "addedfrom": "1",
    "finished_from": "0",
    "list_order": "1",
    "assigned": "2"
  }
]

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Task not found or no checklist items"
}

Add Checklist Item to Task

POST/api/tasks/{id}/checklist

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Task unique ID.
description String Mandatory Checklist item description.
assigned Number optional Optional Staff ID to assign this item to.
list_order Number optional Optional Sort order (defaults to highest + 1).
curl -X POST "https://yoursite.com/api/tasks/123/checklist" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "description": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Checklist item added successfully",
  "checklist_item_id": 15
}

Error-Response:

HTTP/1.1 400 Bad Request
{
  "status": false,
  "message": "Description is required"
}

Get Task Comments

GET/api/tasks/{id}/comments

Returns the comment thread of a task, oldest first. Requires the Tasks "get" permission.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Task unique ID (URL segment).
curl -X GET "https://yoursite.com/api/tasks/123/comments" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "42",
    "content": "Client approved the quote.",
    "taskid": "18",
    "staffid": "3",
    "contact_id": "0",
    "dateadded": "2026-07-31 10:14:52",
    "file_id": "0"
  }
]

Task-Not-Found:

HTTP/1.1 404 Not Found
{ "status": false, "message": "Task not found" }

Add a Task Comment

POST/api/tasks/{id}/comments

Adds a comment to a task, authored by the token's staff member. Requires the Tasks "post" permission. Send an Idempotency-Key header to make retries safe.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Task unique ID (URL segment).
content String Mandatory comment text.
curl -X POST "https://yoursite.com/api/tasks/123/comments" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "content": "..." }'

Success-Response:

HTTP/1.1 200 OK
{ "status": true, "message": "Comment added successfully", "comment_id": 42 }

Validation:

HTTP/1.1 400 Bad Request
{ "status": false, "message": "Content is required" }

Delete Checklist Item

DELETE/api/tasks/{task_id}/checklist/{item_id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
task_id Number Task unique ID.
item_id Number Checklist item ID.
curl -X DELETE "https://yoursite.com/api/tasks/123/checklist/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Checklist item deleted successfully"
}

Update Checklist Item

PUT/api/tasks/{task_id}/checklist/{item_id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
task_id Number Task unique ID.
item_id Number Checklist item ID.
description String optional Optional Updated description.
finished Number optional Optional 0=unchecked, 1=checked.
assigned Number optional Optional Staff ID to assign.
list_order Number optional Optional Sort order.
curl -X PUT "https://yoursite.com/api/tasks/123/checklist/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Checklist item updated successfully"
}

Delete a Task Comment

DELETE/api/tasks/{task_id}/comments/{comment_id}

Deletes a task comment. Requires the Tasks "delete" permission.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
task_id Number Task unique ID (URL segment).
comment_id Number Comment unique ID (URL segment).
curl -X DELETE "https://yoursite.com/api/tasks/123/comments/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{ "status": true, "message": "Comment deleted successfully" }

Update a Task Comment

PUT/api/tasks/{task_id}/comments/{comment_id}

Updates the text of an existing task comment. Requires the Tasks "put" permission.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
task_id Number Task unique ID (URL segment).
comment_id Number Comment unique ID (URL segment).
content String Mandatory new comment text.
curl -X PUT "https://yoursite.com/api/tasks/123/comments/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "content": "..." }'

Success-Response:

HTTP/1.1 200 OK
{ "status": true, "message": "Comment updated successfully" }

Taxes

Request Taxes

GET/api/common/tax_data

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/common/tax_data" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

 HTTP/1.1 200 OK
[
    {
        "id": "4",
        "name": "PAYPAL",
        "taxrate": "5.00"
    },
    {
        "id": "1",
        "name": "CGST",
        "taxrate": "9.00"
    },
    {
        "id": "2",
        "name": "SGST",
        "taxrate": "9.00"
    },
    {
        "id": "3",
        "name": "GST",
        "taxrate": "18.00"
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Thirdparty

Get All Records from Custom Table

GET/api/thirdparty/customtable/{table_name}

Retrieves all records from the specified custom table. The table name should be the exact name as it exists in the database (no prefix will be added).

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
table_name String Name of the custom database table (exact table name as it exists in the database)
curl -X GET "https://yoursite.com/api/thirdparty/customtable/TABLE_NAME" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
  {
    "id": "1",
    "shoenumber": "39",
    "winter": "40"
  },
  {
    "id": "2",
    "shoenumber": "41",
    "winter": "42"
  }
]

Error-Response (Table Not Found):

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Table 'giorgos' does not exist"
}

Insert Record into Custom Table

POST/api/thirdparty/customtable/{table_name}

Inserts a new record into the specified custom table. All columns in the request body must exist in the table, otherwise an error will be returned.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
Content-Type String application/json

Parameters

FieldTypeDescription
table_name String Name of the custom database table (exact table name as it exists in the database)
curl -X POST "https://yoursite.com/api/thirdparty/customtable/TABLE_NAME" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 201 Created
{
  "status": true,
  "message": "Record created successfully",
  "id": 5
}

Error-Response (Column Not Found):

HTTP/1.1 400 Bad Request
{
  "status": false,
  "message": "Column 'invalid_column' does not exist in table 'george'"
}

Delete Record from Custom Table

DELETE/api/thirdparty/customtable/{table_name}/{id}

Deletes a record from the specified custom table by its ID.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
table_name String Name of the custom database table (exact table name as it exists in the database)
id Number Record ID
curl -X DELETE "https://yoursite.com/api/thirdparty/customtable/TABLE_NAME/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Record deleted successfully"
}

Error-Response (Record Not Found):

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Record not found"
}

Get Record from Custom Table by ID

GET/api/thirdparty/customtable/{table_name}/{id}

Retrieves a specific record from the custom table by its ID.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
table_name String Name of the custom database table (exact table name as it exists in the database)
id Number Record ID
curl -X GET "https://yoursite.com/api/thirdparty/customtable/TABLE_NAME/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "id": "1",
  "shoenumber": "39",
  "winter": "40"
}

Error-Response (Record Not Found):

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Record not found"
}

Update Record in Custom Table

PUT/api/thirdparty/customtable/{table_name}/{id}

Updates an existing record in the specified custom table. All columns in the request body must exist in the table, otherwise an error will be returned.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
Content-Type String application/json

Parameters

FieldTypeDescription
table_name String Name of the custom database table (exact table name as it exists in the database)
id Number Record ID
curl -X PUT "https://yoursite.com/api/thirdparty/customtable/TABLE_NAME/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Record updated successfully"
}

Error-Response (Column Not Found):

HTTP/1.1 400 Bad Request
{
  "status": false,
  "message": "Column 'invalid_column' does not exist in table 'george'"
}

Tickets

Delete a Ticket

DELETE/api/delete/tickets/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Ticket unique ID.
curl -X DELETE "https://yoursite.com/api/delete/tickets/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Ticket Delete Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Ticket Delete Fail."
}

Add New Ticket

POST/api/tickets

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
subject String Mandatory Ticket name .
department String Mandatory Ticket Department.
contactid String Mandatory Ticket Contact.
userid String Mandatory Ticket user.
project_id String optional Optional Ticket Project.
message String optional Optional Ticket message.
service String optional Optional Ticket Service.
assigned String optional Optional Assign ticket.
cc String optional Optional Ticket CC.
priority String optional Optional Priority.
tags String optional Optional ticket tags.
curl -X POST "https://yoursite.com/api/tickets" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "subject": "...", "department": "...", "contactid": "...", "userid": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Ticket add successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Ticket add fail."
}

Get Ticket(s)

GET/api/tickets/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number optional Optional Ticket unique ID. If not provided, returns all tickets with pagination
page Number optional Optional Page number for pagination (when ID is not provided)

default: 1

per_page Number optional Optional Number of items per page (min: 1, max: 100, when ID is not provided)

default: 20

curl -X GET "https://yoursite.com/api/tickets/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response (Single Ticket):

HTTP/1.1 200 OK
{
    "id": "7",
    "ticketid": "7",
    "adminreplying": "0",
    "userid": "0",
    "contactid": "0",
    "email": null,
    "name": "Trung bình",
    "department": "1",
    "priority": "2",
    "status": "1",
    "service": "1",
    "ticketkey": "8ef33d61bb0f26cd158d56cc18b71c02",
    "subject": "Ticket ER",
    "message": "Ticket ER",
    "admin": "5",
    "date": "2019-04-10 03:08:21",
    "project_id": "5",
    "lastreply": null,
    "clientread": "0",
    "adminread": "1",
    "assigned": "5",
    "line_manager": "8",
    "milestone": "27",
    ...
}

Success-Response (All Tickets with Pagination):

HTTP/1.1 200 OK
{
  "data": [
    {
      "id": "7",
      "ticketid": "7",
      "subject": "Ticket ER",
      ...
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 20,
    "total": 137,
    "last_page": 7
  }
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Update a ticket

PUT/api/tickets/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
subject String Mandatory Ticket name .
department String Mandatory Ticket Department.
contactid String Mandatory Ticket Contact.
userid String Mandatory Ticket user.
priority String Mandatory Priority.
project_id String optional Optional Ticket Project.
message String optional Optional Ticket message.
service String optional Optional Ticket Service.
assigned String optional Optional Assign ticket.
tags String optional Optional ticket tags.
curl -X PUT "https://yoursite.com/api/tickets/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "subject": "...", "department": "...", "contactid": "...", "userid": "...", "priority": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Ticket Update Successful."
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Ticket Update Fail."
}

Add reply to a ticket

POST/api/tickets/reply/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id Number Ticket unique ID.
message String Mandatory Reply message.
admin Number optional Optional Staff ID (if provided, reply is from staff member).
status Number optional Optional Ticket status after reply (default: 1 for customer, 3 for staff).
cc String optional Optional CC email addresses.
file File optional Optional File attachments.
curl -X POST "https://yoursite.com/api/tickets/reply/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "message": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Ticket Reply Added Successful.",
  "reply_id": 123
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Ticket Reply Fail."
}

Timesheets

Request all Timesheets

GET/api/timesheets/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/timesheets/" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
    {
        "task_id": "2",
        "start_time": "10:00:00",
        "end_time": "12:00:00",
        "staff_id ": "2",
        "hourly_rate": "5.00",
        "note": "testing note",
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "No data were found"
}

Add New Timesheet

POST/api/timesheets/

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X POST "https://yoursite.com/api/timesheets/" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
 {
     "status": true,
     "message": "Data Added Successfully"
 }

Error-Response:

   HTTP/1.1 404 Not Found
{
    "status": false,
    "error": "Data not Added"    
}

Delete a Timesheet

DELETE/api/timesheets/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id id ID for data Deletion.
curl -X DELETE "https://yoursite.com/api/timesheets/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
 {
     "status": true,
     "message": "Delete Successful."
 }

Error-Response:

   HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "Delete Fail."
}

Request Timesheet Information

GET/api/timesheets/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id id Data id ID.
curl -X GET "https://yoursite.com/api/timesheets/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
[
    {
        "task_id": "2",
        "start_time": "10:00:00",
        "end_time": "12:00:00",
        "staff_id ": "2",
        "hourly_rate": "5.00",
        "note": "testing note",
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
    "status": false,
    "message": "No data were found"
}

Update a Timesheet

PUT/api/timesheets/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
id id ID for update data.
curl -X PUT "https://yoursite.com/api/timesheets/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Data Update Successful."
}

Error-Response:

    HTTP/1.1 404 Not Found
 {
      "status": false,
      "message": "Data Not Acceptable OR Not Provided"
 }

{
   "status": false,
   "message": "Data Update Fail."
}

Webhooks

List Webhooks

GET/api/webhooks

List all configured webhooks. Secrets are never returned (has_secret flag only). Supports page/per_page, sort, fields and date filters.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/webhooks" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "data": [
    {
      "id": "3",
      "name": "Order sync",
      "url": "https://hooks.example.com/perfex",
      "events": ["invoice_created", "invoice_paid"],
      "active": "1",
      "headers": { "X-Env": "prod" },
      "timeout": "30",
      "retry_count": "3",
      "last_triggered": "2026-07-20 14:32:10",
      "success_count": "128",
      "failure_count": "2",
      "date_created": "2026-02-14 09:12:44",
      "date_updated": "2026-07-20 14:32:10",
      "has_secret": true
    },
    {
      "id": "4",
      "name": "Ticket alerts",
      "url": "https://ops.example.com/webhooks/tickets",
      "events": ["ticket_created", "ticket_reply_created"],
      "active": "0",
      "headers": null,
      "timeout": "30",
      "retry_count": "5",
      "last_triggered": null,
      "success_count": "0",
      "failure_count": "0",
      "date_created": "2026-06-01 08:00:00",
      "date_updated": "2026-06-01 08:00:00",
      "has_secret": false
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 2,
    "total_pages": 1,
    "has_more": false,
    "current_page": 1,
    "last_page": 1
  }
}

Create a Webhook

POST/api/webhooks

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
name String Webhook name.
url String Target URL (SSRF-checked: https/http public hosts only).
events String Comma list of event names, or "*" for all. See GET api/webhooks/events.
secret String optional HMAC secret. Deliveries then carry X-Perfex-Signature: t=,v1=.
timeout Number optional Request timeout in seconds (1-120).

default: 30

retry_count Number optional Retries in queued mode (0-10).

default: 3

headers String optional JSON object of custom headers.
curl -X POST "https://yoursite.com/api/webhooks" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "...", "url": "...", "events": "..." }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Webhook created successfully",
  "record_id": 3,
  "data": {
    "id": "3",
    "name": "Order sync",
    "url": "https://hooks.example.com/perfex",
    "events": ["invoice_created", "invoice_paid"],
    "active": "1",
    "headers": { "X-Env": "prod" },
    "timeout": "30",
    "retry_count": "3",
    "last_triggered": null,
    "success_count": "0",
    "failure_count": "0",
    "date_created": "2026-02-14 09:12:44",
    "date_updated": "2026-02-14 09:12:44",
    "has_secret": true
  }
}

Validation-Error:

HTTP/1.1 422 Unprocessable Entity
{
  "status": false,
  "error": "validation_failed",
  "message": "Webhook validation failed",
  "errors": {
    "url": "The url field is required.",
    "events": "Unknown events: invoice.paid. See GET api/webhooks/events for the catalog."
  }
}

Delete a Webhook

DELETE/api/webhooks/{id}

Deletes the webhook together with its delivery logs and queued jobs.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X DELETE "https://yoursite.com/api/webhooks/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Webhook deleted successfully"
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Webhook not found"
}

Request Webhook Information

GET/api/webhooks/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/webhooks/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "id": "3",
  "name": "Order sync",
  "url": "https://hooks.example.com/perfex",
  "events": ["invoice_created", "invoice_paid"],
  "active": "1",
  "headers": { "X-Env": "prod" },
  "timeout": "30",
  "retry_count": "3",
  "last_triggered": "2026-07-20 14:32:10",
  "success_count": "128",
  "failure_count": "2",
  "date_created": "2026-02-14 09:12:44",
  "date_updated": "2026-07-20 14:32:10",
  "has_secret": true
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Webhook not found"
}

Update a Webhook

PUT/api/webhooks/{id}

Partial update - only the provided fields change; same validation as create.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X PUT "https://yoursite.com/api/webhooks/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Webhook updated successfully",
  "data": {
    "id": "3",
    "name": "Order sync",
    "url": "https://hooks.example.com/perfex",
    "events": ["invoice_created", "invoice_paid", "invoice_cancelled"],
    "active": "1",
    "headers": { "X-Env": "prod" },
    "timeout": "45",
    "retry_count": "3",
    "last_triggered": "2026-07-20 14:32:10",
    "success_count": "128",
    "failure_count": "2",
    "date_created": "2026-02-14 09:12:44",
    "date_updated": "2026-07-21 10:05:12",
    "has_secret": true
  }
}

Not-Found:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Webhook not found"
}

Nothing-To-Update:

HTTP/1.1 422 Unprocessable Entity
{
  "status": false,
  "error": "validation_failed",
  "message": "Nothing to update",
  "errors": {
    "_general": "No updatable fields provided"
  }
}

Webhook Delivery Logs

GET/api/webhooks/{id}/logs

Latest 500 delivery attempts with status, response code and error details. Paginated via page/per_page.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/webhooks/123/logs" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "data": [
    {
      "id": "982",
      "webhook_id": "3",
      "event": "invoice_paid",
      "url": "https://hooks.example.com/perfex",
      "payload": "{\"event\":\"invoice_paid\",\"timestamp\":1753021930,\"data\":{\"webhook_id\":3}}",
      "response_code": "200",
      "response_body": "{\"ok\":true}",
      "error_message": null,
      "attempt_number": "1",
      "status": "success",
      "triggered_at": "2026-07-20 14:32:10"
    },
    {
      "id": "981",
      "webhook_id": "3",
      "event": "invoice_created",
      "url": "https://hooks.example.com/perfex",
      "payload": "{\"event\":\"invoice_created\",\"timestamp\":1753021300,\"data\":{\"webhook_id\":3}}",
      "response_code": "500",
      "response_body": "Internal Server Error",
      "error_message": "HTTP 500: Internal Server Error",
      "attempt_number": "2",
      "status": "failed",
      "triggered_at": "2026-07-20 14:21:40"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 25,
    "total": 2,
    "total_pages": 1,
    "has_more": false,
    "current_page": 1,
    "last_page": 1
  }
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Webhook not found"
}

Enable/Disable a Webhook

POST/api/webhooks/{id}/toggle

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X POST "https://yoursite.com/api/webhooks/123/toggle" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'

Success-Response:

HTTP/1.1 200 OK
{
  "status": true,
  "message": "Webhook enabled",
  "active": 1
}

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Webhook not found"
}

Webhook Event Catalog

GET/api/webhooks/events

The authoritative catalog: 124 events across 22 resource groups (invoice_created, lead_status_changed, ticket_reply_created, kb_article_created...).

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area
curl -X GET "https://yoursite.com/api/webhooks/events" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
{
  "total_events": 124,
  "wildcard": "*",
  "groups": {
    "customers": {
      "customer_created": "Customer created",
      "customer_updated": "Customer updated",
      "customer_deleted": "Customer deleted"
    },
    "invoices": {
      "invoice_created": "Invoice created",
      "invoice_paid": "Invoice fully paid",
      "invoice_status_changed": "Invoice status changed"
    },
    "tickets": {
      "ticket_created": "Ticket created",
      "ticket_reply_created": "Reply added to ticket"
    },
    "system": {
      "webhook_created": "Webhook created",
      "webhook_updated": "Webhook updated",
      "webhook_deleted": "Webhook deleted"
    }
  }
}

Custom Fields

Request Values of Custom Fields

GET/api/custom_fields/{FieldBelongsto}/{id}

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
FieldBelongsto string Belongs to Mandatory Field Belongs to.
id Number optional Optional unique ID.
curl -X GET "https://yoursite.com/api/custom_fields/FIELDBELONGSTO/123" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

  HTTP/1.1 200 OK
[
    {
        "field_name": "custom_fields[invoice][1]",
        "custom_field_id": "1",
        "label": "Input 1",
        "required": "0",
        "type": "input",
        "value": "input1 data"
    },
    {
        "field_name": "custom_fields[invoice][2]",
        "custom_field_id": "2",
        "label": "Number 1",
        "required": "0",
        "type": "number",
        "value": "12"
    },
    {
        "field_name": "custom_fields[invoice][3]",
        "custom_field_id": "3",
        "label": "Textarea 1",
        "required": "0",
        "type": "textarea",
        "value": "textarea content"
    },
    {
        "field_name": "custom_fields[invoice][4]",
        "custom_field_id": "4",
        "label": "Select 1",
        "required": "0",
        "type": "select",
        "value": "[\"Option 1\"]",
        "options": "[\"Option 1\",\"Option 2\",\"Option 3\"]"
    },
    {
        "field_name": "custom_fields[invoice][5]",
        "custom_field_id": "5",
        "label": "Multiselect 1",
        "required": "0",
        "type": "multiselect",
        "value": "[\"Option 1\",\" Option 2\"]",
        "options": "[\"Option 1\",\"Option 2\",\"Option 3\"]"
    },
    {
        "field_name": "custom_fields[invoice][6]",
        "custom_field_id": "6",
        "label": "Checkbox 1",
        "required": "0",
        "type": "checkbox",
        "value": "[\"Option 1\",\" Option 2\"]",
        "options": "[\"Option 1\",\"Option 2\",\"Option 3\"]"
    },
    {
        "field_name": "custom_fields[invoice][7]",
        "custom_field_id": "7",
        "label": "Datepicker 1",
        "required": "0",
        "type": "date_picker",
        "value": "2021-05-16"
    },
    {
        "field_name": "custom_fields[invoice][8]",
        "custom_field_id": "8",
        "label": "Datetime Picker 1",
        "required": "0",
        "type": "date_picker_time",
        "value": "2021-05-25 23:06:00"
    },
    {
        "field_name": "custom_fields[invoice][9]",
        "custom_field_id": "9",
        "label": "Colorpicker 1",
        "required": "0",
        "type": "colorpicker",
        "value": "#8f1b1b"
    },
    {
        "field_name": "custom_fields[invoice][10]",
        "custom_field_id": "10",
        "label": "Hyperlink 1",
        "required": "0",
        "type": "link",
        "value": "<a href=\"https://google.com\" target=\"_blank\">google</a>"
    }
]

Error-Response:

HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "No data were found"
}

Delete Custom Fields

DELETE/N/A

To remove particular custom field value you can use Update action and an empty value in the custom field.
Note: When you delete any record the corresponding custom field data will be automatically deleted.

curl -X DELETE "https://yoursite.com/N/A" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
 Same as Original request

Error-Response:

HTTP/1.1 404 Not Found
Same as Original request

Request Custom Fields

GET/N/A

Custom fields' data will be returned combined with other request's information during the initial GET request of each available endpoint (Contacts, Invoices etc) with their respective label and value key

curl -X GET "https://yoursite.com/N/A" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
    {
        "id": "1",
        "sent": "0",
        "datesend": null,
        "clientid": "1",
        "deleted_customer_name": null,
        "number": "10",
        "prefix": "INV-",
        "number_format": "1",
        "datecreated": "2021-05-14 00:44:52",
        "date": "2021-08-28",
        "duedate": "2021-09-27",
        "currency": "1",
        "subtotal": "110.00",
        "total_tax": "0.00",
        "total": "110.00",
        "adjustment": "0.00",
        "addedfrom": "0",
        "hash": "4222d2f53404324ea73535d3c0f2c3f0",
        "status": "1",
        "clientnote": "",
        "adminnote": "",
        "last_overdue_reminder": null,
        "cancel_overdue_reminders": "1",
        "allowed_payment_modes": "a:2:{i:0;s:1:\"1\";i:1;s:1:\"2\";}",
        "token": null,
        "discount_percent": "0.00",
        "discount_total": "0.00",
        "discount_type": "",
        "recurring": "0",
        "recurring_type": null,
        "custom_recurring": "0",
        "cycles": "0",
        "total_cycles": "0",
        "is_recurring_from": null,
        "last_recurring_date": null,
        "terms": "",
        "sale_agent": "0",
        "billing_street": "billing address",
        "billing_city": "billing city name",
        "billing_state": "billing state name",
        "billing_zip": "billing zip code",
        "billing_country": "0",
        "shipping_street": "shipping address",
        "shipping_city": "city name",
        "shipping_state": "state name",
        "shipping_zip": "zip code",
        "shipping_country": "0",
        "include_shipping": "1",
        "show_shipping_on_invoice": "1",
        "show_quantity_as": "1",
        "project_id": "0",
        "subscription_id": "0",
        "short_link": null,
        "symbol": "$",
        "name": "USD",
        "decimal_separator": ".",
        "thousand_separator": ",",
        "placement": "before",
        "isdefault": "1",
        "currencyid": "1",
        "currency_name": "USD",
        "total_left_to_pay": "110.00",
        "items": [
            {
                "id": "1",
                "rel_id": "1",
                "rel_type": "invoice",
                "description": "item description",
                "long_description": "item long description",
                "qty": "1.00",
                "rate": "10.00",
                "unit": "1",
                "item_order": "1",
                "customfields": [
                    {
                        "label": "Input 1",
                        "value": "test 12 item 1"
                    },
                    {
                        "label": "Number 1",
                        "value": "10"
                    },
                    {
                        "label": "Textarea 1",
                        "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry"
                    },
                    {
                        "label": "Select 1",
                        "value": "Option 1"
                    },
                    {
                        "label": "Multiselect 1",
                        "value": "Option 1, Option 2"
                    },
                    {
                        "label": "Checkbox 1",
                        "value": "Option 1, Option 3"
                    },
                    {
                        "label": "Datepicker 1",
                        "value": "2021-05-06"
                    },
                    {
                        "label": "Datetime Picker 1",
                        "value": "2021-05-06 00:23:25"
                    },
                    {
                        "label": "Colorpicker 1",
                        "value": "#ffffff"
                    },
                    {
                        "label": "Hyperlink 1",
                        "value": "<a>Link</a>"
                    }
                ]
            },
            {
                "id": "2",
                "rel_id": "1",
                "rel_type": "invoice",
                "description": "updated item 2 description",
                "long_description": "updated item 2 logn description",
                "qty": "1.00",
                "rate": "100.00",
                "unit": "",
                "item_order": "2",
                "customfields": [
                    {
                        "label": "Input 1",
                        "value": "test 12 item 2"
                    },
                    {
                        "label": "Number 1",
                        "value": "10"
                    },
                    {
                        "label": "Textarea 1",
                        "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry"
                    },
                    {
                        "label": "Select 1",
                        "value": "Option 1"
                    },
                    {
                        "label": "Multiselect 1",
                        "value": "Option 1, Option 2"
                    },
                    {
                        "label": "Checkbox 1",
                        "value": "Option 1, Option 3"
                    },
                    {
                        "label": "Datepicker 1",
                        "value": "2021-05-06"
                    },
                    {
                        "label": "Datetime Picker 1",
                        "value": "2021-05-06 00:23:25"
                    },
                    {
                        "label": "Colorpicker 1",
                        "value": "#ffffff"
                    },
                    {
                        "label": "Hyperlink 1",
                        "value": "<a>Link</a>"
                    }
                ]
            }
        ],
        "attachments": [],
        "visible_attachments_to_customer_found": false,
        "client": {
            "userid": "1",
            "company": "updated company",
            "vat": "",
            "phonenumber": "",
            "country": "0",
            "city": "",
            "zip": "",
            "state": "",
            "address": "",
            "website": "",
            "datecreated": "2021-05-14 00:15:06",
            "active": "1",
            "leadid": null,
            "billing_street": "",
            "billing_city": "",
            "billing_state": "",
            "billing_zip": "",
            "billing_country": "0",
            "shipping_street": "",
            "shipping_city": "",
            "shipping_state": "",
            "shipping_zip": "",
            "shipping_country": "0",
            "longitude": null,
            "latitude": null,
            "default_language": "",
            "default_currency": "0",
            "show_primary_contact": "0",
            "stripe_id": null,
            "registration_confirmed": "1",
            "addedfrom": "0"
        },
        "payments": [],
        "scheduled_email": null,
        "customfields": [
            {
                "label": "Input 1",
                "value": "test 12"
            },
            {
                "label": "Number 1",
                "value": "10"
            },
            {
                "label": "Textarea 1",
                "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry"
            },
            {
                "label": "Select 1",
                "value": "Option 1"
            },
            {
                "label": "Multiselect 1",
                "value": "Option 1, Option 2"
            },
            {
                "label": "Checkbox 1",
                "value": "Option 1, Option 3"
            },
            {
                "label": "Datepicker 1",
                "value": "2021-05-06"
            },
            {
                "label": "Datetime Picker 1",
                "value": "2021-05-06 00:23:25"
            },
            {
                "label": "Colorpicker 1",
                "value": "#ffffff"
            },
            {
                "label": "Hyperlink 1",
                "value": "<a>Link</a>"
            }
        ]
    }

Error-Response:

HTTP/1.1 404 Not Found
Same as Original request

Search custom field values' information

GET/N/A

Custom fields' data will be returned combined with other request's information during the initial SEARCH request of each available endpoint (Contacts, Invoices etc) with their respective label and value key

curl -X GET "https://yoursite.com/N/A" \
  -H "authtoken: YOUR_API_TOKEN"

Success-Response:

HTTP/1.1 200 OK
    [
        {
            "id": "1",
            "sent": "0",
            "datesend": null,
            "clientid": "1",
            "deleted_customer_name": null,
            "number": "10",
            "prefix": "INV-",
            "number_format": "1",
            "datecreated": "2021-05-14 00:15:06",
            "date": "2021-08-28",
            "duedate": "2021-09-27",
            "currency": "1",
            "subtotal": "110.00",
            "total_tax": "0.00",
            "total": "110.00",
            "adjustment": "0.00",
            "addedfrom": "0",
            "hash": "4222d2f53404324ea73535d3c0f2c3f0",
            "status": "1",
            "clientnote": "",
            "adminnote": "",
            "last_overdue_reminder": null,
            "cancel_overdue_reminders": "1",
            "allowed_payment_modes": "a:2:{i:0;s:1:\"1\";i:1;s:1:\"2\";}",
            "token": null,
            "discount_percent": "0.00",
            "discount_total": "0.00",
            "discount_type": "",
            "recurring": "0",
            "recurring_type": null,
            "custom_recurring": "0",
            "cycles": "0",
            "total_cycles": "0",
            "is_recurring_from": null,
            "last_recurring_date": null,
            "terms": "",
            "sale_agent": "0",
            "billing_street": "",
            "billing_city": "",
            "billing_state": "",
            "billing_zip": "",
            "billing_country": "0",
            "shipping_street": "",
            "shipping_city": "",
            "shipping_state": "",
            "shipping_zip": "",
            "shipping_country": "0",
            "include_shipping": "1",
            "show_shipping_on_invoice": "1",
            "show_quantity_as": "1",
            "project_id": "0",
            "subscription_id": "0",
            "short_link": null,
            "userid": "1",
            "company": "updated company",
            "vat": "",
            "phonenumber": "",
            "country": "0",
            "city": "",
            "zip": "",
            "state": "",
            "address": "",
            "website": "",
            "active": "1",
            "leadid": null,
            "longitude": null,
            "latitude": null,
            "default_language": "",
            "default_currency": "0",
            "show_primary_contact": "0",
            "stripe_id": null,
            "registration_confirmed": "1",
            "invoiceid": "1",
            "customfields": [
                {
                    "label": "Input 1",
                    "value": "test 12"
                },
                {
                    "label": "Number 1",
                    "value": "10"
                },
                {
                    "label": "Textarea 1",
                    "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry"
                },
                {
                    "label": "Select 1",
                    "value": "Option 1"
                },
                {
                    "label": "Multiselect 1",
                    "value": "Option 1, Option 2"
                },
                {
                    "label": "Checkbox 1",
                    "value": "Option 1, Option 3"
                },
                {
                    "label": "Datepicker 1",
                    "value": "2021-05-06"
                },
                {
                    "label": "Datetime Picker 1",
                    "value": "2021-05-06 00:23:25"
                },
                {
                    "label": "Colorpicker 1",
                    "value": "#ffffff"
                },
                {
                    "label": "Hyperlink 1",
                    "value": "<a>Link</a>"
                }
            ]
        },
        {
            "id": "2",
            "sent": "0",
            "datesend": null,
            "clientid": "1",
            "deleted_customer_name": null,
            "number": "4",
            "prefix": "INV-",
            "number_format": "1",
            "datecreated": "2021-05-14 00:15:06",
            "date": "2021-05-28",
            "duedate": "2021-06-27",
            "currency": "1",
            "subtotal": "110.00",
            "total_tax": "0.00",
            "total": "110.00",
            "adjustment": "0.00",
            "addedfrom": "0",
            "hash": "630f8cc7ed2e6a70c4113ab24041bdf5",
            "status": "6",
            "clientnote": "",
            "adminnote": "",
            "last_overdue_reminder": null,
            "cancel_overdue_reminders": "1",
            "allowed_payment_modes": "a:2:{i:0;s:1:\"1\";i:1;s:1:\"2\";}",
            "token": null,
            "discount_percent": "0.00",
            "discount_total": "0.00",
            "discount_type": "",
            "recurring": "0",
            "recurring_type": null,
            "custom_recurring": "0",
            "cycles": "0",
            "total_cycles": "0",
            "is_recurring_from": null,
            "last_recurring_date": null,
            "terms": "",
            "sale_agent": "0",
            "billing_street": "",
            "billing_city": "",
            "billing_state": "",
            "billing_zip": "",
            "billing_country": "0",
            "shipping_street": "",
            "shipping_city": "",
            "shipping_state": "",
            "shipping_zip": "",
            "shipping_country": "0",
            "include_shipping": "1",
            "show_shipping_on_invoice": "1",
            "show_quantity_as": "1",
            "project_id": "0",
            "subscription_id": "0",
            "short_link": null,
            "userid": "1",
            "company": "updated company",
            "vat": "",
            "phonenumber": "",
            "country": "0",
            "city": "",
            "zip": "",
            "state": "",
            "address": "",
            "website": "",
            "active": "1",
            "leadid": null,
            "longitude": null,
            "latitude": null,
            "default_language": "",
            "default_currency": "0",
            "show_primary_contact": "0",
            "stripe_id": null,
            "registration_confirmed": "1",
            "invoiceid": "2",
            "customfields": [
                {
                    "label": "Input 1",
                    "value": "test 12"
                },
                {
                    "label": "Number 1",
                    "value": "10"
                },
                {
                    "label": "Textarea 1",
                    "value": "Lorem Ipsum is simply dummy text of the printing and typesetting industry"
                },
                {
                    "label": "Select 1",
                    "value": "Option 1"
                },
                {
                    "label": "Multiselect 1",
                    "value": "Option 1, Option 2"
                },
                {
                    "label": "Checkbox 1",
                    "value": "Option 1, Option 3"
                },
                {
                    "label": "Datepicker 1",
                    "value": "2021-05-06"
                },
                {
                    "label": "Datetime Picker 1",
                    "value": "2021-05-06 00:23:25"
                },
                {
                    "label": "Colorpicker 1",
                    "value": "#ffffff"
                },
                {
                    "label": "Hyperlink 1",
                    "value": "<a>Link</a>"
                }
            ]
        }
    ]

Error-Response:

HTTP/1.1 404 Not Found
Same as Original request

Add Custom Fields

POST/N/A

Submit URL for POST request of the custom fields remains the same for each endpoint (ie api/contacts for Contacts endpoint, api/invoices for Invoices endpoint, etc..)

In this example, we will use the following form data which corresponds to the following custom field types:

custom_fields[invoice][1] = Input Type
custom_fields[invoice][2] = Number
custom_fields[invoice][3] = Textarea
custom_fields[invoice][4] = Radio
custom_fields[invoice][5] = Checkbox
custom_fields[invoice][6] = Multiselect
custom_fields[invoice][7] = Date
custom_fields[invoice][8] = Datetime
custom_fields[invoice][9] = Color
custom_fields[invoice][10] = Link

Parameters

FieldTypeDescription
custom_fields[customFieldType] string/array Custom Field Key should be same as field_name returned from Search custom field values' information
curl -X POST "https://yoursite.com/N/A" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "custom_fields[customFieldType]": "..." }'

Success-Response:

HTTP/1.1 200 OK
 Same as Original request

Error-Response:

HTTP/1.1 404 Not Found
Same as Original request

Update Custom Fields

PUT/N/A

Submit URL for PUT request of the custom fields remains the same for each endpoint (ie api/contacts for Contacts endpoint, api/invoices for Invoices endpoint, etc..)

In this example, we will use the following form data which corresponds to the following custom field types:

custom_fields[invoice][1] = Input Type
custom_fields[invoice][2] = Number
custom_fields[invoice][3] = Textarea
custom_fields[invoice][4] = Radio
custom_fields[invoice][5] = Checkbox
custom_fields[invoice][6] = Multiselect
custom_fields[invoice][7] = Date
custom_fields[invoice][8] = Datetime
custom_fields[invoice][9] = Color
custom_fields[invoice][10] = Link

Parameters

FieldTypeDescription
custom_fields[customFieldType] string/array Custom Field JSON should be same as below with field_name and custom_field_id returned from Search custom field values' information
curl -X PUT "https://yoursite.com/N/A" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "custom_fields[customFieldType]": "..." }'

Success-Response:

HTTP/1.1 200 OK
 Same as Original request

Error-Response:

HTTP/1.1 404 Not Found
Same as Original request