Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If the API call is successful, the API shall return a response such as the below.

{
    "success": true,

"statusCode": 200,
    "msg": Bad Request - Invalid Date Format
}

3.1 Output Parameters

Parameter

Description

success

Denotes if the API call was successful.

statusCode

Refers to the relevant http status code. Any status code other than "200" refers to an error while processing the request.

msg

Refers to a text value describing the response. For errors, it can describe any error which may have occurred.

The possible values for "statusCode" are presented here.

...

{
    "success": false,
    "statusCode": 400,
    "errorMsg": "Invalid JSON. Please ensure you are passing a valid JSON string and it is url encoded properly."
}

4 Coding Examples

4.1 CURL

1
2
3
4
5

#The following command updates existing employee data.
  
curl --location --request POST 'https://hinote.in/hrworks/api/v1/editEmployee?key=customer_api_key' \
--header 'Content-Type: text/plain' \
--data-raw '{"employeeId": "XYZ0001", "nameInBankAccount": "Deepika Sharma"}'