❓Request method description
FIRST LINE uses RESTful as the main API design, and there are four HTTP request methods used:
Method
Description
GET
Request to display a specified resource, i.e. browse data
POST
Used to submit the entity of a specified resource, i.e. add data
PUT
Replace the specified resource, i.e. update data
DELETE
Delete the specified resource, i.e. delete data
Request example
Below is an example of using POST a Postman example of requesting to add a customer
{
"membership_no":"R0000555",
"identity_no":"A000000002",
"gender":0,
"first_name":"Chen",
"last_name":"Dahua",
"birth_at":"1990-01-01"
}
Headers

There are three parts to the headers, explained one by one below:
Headers
Description
Authorization
That is, the token; a query string parameter can also be used instead.
Content-Type
To ensure that both server receiving and returning are handled in JSON format, this header is necessary.
Accept
To ensure that both server-side receiving and returning are handled in JSON format, this header is necessary.
Other methods
GET \ DELETE
GET,DELETE and so on; just choose the corresponding Postman request method.
PUT
Since direct use of HTTP PUT requests is not supported, when a PUT request is needed, please use the POST method instead and make sure to add the _method="put" parameter.

Error codes
Uses standard HTTP status codes, defined by RFC 2616 and extended by the specifications of RFC 2518,RFC 2817,RFC 2295,RFC 2774 and RFC 4918 and other specifications. All status codes are divided into five categories; the first digit of the status code represents one of the five response states. The message phrases shown are typical, but any readable alternative may be provided. Unless otherwise noted, the status codes are part of the HTTP/1.1 standard (RFC 7231).
Code
Description
400
Bad Request - Your request is invalid.
401
Unauthorized -- Your API key is wrong.
403
Forbidden -- The kitten requested is hidden for administrators only.
404
Not Found -- The specified kitten could not be found.
405
Method Not Allowed -- You tried to access a kitten with an invalid method.
406
Not Acceptable -- You requested a format that isn't json.
410
Gone -- The kitten requested has been removed from our servers.
418
I'm a teapot.
419
Sesstion expired.
422
Unprocessable Entity.
429
Too Many Requests -- You're requesting too many kittens! Slow down!
500
Internal Server Error -- We had a problem with our server. Try again later.
503
Service Unavailable
Last updated