Below we have listed the operations, HTTP verbs and an example URL for the Token resource within the Surpass API.
|Operation||HTTP Verb||Example URL|
Within the table below we have provided all of the attributes included in the token resource. This includes the attribute name, data type and if the attribute is mandatory when sending a POST request. Remember that if an attribute is not mandatory it can be omitted from the body of the POST request.
|Attribute Name||Type||Description||Order (GET)||Filter (GET)||Available Operators (GET)||Unique Identifier||Mandatory for Create (POST)|
|Keycode||String||Unable to GET/PUT/DELETE||N/A||N/A||N/A||N/A||Allows to create a SecureAssess token for a specific keycode.|
- The keycode passed into the request must be in a finished state.
POST Request and Return
The POST Token method requires the attributes listed above to be submitted as part of the body of the HTTPS request. This can be submitted in either JSON or XML format, the content-type used will need to be submitted as part of the header of the request. An example of the address, header and body of the request (for both formats) can be found below.
Depending on how the request was submitted the response will be returned in either JSON or XML format. If the call was unsuccessful then you will receive an error message, all error messages available in the Surpass API can be found here.
Example POST request & response (JSON)
Example POST request & response (XML)
To successfully call the POST Token method, the user specified in the header of the request must have the 'Create Keycode Token' permission in Surpass. This permission is not available within the UI, please speak to your BTL Account Manager, if you would like to integrate with this method.