Sumário


Objetivo


      Esse documento tem o objetivo de exemplificar o uso da API de Lançamento e Partida utilizando todos os métodos implementados.

Recurso disponível a partir da release 12.1.2406.




1 - Campos e Parâmetros

LANÇAMENTO
CampoIdentificadorTipo
operationIdIDOPERACAOInt
reversalESTORNOBoolean
companyIdCODCOLIGADAInt
entryIdIDLANCAMENTOInt
batchCodeCODLOTEInt
descriptionDESCRICAOString
accountEntryPARTIDALista

PARTIDA (accountEntry)

Campo

IdentificadorTipo
companyIdCODCOLIGADAInt
batchCodeCODLOTEInt
entryIdIDLANCAMENTOInt
entryNumberIdIDPARTIDAInt
branchIdCODFILIALInt
branchNameNOMEFILIALString
dateDATADate
dateInclusionDATAINCLUSAODate
companyIdDebitAccountCodColDebitoInt
debitAccountCodContaDebitoString
debitDescriptionDescricaoDebitoString
companyIdCreditAccountCodColCreditoInt
creditAccountCodContaCreditoString
creditDescriptionDescricaoCreditoString
companyIdAgainstEntryCodColContraPartidaInt
valueVALORDecimal
value2VALOR2Decimal
date2DATA2Data
integrateApplicationIntegraAplicacaoString
originNewModOriginadoNovoModoInt
generationTypeTipoGeracaoString
userUsuarioString
complementaryFieldsCamposComplementaresLista
apportionmentDebitRateioDebitoLista
apportionmentCreditRateioCreditoLista
valuesCurrenciesMoedaValoresLista
apportionmentValuesCurrenciesRateioMoedasValoresLista
CamposComplementares (complementaryFields)
CampoIdentificadorTipo
codloteCODLOTEInt
lctrefLCTREFInt
idpartidaIDPARTIDAInt
idinteiroIDINTERNOInt
RateioDebito (apportionmentDebit) / RateioCredito(apportionmentCredit)
CampoIdentificadorTipo
companyIdCODCOLIGADAInt
dateDATAData
companyIdAccountManagementCODCOLCONTAInt
accountManagementInactiveATIVOInt
accountManagementCodeCODCONTAString
debitValueVALORDEBITODecimal
creditValueVALORCREDITODecimal
apportionmentIdIDRATEIOInt
entryNumberIdIDPARTIDAInt
valueVALORDecimal
percentualPERCENTUALString
MoedaValores(valuesCurrencies)
CampoIdentificadorTipo
companyIdCODCOLIGADAInt
entryNumberIdIDPARTIDAInt
currencyMOEDAString
valueVALORDecimal
RateioMoedasValores(apportionmentValuesCurrencies)
CampoIdentificadorTipo
companyIdCODCOLIGADAInt
apportionmentIdIDMULTIMOEDAInt
currencyMOEDAString
valueVALORDecimal



{
  "operationId": IDOPERACAO,
     "reversal": ESTORNO,
    "companyId": CODCOLIGADA,
      "entryId": IDLANCAMENTO,
    "batchCode": CODLOTE,
  "description": DESCRICAO,
 "accountEntry": PARTIDA
 [ {
					 	 "companyId": CODCOLIGADA,
					 	 "batchCode": CODLOTE,
					 	   "entryId": IDLANCAMENTO,
					 "entryNumberId": IDPARTIDA,
						  "branchId": CODFILIAL,
						"branchName": NOMEFILIAL,
							  "date": DATA,
					 "dateInclusion": DATAINCLUSAO,
			 "companyIdDebitAccount": CodColDebito,
					  "debitAccount": CodContaDebito,
				  "debitDescription": DescricaoDebito,
			"companyIdCreditAccount": CodColCredito,
					 "creditAccount": CodContaCredito,
				 "creditDescription": DescricaoCredito,
			 "companyIdAgainstEntry": CodColContraPartida,
							 "value": VALOR,
							"value2": VALOR2,
							 "date2": DATA2,
			  "integrateApplication": IntegraAplicacao,
				      "originNewMod": OriginadoNovoModo,
				    "generationType": TipoGeracao,
							  "user": Usuario,
               "complementaryFields": CamposComplementares 
			   {				
			   },
				   "batchCodeOrigin": CodLoteOrigem,
					   "operationId": IDOPERACAO,
				 "reversalAccountId": ReversalAccountId,
					"groupAccountId": GroupAccountId,
						 "accountId": IdCont,
					 "itemAmountRAS": QtdItem_Ras,
				"apportionmentDebit": RateioDebito
				[
				],
			   "apportionmentCredit": RateioCredito	 
			   [
			   ],
				  "valuesCurrencies": MoedaValores	 
				  [
				  ],
     "apportionmentValuesCurrencies": RateioMoedasValores
	 [
	 ]
    }
  ]
}

