Use the Client API to Create, Update, & Delete Clients
Get Clients
GET /v2/clients/[client_id]
Optional Parameters
- client_id - If omitted then a list of clients will be returned.
- client_name - Simple wildcard search. For example client_name=test will match 'test client' and 'my test client'
- limit - Limit number of records returned. Maximum 1000 records
- offset - Start position for fetching records
Sample Response - Single Client
{
"data": [
{
"client_id": "1",
"client_name": "My first client",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 10:56:57",
"date_modified": "2015-01-27 10:56:57",
"user_id": "1234"
}
]
}
"data": [
{
"client_id": "1",
"client_name": "My first client",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 10:56:57",
"date_modified": "2015-01-27 10:56:57",
"user_id": "1234"
}
]
}
Sample Response - Multiple Clients
{
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"client_id": "1",
"client_name": "My first client",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 10:56:57",
"date_modified": "2015-01-27 10:56:57",
"user_id": "1234"
},
{
"client_id": "2",
"client_name": "My second client",
"contact_id": "0",
"email": "someone.else@example.com",
"tel": "",
"fax": "",
"mobile": "",
"website": "",
"address": "",
"city": "",
"state": "",
"postcode": "",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2014-09-15 12:43:26",
"date_modified": "2014-09-15 11:43:26",
"user_id": "1234"
}
]
}
"paging": {
"offset": 0,
"limit": 1000,
"total_records": 2
},
"data": [
{
"client_id": "1",
"client_name": "My first client",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 10:56:57",
"date_modified": "2015-01-27 10:56:57",
"user_id": "1234"
},
{
"client_id": "2",
"client_name": "My second client",
"contact_id": "0",
"email": "someone.else@example.com",
"tel": "",
"fax": "",
"mobile": "",
"website": "",
"address": "",
"city": "",
"state": "",
"postcode": "",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2014-09-15 12:43:26",
"date_modified": "2014-09-15 11:43:26",
"user_id": "1234"
}
]
}
Example Calls
Get all clients
curl -X GET "https://api.projectbubble.com/v2/clients" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Search for client by name
curl -X GET "https://api.projectbubble.com/v2/clients?client_name=first" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK or "No records found"
401 - Permission error. Your user account (API Key) does not have permission to access clients.
401 - Permission error. Your user account (API Key) does not have permission to access clients.
Create Client
POST /v2/clients
Required Parameters
- client_name - Client name
Optional Parameters
- contact_id - Contact ID
- active - Active? (2 is amber)
- email - Email
- tel - Tel
- fax - Fax
- mobile - Mobile
- website - Website
- address - Address
- city - City
- state - State
- postcode - Postcode
- country - Country
- background - Background
- user_id - Creator user ID
Sample Response
{
"data": [
{
"client_id": "3",
"client_name": "My first api client",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 11:48:36",
"date_modified": "2015-01-27 11:48:36",
"user_id": "1234"
}
]
}
"data": [
{
"client_id": "3",
"client_name": "My first api client",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 11:48:36",
"date_modified": "2015-01-27 11:48:36",
"user_id": "1234"
}
]
}
Example Calls
curl -X POST "https://api.projectbubble.com/v2/clients" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"client_name": "My first api client", "email": "someone@example.com", \
"tel": "555 12345 1234", "mobile": "555 23454 3453", "website": "www.example.com", \
"city": New York City", "state": "New York", "postcode": "87263", "country": "US"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"client_name": "My first api client", "email": "someone@example.com", \
"tel": "555 12345 1234", "mobile": "555 23454 3453", "website": "www.example.com", \
"city": New York City", "state": "New York", "postcode": "87263", "country": "US"}'
Response Codes
201 - Created OK
401 - Permission error. Your user account (API Key) does not have permission to access clients.
404 - Client not found
401 - Permission error. Your user account (API Key) does not have permission to access clients.
404 - Client not found
Update Client
PUT /v2/clients/[client_id]
Required Parameters
- client_id - Client ID
Optional Parameters
- client_name - Client name
- contact_id - Contact ID
- active - Active? (2 is amber)
- email - Email
- tel - Tel
- fax - Fax
- mobile - Mobile
- website - Website
- address - Address
- city - City
- state - State
- postcode - Postcode
- country - Country
- background - Background
- user_id - Creator user ID
Sample Response
{
"data": [
{
"client_id": "3",
"client_name": "My first api client updated",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 11:48:36",
"date_modified": "2015-01-27 11:54:37",
"user_id": "1234"
}
]
}
"data": [
{
"client_id": "3",
"client_name": "My first api client updated",
"contact_id": "0",
"email": "someone@example.com",
"tel": "555 12345 1234",
"fax": "",
"mobile": "555 23454 3453",
"website": "www.example.com",
"address": "Big Avenue",
"city": "New York City",
"state": "New York",
"postcode": "87263",
"country": "US",
"notes": "",
"background": "",
"active": "1",
"date_created": "2015-01-27 11:48:36",
"date_modified": "2015-01-27 11:54:37",
"user_id": "1234"
}
]
}
Example Calls
curl -X PUT "https://api.projectbubble.com/v2/clients/3" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"client_name": "My first api client updated"}'
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8" \
-d '{"client_name": "My first api client updated"}'
Response Codes
200 - OK
401 - Permission error. Your user account (API Key) does not have permission to access clients.
404 - Client not found
401 - Permission error. Your user account (API Key) does not have permission to access clients.
404 - Client not found
Delete Client
DELETE /v2/client/[client_id]
Sample Response
[]
Example Calls
curl -X DELETE "https://api.projectbubble.com/v2/clients/3" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"
Response Codes
200 - OK
401 - Permission error. Your user account (API Key) does not have permission to access clients.
404 - Client not found
401 - Permission error. Your user account (API Key) does not have permission to access clients.
404 - Client not found
© 2005 - 2024 ProProfs