Skip to main content

API

1.1 Get Customer by user division (for multi division create sales order)

This is for Multi Division Create Sales Order. This API is for search customer by user divisions using keyword. Need to search matching using code OR name OR name2. Criteria : customer must be assigned to the same divisions as the user.

Alt text

1.1.1 API Definition

FieldDetails
Endpoint/api/customer/user-division
MethodGET
AuthenticationRequired

1.1.2 Request

HeaderValue
AuthorizationValue
Content-typeapplication/json

1.1.3 Query Parameters:

ParameterTypeRequiredDescription
user_idintegerYesUnique identifier
keywordstringYesKeyword to search the customer
is_activestringYesDefault to A, B (meaning Active and Block status

Request Body (for POST/PUT):

  • None

Response

Success (200):

{
"status": "success",
"data": [
{
"id": 1,
"code": "C001",
"ref_code": "REF001",
"company_name": "ABC Sdn Bhd",
"company_name_01": "ABC Holdings",
"company_id": "COM001",
"company_code": "ABC123",
"currency_id": "MYR",
"currency_code": "MYR",
"location_id": "LOC001",
"location_code": "HQ01",
"area_id": "AR001",
"area_code": "KL01",
"agent_id": "AG001",
"agent_code": "AGENTX",
"term_id": "T001",
"term_code": "NET30",
"sales_tax_id": "ST001",
"sales_tax_code": "SST10",
"purchase_tax_id": "PT001",
"purchase_tax_code": "PST5",
"registration_no": "123456-A",
"gst_reg_no": "GST123456",
"address_01": "No. 1, Jalan ABC",
"address_02": "Taman XYZ",
"address_03": "Mukim DEF",
"address_04": "",
"postcode": "50000",
"city": "Kuala Lumpur",
"state": "Wilayah Persekutuan",
"country": "Malaysia",
"attention": "Mr. John Doe",
"phone_01": "+60312345678",
"phone_02": "+60123456789",
"fax_01": "+60387654321",
"fax_02": "",
"del_address_01": "No. 10, Jalan Deliver",
"del_address_02": "Taman Ship",
"del_address_03": "",
"del_address_04": "",
"del_attention": "Ms. Jane Smith",
"del_postcode": "43000",
"del_city": "Kajang",
"del_state": "Selangor",
"del_country": "Malaysia",
"del_phone_01": "+60311223344",
"del_phone_02": "+601155667788",
"del_fax_01": "+60399887766",
"del_fax_02": "",
"email": "info@abc.com",
"tin_no": "TIN123456",
"new_reg_no": "REG789012",
"sst_no": "SST098765",
"nric_no": "810101-14-5678",
"passport_no": "A12345678",
"army_no": "ARMY12345",
"consolidated_einv": "EINV001"
}
]
}

Note/Business Logic

  1. Similar logic to Eficore 1 search customer. AutoCompleteController -> actionSelect2FindCustomer

Permission

  • None

1.2 Get customer by selected division (need to change to search?) (For normal create sales order)

This is for Normal Create Sales Order. This API is for search customer by division from keyword. Need to search matching using code OR name OR name2. Criteria : customer must be assigned to selected division.

Alt text

1.2.1 API Definition

FieldDetails
Endpoint/api/customer/user-division
MethodGET
AuthenticationRequired

1.2.2 Request

HeaderValue
AuthorizationValue
Content-typeapplication/json

1.2.3 Query Parameters:

ParameterTypeRequiredDescription
user_idintegerYesUnique identifier
keywordstringYesKeyword to search the customer
division_idintegerYesUnique identifier
is_activestringYesDefault to A, B (meaning Active and Block status

Request Body (for POST/PUT):

  • None

Response

Success (200):

{
"status": "success",
"data": [
{
"id": 1,
"code": "C001",
"ref_code": "REF001",
"company_name": "ABC Sdn Bhd",
"company_name_01": "ABC Holdings",
"company_id": "COM001",
"company_code": "ABC123",
"currency_id": "MYR",
"currency_code": "MYR",
"location_id": "LOC001",
"location_code": "HQ01",
"area_id": "AR001",
"area_code": "KL01",
"agent_id": "AG001",
"agent_code": "AGENTX",
"term_id": "T001",
"term_code": "NET30",
"sales_tax_id": "ST001",
"sales_tax_code": "SST10",
"purchase_tax_id": "PT001",
"purchase_tax_code": "PST5",
"registration_no": "123456-A",
"gst_reg_no": "GST123456",
"address_01": "No. 1, Jalan ABC",
"address_02": "Taman XYZ",
"address_03": "Mukim DEF",
"address_04": "",
"postcode": "50000",
"city": "Kuala Lumpur",
"state": "Wilayah Persekutuan",
"country": "Malaysia",
"attention": "Mr. John Doe",
"phone_01": "+60312345678",
"phone_02": "+60123456789",
"fax_01": "+60387654321",
"fax_02": "",
"del_address_01": "No. 10, Jalan Deliver",
"del_address_02": "Taman Ship",
"del_address_03": "",
"del_address_04": "",
"del_attention": "Ms. Jane Smith",
"del_postcode": "43000",
"del_city": "Kajang",
"del_state": "Selangor",
"del_country": "Malaysia",
"del_phone_01": "+60311223344",
"del_phone_02": "+601155667788",
"del_fax_01": "+60399887766",
"del_fax_02": "",
"email": "info@abc.com",
"tin_no": "TIN123456",
"new_reg_no": "REG789012",
"sst_no": "SST098765",
"nric_no": "810101-14-5678",
"passport_no": "A12345678",
"army_no": "ARMY12345",
"consolidated_einv": "EINV001"
}
]
}

Note/Business Logic

  1. Similar logic to Eficore 1 search customer. AutoCompleteController -> actionSelect2FindCustomer

Permission

  • None