1 - Métodos


      Serão apresentados 5 métodos, os quais foram implementados na API de Lançamento e Partida, são eles:

1.1 - GET


1.1.1 - Get All (Recuperar todas os Lançamento e Partida)

Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}

Domínio: localhost

Porta: 8051

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6

{
    "hasNext": false,
    "items": [
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 9,
            "batchCode": 0,
            "description": "GAS",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 9,
                    "entryNumberId": 8,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2011-09-15T00:00:00-03:00",
                    "dateInclusion": "2017-09-15T11:44:42-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.892",
                    "debitDescription": "COLIG. 6 FILIAL 12",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.002",
                    "creditDescription": "Caixa Filial Rio de Janeiro",
                    "companyIdAgainstEntry": 0,
                    "value": 111.00,
                    "value2": 200.00,
                    "date2": "2011-09-15T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 8,
                        "idpartida": 8,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        },
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 10,
            "batchCode": 0,
            "description": "BLOCO K",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 10,
                    "entryNumberId": 9,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2017-04-11T00:00:00-03:00",
                    "dateInclusion": "2018-04-11T16:01:07-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.017",
                    "debitDescription": "BLOCO K 200 D",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "2.1.1.1.015",
                    "creditDescription": "200,00 C",
                    "companyIdAgainstEntry": 0,
                    "value": 200.00,
                    "value2": 400.00,
                    "date2": "2017-04-11T00:00:00-03:00",
                    "historicCode": "011",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 9,
                        "idpartida": 9,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        }
    ]
}


1.1.2 - Order (Retorna os dados ordenados)

Order: parâmetro responsável pela ordenação do resultado, podendo ser ascendente ou descendente. O resultado com a ordem descendente deve ser precedida do caractere "-" (menos).

Exemplo 1: ?order=campo1 (Ascendente)

Exemplo 2: ?order=-campo1 (Descendente)

Múltiplos campos de ordenação: ?order=[-]campo1, [-]campo2, [-]campo3 ...

Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}?order={campo}

Domínio: localhost

Porta: 8051

Campo: description

Tipo de Ordenação: Ascendente

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6?order=description

