ListTypes — List available modules #
This operation returns all modules accessible via the API.
GET
https://apps.kafinea.com/{instance}/webservice.php
| Parameter | Type | Required | Description |
|---|---|---|---|
operation |
string | yes | Must be listtypes |
sessionName |
string | yes | Session ID |
Curl example:
curl "https://apps.kafinea.com/YourKafinea/webservice.php?operation=listtypes&sessionName=YOUR_SESSION_ID"
Describe — Describe a module #
This operation allows you to view a module’s fields (type, mandatory status) and available actions.
GET
https://apps.kafinea.com/{instance}/webservice.php
| Parameter | Type | Required | Description |
|---|---|---|---|
operation |
string | yes | Must be describe |
sessionName |
string | yes | Session ID |
elementType |
string | yes | Module name (e.g.: Contacts) |
Curl example:
curl "https://apps.kafinea.com/YourKafinea/webservice.php?operation=describe&sessionName=YOUR_SESSION_ID&elementType=Contacts"
Retrieve — Retrieve an entity #
Retrieves a specific entity by its Webservice ID (e.g.: 21x3456).
GET
https://apps.kafinea.com/{instance}/webservice.php
| Parameter | Type | Required | Description |
|---|---|---|---|
operation |
string | yes | Must be retrieve |
sessionName |
string | yes | Session ID |
id |
string | yes | Entity Webservice ID (e.g.: 21x3456) |
Curl example:
curl "https://apps.kafinea.com/YourKafinea/webservice.php?operation=retrieve&sessionName=YOUR_SESSION_ID&id=21x3456"
Create — Create an entity #
Creates a new entity within a module. All mandatory fields must be included. Field values linked to other modules must use the Webservice IDs format (e.g.: 21x3456).
POST
https://apps.kafinea.com/{instance}/webservice.php
| Parameter | Type | Required | Description |
|---|---|---|---|
operation |
string | yes | Must be create |
sessionName |
string | yes | Session ID |
element |
JSON | yes | JSON object of the entity (fieldname: fieldvalue) |
elementType |
string | yes | Module name (e.g.: Contacts) |
Curl example:
curl -X POST https://apps.kafinea.com/YourKafinea/webservice.php \
-d "operation=create" \
-d "sessionName=YOUR_SESSION_ID" \
-d 'element={"lastname":"Dupont","email":"dupont@example.com","assigned_user_id":"19x1"}' \
-d "elementType=Contacts"
Warning! For inventory modules (invoices, quotes, orders, etc.), it is mandatory to include the following fields in the
elementobject:
productid— Product Webservice IDhdnTaxType—IndividualorGroupLineItems— Array of products or services
Update — Update an entity #
Updates an existing entity. All fields must be included (not just those modified). The element object must contain the entity’s Webservice ID (e.g.: "id": "21x3456").
POST
https://apps.kafinea.com/{instance}/webservice.php
| Parameter | Type | Required | Description |
|---|---|---|---|
operation |
string | yes | Must be update |
sessionName |
string | yes | Session ID |
element |
JSON | yes | Complete JSON object of the entity (with id) |
elementType |
string | yes | Module name |
Curl example:
curl -X POST https://apps.kafinea.com/YourKafinea/webservice.php \
-d "operation=update" \
-d "sessionName=YOUR_SESSION_ID" \
-d 'element={"id":"21x3456","lastname":"Dupont","email":"nouveau@example.com","assigned_user_id":"19x1"}' \
-d "elementType=Contacts"
Partial Edit on locked entities #
If you need to modify certain fields on locked entities (Permanent Lock, such as a validated invoice), you can use partial editing without unlocking the record.
POST
https://apps.kafinea.com/{instance}/webservice.php
| Parameter | Type | Required | Description |
|---|---|---|---|
operation |
string | yes | Must be update |
sessionName |
string | yes | Session ID |
partial_edit |
int | yes | Must be 1 — at the same level as operation, not in element |
element |
JSON | yes | JSON object with id and all mandatory fields |
elementType |
string | yes | Module name |
Operation and restrictions:
- Allowed fields: statuses, assigned user, order references, and all custom fields.
- Blocked product lines: any modification to items, prices, or quantities (Line Items) is ignored in partial edit mode.
- Error handling: without the
partial_edit=1flag, the API returnsACCESSDENIED. If the module does not support this mode:ACCESSDENIED – Partial edit is not supported for module X.
Warning! Even in
partial_editmode, theelementobject must contain all mandatory fields of the module, exactly as for a standard update.
Curl example:
curl -X POST https://apps.kafinea.com/YourKafinea/webservice.php \
-d "operation=update" \
-d "sessionName=YOUR_SESSION_ID" \
-d "partial_edit=1" \
-d 'element={"id":"7x1234","invoicestatus":"Paid","assigned_user_id":"19x1"}' \
-d "elementType=Invoice"
Delete — Delete an entity #
Deletes a specific entity by its Webservice ID (e.g.: 21x3456).
POST
https://apps.kafinea.com/{instance}/webservice.php
| Parameter | Type | Required | Description |
|---|---|---|---|
operation |
string | yes | Must be delete |
sessionName |
string | yes | Session ID |
id |
string | yes | Entity Webservice ID (e.g.: 21x3456) |
Curl example:
curl -X POST https://apps.kafinea.com/YourKafinea/webservice.php \
-d "operation=delete" \
-d "sessionName=YOUR_SESSION_ID" \
-d "id=21x3456"