Skip to main content

API

1.1 Get Location list by division

This API is for selecting Cost Center by its code and user.

1.1.1 API Definition

FieldDetails
Endpoint/api/cost-center/select
MethodGET
AuthenticationRequired

1.1.2 Request

HeaderValue
AuthorizationValue
Content-typeapplication/json

1.1.3 Query Parameters:

  • None

Request Body:

  • None
    ParameterTypeRequiredDescription
    qstringYesCost center's code
    filtersarrayNoAdditional filters such as by division and status
    pageintegerYesPage of search results
    limitintegerYesLimit of search results
    user_idintegerYesThe ID of the User

Response

Success (200):

{
"data": {
"results": [
{
"id": "1",
"code": "B01",
"description": "Brooding Farm 01"
},
{
"id": "2",
"code": "B02",
"description": "Brooding Farm 02"
},
{
"id": "3",
"code": "CPS01",
"description": "Central Packing Station 1"
},
{
"id": "4",
"code": "CPS02",
"description": "Central Packing Station 2"
},
{
"id": "5",
"code": "CPS03",
"description": "Central Packing Station 3"
},
{
"id": "6",
"code": "CR01",
"description": "Cold Room"
},
{
"id": "7",
"code": "DCJB",
"description": "Distribution Centre - Johor Bahru"
},
{
"id": "8",
"code": "DCKTN",
"description": "Distribution Centre - Kuantan"
},
{
"id": "9",
"code": "DCPNG",
"description": "Distribution Centre -Penang"
},
{
"id": "10",
"code": "DEP",
"description": "Depopulation"
},
{
"id": "11",
"code": "EC01",
"description": "E Commerce - Shopee"
},
{
"id": "12",
"code": "EWR01",
"description": "Egg Washer Room"
},
{
"id": "13",
"code": "GEN",
"description": "Maint-General"
},
{
"id": "14",
"code": "HBE01",
"description": "Hard Boiled Egg"
},
{
"id": "15",
"code": "HQ",
"description": "Head Quarter"
},
{
"id": "16",
"code": "L01A",
"description": "Layer Farm 01A"
},
{
"id": "17",
"code": "L01B",
"description": "Layer Farm 01B"
},
{
"id": "18",
"code": "L02",
"description": "Layer Farm 02"
},
{
"id": "19",
"code": "L02B",
"description": "Layer Farm 02B"
},
{
"id": "20",
"code": "L03",
"description": "Layer Farm 03"
},
{
"id": "21",
"code": "L04",
"description": "Layer Farm 04"
},
{
"id": "22",
"code": "L05A",
"description": "Layer Farm 05A"
},
{
"id": "23",
"code": "L05B",
"description": "Layer Farm 05B"
},
{
"id": "24",
"code": "L06",
"description": "Layer Farm 06"
},
{
"id": "25",
"code": "L06N",
"description": "New Layer 06"
},
{
"id": "26",
"code": "L07",
"description": "Layer Farm 07"
},
{
"id": "27",
"code": "L08",
"description": "Layer Farm 08"
},
{
"id": "28",
"code": "L08B",
"description": "Layer 8B"
},
{
"id": "29",
"code": "L09",
"description": "Layer Farm 09"
},
{
"id": "30",
"code": "L10",
"description": "Layer Farm 10"
}
],
"length": "81"
},
"success": true
}

Note/Business Logic

  • None

Permission

  • None