{
    "hasNext": false,
    "items": [
        {
            "id": "14|00002",
            "company": 14,
            "code": "00002",
            "description": "00002",
            "instantBalance": 0.0000,
            "databaseBalance": 0.0000,
            "cashAccountDatabase": "2020-02-19T00:00:00-03:00",
            "proprietaryCompany": 14,
            "unpaidBalance": -57378.9400,
            "currencyCode": "R$",
            "active": 1,
            "cashBookCode": "888",
            "allowOpenning": 0
        },
        {
            "id": "1|0005",
            "company": 1,
            "code": "0005",
            "description": "APLICACAO BANCO REAL",
            "instantBalance": 16620.0000,
            "databaseBalance": 120.0000,
            "cashAccountDatabase": "1999-12-15T00:00:00-03:00",
            "proprietaryCompany": 6,
            "bankNumber": "275",
            "agencyNumber": "002233",
            "accountNumber": "22200",
            "unpaidBalance": 0.0000,
            "currencyCode": "R$",
            "active": 1,
            "lastCashNumber": "1",
            "allowOpenning": 1
        },
        {
            "id": "1|0066",
            "company": 1,
            "code": "0066",
            "description": "BANCO BEMGE",
            "instantBalance": 200000.0000,
            "databaseBalance": 200000.0000,
            "cashAccountDatabase": "2015-01-09T00:00:00-03:00",
            "proprietaryCompany": 1,
            "unpaidBalance": 0.0000,
            "currencyCode": "R$",
            "active": 1,
            "branchCode": 1,
            "allowOpenning": 0
        },
        {
            "id": "1|0009",
            "company": 1,
            "code": "0009",
            "description": "BANCO BRADESCO",
            "instantBalance": 65155.2500,
            "databaseBalance": 100000.0000,
            "cashAccountDatabase": "2004-11-03T00:00:00-03:00",
            "proprietaryCompany": 1,
            "bankNumber": "237",
            "agencyNumber": "0065",
            "accountNumber": "0019284",
            "unpaidBalance": 0.0000,
            "currencyCode": "R$",
            "active": 1,
            "allowOpenning": 0
        },
        {
            "id": "1|0008",
            "company": 1,
            "code": "0008",
            "description": "BANCO DO BRASIL",
            "instantBalance": 203690.1300,
            "databaseBalance": 0.0000,
            "cashAccountDatabase": "2004-09-14T00:00:00-03:00",
            "proprietaryCompany": 1,
            "bankNumber": "001",
            "agencyNumber": "3489",
            "accountNumber": "14714",
            "unpaidBalance": 15500.0000,
            "currencyCode": "R$",
            "active": 1,
            "allowOpenning": 0
        }
    ]
}

Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}?order=[-]{campo}

Domínio: localhost

Porta: 8051

Campo: description

Tipo de Ordenação: Descendente

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6?order=-description

   {
    "hasNext": false,
    "items": [
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 9,
            "batchCode": 0,
            "description": "GAS",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 9,
                    "entryNumberId": 8,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2011-09-15T00:00:00-03:00",
                    "dateInclusion": "2017-09-15T11:44:42-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.892",
                    "debitDescription": "COLIG. 6 FILIAL 12",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.002",
                    "creditDescription": "Caixa Filial Rio de Janeiro",
                    "companyIdAgainstEntry": 0,
                    "value": 111.00,
                    "value2": 200.00,
                    "date2": "2011-09-15T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 8,
                        "idpartida": 8,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        },
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 12,
            "batchCode": 0,
            "description": "EQUIVALENCIA - AUTOMAÇÃO",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 12,
                    "entryNumberId": 14,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2011-05-07T00:00:00-03:00",
                    "dateInclusion": "2019-09-12T11:31:48-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.001",
                    "debitDescription": "Caixa Geral",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "4.1.1.1.001",
                    "creditDescription": "Vendas de Sistemas de Contabilidade",
                    "companyIdAgainstEntry": 0,
                    "value": 500000.00,
                    "value2": 1000000.00,
                    "date2": "2011-05-07T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 14,
                        "idpartida": 14,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                },
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 12,
                    "entryNumberId": 15,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2011-05-07T00:00:00-03:00",
                    "dateInclusion": "2019-09-12T11:31:48-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "3.1.1.3.001",
                    "debitDescription": "DESPESAS FINANCEIRAS",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.001",
                    "creditDescription": "Caixa Geral",
                    "companyIdAgainstEntry": 0,
                    "value": 250000.00,
                    "value2": 500000.00,
                    "date2": "2011-05-07T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 15,
                        "idpartida": 15,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        } 
	]
}


1.1.3 - Filter (Resultado filtrado)


Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}?{campo}={valor}

Domínio: localhost

Porta: 8051

Campo: entryId

Valor: 9

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6?entryId=9

{
    "hasNext": false,
    "items": [
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 9,
            "batchCode": 0,
            "description": "GAS",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 9,
                    "entryNumberId": 8,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2011-09-15T00:00:00-03:00",
                    "dateInclusion": "2017-09-15T11:44:42-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.892",
                    "debitDescription": "COLIG. 6 FILIAL 12",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.002",
                    "creditDescription": "Caixa Filial Rio de Janeiro",
                    "companyIdAgainstEntry": 0,
                    "value": 111.00,
                    "value2": 200.00,
                    "date2": "2011-09-15T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 8,
                        "idpartida": 8,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        }
    ]
}

