---
title: Webservices CITSmart Docs
slug: pink-dev/webservices-citsmart-docs
description: Learn about the REST communication structure between applications and the back-end server in this document. Discover the various listing services available in the CITSMART ECM system, allowing users to retrieve lists of subjects, legal hypotheses, people,
docTags: 
createdAt: 2022-03-07T15:24:00.000Z
---

This section is intended to describe the communication structure REST, established between applications and the back-end server.

:::hint{type="danger"}
**CITSMART\_URL**: URL unalterable prefix, so that you can access the services made available to the mobile applications.
*ALL API THAT REQUIRES A “**sessionID**” WILL NEED TO BE IN A SESSION PROVIDED BY THE “Login” API.*
:::

***

### Login

User Authentication Service

:::CodeblockTabs
Method

```none
 	GET
```

URL

```html
 	<url_base>/cit-portal-web/rest/usuario/getToken
```

Request

```json
	{
	"username":"rogerio.cassimiro",
	"password":"123456"
	}
```

Response

```json
	{
	"id":25080,
	"dateEdition":"2017-09-12T11:06:28.907-0300",
	"dateCreation":"2017-08-10T10:00:51.274-0300",
	"username":"rogerio.cassimiro",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074",
	"name":"rogerio.cassimiro",
	"version":":59"
	}
```

Fields

```none
	Request:
	   username: alphanumeric not empty and not null;
	   password :alphanumeric not empty and not null;
	Response:
	   id: numeric not empty and not null;
	   dateEdition: timestamp not empty and not null;
	   dateCreation: timestamp not empty and not null;
	   username: alphanumeric not empty and not null;
	   token: alphanumeric not empty and not null;
	   name: alphanumeric not empty and not null;
	   version: numeric not empty and not null;
```
:::

### LIST DEPARTMENT

Service list of departments to be used.

:::CodeblockTabs
Method

```none
 	GET
```

URL

```html
 	<url_base>/cit-ecm-web/integracao /listUnidade
```

Request

```json
	 {
	"name":"Department 1",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}
```

Response

```json
	 	
	{
	"units":[
	{
	"id":93794,
	"name":"Department 1",
	"code":"000001"
	}
	]
	}
```

Fields

```none
	Request:
	   name: alphanumeric not empty and not null
	   token: alphanumeric not empty and not null
	Response:
	   units: List empty and not null;
	   id: numeric not empty and not null
	   name: alphanumeric not empty and not null
	   code: alphanumeric not empty and not null
```
:::

### LIST LEVEL ACCESS TYPE PROCESS

The subject listing service of a process and / or document, to be used.

:::CodeblockTabs
Method

```none
	GET
```

URL

```html
	<CITSMART_URL>/cit-ecm-web/integracao/listNivelAcessoTipoProcesso
```

Request

```json
	{
	"idTypeProcess":"54654",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}
```

Response

```json
	{
	"levelAccessTypeProcess":[
	{
	"idLevelAccessTypeProcess":97942,
	"idLevelAccess:":"23121",
	"name":"PUBLIC"
	},
	{
	"idLevelAccessTypeProcess":97947,
	" idLevelAccess":91426,
	"name":"RESTRICT"
	}
	]
	}
```

Fields

```none
	Request:
 	   idTypeProcess: numeric not empty and not null
	   token: alphanumeric not empty and not null
	Response:
	  levelAccessTypeProcess: list not empty and not null;
	  idLevelAccess: numeric not empty and not null
	  idLevelAccessTypeProcess: numeric not empty and not null
 	  name: alphanumeric not empty and not null
```
:::

### LIST LEVEL ACCESS TYPE DOCUMENT

The subject listing service of a process and / or document, to be used.

:::CodeblockTabs
Method

```none
 	GET
```

```html
 	<CITSMART_URL>/cit-ecm-web/integracao/listNivelAcessoTipoDocumento
```

Request

```json
	{
	"idTypeDocument":"54654",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}
```

Response

```json
	{
	"levelAccessTypeDocument":[
	{
	"idLevelAccessTypeDocument":97942,
	" idLevelAccess:":"23121",
	"name":"PUBLIC"
	},
	{
	"idLevelAccessTypeDocument ":97947,
	"idLevelAccess":91426,
	"name":"RESTRICTED"
	}
	]
	}
```

Fields

```none
	Request:
	  idTypeDocument: numeric not empty and not null
	  token: alphanumeric not empty and not null
	Response:
	  levelAccesTypeDocument: list not empty and not null;
	  idLevelAccess: numeric not empty and not null
	  idLevelAccessTypeDocument: numeric not empty and not null
  	  name: alphanumeric not empty and not null
```
:::

