This API is required for any user wanting to log in and access our RESTful API service. If the
login is successful, ensure that you keep hold of the session token provided in the response
header, as this is required for any subsequent request for identification.
Parameters
| Name | Notes |
| user | (required) username of the account trying to log in. |
| pass | (required) password for the given username. This may never be passed via the URI. |
Sample Request
https://supplier.rstore.com/rest/authenticate.api
With JSON Content:
{
"user": "testsupplier",
"pass": "testpw123"
}
Responses
On Success:
HTTP/1.0 200 OK
Cookie: "ksi=abcdefghijklmnopqrstuvwxyz123"
{
"mode": "Test",
"supplier_id": 1,
}
On Invalid Json Provided:
HTTP/1.0 400 Invalid Request
Invalid json provided
On Missing or Invalid Parameters Provided:
HTTP/1.0 400 Insufficient Parameters
On Incorrect Credentials Provided:
HTTP/1.0 401 Unauthorized: ( ERROR_MESSAGE )
Comments
0 comments
Article is closed for comments.