Para realizar filtros complexos na API de Lançamento e Partida é possível adotar o padrão OData. Para entender melhor sobre a utilização desse padrão, acesse o link da documentação Utilizando filtros complexos - Exemplos do guia de API - ODATA.

1.1.4 - Paginação


Page: Página que será apresentada.

PageSize: Quantidade máxima de registros por página que serão apresentados.

Exemplo: ?page=1&pageSize=1

Valores padrão: Caso não sejam preenchidos os parâmetros evidenciados acima serão preenchidos com valores padrão.

Page: 1

PageSize: 20

Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}?page={valor1}&pageSize={valor2}

Domínio: localhost

Porta: 8051

Valor1: 1

Valor2: 3

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6?page=1&pageSize=3

{
    "hasNext": true,
    "items": [
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 9,
            "batchCode": 0,
            "description": "GAS",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 9,
                    "entryNumberId": 8,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2011-09-15T00:00:00-03:00",
                    "dateInclusion": "2017-09-15T11:44:42-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.892",
                    "debitDescription": "COLIG. 6 FILIAL 12",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.002",
                    "creditDescription": "Caixa Filial Rio de Janeiro",
                    "companyIdAgainstEntry": 0,
                    "value": 111.00,
                    "value2": 200.00,
                    "date2": "2011-09-15T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 8,
                        "idpartida": 8,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        },
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 10,
            "batchCode": 0,
            "description": "BLOCO K",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 10,
                    "entryNumberId": 9,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2017-04-11T00:00:00-03:00",
                    "dateInclusion": "2018-04-11T16:01:07-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.017",
                    "debitDescription": "BLOCO K 200 D",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "2.1.1.1.015",
                    "creditDescription": "200,00 C",
                    "companyIdAgainstEntry": 0,
                    "value": 200.00,
                    "value2": 400.00,
                    "date2": "2017-04-11T00:00:00-03:00",
                    "historicCode": "011",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 9,
                        "idpartida": 9,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        },
        {
            "operationId": 0,
            "reversal": false,
            "companyId": 6,
            "entryId": 11,
            "batchCode": 0,
            "description": "BLOCO K",
            "accountEntry": [
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 11,
                    "entryNumberId": 10,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2017-04-11T00:00:00-03:00",
                    "dateInclusion": "2018-04-11T17:06:56-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "2.1.1.1.016",
                    "debitDescription": "585,76 D",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.018",
                    "creditDescription": "585,76 C",
                    "companyIdAgainstEntry": 0,
                    "value": 585.76,
                    "value2": 1171.52,
                    "date2": "2017-04-11T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 10,
                        "idpartida": 10,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                },
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 11,
                    "entryNumberId": 11,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2017-04-11T00:00:00-03:00",
                    "dateInclusion": "2018-04-11T18:10:39-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "2.1.1.1.017",
                    "debitDescription": "1122,12 D",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.019",
                    "creditDescription": "1122,12 C",
                    "companyIdAgainstEntry": 0,
                    "value": 1122.12,
                    "value2": 2244.24,
                    "date2": "2017-04-11T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 11,
                        "idpartida": 11,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                },
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 11,
                    "entryNumberId": 12,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2017-04-11T00:00:00-03:00",
                    "dateInclusion": "2018-04-11T18:26:03-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "1.1.1.1.020",
                    "debitDescription": "6,00 D",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "2.1.1.1.018",
                    "creditDescription": "6,00 C",
                    "companyIdAgainstEntry": 0,
                    "value": 6.00,
                    "value2": 12.00,
                    "date2": "2017-04-11T00:00:00-03:00",
                    "historicCode": "011",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 12,
                        "idpartida": 12,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                },
                {
                    "companyId": 6,
                    "batchCode": 0,
                    "entryId": 11,
                    "entryNumberId": 13,
                    "branchId": 12,
                    "branchName": "ESCOLA EXEMPLO 1",
                    "date": "2017-04-11T00:00:00-03:00",
                    "dateInclusion": "2018-04-11T18:36:57-03:00",
                    "companyIdDebitAccount": 6,
                    "debitAccount": "2.1.1.1.019",
                    "debitDescription": "256,00 D",
                    "companyIdCreditAccount": 6,
                    "creditAccount": "1.1.1.1.021",
                    "creditDescription": "256,00 C",
                    "companyIdAgainstEntry": 0,
                    "value": 256.00,
                    "value2": 512.00,
                    "date2": "2017-04-11T00:00:00-03:00",
                    "integrateApplication": "C",
                    "originNewMod": 1,
                    "generationType": "O",
                    "user": "mestre",
                    "complementaryFields": {
                        "codlote": 0,
                        "lctref": 13,
                        "idpartida": 13,
                        "idinteiro": 0
                    },
                    "batchCodeOrigin": 0,
                    "userModified": "mestre",
                    "operationId": 0,
                    "reversalAccountId": 0,
                    "groupAccountId": 0,
                    "accountId": 0,
                    "itemAmountRAS": 0,
                    "apportionmentDebit": [],
                    "apportionmentCredit": [],
                    "valuesCurrencies": [],
                    "apportionmentValuesCurrencies": []
                }
            ]
        }
    ]
}