### LIST SUBJECT

The subject listing service of a process and / or document, to be used.

:::CodeblockTabs
Method

```text
 	GET
```

```html
  	<CITSMART_URL>/cit-ecm-web/integracao/listAssunto
```

Request

```json
	{
	"name":"HEARING.MEETINGS"
	"code":"010.3",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}
```

Response

```json
	{
	"subjects":[
	{
	"id":6982,
	"code":"010.3",
	"name":"HEARING.MEETINGS",
	"subject":"010.3 – ADMINISTRATION.GENERAL "
	}
	]
	}
```

Fields

```none
	Request:
	  name: alphanumeric not empty and not null
	  code: alphanumeric not empty and not null
	  token: alfanumeric not empty and not null
 	Response:
	  subjects: List empty and not null;
	  id: numeric not empty and not null
	  code: alphanumeric not empty and not null
	  name: alphanumeric not empty and not null
	  subject: alphanumeric not empty and not null
```
:::

### LIST LEGAL HYPOTHESES

List of legal hypotheses of a process or document, to be used.

:::CodeblockTabs
Method

```none
	GET
```

```html
	<CITSMART_URL>/cit-ecm-web/integracao/listHipoteseLegal
```

Request

```json
	{
	"idLevelAccess":"97947",
	"name":"Information name",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}
```

Response

```json
	{
	"hypoteseLegal":[
	{
	"id":7340,
	"description":"Law description",
	"name":"Information name"
	}
	]
	}
```

Fields

```none
	Request:
	  idLevelAccess: numeric not empty and not null
	  name: alphanumeric not empty and not null
	  token: alphanumeric not empty and not null
	Response:
	  hypoteseLegal: List empty and not null;
	  id: numeric not empty and not null
   	  description: alphanumeric not empty and not null
	  name: alphanumeric not empty and not null
```
:::

### LIST PEOPLE

List of interested persons of a process or document, to be used:

:::CodeblockTabs
Method

```none
	GET
```

```html
	<CITSMART_URL>/cit-ecm-web/integracao/listPessoas
```

Request

```json
	{
	"name":"Maycon",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}	 
```

Response

```json
	{
	"people":[
	{
	"id":98064,
	"name":"Maycon"
	}
	]
	} 
```

Fields

```none
	Request:
	  name: alphanumeric not empty and not null
	  token: alphanumeric not empty and not null
	Response:
	  people: List empty and not null;
	  id: numeric not empty and not null
  	  name: alphanumeric not empty and not null
```
:::

### LIST FORM OF CONFERENCE

List of the conference forms of a process and / or document, to be used

:::CodeblockTabs
Method

```none
	GET	
```

```html
	<CITSMART_URL>/cit-ecm-web/integracao/listFormaConferencia
```

Request

```json
	 {
	"name":"Administrative certified copy",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}
```

Response

```json
	{
	"formConference":[
	{
	"id":97484,
	"name":"Administrative certified copy"
	}
	]
	}
```

Fields

```none
	Request:
	  name: alphanumeric not empty and not null
	  token: alphanumeric not empty and not null
	Response:
	  formaConference: List empty and not null;
	  id: numeric not empty and not null
	  name: alphanumeric not empty and not null
```
:::

### LIST MEDIA TYPES

List of media types for a document to be used

:::CodeblockTabs
Method

```none
	GET
```

URL

```html
	<CITSMART_URL>/cit-ecm-web/integracao/listTipoSuporte
```

Request

```json
	{
	"name":"Name type media",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	} 
```

Response

```json
	{
	"typeSupport":[
	{
	"id":97975,
	"name":"Name type media"
	}
	]
	}
```

Fields

```none
	Request:
	  name: alphanumeric not empty and not null
	  token: alphanumeric not empty and not null
	Response:
	  typeSupport: List empty and not null;
	  id: numeric not empty and not null
	  name: alphanumeric not empty and not null  
```
:::

### LIST DOCUMENT TYPES

Listing service of document types of a document, to be used.

:::CodeblockTabs
Method

```none
 	GET
```

URL

```html
 	<CITSMART_URL>/cit-ecm-web/integracao/listTipoDocumento
```

Request

```json
	 {
	"name":"Document type name",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}
```

Response

```json
	{
	"typeDocument":[
	{
	"id":97949,
	"name":"Document type name"
	}
	]
	} 
```

Fields

```none
	Request:
	  name: alphanumeric not empty and not null
	  token: alphanumeric not empty and not null
	Response:
	  typeDocument: List empty and not null;
	  id: numeric not empty and not null
	  name: alphanumeric not empty and not null	  
```
:::

