POS Authentication

This REST API is used to get access token from the POS service provider. In this POST request, Uniware sends the valid username and password to get a token from the POS service provider. This token is used in all subsequent API requests by Uniware.

Tip

Complete integration flow is available on Basic Overview page.

Basic Information

NAME DETAILS
URL: https://{posbaseurl}/v1
Endpoint: /auth/Token
Request Type: POST
Scheme: HTTPS
Header (Content-Type): application/json
Header (username ): login username
Header (password ): login password
Header (grant_type): “password”

Response Payload (Static Token)

{
   "access_token": "1211cf66-d9b3-498b-a8a4-04c76578b72e",
   "status": "SUCCESS"
}

Response Payload (Dynamic token which is expired in defined time)

{
   "access_token": "1211cf66-d9b3-498b-a8a4-04c76578b72e",
   "refresh_token": "18f96b68-bdf4-4c5f-93f2-16e2c6e674c6",
   "expires_in": 41621,
   "status": "SUCCESS"
}

Response Payload (Error)

{
"status": "FAILED",
"errorMessage" :"Bad credentials"
}

Response Payload Details

PARAMETERS TYPE DESCRIPTION NOTES
access_token string Access token (expires after time given in expires_in) Eg: “1211cf66-d9b3-498b-a8a4-04c76578b72e”
refresh_token string Refresh token (used to re-validate access_token, Eg:“18f96b68-bdf4-4c5f-93f2-16e2c6e674c6”
expires_in integer valid time of access_token in seconds Eg: 41621
scope string “read trust write” -
status string Status of the API request Allowable: SUCCESS, FAILED
errorMessage string Error message Eg: Bad credentials

Error Codes

Refer Response Codes section to know about specific errors codes.

Unicommerce Website

Copyright © 2022 Unicommerce eSolutions Pvt. Ltd.