1.1.5 - Fields (Retorno de campos específicos no resultado)


Fields: parâmetro responsável pela especialização de campos em um resultado, ou seja, o usuário define quais campos serão apresentados no resultado.

Exemplo: ?fields=campo1

Múltiplos campos de ordenação: ?fields=campo1, campo2, campo3 ...

Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}?fields={campos}

Domínio: localhost

Porta: 8051

Campo 1: entryId

Campo 2: batchCode

Campo 3: description

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6?fields=entryId,batchCode,description

{
    "hasNext": false,
    "items": [
        {
            "entryId": 9,
            "batchCode": 0,
            "description": "GAS"
        },
        {
            "entryId": 10,
            "batchCode": 0,
            "description": "BLOCO K"
        },
        {
            "entryId": 11,
            "batchCode": 0,
            "description": "BLOCO K"
        },
        {
            "entryId": 12,
            "batchCode": 0,
            "description": "EQUIVALENCIA - AUTOMAÇÃO"
        },
        {
            "entryId": 13,
            "batchCode": 0,
            "description": "EQUIVALENCIA - AUTOMACAO"
        },
        {
            "entryId": 14,
            "batchCode": 50,
            "description": "Contabilização aquisição do Patrimônio 01.01.001__1"
        }
    ]
}

1.1.6 - GetOne (Recuperar Lançamento e Partida pela chave composta)


Nos parâmetros do GetOne é necessário passar uma chave composta ("id"), por isso informamos "companyId" que é o código da coligada de Lançamento que queremos selecionar, o "entryId" que é o código de Lançamento e o "batchCode" que é o código Lote, sendo eles separados pelo caractere "|" pipe.

Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}/{entryId}|{batchCode}

Domínio: localhost

Porta: 8051

companyId: 6

entryId: 9

batchCode: 0

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6/9|0

{
    "operationId": 0,
    "reversal": false,
    "companyId": 6,
    "entryId": 9,
    "batchCode": 0,
    "description": "GAS",
    "accountEntry": [
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 9,
            "entryNumberId": 8,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-09-15T00:00:00-03:00",
            "dateInclusion": "2017-09-15T11:44:42-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "1.1.1.1.892",
            "debitDescription": "COLIG. 6 FILIAL 12",
            "companyIdCreditAccount": 6,
            "creditAccount": "1.1.1.1.002",
            "creditDescription": "Caixa Filial Rio de Janeiro",
            "companyIdAgainstEntry": 0,
            "value": 111.00,
            "value2": 200.00,
            "date2": "2011-09-15T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 8,
                "idpartida": 8,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "userModified": "mestre",
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        }
    ]
}


1.2 - POST


1.2.1 - Post (Inserir um Lançamento e Partida)


Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}

Domínio: localhost

Porta: 8051

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6