### CREATE PROCESS

Service creating a process.

:::CodeblockTabs
Method

```none
	POST
```

```html
 	<CITSMART_URL>/cit-ecm-web/integracao/processo
```

Request

```json
	{
	"assuntoComplementar":"Subject Detail",
	"observacaoGeral":"General observation",
	"unidade":{
	"id":40358
	},
	"tipoProcesso":{
	"id":40394
	},
	"nivelAcesso":{
	"idNivelAcessoTipoProcesso":40395
	},
	"assunto":{
	"id":40393
	},
	"interessados":[
	{
	"interessado":{
	"id":40355
	}
	}
	],
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	} 
```

Response

```json
	{
	"id":"25353",
	"nup":"00001.00002/2016-58"
	}	 
```

Fields

```none
	Request:
 	  subjectComplementary: alphanumeric not empty and not null
	  observationGeneral: alphanumeric not empty and not null
	  unit: not empty and not null;
	  id: not empty and not null ;
	  typeProcess: not empty and not null;
	     id: not empty and not null ;
	  levelAccess: not empty and not null
	     idLevelAccessTypeProcess: not empty and not null ;
	  hypoteseLegal: not empty and not null if the access level differs from Public.
	     id: numeric not empty and not null
	  subject: not empty and not null ;
  	     id: not empty and not null ;
	  interested: can be empty and null;
	    personal
	  token: alphanumeric not empty and not null
	Response:
	  id: numeric not empty and not null
	  nup: alphanumérico not empty and not null; 
```
:::

### CREATE DOCUMENT

Document creation service

:::CodeblockTabs
Method

```none
 	POST
```

```html
 	<CITSMART_URL>/cit-ecm-web/integracao/documento
```

Request

```json
	{
	"numero":"9999",
	"assuntoComplementar":"Complementary Subject",
	"dataReferencia":"2016-08-19T14:45:25.360-0300",
	"unidade":{
	"id":40358
	},
	"processo":{
	"id":40503
	},
	"tipoDocumento":{
	"id":40426
	},
	"nivelAcesso":{
	"idNivelAcessoTipoDocumento":40427
	},
	"hipoteseLegal":{
	"id": 5658
	},
	"assunto":{
	"id":40393
	},
	"destinatario":{
	"id":40355
	},
	"tipoSuporteDocumento":{
	"id":40430
	},
	"interessados":[
	{
	"interessado":{
	"id":40355
	}
	}
	],
	"tipoConferencia":{
	"id":39950
	},
	"localizacao":"Physical location",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	} 
```

Response

```json
	{
	"id":"25353",
	"numero":"00001.00002/2016-58"
	} 
```

Fields

```none
	Request:
	  numero: alphanumeric not empty and not null;
	  assuntoComplementar: alphanumeric not empty and not null
	  localização: alphanumeric may be empty or null;
	  conteudo: not empty and not null;
	     The content of the document should be sent in base64
	  dataReferencia: timestamp not empty and not null;
	  unidade: not empty and not null;
	     id: numeric not empty and not null
	  processo: not empty and not null;
	     id: numeric not empty and not null
	  tipoDocumento: not empty and not null;
	     id: numeric not empty and not null
	  nivelAcesso: not empty and not null;
	     idNivelAcessoTipoProcesso: numeric not empty and not null
	  hipoteseLegal: not empty and not null, if the nível de acesso differs from Público;
	     id: numeric not empty and not null
	  assunto: not empty and not null;
	     id: numeric not empty and not null
	  destinatario: not empty and not null;
	     pessoa: not empty and not null;
	        id: numeric not empty and not null;
	  tipoSuporteDocumento: not empty and not null;
	  interessados: can be empty and null;
	     pessoa: not empty and not null;
	        id: numeric not empty and not null;
	  tipoConferencia: boolean not empty and not null;
	  localização: alphanumeric not null and non-empty, if the tipoConferencia attribute is true;
	  token: alfanumeric not empty and not null
	Response:
	  id: numeric not empty and not null
	  numero: not empty and not null 
```
:::

### UPLOAD DOCUMENT

Document creation service

:::CodeblockTabs
Method

```none
 	POST
```

```html
 	<CITSMART_URL>/cit-ecm-web/integracao/uploadAnexo
```

Request

```json
	{
	"file":"9999",
	"idDocumento":"25353",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	}	 
```

Response

```json
	N/A
```

Fields

```none
	Request:
 	  idDocumento: numeric not empty and not null
	  file: not empty and not null
	  token: alphanumeric not empty and not null 
```
:::

