FieldEx Developer
developer notes

Get All Projects By Customer

The ProjectsGetAllByCustomer API allows you to retrieve all existing Projects by Customer.

Method API Endpoint
GET {{endpoint}}/api/ext/projects

Headers

Key Value
Content-Type application/json
Authorization Bearer {{token}}

Filter Fields

Parameter Type Example Required Description
page Number 0 true Specifies the page number
perPage Number 25 true Specifies the number of records per page
startFrom Number 0 true Specifies the start point of the column being sorted
columnName String id true Specifies the name of the column being sorted
sortOrder String desc/asc true Specifies the order in which the column is being sorted
search String a true Specifies the search query
customerId Number 1 false Customer ID for filtering
projectType Number 1 false Project Type for filtering
serviceZoneId Number 2 false Service Zone ID for filtering
categoryId Number 1 false Category ID for filtering
geofenceId Number 1 false Geofence ID for filtering
siteId Number 1 false Site ID for filtering
origin String project false Origin information for filtering

API Query Example

Method API Call
GET api/ext/projects?
page=1&perPage=2&startFrom=3&columnName=id&sortOrder=desc&search
=a&customerId=15&projectType=1&serviceZoneId=1&categoryId=1&geofenceId
=1&siteId=1&origin=customer

Example Response

// 200 Response Code
{
    "total": 1137,
    "count": 1,
    "data": [
        {
            "id": "2142",
            "name": "test",
            "projectNumber": "PRJ-002142",
            "active": "false",
            "projectType": {
                "createdBy": "null",
                "createdDate": "2023-11-27T06:35:39Z",
                "lastModifiedBy": "null",
                "lastModifiedDate": "2023-11-27T06:35:39Z",
                "id": "null",
                "name": "Project_Type",
                "label": "null",
                "order": "null",
                "active": "null",
                "isDefault": "null",
                "code": "null"
            },
            "geoFence": null,
            "serviceZone": {
                "createdBy": "null",
                "createdDate": "2023-11-27T06:35:39Z",
                "lastModifiedBy": "null",
                "lastModifiedDate": "2023-11-27T06:35:39Z",
                "id": "null",
                "name": "Kuala Lumpur",
                "isDefault": "null",
                "active": "null",
                "order": "null",
                "code": "null",
                "label": "null",
                "systemValue": "null"
            },
            "projectCategory": null,
            "customer": {
                "id": 3,
                "name": "1 Load Test [DO NOT DELETE]",
                "email": null,
                "billingCity": null,
                "billingCountry": null,
                "billingPostcode": null,
                "billingState": null,
                "billingStreet": null,
                "shippingCity": null,
                "shippingCountry": null,
                "shippingPostcode": null,
                "shippingState": null,
                "shippingStreet": null,
                "billingLatitude": null,
                "billingLongitude": null,
                "phone": null,
                "geoFence": null,
                "systemUsed": null,
                "isDeleted": null,
                "customerSfExternalId": null,
                "customerExternalId": null,
                "shippingLatitude": null,
                "shippingLongitude": null,
                "serviceZone": null,
                "categoryType": null,
                "contactPersonName": null,
                "customerReferenceNo": null
            },
            "projectStatus": null
        }
    ],
    "recordsTotal": "1137",
    "recordsFiltered": "1137",
    "status": "HAS_DATA"
}