DJUST Authentication API (automated)
DJUST APIs rely on authentication to make requests. To use DJUST APIs, you need to include an authentication token in the request headers.
Requirements
- Your API key (
dj-api-key
) provided by DJUST. - At least one customer user has been created in your back-office.
Endpoints
Request Access Token
Endpoint
- URL:
POST /auth/token
- Operation ID: AUTH-101
- Summary: Ask for an access token.
Request
Header | Type | Required | Description |
dj-client | string | required | The type of client, must be one of "OPERATOR," "ACCOUNT," or "SUPPLIER." |
dj-api-key | string | required | Your API key for authentication. |
dj-store | string | optional | The store identifier, if applicable. |
dj-store-view | string | optional | The store view identifier, if applicable. |
Request Body
- Content Type:
application/json
- Schema: TokenRequest
- Required: true
Example Request
Response
Copy the access token and save it, as you will need it to authenticate for future requests.
Check if Token is Valid
Endpoint
- URL:
GET /auth/is-token-valid
- Operation ID: TOK-200
- Summary: Return true if the token exists and is not expired.
Request
Header | Type | Required | Description |
dj-client | string | required | The type of client, must be one of "OPERATOR," "ACCOUNT," or "SUPPLIER." |
dj-api-key | string | required | Your API key for authentication. |
dj-store | string | optional | The store identifier, if applicable. |
dj-store-view | string | optional | The store view identifier, if applicable. |
Query Parameters
token
(string, required): The authentication token to check.
Example Request
Response
- Status Code: 200
- Content Type:
*/*
- Response Type: boolean
- Description: OK
Refresh Token
Endpoint
- URL:
POST /auth/refresh-token
- Operation ID: AUTH-102
- Summary: Ask for an access token from a refresh token.
Request
Header | Type | Required | Description |
dj-client | string | required | The type of client, must be one of "OPERATOR," "ACCOUNT," or "SUPPLIER." |
dj-api-key | string | required | Your API key for authentication. |
dj-store | string | optional | The store identifier, if applicable. |
dj-store-view | string | optional | The store view identifier, if applicable. |
Request Body
Example Request
Response
Reset Password
Endpoint
- URL:
POST /auth/reset-password
- Operation ID: PWD-102
- Summary: Reset password.
Request
Header | Type | Required | Description |
dj-client | string | required | The type of client, must be one of "OPERATOR," "ACCOUNT," or "SUPPLIER." |
dj-api-key | string | required | Your API key for authentication. |
dj-store | string | optional | The store identifier, if applicable. |
dj-store-view | string | optional | The store view identifier, if applicable. |
Request Body
Example Request
Response
- Status Code: 200
- Description: OK
Revoke Token
Endpoint
- URL:
POST /auth/revoke-token
- Operation ID: AUTH-103
- Summary: Delete the current token session.
Request
Header | Type | Required | Description |
dj-client | string | required | The type of client, must be one of "OPERATOR," "ACCOUNT," or "SUPPLIER." |
dj-api-key | string | required | Your API key for authentication. |
dj-store | string | optional | The store identifier, if applicable. |
dj-store-view | string | optional | The store view identifier, if applicable. |
Example Request
Response
- Status Code: 200
- Description: OK
Send Reset Password Email
Endpoint
- URL:
POST /auth/send-reset-password-email
- Operation ID: PWD-101
- Summary: Send an email for password reset.
Request
Header | Type | Required | Description |
dj-client | string | required | The type of client, must be one of "OPERATOR," "ACCOUNT," or "SUPPLIER." |
dj-api-key | string | required | Your API key for authentication. |
dj-store | string | optional | The store identifier, if applicable. |
dj-store-view | string | optional | The store view identifier, if applicable. |
Request Body
Example Request
Response
- Status Code: 200
- Description: OK
Data Models
AuthenticatedUserDto
AuthenticationResponseDto
- Type: object
- Properties:
token
(TokenResponse) user
(AuthenticatedUserDto)
RefreshTokenRequest
ResetPasswordRequest
- Type: object
- Properties:
newPassword
(string) resetPasswordToken
(string, format: uuid)
SendResetPasswordEmailRequest
- Type: object
- Properties:
email
(string) redirectUrl
(string)
TokenRequest
- Type: object
- Properties:
password
(string) username
(string)
TokenResponse
- Type: object
- Properties:
accessToken
(string) expireAt
(integer, format: int64) refreshToken
(string)