{
    "operationId": 0,
    "reversal": false,
    "companyId": 6,
    "entryId": 12,
    "batchCode": 0,
    "description": "EQUIVALENCIA - AUTOMAÇÃO",
    "accountEntry": [
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 12,
            "entryNumberId": 14,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "1.1.1.1.001",
            "debitDescription": "Caixa Geral",
            "companyIdCreditAccount": 6,
            "creditAccount": "4.1.1.1.001",
            "creditDescription": "Vendas de Sistemas de Contabilidade",
            "companyIdAgainstEntry": 0,
            "value": 500000.00,
            "value2": 1000000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 14,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        },
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 12,
            "entryNumberId": 15,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "3.1.1.3.001",
            "debitDescription": "DESPESAS FINANCEIRAS",
            "companyIdCreditAccount": 6,
            "creditAccount": "1.1.1.1.001",
            "creditDescription": "Caixa Geral",
            "companyIdAgainstEntry": 0,
            "value": 250000.00,
            "value2": 500000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 15,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        }
    ]
}
{
    "operationId": 0,
    "reversal": false,
    "companyId": 6,
    "entryId": 29,
    "batchCode": 0,
    "description": "EQUIVALENCIA - AUTOMAÇÃO",
    "accountEntry": [
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 29,
            "entryNumberId": 33,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "1.1.1.1.001",
            "debitDescription": "Caixa Geral",
            "companyIdCreditAccount": 6,
            "creditAccount": "4.1.1.1.001",
            "creditDescription": "Vendas de Sistemas de Contabilidade",
            "companyIdAgainstEntry": 0,
            "value": 500000.00,
            "value2": 1000000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 31,
                "idpartida": 33,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        },
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 29,
            "entryNumberId": 34,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "3.1.1.3.001",
            "debitDescription": "DESPESAS FINANCEIRAS",
            "companyIdCreditAccount": 6,
            "creditAccount": "1.1.1.1.001",
            "creditDescription": "Caixa Geral",
            "companyIdAgainstEntry": 0,
            "value": 250000.00,
            "value2": 500000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 32,
                "idpartida": 34,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        }
    ]
}
{
    "code": "FE006",
    "message": "Chave duplicada\r\n\r\nPossíveis causas:\r\n  - inclusão de registro cujo valor da chave primária já existe\r\n  - inclusão de registro cujo valor do índice único já existe",
    "detailedMessage": null,
    "helpUrl": null,
    "details": [
        {
            "code": "Exception",
            "message": "Violation of PRIMARY KEY constraint 'PKCLCOMPL'. Cannot insert duplicate key in object 'dbo.CLCOMPL'. The duplicate key value is (6, 8).\r\nThe statement has been terminated.",
            "detailedMessage": null,
            "helpUrl": null,
            "details": [
                {
                    "code": "Exception",
                    "message": "INSERT INTO [CLCOMPL] ([CODCOLIGADA], [CODLOTE], [LCTREF], [DOCUMENTO], [DIGITADOR], [KWHORA], [DATA], [VALIDADE], [RESPONSABILIDADE], [IDPARTIDA], [RECCREATEDBY], [RECCREATEDON], [RECMODIFIEDBY], [RECMODIFIEDON], [SPEDFCONT], [IDDMPL], [IDINTEIRO]) VALUES (6, 0, 28, null, null, , null, null, null, 8, 'mestre', '26/03/2024 09:38:59', 'mestre', '26/03/2024 09:38:59', null, null, 0)",
                    "detailedMessage": null,
                    "helpUrl": null,
                    "details": null
                }
            ]
        },
        {
            "code": "Exception",
            "message": "INSERT INTO [CLCOMPL] ([CODCOLIGADA], [CODLOTE], [LCTREF], [DOCUMENTO], [DIGITADOR], [KWHORA], [DATA], [VALIDADE], [RESPONSABILIDADE], [IDPARTIDA], [RECCREATEDBY], [RECCREATEDON], [RECMODIFIEDBY], [RECMODIFIEDON], [SPEDFCONT], [IDDMPL], [IDINTEIRO]) VALUES (6, 0, 28, null, null, , null, null, null, 8, 'mestre', '26/03/2024 09:38:59', 'mestre', '26/03/2024 09:38:59', null, null, 0)",
            "detailedMessage": null,
            "helpUrl": null,
            "details": null
        }
    ]
}

1.3 - PATCH


1.3.1 - Patch (Atualização parcial de um Lançamento e Partida) (INCOMPLETO)


Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}/{entryId}|{batchCode}

