Clienti
3 min
Create new customer
Use this route to create a new customer
POST
https://api.fsflt.net/customerarea/customers/new
Header Parameters
- X-API-KEYstringrequiredDescription
Body Parameters
- emailstringrequiredDescription
- passwordstringrequiredDescription
- customer_namestringrequiredDescription
- country_codestringrequiredDescription
- industry_codeNumberrequiredDescription
- company_namestringrequiredDescription
- customer_surnamestringDescription
- skypestringDescription
- phonestringDescription
- langstringDescription
shell
curl -X 'POST' \
'https://api.fsflt.net/customerarea/customers/new' \
-H 'accept: application/json' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{YOUR_PARAM}'200
{
"code": 200,
"content": {
"customer_code": 1
}
}401
{
"message": "Invalid token or Unauthorized admin"
}500
{
"code": 500,
"message": "The given data was invalid.",
"errors": {
"lang": [
"The lang must be one of the following types: EN, IT, ES, DE"
]
}
}Get customer list
Get your customer list
GET
https://api.fsflt.net/customerarea/customers/list
Header Parameters
- X-API-KEYstringrequired
Shell
curl -X 'GET' \
'https://api.fsflt.net/customerarea/customers/list' \
-H 'accept: application/json' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{YOUR_PARAM}'200
{
"code": 200,
"content": [
{
"main": true,
"code": 4242,
"name": "My",
"surname": "Account",
"email": "[email protected]",
"lang": 'EN',
"country_code": "GB",
"company_name": "My Company Name",
"industry_code": 1,
"organization_id": null,
"migration_status": "NOT_MIGRATED"
"contacts": {
"skype": "",
"phone": "+3912345"
},
},
{
"main": false,
"code": 1234,
"name": "Jack",
"surname": "Jhonson",
"email": "[email protected]",
"lang": 'EN',
"country_code": "GB",
"company_name": "Jack Tech Co.",
"industry_code": 1,
"organization_id": "019f88ef-7fb5-725c-88e8-0d7028d1b392",
"migration_status": "MIGRATED"
"contacts": {
"skype": "Jack2021",
"phone": "+3912345"
},
}
]
}404
{
"message": "Ain't no cake like that."
}Get customer licenses
GET
https://api.fsflt.net/customerarea/customers/licenses
Header Parameters
- X-API-KEYstringrequired
Body Parameters
- customer_codestringrequired
- langstringDescription
shell
curl -X 'POST' \
'https://api.fsflt.net/customerarea/customers/licenses' \
-H 'accept: application/json' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{YOUR_PARAM}'200
{
"ACTIVE_LICENSES": [
{
"id": 223344,
"code": "CL_Q_A005-M1",
"title": "Business Filter License - 5 nominal user",
"purchase_date": "2024-01-24",
"expiration_date": "2024-02-29",
"note": "License note",
"canceled": "0"
},
{
"id": 112233,
"code": "CL_Q_A005-M1",
"title": "Business Filter License - 5 nominal user",
"purchase_date": "2024-01-24",
"expiration_date": "2024-02-29",
"note": "License note",
"canceled": "0"
}
]}Remove a customer license (Must have been assigned in the last 3 days)
POST
https://api.fsflt.net/customerarea/customers/licenses/remove
Header Parameters
- X-API-KEYstringrequired
Body Parameters
- customer_codestringrequiredDescription
- license_idstringrequiredDescription
curl
curl --location 'https://api.fsflt.net/customerarea/customers/licenses/remove' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"customer_code":"string","license_id":"string"}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.fsflt.net/customerarea/customers/licenses/remove',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"customer_code": "string",
"license_id": "string"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"customer_code": "string",
"license_id": "string"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.fsflt.net/customerarea/customers/licenses/remove", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api.fsflt.net/customerarea/customers/licenses/remove"
payload = json.dumps({
"customer_code": "string",
"license_id": "string"
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.fsflt.net/customerarea/customers/licenses/remove")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"customer_code": "string",
"license_id": "string"
})
response = https.request(request)
puts response.read_body
200
{
"code": 200,
"content": "License removed successfully"
}412
{
"code": 412,
"content": "Unable to find the license provided. The license must have been assigned in the last 3 days."
}Change customer password
POST
https://api.fsflt.net/customerarea/customers/change/password
Header Parameters
- X-API-KEYstringrequired
Body Parameters
- customer_codestringrequiredDescription
- passwordstringrequiredDescription
shell
curl -X 'POST' \
'https://api.fsflt.net/customerarea/customers/change/password' \
-H 'accept: application/json' \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{YOUR_PARAM}'200
{
"code": 200,
"content": {
"message": "The password has been modified."
}
}404
{
"message": "Ain't no cake like that."
}