RESTful Endpoints
This section describes every endpoint needed to integrate to E-Snapped API.
Connect and authenticate to the API
Connect and authenticate to the API to be able to commence a single transaction.
POST/esws/api/connect
Notes
- Issued authorization token is valid within 60 seconds upon response.
- Integrator must authenticate first before sending a transaction.
Authorization

Request Samples
curl -X POST "http://test.ws.e-snapped.com/esws/api/connect"
-H "accept: application/json"
-H "Key: amaclead.altpaynet"
-H "Secret: qwerty12345"
-H "Content-Type: application/json"
var settings = {
"url": "{host}/esws/api/connect",
"method": "POST",
"timeout": 0,
"headers": {
"Key": "jdoe.altpaynet",
"Secret": "qwerty12345",
"Content-Type": "application/json"
},
"data": JSON.stringify({}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
Responses
200 Successful Request

400 Result of missing/invalid header parameter/s

401 Result of incorrect authentication credentials. Make sure to provide the correct key and secret values

Response Samples
{
"code": "OK.02",
"message": "Authentication Success",
"timestamp": "2020-02-07 03:25:14.953",
"token": "Bearer eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJBbHRQYXlOZXQgQ29ycCIsImlhdCI6MTU4MTA0NTkxNCwiZXNrIjoiVThnSGElMkJDTVdie FNRMVJ0WUEyZ0FkMmN4cEtPZW8lMkJMbXh5TEwxS3k1ZW8lM0QuZXNsbFdSQ3NEbk9UalM4TG9TbHMlMkJUUkElM0QlM0QiLCJlc3AiOiI1bjE3T0dGVlpnOW5R VW5TWTRGUXZRJTNEJTNELmVzRXRvT1JUVkNXSXl0JTJCN2pWamNYRnVnJTNEJTNEIiwiZXhwIjoxNTgxMDQ3NzE0fQ.yn6_ncSr1MckNsE3BkhsMW5r1muRJlfL dSOHBpYjjeo"
}
{
"code": "ER.01",
"message": "HTTP Request Error",
"timestamp": "2020-02-07 03:27:50.653",
"errors": [
"Missing request header 'key' of type String"
]
}
{
{
"code": "ER.02",
"message": "Authentication Error",
"timestamp": "2020-02-07 03:30:06.267",
"errors": [
"Invalid credentials"
]
}