Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Informações
iconfalse
titlePost

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

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8051

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

Informações
iconfalse
titleExemplo de Entrada
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "reversal": false,
    "companyId": 6,
    "entryId": 12,
    "batchCode": 0,
    "userId": "mestre",
    "description": "EQUIVALENCIA - AUTOMAÇÃO put",
    "accountEntry": [
        {
            "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",
            "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": []
        },
        {
            "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",
            "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": []
        }
    ]
}
Informações
iconfalse
titleExemplo de Resultado Positivo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "reversal": false,
    "companyId": 6,
    "entryId": 30,
    "batchCode": 0,
    "description": "EQUIVALENCIA - AUTOMAÇÃO",
    "accountEntry": [
        {
            "entryNumberId": 37,
            "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",
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 35,
                "idpartida": 37,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        },
        {
            "entryNumberId": 38,
            "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",
            "generationType": "O",
            "user": "mestre",
            "complementaryFields": {
                "codlote": 0,
                "lctref": 36,
                "idpartida": 38,
                "idinteiro": 0
            },
            "batchCodeOrigin": 0,
            "operationId": 0,
            "reversalAccountId": 0,
            "groupAccountId": 0,
            "accountId": 0,
            "itemAmountRAS": 0,
            "apportionmentDebit": [],
            "apportionmentCredit": [],
            "valuesCurrencies": [],
            "apportionmentValuesCurrencies": []
        }
    ]
}
Informações
iconfalse
titleExemplo de Resultado Negativo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "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
        }
    ]
}

2.3 - PATCH

...

2.3.1 - Patch (Atualização parcial de um Lançamento e Partida

...

...

Informações
iconfalse
titlePatch

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

Informações
iconfalse
titleExemplo de Configuração

Domínio: localhost

Porta: 8051

CompanyId: 6

entryId: 12

batchCode: 0

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

Informações
iconfalse
titleExemplo de Entrada
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "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"
        }
    ]
}
Informações
iconfalse
titleExemplo de Resultado Positivo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "reversal": false,
    "companyId": 6,
    "entryId": 12,
    "batchCode": 0,
    "description": "EQUIVALENCIA - AUTOMAÇÃO",
    "accountEntry": [
        {
            "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",
            "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": []
        },
        {
            "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",
            "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": []
        }
    ]
}
Informações
iconfalse
titleExemplo de Resultado Negativo
Expandir
titleVer resultado JSON...
Bloco de código
languagejs
firstline1
titleResultado (JSON)
linenumberstrue
{
    "Code": "FE016",
    "Message": "O Corpo da mensagem contêm valores inválidos.",
    "DetailMessage": "",
    "HelpUrl": "http://tdn.totvs.com/x/e0F0GQ",
    "Details": null
}

...