Domínio: localhost

Porta: 8051

CompanyId: 6

entryId: 12

batchCode: 0

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6/12|0

{
    "operationId": 0,
    "reversal": false,
    "companyId": 6,
    "entryId": 12,
    "batchCode": 0,
    "description": "EQUIVALENCIA - AUTOMAÇÃO",
    "accountEntry": [
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 12,
            "entryNumberId": 14,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1 2",
            "debitDescription": "Caixa Geral 2 ",
            "creditDescription": "Vendas de Sistemas de Contabilidade 2"
        }
    ]
}
{
	"id": "1|TesteAPI",
    "company": 1,
    "code": "TesteAPI",
    "description": "Teste edição conta caixa",
    "instantBalance": 0.0000,
    "databaseBalance": 0.0000,
    "cashAccountDatabase": "2023-10-31T00:00:00-03:00",
    "lastNumberCheckBank": "124758",
    "proprietaryCompany": 1,
    "unpaidBalance": 0.0000,
    "currencyCode": "R$",
    "bankAccountCompany": 1,
    "userLowerLimit": 1,
    "lowerLimit": 15000.0,
    "allowOpenning": 1,
    "lastCashNumber": "00005",
    "active": 1,
    "cpmfAutomatic": 0,
    "branchCode": 1,
    "batchCode": 0,
    "refundBatchCode": 0,
    "cutoffDateBalance": 0.0000
}
{
    "Code": "FE016",
    "Message": "O Corpo da mensagem contêm valores inválidos.",
    "DetailMessage": "",
    "HelpUrl": "http://tdn.totvs.com/x/e0F0GQ",
    "Details": null
}

1.4 - PUT


1.4.1 - Put (Atualização completa de um Lançamento e Partida)


Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}/{entryId}|{batchCode}

Domínio: localhost

Porta: 8051

companyId: 6

entryId: 12

batchCode: 0

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6/12|0