### GET BY ID PROCESS

Service that retrieves details of a process, according to its identifier.

:::CodeblockTabs
Method

```none
 	GET
```

URL

```html
 	<CITSMART_URL>/cit-ecm-web/integracao/getByIdProcesso
```

Request

```json
	{
	"id":6967
	}
```

Response

```json
	{
	"id":"5252",
	"assuntoComplementar":"Complementary Subject",
	"observacaoGeral":"General observation",
	"dataReferencia":null,
	"situacao":"In progress",
	"tipoProcesso":{
	"id":97930,
	"nome":"Type reserved process"
	},
	"nivelAcesso":{
	" idNivelAcessoTipoProcesso ":91428,
	"descricao":"Public"
	},
	"hipoteseLegal":{
	"id":97841,
	"nome":"Information name"
	},
	"assunto":{
	"id":97839,
	"nome":"ADM",
	"assunto":"0001 - ADM "
	},
	"interessados":[
	{
	"pessoas":{
	"id":98064,
	"nome":"Maycon"
	}
	}
	],
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	} 
```

Fields

```none
	Request:
 	  id: numeric not empty and not null
	  token: alphanumeric not empty and not null
	Response:
	  assuntoComplementar: alphanumeric not empty and not null
	  observacaoGeral: alphanumeric not empty and not null
	  dataReferencia:
	  unidade: not empty and not null;
	     id: numeric not empty and not null
	  nome: alfphanumeric not empty and not null
	  tipoProcesso: not empty and not null;
	     id: numeric not empty and not null
	  nome: alphanumeric not empty and not null
	     nivelAcesso: not empty and not null
	     idNivelAcessoTipoProcesso: numeric not empty and not null
	     descricao: alphanumeric not empty and not null
	  hipoteseLegal: not empty and not null, if the access level differs from Public.
	     id: numeric not empty and not null
	     nome: alphanumeric not empty and not null
	assunto: not empty and not null;
	     id: numeric not empty and not null
	     assunto: alphanumeric not empty and not null
	interessados: can be empty and null;
	     pessoa: not empty and not null;
	        id: numeric not empty and not null;
	        nome: : alphanumeric not empty and not null  
```
:::

### LIST PROCESS

Listing of processes to be used by a document

:::CodeblockTabs
Method

```none
	GET
```

```html
 	<CITSMART_URL>/cit-ecm-web/integracao/listProcesso
```

Request

```json
	{
	"nup":"00010.000012/2016-94",
	"token":"TGT-17-BI06OJWapCune4uamf6zUDOcyf0GNPPxjrOSDJ66ZxtcthZGhf-CITDFSRV074"
	} 
```

Response

```json
	{
	"processo":[
	{
	"id":"5252",
	"assuntoComplementar":"Complementary Subject",
	"nup":"00010.000012/2016-94",
	"status":"Complementary Subject",
	"tipoProcesso":{
	"id":97930,
	"nome":"type reserved process"
	},
	"nivelAcesso":{
	"descricao":"Público"
	},
	"assunto":{
	"id":97839,
	"nome":"ADM",
	"assunto":"0001 - ADM"
	},
	"hipoteseLegal":{
	"id":97841,
	"nome":"Information name hypothesis"
	}
	}
	]
	} 
```

Fields

```none
	Request:
 	  nup: alphanumeric may be empty or null;
	  token: alphanumeric not empty and not null
	Response:
	  id: numeric not empty and not null
	  assuntoComplementar: alphanumeric not empty and not null
	  status: alphanumeric not empty and not null
  	     CONCLUIDO: "Completed";
	     EM_ANDAMENTO: "In progress";
	     AGUARDANDO_VALIDACAO: "Waiting for Validation"
	     VALIDADO: "Validated";
	     ANEXADO: "Attached";
	  tipoProcesso: not empty and not null;
	     id: numeric not empty and not null
	     nome: alphanumeric not empty and not null
	  nivelAcesso: not empty and not null
	     idNivelAcessoTipoProcesso: numeric not empty and not null
	     descricao: alphanumeric not empty and not null
	  hipoteseLegal: not empty and not null, if the accessLevel differs from Public.
	     id: numeric not empty and not null
	     nome: alphanumeric not empty and not null
	  assunto: not empty and not null ;
	     id: numeric not empty and not null
	     assunto: alphanumeric not empty and not null
	  hipoteseLegal: not empty and not null, if the levelAccess differs from Public.
	     id: numeric not empty and not null
	     name: alphanumeric not empty and not null  
```
:::

