POST
Auth by API tokenGET
Get all groupsGET
Get group by nameHow to use the Postman to test the SimplificaCI API
Postman is an application used for API testing. It is an HTTP client that tests HTTP requests, utilizing a graphical user interface, through which we obtain different types of responses that need to be subsequently validated.
Download the app to quickly get started using the Postman API Platform (Windows)
if you don’t have an account yet, sign up, then login.
Download the file, and save it to a local folder that you’ll remember later.
Now, in Postman, go to File
-> Import...
-> Upload Files
and select the previously downloaded file from your computer.
Then the SimplificaCI collection will be loaded into your Postman platform.
Inside Postman, after importing the Collection, in the left corner select SimplificaCI, then in Variables tab replace each of your variables.
Variable | Description |
---|---|
URL | https://api.simplificaci.com.br |
TOKEN_USER | You got it inside the SimplificaCI platform (simplificaci.com.br). See Guide. |
cpf | Employee CPF. Used in some methods. |
group_name | Group name. Used in some methods. |
The variable BEARER_TOKEN is used in all methods (except authentication) and its value is obtained with the method Auth by API token. However, its value is automatically updated when executing Auth by API token method via test script.
Test scripts are written in JavaScript, and are run after the response is received.
Run the ‘Auth by API token’ method for your BEARER_TOKEN variable is ready to perform the other requests.
Choose which method you will interact, then click on “Send” (blue button), to send the request to our server.
The return will appear in “Response”.
You must be logged into your SimplificaCI platform.
Then, go to the Integration area and on the API keys tab click on Generate access token (green button).
Wait, and the token will be shown below.
This token replaces the TOKEN_USER variable, which is Api-Token header parameter value in Authentication method.
POST
Auth by API tokenAuth method to authenticate at SimplificaCI API.
In this method you must to use the API TOKEN you got inside the SimplificaCI platform (simplificaci.com.br). See Guide.
This method returns the BEARER TOKEN that will be used by all other methods in the API.
POST /security/token
Key | Description |
---|---|
Content-Type | Content type |
Access-Type | Access type |
Api-Token | API TOKEN you got inside the SimplificaCI platform (simplificaci.com.br). See Guide. |
{
"Content-Type": "application/x-www-form-urlencoded",
"Access-Type": "public",
"Api-Token": "{TOKEN_USER}"
}
Key | Description |
---|---|
grant_type | Auth type |
{
"grant_type": "password"
}
Code | Description |
---|---|
200 | Success |
{
"access_token": "TOKEN_BEARER",
"token_type": "bearer",
"expires_in": 999999
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/security/token",
"method": "POST",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Access-Type": "public",
"Api-Token": "TOKEN_USER"
},
"data": {
"grant_type": "password"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/security/token");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Access-Type"), "public");
request.AddHeader("Api-Token"), "TOKEN_USER");
request.AddParameter("application/x-www-form-urlencoded", "grant_type=password", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -H "Access-Type: public" -H "Api-Token: TOKEN_USER"
-d "grant_type=password"
"api.simplificaci.com.br/security/token"
GET
Get all groupsGET
Get group by nameMethod used to get a list of groups from SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
GET /public/v1/groups
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
page | Page number you want to get. (The total of pages will came together with the results) |
{
"page": "1"
}
Code | Description |
---|---|
200 | Success |
{
"CurrentPage": 1,
"TotalPages": 41,
"groups": [
{
"name": "Name",
"type": "Type",
"gsuite_id": "Google GSuite Id",
"isdepartment": "Is the group a department?",
"isactive": true
}
]
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/groups",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"page": "1"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/groups");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "page=1", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "page=1"
"api.simplificaci.com.br/public/v1/groups"
Method used to get a specific group by it’s name from SimplificaCI platform.
PS: Replace {group_name} by the group name you want to get.
In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
GET /public/v1/group/{group_name}
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Code | Description |
---|---|
200 | Success |
{
"name": "Name",
"type": "Type",
"gsuite_id": "Google GSuite Id",
"isdepartment": "Is the group a department?",
"isactive": true
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/group/{name}",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/group/{name}");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
"api.simplificaci.com.br/public/v1/group/{name}"
Method used to get a list of employees from SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST Auth by API token.
GET /public/v1/persons
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
page | Page number you want to get. (The total of pages will came together with the results) |
unities | Comma separated unity initials to be filtered (Optional) |
isactive | Person status you want to filter (Optional) |
fields | Comma separated fields you want to be returned (Optional) |
{
"page": "1",
"unities": "UND1,UND2,UND3",
"isactive": "Boolean (true or false)",
"fields": "fullname,email,isactive"
}
Code | Description |
---|---|
200 | Success |
{
"CurrentPage": 1,
"TotalPages": 41,
"persons": [
{
"fullname": "Name",
"email": "Email 1",
"email2": "Email 2",
"email3": "Email 3",
"cpf": "CPF (Personal ID)",
"phonenumber": "Phone",
"phoneextensionnumber": "Phone extension number",
"gender": "Gender (M or F)",
"birthdate": "Birth Date (0001-01-01T00:00:00)",
"admissiondate": "Admission Date (0001-01-01T00:00:00)",
"terminationdate": "Termination Date (0001-01-01T00:00:00)",
"vacationinitdate": "Vacation Init Date (0001-01-01T00:00:00)",
"vacationfinaldate": "Vacation End Date (0001-01-01T00:00:00)",
"occupation": "Occupation",
"isactive": true,
"domainuser": "Domain and User for Windows Authentication",
"registration": "Personal Registration ID in company",
"isblocked": false,
"mobiletoken": "Mobile token for authentication",
"desktoptoken": "Desktop token for authentication",
"groups": "Groups separated by comma (;)"
}
]
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/persons",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"page": "1",
"unities": "UND1,UND2,UND3",
"isactive": "Boolean (true or false)",
"fields": "fullname,email,isactive"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/persons");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "page=1unities=UND1%2CUND2%2CUND3isactive=Boolean%20(true%20or%20false)fields=fullname%2Cemail%2Cisactive", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "page=1&unities=UND1,UND2,UND3&isactive=Boolean (true or false)&fields=fullname,email,isactive"
"api.simplificaci.com.br/public/v1/persons"
Method used to get a specific employee by it CPF from SimplificaCI platform.
PS: Replace {cpf} by the employee CPF you want to get. In this method you must send the BEARER TOKEN you got on method: POST Auth by API token.
GET /public/v1/persons/{cpf}
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Code | Description |
---|---|
200 | Success |
{
"CurrentPage": 1,
"TotalPages": 41,
"persons": [
{
"fullname": "Name",
"email": "Email 1",
"email2": "Email 2",
"email3": "Email 3",
"cpf": "CPF (Personal ID)",
"phonenumber": "Phone",
"phoneextensionnumber": "Phone extension number",
"gender": "Gender (M or F)",
"birthdate": "Birth Date (0001-01-01T00:00:00)",
"admissiondate": "Admission Date (0001-01-01T00:00:00)",
"terminationdate": "Termination Date (0001-01-01T00:00:00)",
"vacationinitdate": "Vacation Init Date (0001-01-01T00:00:00)",
"vacationfinaldate": "Vacation End Date (0001-01-01T00:00:00)",
"occupation": "Occupation",
"isactive": true,
"domainuser": "Domain and User for Windows Authentication",
"registration": "Personal Registration ID in company",
"isblocked": false,
"mobiletoken": "Mobile token for authentication",
"desktoptoken": "Desktop token for authentication",
"groups": "Groups separated by comma (;)"
}
]
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/person/{cpf}",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/person/{cpf}");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
"api.simplificaci.com.br/public/v1/person/{cpf}"
Method used to get a specific employee by it’s Group from SimplificaCI platform.
PS: Replace {group_name} by the employee group name you want to update. In this method you must send the BEARER TOKEN you got on method: POST Auth by API token.
GET /public/v1/personsbygroup/{group_name}
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Code | Description |
---|---|
200 | Success |
{
"CurrentPage": 1,
"TotalPages": 41,
"persons": {
"fullname": "Name",
"email": "Email 1",
"email2": "Email 2",
"email3": "Email 3",
"cpf": "CPF (Personal ID)",
"phonenumber": "Phone",
"phoneextensionnumber": "Phone extension number",
"gender": "Gender (M or F)",
"birthdate": "Birth Date (0001-01-01T00:00:00)",
"admissiondate": "Admission Date (0001-01-01T00:00:00)",
"terminationdate": "Termination Date (0001-01-01T00:00:00)",
"vacationinitdate": "Vacation Init Date (0001-01-01T00:00:00)",
"vacationfinaldate": "Vacation End Date (0001-01-01T00:00:00)",
"occupation": "Occupation",
"isactive": true,
"domainuser": "Domain and User for Windows Authentication",
"registration": "Personal Registration ID in company",
"isblocked": false,
"mobiletoken": "Mobile token for authentication",
"desktoptoken": "Desktop token for authentication",
"groups": "Groups separated by comma (;)"
}
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/personsByGroup/{group_name}",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/personsByGroup/{group_name}");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {USER-AUTH-TOKEN}"
" api.simplificaci.com.br/public/v1/personsByGroup/{group_name}"
Method used to insert or update an employee in SimplificaCI platform.
PS: Replace {cpf} by the employee CPF you want to insert or update. In this method you must send the BEARER TOKEN you got on method: POST Auth by API token.
PUT /public/v1/person/{cpf}
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
fullname | Full name |
Principal Email | |
email2 | Aditional Email |
email3 | Aditional Email |
gender | Gender (M ou F) |
birthdate | Birth date |
admissiondate | Admission date |
terminationdate | Demission date |
vacationinitialdate | Vacation initial date |
vacationfinaldate | Vacation final date |
occupation | Ocupation |
isactive | Is active? (Y ou N) |
domainuser | Corporation network Domain/User |
registration | Company ID Numeber |
phonenumber | Phone number |
phoneextensionnumber | Phone extension number |
groups | Groups (use semicolon (;) to separate the groups names |
unities | Unidades (use semicolon (;) to separate the unities initials |
leader | CPF, Company ID Number or E-mail of the person who is considered the leader of the person being inserted/updated |
{
"fullname": "John Doe",
"email": "john@doe.com",
"email2": "john@doe2.com",
"email3": "john@doe3.com",
"gender": "M",
"birthdate": "99/99/9999",
"admissiondate": "99/99/9999",
"terminationdate": "99/99/9999",
"vacationinitialdate": "99/99/9999",
"vacationfinaldate": "99/99/9999",
"occupation": "Vendedor",
"isactive": "Y",
"domainuser": "CORP/John",
"registration": "ABC0000DFG000",
"phonenumber": "99 99999 9999",
"phoneextensionnumber": "9999999",
"groups": "Group 1; Group 2; Group N",
"unities": "UND1; UND2; UNDN",
"leader": ""
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/person/{cpf}",
"method": "PUT",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"fullname": "John Doe",
"email": "john@doe.com",
"email2": "john@doe2.com",
"email3": "john@doe3.com",
"gender": "M",
"birthdate": "99/99/9999",
"admissiondate": "99/99/9999",
"terminationdate": "99/99/9999",
"vacationinitialdate": "99/99/9999",
"vacationfinaldate": "99/99/9999",
"occupation": "Vendedor",
"isactive": "Y",
"domainuser": "CORP/John",
"registration": "ABC0000DFG000",
"phonenumber": "99 99999 9999",
"phoneextensionnumber": "9999999",
"groups": "Group 1; Group 2; Group N",
"unities": "UND1; UND2; UNDN",
"leader": ""
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/person/{cpf}");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "fullname=John%20Doeemail=john%40doe.comemail2=john%40doe2.comemail3=john%40doe3.comgender=Mbirthdate=99%2F99%2F9999admissiondate=99%2F99%2F9999terminationdate=99%2F99%2F9999vacationinitialdate=99%2F99%2F9999vacationfinaldate=99%2F99%2F9999occupation=Vendedorisactive=Ydomainuser=CORP%2FJohnregistration=ABC0000DFG000phonenumber=99%2099999%209999phoneextensionnumber=9999999groups=Group%201%3B%20Group%202%3B%20Group%20Nunities=UND1%3B%20UND2%3B%20UNDNleader=", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "fullname=John Doe&email=john@doe.com&email2=john@doe2.com&email3=john@doe3.com&gender=M&birthdate=99/99/9999&admissiondate=99/99/9999&terminationdate=99/99/9999&vacationinitialdate=99/99/9999&vacationfinaldate=99/99/9999&occupation=Vendedor&isactive=Y&domainuser=CORP/John®istration=ABC0000DFG000&phonenumber=99 99999 9999&phoneextensionnumber=9999999&groups=Group 1; Group 2; Group N&unities=UND1; UND2; UNDN&leader="
"api.simplificaci.com.br/public/v1/person/{cpf}"
INFO
Avoid inactive employeesIf in your data update routine only active collaborators are expected to be sent, by default, data that has not been updated will be kept within SimplificaCI. That is, this means that employees who are no longer part of your company (and consequently) are no longer in your shipping routine will still be maintained with Active status within our base.
To do this, we strongly recommend that after you submit your list, you will be forced to update to the Inactive status of all collaborators not on your list.
You can get this relationship from a relationship between your data and those obtained through the Get all employee endpoint.
Method used to inser or update a Datastore contents variables in SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
PUT /public/v1/datastore
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
name | Variable name |
value | Variable name |
date | Registry date |
{
"name": "ServerStatus",
"value": "ALIVE",
"date": "01/01/2018 12:00:00"
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
],
"id": null,
"status": 400
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/datastore",
"method": "PUT",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"name": "ServerStatus",
"value": "ALIVE",
"date": "01/01/2018 12:00:00"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/datastore");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "name=ServerStatusvalue=ALIVEdate=01%2F01%2F2018%2012%3A00%3A00", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "name=ServerStatus&value=ALIVE&date=01/01/2018 12:00:00"
"api.simplificaci.com.br/public/v1/datastore"
Method used to get variable informations from Datastore in SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
GET /public/v1/datastore/{name}
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Code | Description |
---|---|
200 | Success |
{
"name": "my_datastore_name_1",
"value": "my_value_1",
"date": "2017-03-25T17:55:25.123"
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/datastore/{name}",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/datastore/{name}");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
"api.simplificaci.com.br/public/v1/datastore/{name}"
GET
Get general metricsGET
Get announcement metrics by Source UnitiesGET
Get announcement metrics by Destination UnitiesGET
Get announcement metrics by groupsGET
Get announcement metrics by linksGET
Get metrics by announcementsMethod used to fetch overall metrics from announcements over a period of time
GET /analytics/general
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
codigo_comunicado | Variable name |
disparado_de | Start date |
disparado_ate | End date |
enviado_de | Start date |
enviado_ate | End date |
periodo_de | Start date |
periodo_ate | End date |
{
"codigo_comunicado": "123",
"disparado_de": "01/01/2018 12:00:00",
"disparado_ate": "01/01/2018 12:00:00",
"enviado_de": "01/01/2018 12:00:00",
"enviado_ate": "01/01/2018 12:00:00",
"periodo_de": "01/01/2018 12:00:00",
"periodo_ate": "01/01/2018 12:00:00"
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
],
"id": null,
"status": 200,
"current_page": 1,
"total_pages": 2,
"announcements": [
{
"id": 140517,
"titulo": "Announcement Title",
"canais": "EM|",
"unidade_id": 111,
"unidade_sigla": "",
"unidade_origem": "Source Unity",
"editoria_id": 861,
"editoria": "",
"disparado_em": "2021-10-01T12:34:56.789",
"enviado_em": "2021-10-01T12:34:56.789",
"periodo_de": "2021-10-01T12:34:56.789",
"periodo_ate": "2021-10-01T12:34:56.789",
"status": "done",
"publico_total": 10000,
"publico_alcancado": 9000,
"publico_engajado": 8000,
"quantidade_comentarios": 0,
"quantidade_reacoes ": 0,
"quantidade_reacoes_positiva": 0,
"quantidade_reacoes_neutra ": 0,
"quantidade_reacoes_negativa": 0,
"quantidade_links": 0,
"quantidade_pessoas_clicaram_link": 6000,
"quantidade_cliques_totais_link": 7000
}
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
Method used to search for metrics, separating announcements by source unit
GET /analytics/sourceunities
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
codigo_comunicado | Variable name |
disparado_de | Start date |
disparado_ate | End date |
enviado_de | Start date |
enviado_ate | End date |
periodo_de | Start date |
periodo_ate | End date |
{
"codigo_comunicado": "123",
"disparado_de": "01/01/2018 12:00:00",
"disparado_ate": "01/01/2018 12:00:00",
"enviado_de": "01/01/2018 12:00:00",
"enviado_ate": "01/01/2018 12:00:00",
"periodo_de": "01/01/2018 12:00:00",
"periodo_ate": "01/01/2018 12:00:00"
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
],
"id": null,
"status": 200,
"current_page": 1,
"total_pages": 2,
"announcements": [
{
"id": 140517,
"unidade": "Código da Unidade",
"publico_total": 10000,
"publico_alcancado": 9000,
"publico_engajado": 8000,
"quantidade_comentarios": 0,
"quantidade_reacoes ": 0,
"quantidade_reacoes_positiva": 0,
"quantidade_reacoes_neutra ": 0,
"quantidade_reacoes_negativa": 0,
"quantidade_links": 0,
"quantidade_pessoas_clicaram_link": 6000,
"quantidade_cliques_totais_link": 7000
}
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
Method used to search for metrics, separating announcements by destination unit
GET /analytics/destinationunities
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
codigo_comunicado | Variable name |
disparado_de | Start date |
disparado_ate | End date |
enviado_de | Start date |
enviado_ate | End date |
periodo_de | Start date |
periodo_ate | End date |
{
"codigo_comunicado": "123",
"disparado_de": "01/01/2018 12:00:00",
"disparado_ate": "01/01/2018 12:00:00",
"enviado_de": "01/01/2018 12:00:00",
"enviado_ate": "01/01/2018 12:00:00",
"periodo_de": "01/01/2018 12:00:00",
"periodo_ate": "01/01/2018 12:00:00"
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
],
"id": null,
"status": 200,
"current_page": 1,
"total_pages": 2,
"announcements": [
{
"id": 140517,
"unidade": "Código da Unidade",
"publico_total": 10000,
"publico_alcancado": 9000,
"publico_engajado": 8000,
"quantidade_comentarios": 0,
"quantidade_reacoes ": 0,
"quantidade_reacoes_positiva": 0,
"quantidade_reacoes_neutra ": 0,
"quantidade_reacoes_negativa": 0,
"quantidade_links": 0,
"quantidade_pessoas_clicaram_link": 6000,
"quantidade_cliques_totais_link": 7000
}
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
Method used to search for metrics, separating announcements by destination unit
GET /analytics/groups
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
codigo_comunicado | Variable name |
disparado_de | Start date |
disparado_ate | End date |
enviado_de | Start date |
enviado_ate | End date |
periodo_de | Start date |
periodo_ate | End date |
{
"codigo_comunicado": "123",
"disparado_de": "01/01/2018 12:00:00",
"disparado_ate": "01/01/2018 12:00:00",
"enviado_de": "01/01/2018 12:00:00",
"enviado_ate": "01/01/2018 12:00:00",
"periodo_de": "01/01/2018 12:00:00",
"periodo_ate": "01/01/2018 12:00:00"
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
],
"id": null,
"status": 200,
"current_page": 1,
"total_pages": 2,
"groups": [
{
"id": 10101,
"grupo": "Nome do grupo",
"publico_total": 10000,
"publico_alcancado": 9000,
"publico_engajado": 8000,
"quantidade_comentarios": 0,
"quantidade_reacoes ": 0,
"quantidade_reacoes_positiva": 0,
"quantidade_reacoes_neutra ": 0,
"quantidade_reacoes_negativa": 0,
"quantidade_links": 0,
"quantidade_pessoas_clicaram_link": 6000,
"quantidade_cliques_totais_link": 7000
}
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
Method used to search for metrics, separating announcements by destination unit
GET /analytics/destinationunities
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
codigo_comunicado | Variable name |
disparado_de | Start date |
disparado_ate | End date |
enviado_de | Start date |
enviado_ate | End date |
periodo_de | Start date |
periodo_ate | End date |
{
"codigo_comunicado": "123",
"disparado_de": "01/01/2018 12:00:00",
"disparado_ate": "01/01/2018 12:00:00",
"enviado_de": "01/01/2018 12:00:00",
"enviado_ate": "01/01/2018 12:00:00",
"periodo_de": "01/01/2018 12:00:00",
"periodo_ate": "01/01/2018 12:00:00"
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
],
"id": null,
"status": 200,
"current_page": 1,
"total_pages": 1,
"links": [
{
"id": 10101,
"url": "http://www.google.com/",
"quantidade_pessoas_clicaram_link": 15,
"quantidade_cliques_totais_link": 25,
"status": 0
}
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
Method used to search for metrics, separating announcements by destination unit
GET /analytics/announcements
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
codigo_comunicado | Variable name |
disparado_de | Start date |
disparado_ate | End date |
enviado_de | Start date |
enviado_ate | End date |
periodo_de | Start date |
periodo_ate | End date |
{
"codigo_comunicado": "123",
"disparado_de": "01/01/2018 12:00:00",
"disparado_ate": "01/01/2018 12:00:00",
"enviado_de": "01/01/2018 12:00:00",
"enviado_ate": "01/01/2018 12:00:00",
"periodo_de": "01/01/2018 12:00:00",
"periodo_ate": "01/01/2018 12:00:00"
}
Code | Description |
---|---|
200 | Success |
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
],
"id": null,
"status": 200,
"current_page": 1,
"total_pages": 2,
"announcements": [
{
"id": 10101,
"titulo": "Titulo do comunicado",
"canais": "EM|",
"unidade_id": 101,
"unidade_sigla": "",
"unidade_origem": "",
"editoria_id": 111,
"editoria": "Editoria",
"disparado_em": "2021-10-01T12:34:56.789",
"enviado_em": "2021-10-01T12:34:56.789",
"periodo_de": "2021-10-01T12:34:56.789",
"periodo_ate": "2021-10-01T12:34:56.789",
"status": "play",
"publico_total": 10000,
"publico_alcancado": 9000,
"publico_engajado": 8000,
"quantidade_comentarios": 0,
"quantidade_reacoes ": 0,
"quantidade_reacoes_positiva": 0,
"quantidade_reacoes_neutra ": 0,
"quantidade_reacoes_negativa": 0,
"quantidade_links": 0,
"quantidade_pessoas_clicaram_link": 6000,
"quantidade_cliques_totais_link": 7000
}
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
Method used to get a list of categories from SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
GET /public/v1/categories
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
id | Optional. Works as a filter |
name | Optional. Works as a filter |
{
"id": "1",
"name": "Name"
}
Code | Description |
---|---|
200 | Success |
{
"categories": [
{
"id": 1,
"name": "John Doe"
}
],
"id": null,
"status": 200
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/categories",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"id": "1",
"name": "John Doe"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/categories");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "id=1name=John%20Doe", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "id=1&name=John Doe"
"api.simplificaci.com.br/public/v1/categories"
Method used to insert or update a category in SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
PUT /public/v1/categories
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
id | Required when editing. Null when creating |
name | Category name |
{
"id": "1",
"name": "Name"
}
Code | Description |
---|---|
200 | Success |
{
"errors": [],
"id": null,
"status": 200
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/categories",
"method": "PUT",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"id": "1",
"name": "John Doe"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/categories");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "id=1name=John%20Doe", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "id=1&name=John Doe"
"api.simplificaci.com.br/public/v1/categories"
Method used to get a list of editorials from SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
GET /public/v1/editorials
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
id | Optional. Works as a filter |
name | Optional. Works as a filter |
color | Optional. Works as a filter |
{
"id": "1",
"name": "Name",
"color": "#000000"
}
Code | Description |
---|---|
200 | Success |
{
"editorias": [
{
"id": 1,
"name": "Name",
"color": "#000000"
}
],
"id": null,
"status": 200
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/editorials",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"id": "1",
"name": "John Doe",
"color": "#000000"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/editorials");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "id=1name=John%20Doecolor=#000000", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "id=1&name=John Doe&color=#000000"
"api.simplificaci.com.br/public/v1/editorials"
Method used to insert or update an editorial in SimplificaCI platform.
PUT /public/v1/editorials
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
id | Required when editing. Null when creating |
name | Editorial name |
color | Hexadecimal pattern color |
{
"id": "1",
"name": "Name",
"color": "#000000"
}
Code | Description |
---|---|
200 | Success |
{
"errors": [],
"id": null,
"status": 200
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/editorials",
"method": "PUT",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"id": "1",
"name": "John Doe",
"color": "#000000"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/editorials");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "BearerBearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "id=1name=John%20Doecolor=#000000", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "id=1&name=John Doe&color=#000000"
"api.simplificaci.com.br/public/v1/editorials"
Method used to get a list of articles from SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
GET /public/v1/articles
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
id | Optional. Works as a filter |
title | Optional. Works as a filter |
editorialid | Optional. Works as a filter |
{
"id": "1",
"title": "article title",
"editorialid": "1",
}
Code | Description |
---|---|
200 | Success |
{
"articles": [
{
"id": 1,
"editorialid": 1,
"title": "article title",
"resume": "article resume",
"highlighted": true,
"createddate": "yyyy-MM-ddThh:mm:ss.xxx",
"urlredirectto": "{URL}",
"image": "{URL}"
}
],
"id": null,
"status": 200
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/articles",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"id": "1",
"title": "Article Title",
"editorialid": "1"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/articles");
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "id=1title=Article%20Titleeditoriaid=1", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X GET -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "id=1&title=Article Title&editoria_id=1"
"api.simplificaci.com.br/public/v1/articles"
Method used to insert or update an article in SimplificaCI platform.
PS: In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
PUT /public/v1/articles
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
id | Required when editing. Null when creating |
editorialid | editorial id (Optional when editing. Required when creating) |
title | article title |
resume | article resume |
highlighted | highlights the article (boolean value) |
urlredirectto | {URL} |
image | {URL} |
{
"id": "1",
"editorialid": "1",
"title": "article title",
"resume": "article resume",
"highlighted": true,
"urlredirectto": "{URL}",
"image": "{URL}"
}
Code | Description |
---|---|
200 | Success |
{
"errors": [],
"id": null,
"status": 200
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/articles",
"method": "PUT",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"id": "1",
"editorialid": "1",
"title": "Article Title",
"resume": "Loren Ipsun",
"highlighted": "false",
"urlredirectto": "{URL}",
"image": "{URL}"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/articles");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "id=1title=Article%20Titleresume=Loren%20Ipsuneditorialid=1highlighted=falseurlredirectto={URL}image={URL}", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "id=1title=Article Title&resume=Loren Ipsun&1editorialid=1&highlighted=false&falseurlredirectto={URL}&image={URL}"
"api.simplificaci.com.br/public/v1/articles"
Method used to send a push notification to a person’s Simplifica Mobile application.
PS: Replace {cpf} by the employee CPF you want to get.
In this method you must send the BEARER TOKEN you got on method: POST
Auth by API token.
PUT /public/v1/notifyperson/{cpf}
Key | Description |
---|---|
Content-Type | Content type |
Authorization | BEARER TOKEN you got on method: POST Auth by API token |
{
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
}
Key | Description |
---|---|
action | Action type Default type: message Valid types: message , announcement , page , url |
payload | Action payload depending on the action type Examples: announcement -> should have the announcement id as payload page -> should have the page id as payload url -> should have a valid url as payload message -> should have a valid text message with a maximum size of 1024 chars as payloadSee the examples bellow |
message
action type:{
"action": "message",
"payload": "My text message"
}
announcement
action type:{
"action": "announcement",
"payload": "99999"
}
page
action type:{
"action": "page",
"payload": "99999"
}
url
action type:{
"action": "url",
"payload": "https://simplificaci.com.br"
}
Code | Description |
---|---|
200 | Success |
{
"errors": [],
"id": null,
"status": 200
}
Code | Description |
---|---|
400 | Forbidden |
{
"errors": [
"ERROR MESSAGES HERE"
]
}
Code | Description |
---|---|
403 | Forbidden |
{
"error": "403|Forbidden"
}
AJAX
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.simplificaci.com.br/public/v1/notifyperson/{cpf}",
"method": "PUT",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {TOKEN_BEARER}"
},
"data": {
"action": "message",
"payload": "My text message"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
CSHARP
//This code use the RestSharp Client. See (http://restsharp.org/).
var client = new RestClient("https://api.simplificaci.com.br/public/v1/articles");
var request = new RestRequest(Method.PUT);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("Content-Type"), "application/x-www-form-urlencoded");
request.AddHeader("Authorization"), "Bearer {TOKEN_BEARER}");
request.AddParameter("application/x-www-form-urlencoded", "action=message&payload=My%20text%20message", ParameterType.RequestBody);
IRequestResponse response = client.Execute(request);
CURL
curl -X PUT -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Bearer {TOKEN_BEARER}"
-d "action=message&payload=My%20text%20message"
"api.simplificaci.com.br/public/v1/articles"