{
    "operationId": 0,
    "reversal": false,
    "companyId": 6,
    "entryId": 12,
    "batchCode": 0,
    "description": "EQUIVALENCIA - AUTOMAÇÃO put",
    "accountEntry": [
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 12,
            "entryNumberId": 14,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "1.1.1.1.001",
            "debitDescription": "Caixa Geral",
            "companyIdCreditAccount": 6,
            "creditAccount": "4.1.1.1.001",
            "creditDescription": "Vendas de Sistemas de Contabilidade",
            "companyIdAgainstEntry": 0,
            "value": 500000.00,
            "value2": 1000000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 14,
                "idpartida": 14,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        },
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 12,
            "entryNumberId": 15,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "3.1.1.3.001",
            "debitDescription": "DESPESAS FINANCEIRAS",
            "companyIdCreditAccount": 6,
            "creditAccount": "1.1.1.1.001",
            "creditDescription": "Caixa Geral",
            "companyIdAgainstEntry": 0,
            "value": 250000.00,
            "value2": 500000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 15,
                "idpartida": 15,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        }
    ]
}
{
    "operationId": 0,
    "reversal": false,
    "companyId": 6,
    "entryId": 12,
    "batchCode": 0,
    "description": "EQUIVALENCIA - AUTOMAÇÃO put",
    "accountEntry": [
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 12,
            "entryNumberId": 14,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "1.1.1.1.001",
            "debitDescription": "Caixa Geral",
            "companyIdCreditAccount": 6,
            "creditAccount": "4.1.1.1.001",
            "creditDescription": "Vendas de Sistemas de Contabilidade",
            "companyIdAgainstEntry": 0,
            "value": 500000.00,
            "value2": 1000000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 14,
                "idpartida": 14,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "userModified": "mestre",
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        },
        {
            "companyId": 6,
            "batchCode": 0,
            "entryId": 12,
            "entryNumberId": 15,
            "branchId": 12,
            "branchName": "ESCOLA EXEMPLO 1",
            "date": "2011-05-07T00:00:00-03:00",
            "dateInclusion": "2019-09-12T11:31:48-03:00",
            "companyIdDebitAccount": 6,
            "debitAccount": "3.1.1.3.001",
            "debitDescription": "DESPESAS FINANCEIRAS",
            "companyIdCreditAccount": 6,
            "creditAccount": "1.1.1.1.001",
            "creditDescription": "Caixa Geral",
            "companyIdAgainstEntry": 0,
            "value": 250000.00,
            "value2": 500000.00,
            "date2": "2011-05-07T00:00:00-03:00",
            "integrateApplication": "C",
            "originNewMod": 1,
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 15,
                "idpartida": 15,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "userModified": "mestre",
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        }
    ]
}
{
    "code": "FE013",
    "message": "Os campos que compõem a chave primária não podem ser diferentes dos informados na requisição.",
    "detailedMessage": "",
    "helpUrl": "",
    "details": null
}
{
    "code": "FE019",
    "message": "Erro durante a requisição de alteração do registro. A partida não foi incluída, pois a Conta Contábil 1.1.1.1.00 da Coligada 6 não foi encontrada no plano de Contas",
    "detailedMessage": null,
    "helpUrl": null,
    "details": null
}
{
    "code": "FE016",
    "message": "O campo \"companyId - Código da Coligada\" deve ser preenchido no Lançamento e na Partida.",
    "detailedMessage": "",
    "helpUrl": "",
    "details": null
}
{
    "code": "FE006",
    "message": "Chave duplicada\r\n\r\nPossíveis causas:\r\n  - inclusão de registro cujo valor da chave primária já existe\r\n  - inclusão de registro cujo valor do índice único já existe",
    "detailedMessage": null,
    "helpUrl": null,
    "details": [
        {
            "code": "Exception",
            "message": "Violation of PRIMARY KEY constraint 'PKCLCOMPL'. Cannot insert duplicate key in object 'dbo.CLCOMPL'. The duplicate key value is (6, 14).\r\nThe statement has been terminated.",
            "detailedMessage": null,
            "helpUrl": null,
            "details": [
                {
                    "code": "Exception",
                    "message": "INSERT INTO [CLCOMPL] ([CODCOLIGADA], [CODLOTE], [LCTREF], [DOCUMENTO], [DIGITADOR], [KWHORA], [DATA], [VALIDADE], [RESPONSABILIDADE], [IDPARTIDA], [RECCREATEDBY], [RECCREATEDON], [RECMODIFIEDBY], [RECMODIFIEDON], [SPEDFCONT], [IDDMPL], [IDINTEIRO]) VALUES (6, 0, 33, null, null, , null, null, null, 14, 'mestre', '26/03/2024 11:02:14', 'mestre', '26/03/2024 11:02:14', null, null, 0)",
                    "detailedMessage": null,
                    "helpUrl": null,
                    "details": null
                }
            ]
        },
        {
            "code": "Exception",
            "message": "INSERT INTO [CLCOMPL] ([CODCOLIGADA], [CODLOTE], [LCTREF], [DOCUMENTO], [DIGITADOR], [KWHORA], [DATA], [VALIDADE], [RESPONSABILIDADE], [IDPARTIDA], [RECCREATEDBY], [RECCREATEDON], [RECMODIFIEDBY], [RECMODIFIEDON], [SPEDFCONT], [IDDMPL], [IDINTEIRO]) VALUES (6, 0, 33, null, null, , null, null, null, 14, 'mestre', '26/03/2024 11:02:14', 'mestre', '26/03/2024 11:02:14', null, null, 0)",
            "detailedMessage": null,
            "helpUrl": null,
            "details": null
        }
    ]
}

1.5 - DELETE


1.5.1 - Delete (Exclui um Lançamento e Partida)


Máscara de Url: http://{domínio}:{porta}/api/ctb/v1/AccountingEntries/{companyId}/{entryId}|{batchCode}

Domínio: localhost

Porta: 8051

companyId: 6

entryId: 13

batchCode: 0

Url Utilizada: http://localhost:8051/api/ctb/v1/AccountingEntries/6/13|0

Obs.: Em caso de sucesso, será retornado o respondeCode = 204 e a resposta em branco.

{
    "code": "FE011",
    "message": "Registro não encontrado na base de dados.",
    "detailedMessage": "",
    "helpUrl": "",
    "details": null
}