How to get started

This section presents some of the most requested endpoints and their respective responses.

Creating an account

Normally, all ERP, Applications and Management Systems have multi-company, multi-client modeling, etc. Following this approach, for each client of your application, it is recommended to create an account, to segregate and isolate their respective processes, companies, files and results.

Request

url -X POST \
https://corewebapi.asisprojetos.com.br/api/v1/conta \
-H 'app-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \
-d '{
       "cargo" : "Gerente Fiscal",
       "cnpj": "64555018000134",
       "email" : "jose.silva@grupomedeiros.com",
       "nomeEmpresa" : "Grupo Medeiros",
       "nomeProprietario" : "José Silva",
       "razaoSocial" : "Grupo Medeiros LTDA"
    }'
    

Response

{
    "id": 17,
    "chave": "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb",
    "dataCriacao": "02-01-2018 16:26:05",
    "ativo" : true,
    "proprietario": {
        "id": 7654,
        "email": "jose.silva@grupomedeiros.com.br",
        "nome": "José Silva",
        "cargo": "Gerente Fiscal",
        "admin": true,
        "dataCriacao": "02-01-2018 16:26:05"
    },
    "empresa": {
        "id": 3456,
        "nome": "Grupo Medeiros",
        "cnpj": "64555018000134",
        "razaoSocial": "Grupo Medeiros LTDA",
        "dataCriacao": "02-01-2018 16:26:05"
    }
}
    

Upload

Upload files and return the process id

Request

curl -X POST \
  https://file.asisprojetos.com.br/api/v1/upload \
  -H 'account-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \
  -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
  -F 'file=@path/to/file/sped_fiscal.txt
    

Response

{"processos":[
    {
        "id":22362,
        "nome":"sped_fiscal.txt",
        "dataHoraCriacao":"06-06-2018 12:34:46",
        "arquivoId":22740
    }
]}
    

Process query

Query a process by its ID

Request

curl -X GET \
  https://corewebapi.asisprojetos.com.br/api/v1/processo/22362 \
  -H 'account-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \
  -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb'
    

Response

{
    "id":22742,
    "nome":"sped_fiscal.txt",
    "dataHoraCriacao":"06-06-2018 12:34:46",
    "dataHoraInicio":"06-06-2018 12:34:47",
    "dataHoraFim":"06-06-2018 12:35:11",
    "status":201,
    "arquivoId":22360
}
    

Process status

Possible response statuses that may occur when querying processes

DESCRIPTION STATUS
Upload completed 0
Identification Queue 1
File Available for Import. 100
Importing file 101
Import completed 200
Processing file 102
Processing completed 201
Import error 400
Processing error 500
File not identified 401
Internal Error 402

Process Query Results

Synthetic result of a process obtained by its identifier (ID)

Request

curl -X GET \
  https://resultadowebapi.asisprojetos.com.br/api/v1/resultado/processo/22362 \
  -H 'account-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \
  -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb'

    

Response

[
    {
        "diagnostico":"R",
        "codigo":538,
        "ementa":"DE ACORDO COM OS DADOS CONTIDOS NO ARQUIVO, FOI VERIFICADO A AUSÊNCIA DO CÓDIGO DA CONTA ANALÍTICA CONTÁBIL DEBITADA OU CREDITADA. FUNDAMENTO LEGAL: Ato ICMS/COTEPE Nº 9 DE 18/04/2008 - GUIA PRÁTICO DA ESCRITURAÇÃO FISCAL DIGITAL - EFD.",
        "auditoriaId":110,
        "nivel":1,
        "nome":"538 Ausência do COD_CTA Transporte",
        "qtdeResultados":355,
        "resultadoId":5541810
    },
    {
        "diagnostico":"Y",
        "codigo":2396,
        "ementa":"Identificamos a ausência de escrituração do Registro D197 no arquivo." ,
        "auditoriaId":315,
        "nivel":1,
        "nome":"2396 Alerta de Ausência de Escrituração do Registro D197",
        "qtdeResultados":1,
        "resultadoId":5541861
    },
    {
        "diagnostico":"W",
        "codigo":140,
        "ementa":"OS VALORES AQUI A APRESENTADOS DEVERÃO CORRESPONDER AO VALOR CONTÁBIL EQUIVALENTE AS ENTRADAS DE DOCUMENTOS FISCAIS.",
        "auditoriaId":83,
        "nivel":4,
        "nome":"140 Relatório Valor Contábil de Docs Fiscais de Entrada",
        "qtdeResultados":1,
        "resultadoId":5542160
    },
    {
        ...
    }
]
    

Querying process audit results

Analytical result of items from process and audit

Request

curl -X GET \
  https://resultadowebapi.asisprojetos.com.br:8082/api/v1/resultado/processo/22362/auditoria/110 \
  -H 'account-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \
  -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb'
    

Response

{
    "cabecalho":[
        "REG",
        "COD_CTA",
        "NUM_DOC",
        "DT_ENTR_SAÍDA",
        "VL_DOC",
        "COD_SIT",
        "CFOP",
        "SITUAÇÃO",
        "CHV_CTE"
    ],
    "dados":[
        [
            "D100",
            "null",
            "4034",
            "2018-02-20",
            "360.00",
            "0",
            "5353",
            "Documento regular",
            "43180223823221000165570010000040341570562539"
        ],
        [
            "D100",
            "null",
            "3975",
            "2018-02-16",
            "300.00",
            "0",
            "5353",
            "Documento regular",
            "43180223823221000165570010000039751287071250"
        ],
        [
            "D100",
            "null",
            "3875",
            "2018-02-10",
            "1325.50",
            "0",
            "5353",
            "Documento regular",
            "43180223823221000165570010000038751472150190"
        ],
        [
            "D100",
            "null",
            "3764",
            "2018-02-03",
            "200.00",
            "0",
            "5353",
            "Documento regular",
            "43180223823221000165570010000037641383359370"
        ],
        [
            "D100",
            "null",
            "3942",
            "2018-02-15",
            "100.00",
            "0",
            "5353",
            "Documento regular",
            "43180223823221000165570010000039421061629860"
        ],
        [ ... ]
    ...
    ]
}
    

Next steps

In the next section, you can explore more about available authentication Forms with the Asis API.