Authentication

POST /openapi/{version}/auth/token/obtain/{application}/

This endpoint allows you to obtain a JWT Access Token to authenticate and authorize your API requests to the Locad system. To generate the token, you must provide your username, password, and brand_id (which will be provided by the Locad team). The JWT Access Token will be used for subsequent API calls to access secure resources.

Token Validity:

access : 24 Hours refresh : 7 Days

Request Example:

Use the following curl command to obtain a JWT Access Token:

curl --location '{{url}}/openapi/v2/auth/token/obtain/MERCHANT_APP/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "{{username}}",
    "password": "{{password}}",
    "data": {
        "brand_id": {{brand_id}}
    }
}''

Replace username, password, and brand_id with the appropriate values.

Upon successful authentication, you will receive an Access Token and a Refresh Token, which will be used to authorize your requests and refresh your token when it expires. The response includes the access token and refresh token.

The JWT Access Token is required for making authorized API calls within the Locad system. It is valid for a set period, after which it can be refreshed using the Refresh JWT Access Token API.

Request

  • Base URL
    https://base_url
  • Auth
    none declared

Path parameters

applicationstring required

Application Name : Valid Inputs - MERCHANT_APP

versionstring required

Request body

usernamestring required
passwordstring required
accessstring required
refreshstring required

Response

JWT token successfully generated. You can now use the provided access token for authorized API requests.

successboolean
messagestring required

Changes

No recorded changes to this operation across all 1 revision of this API.