Add New Client
POST/api/clients
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| company_name | string | Mandatory Company Name |
| owner_id | string | Mandatory Company owner id |
| group_ids | string | Optional Company group ids |
| address | string | Optional Company address |
| city | string | Optional Company city |
| state | string | Optional Company state |
| zip | string | Optional Company zip |
| country | string | Optional Company country |
| phone | string | Optional Company phone |
| website | string | Optional Company website |
| vat_number | string | Optional Company vat number |
| disable_online_payment | string | Optional Company disable online payment |
curl -X POST "https://yoursite.com/api/clients" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "company_name": "...", "owner_id": "...", "group_ids": "...", "address": "...", "city": "...", "state": "...", "zip": "...", "country": "...", "phone": "...", "website": "...", "vat_number": "...", "disable_online_payment": "..." }' Success-Response:
HTTP/1.1 200 OK
{
"status": true,
"message": "Client add successful."
}
HTTP/1.1 404 Not Found
{
"status": false,
"message": "Client add fail."
}