Comment on page
Authentication
Good to know: All API end points are configured with Bearer Authentication Login to get your Token
Your API requests are authenticated using Bearer Token. Any request that doesn't include Bearer Token will return an error. You can get your token you need to login with your
Email
and Password.
post
/api/account/login
User login
Take a look at how you might call this method using different programing languages:
curl
Node
Python
curl --location --request POST '{baseUrl}/api/account/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"emailAddress": "YOUR_EMAIL_ADDRESS",
"password": "YOUR_PASSWORD"
}'
var request = require('request');
var options = {
'method': 'POST',
'url': '{baseUrl}/api/account/login',
'headers': {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"emailAddress": "YOUR_EMAIL_ADDRESS",
"password": "YOUR_PASSWORD"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{baseUrl}/api/account/login"
payload = json.dumps({
"emailAddress": "YOUR_EMAIL_ADDRESS",
"password": "YOUR_PASSWORD"
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
You need to send Token in
Authorization
header as Bearer
get
/api/client
Search Clients
curl
Node
Python
curl --location --request GET '{baseUrl}/api/Client' \
--header 'Authorization: Bearer {token}' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"contactType": 2,
"companyName": "string",
"firstName": "string",
"lastName": "string",
"salutation": "string",
"website": "string",
"position": "string",
"phone": "string",
"mobile": "string",
"email": "[email protected]",
"department": "string",
"gender": 1,
"telMobile": "string",
"fax": "string",
"contactAddress": {
"street": "string",
"number": "string",
"poBox": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": 0,
"type": 0
}
}
]'
var request = require('request');
var options = {
'method': 'GET',
'url': '{baseUrl}/api/Client',
'headers': {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
},
body: JSON.stringify([
{
"contactType": 2,
"companyName": "string",
"firstName": "string",
"lastName": "string",
"salutation": "string",
"website": "string",
"position": "string",
"phone": "string",
"mobile": "string",
"email": "[email protected]",
"department": "string",
"gender": 1,
"telMobile": "string",
"fax": "string",
"contactAddress": {
"street": "string",
"number": "string",
"poBox": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": 0,
"type": 0
}
}
])
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "{baseUrl}/api/Client"
payload = json.dumps([
{
"contactType": 2,
"companyName": "string",
"firstName": "string",
"lastName": "string",
"salutation": "string",
"website": "string",
"position": "string",
"phone": "string",
"mobile": "string",
"email": "[email protected]",
"department": "string",
"gender": 1,
"telMobile": "string",
"fax": "string",
"contactAddress": {
"street": "string",
"number": "string",
"poBox": "string",
"city": "string",
"zip": "string",
"state": "string",
"country": 0,
"type": 0
}
}
])
headers = {
'Authorization': 'Bearer {token}',
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Last modified 1yr ago