Authentication request

Webpage graphic

Purpose

To allow a Glassboxx vendor website to authenticate before using Sales API requests to send customer and order details to Glassboxx.

Pre-requisites

None

Request

base URL + endpoint /integration/admin/token
Method POST

Notes

After the authorisation request has been performed, the token returned must be used as follows (for php) to authenticate the further requests:- $httpHeaders->addHeaders([ ‘Authorization’ => sprintf(‘Bearer %s’, $token), ‘Content-Type’ => ‘application/json’ ]);

Parameters

Name Type Mandatory Description
username string TRUE The token user name of the Glassboxx account (from the INTEGRATIONS / Vendor page in the Glassboxx Vendor Portal.)
password string TRUE The token password of the vendor’s Glassboxx account (from the INTEGRATIONS / Vendor page in the Glassboxx Vendor Portal).

Responses

Response Name/Message Purpose/Reason/Resolution
200 [token value] The authentication token required to be able to successfully make further API calls.
400 (Bad request) Message: “%fieldName is a required field.”,parameters: {fieldName: “customer” The array has not been passed correctly to the endpoint
400 (Bad request) Message ‘Specified request cannot be processed.’ Please check the layout of the full request being passed.
401 Message ‘You did not sign in string An invalid username/password combination correctly or your account is
temporarily disabled’.
An invalid username/password combination. Please check and retry.

Example

1. Example request and 200 success response
https://server.glassboxx.co.uk/rest/V1/integration/admin/token?username=bluemarli80&password=gKtCRGha8VBynkw

"eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjIzMiwidXR5cGlkIjoyLCJpYXQiOjE3MjkxNTc1NzYsImV4cCI6MTcyOTE2MTE3Nn0.4RhoGmTz9KG734AHaWgtPsty7SOyr3Fo_SQm5tjgOXU"

2. Example 401 error response

{
    "message": "The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later."
}