SimplificaCI API

Foo

Overview

Overview


Using Postman

How 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.

Postman Download

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.

Import the SimplificaCI collection

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.

importation

Replacing variables

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.

variables

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.

Usage

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”.

usage


Generating API Token

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.

tokenuser

This token replaces the TOKEN_USER variable, which is Api-Token header parameter value in Authentication method.


Authentication

Auth by API token

Auth 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.

Endpoint

POST /security/token

Header Parameters

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}"
}

Body Parameters

Key Description
grant_type Auth type
{
	"grant_type": "password"
}

Responses

Code Description
200 Success
{
	"access_token": "TOKEN_BEARER",
	"token_type": "bearer",
	"expires_in": 999999
}
Code Description
403 Forbidden
{
	"error": "403|Forbidden"
}

Code Samples


Groups

Get all groups

Method 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.

Endpoint

GET /public/v1/groups

Header Parameters

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}"
}

Query Parameters

Key Description
page Page number you want to get. (The total of pages will came together with the results)
{
	"page": "1"
}

Responses

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"
}

Code Samples

Get group by name

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.

Endpoint

GET /public/v1/group/{group_name}

Header Parameters

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}"
}

Responses

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"
}

Code Samples


Employees

Get all employees

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.

Endpoint

GET /public/v1/persons

Header Parameters

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}"
}

Query Parameters

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"
}

Responses

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"
}

Code Samples

Get employee by CPF

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.

Endpoint

GET /public/v1/persons/{cpf}

Header Parameters

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}"
}

Responses

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"
}

Code Samples

Get employee by Group

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.

Endpoint

GET /public/v1/personsbygroup/{group_name}

Header Parameters

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}"
}

Responses

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"
}

Code Samples

Insert or Update an employee

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.

Endpoint

PUT /public/v1/person/{cpf}

Header Parameters

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}"
}

Body Parameters

Key Description
fullname Full name
email 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": ""
}

Responses

Code Description
200 Success
400 Forbidden
{
	"errors": [
		"ERROR MESSAGES HERE"
	]
}
Code Description
403 Forbidden
{
	"error": "403|Forbidden"
}

Code Samples

Avoid inactive employees

INFO Avoid inactive employees

If 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.


Datastore

Insert or Update a Datastore variable

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.

Endpoint

PUT /public/v1/datastore

Header Parameters

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}"
}

Body Parameters

Key Description
name Variable name
value Variable name
date Registry date
{
	"name": "ServerStatus",
	"value": "ALIVE",
	"date": "01/01/2018 12:00:00"
}

Responses

Code Description
200 Success
400 Forbidden
{
	"errors": [
		"ERROR MESSAGES HERE"
	],
	"id": null,
	"status": 400
}
Code Description
403 Forbidden
{
	"error": "403|Forbidden"
}

Code Samples

Restore variable informations from 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.

Endpoint

GET /public/v1/datastore/{name}

Header Parameters

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}"
}

Responses

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"
}

Code Samples


Analytics

Get general metrics

Method used to fetch overall metrics from announcements over a period of time

Endpoint

GET /analytics/general

Header Parameters

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}"
}

Body Parameters

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"
}

Responses

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"
}

Get announcement metrics by Source Unities

Method used to search for metrics, separating announcements by source unit

Endpoint

GET /analytics/sourceunities

Header Parameters

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}"
}

Body Parameters

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"
}

Responses

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"
}

Get announcement metrics by Destination Unities

Method used to search for metrics, separating announcements by destination unit

Endpoint

GET /analytics/destinationunities

Header Parameters

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}"
}

Body Parameters

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"
}

Responses

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"
}

Get announcement metrics by groups

Method used to search for metrics, separating announcements by destination unit

Endpoint

GET /analytics/groups

Header Parameters

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}"
}

Body Parameters

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"
}

Responses

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

Endpoint

GET /analytics/destinationunities

Header Parameters

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}"
}

Body Parameters

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"
}

Responses

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"
}

Get metrics by announcements

Method used to search for metrics, separating announcements by destination unit

Endpoint

GET /analytics/announcements

Header Parameters

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}"
}

Body Parameters

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"
}

Responses

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"
}

Categories

Get categories

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.

Endpoint

GET /public/v1/categories

Header Parameters

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}"
}

Body Parameters

Key Description
id Optional. Works as a filter
name Optional. Works as a filter
{
	"id": "1",
	"name": "Name"
}

Responses

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"
}

Code Samples

Insert or Update a category

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.

Endpoint

PUT /public/v1/categories

Header Parameters

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}"
}

Body Parameters

Key Description
id Required when editing. Null when creating
name Category name
{
	"id": "1",
	"name": "Name"
}

Responses

Code Description
200 Success
{
	"errors": [],
	"id": null,
	"status": 200
}
Code Description
400 Forbidden
{
	"errors": [
		"ERROR MESSAGES HERE"
	]
}
Code Description
403 Forbidden
{
	"error": "403|Forbidden"
}

Code Samples


Editorials

Get editorials

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.

Endpoint

GET /public/v1/editorials

Header Parameters

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}"
}

Body Parameters

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"
}

Responses

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"
}

Code Samples

Insert or Update an editorial

Method used to insert or update an editorial in SimplificaCI platform.

Endpoint

PUT /public/v1/editorials

Header Parameters

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}"
}

Body Parameters

Key Description
id Required when editing. Null when creating
name Editorial name
color Hexadecimal pattern color
{
	"id": "1",
	"name": "Name",
	"color": "#000000"
}

Responses

Code Description
200 Success
{
	"errors": [],
	"id": null,
	"status": 200
}
Code Description
400 Forbidden
{
	"errors": [
		"ERROR MESSAGES HERE"
	]
}
Code Description
403 Forbidden
{
	"error": "403|Forbidden"
}

Code Samples


Articles

Get articles

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.

Endpoint

GET /public/v1/articles

Header Parameters

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}"
}

Body Parameters

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",
}

Responses

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"
}

Code Samples

Insert or Update an article

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.

Endpoint

PUT /public/v1/articles

Header Parameters

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}"
}

Body Parameters

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}"
}

Responses

Code Description
200 Success
{
	"errors": [],
	"id": null,
	"status": 200
}
Code Description
400 Forbidden
{
	"errors": [
		"ERROR MESSAGES HERE"
	]
}
Code Description
403 Forbidden
{
	"error": "403|Forbidden"
}

Code Samples

Send Push Notification to a Person

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.

Endpoint

PUT /public/v1/notifyperson/{cpf}

Header Parameters

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}"
}

Body Parameters

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 payload

See the examples bellow
Using message action type:
{
	"action": "message",
	"payload": "My text message"
}
Using announcement action type:
Using page action type:

Responses

Code Description
200 Success
{
	"errors": [],
	"id": null,
	"status": 200
}
Code Description
400 Forbidden
{
	"errors": [
		"ERROR MESSAGES HERE"
	]
}
Code Description
403 Forbidden
{
	"error": "403|Forbidden"
}

Code Samples