Customer.Projects.List
List projects for the logged-in customer. Same query as Admin_model::get_project_data_client: client_id=c_id, type=project, use_as_template=0, archive=0, private_project=0. Optional search on name, note, custom_fields. Order last_query_update DESC, id DESC. Each row keeps member as id list and adds team_members with id+name (same enrichment as staff Projects.List).
Permissions
- User must be logged in with a valid bearer token.
- The user must be from the same company domain as the request Host (call the API on that account subdomain or allowed custom domain). A token from another company returns success=0, error user_not_in_company.
- Returned or changed records are limited by the user permissions, team access, folder access, and account settings.
Action
- Runs the Customer.Projects.List function and returns JSON.
Push Service
No push is sent because this function only reads data or returns helper information.
Automation
No automation is run for this function.
Special Instructions
- On a company subdomain (e.g. https://{user_domain}.bull36.com) the user must match that Host — Login and protected APIs reject another company with success=0, error user_not_in_company. On a main brand host (bull36.com, biz1.co.il, mastrocrm.com, …) the company domain gate is skipped.
- Requires Customer.Login token. Staff Projects.List is unchanged and stays staff-only.
- member / member_ids = team member user_detail ids (unchanged). Use team_members[].name for display names.
Required Parameters
No body parameters are required for this function.
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
searchpost | string | website | Search name, note, custom_fields. Same as dashboard POST search. |
startpost | int | 0 | Row offset. |
limitpost | int | 25 | Page size, capped at 25. |
Authentication
Send the bearer token returned by Login in the request header. The user must be from the same company domain as this Host — a token from another company is rejected (user_not_in_company).
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/Customer.Projects.List",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"limit": "25"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.Projects.List",
"url_domain": "https:\/\/{domain}\/app\/Customer.Projects.List"
}Endpoint
POST /app/Customer.Projects.List
POST https://{user}.bull36.com/app/Customer.Projects.List
POST https://{domain}/app/Customer.Projects.ListSample Output
{
"success": 1,
"count": 1,
"data": [
{
"id": 7580,
"name": "Test new project",
"type": "project",
"client_id": "108545",
"member": [
"14",
"211"
],
"member_ids": [
14,
211
],
"team_members": [
{
"id": 14,
"name": "Owner",
"email": "a@b.com",
"profile_image": ""
},
{
"id": 211,
"name": "Team Member",
"email": "",
"profile_image": ""
}
]
}
]
}Count Only
Use the matching count route with the same filters when the UI only needs total rows for paging.
{
"url": "\/app\/Customer.Projects.Count",
"url_user": "https:\/\/{user}.bull36.com\/app\/Customer.Projects.Count",
"url_domain": "https:\/\/{domain}\/app\/Customer.Projects.Count",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": [],
"sample_output": {
"success": 1,
"count": 123
},
"notes": {
"count": "Use the matching count route when available, or count returned rows.",
"max_limit": 25
}
}Count JavaScript
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
const res = await fetch('https://{domain}/app/Customer.Projects.Count', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data.count);JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('limit', '25');
const res = await fetch('/app/Customer.Projects.List', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data);Error Example
{
"success": 0,
"error": "customer_login_required"
}