0

I'm trying to create an "Invoice" from a journal in the "General Journals" section in BC. From the UI I can select the Document Type "Invoice", but I can't find a way to do that via API. The only endpoint I can find to post to that section is

POST businesscentralPrefix/companies({id})/journals({id})/journalLines({id})

But you can't specify Document Type in that model

{
    "id": "GUID",
    "journalId": "GUID",
    "journalDisplayName": "string",
    "lineNumber": "integer",
    "accountType": "NAV.genJournalAccountType",
    "accountId": "GUID",
    "accountNumber": "string",
    "postingDate": "date",
    "documentNumber": "string",
    "externalDocumentNumber": "string",
    "amount": "decimal",
    "description": "string",
    "comment": "string",
    "taxCode": "string",
    "balanceAccountType": "NAV.genJournalAccountType",
    "balancingAccountId": "GUID",
    "balancingAccountNumber": "string",
    "lastModifiedDateTime": "datetime"
}

I discovered that customer payments can't be created that way either, but I have to use

POST businesscentralPrefix/companies({id})/customerPaymentJournals({id})/customerPayment({id})

and that works fine, but I can't find an alternative way to create an Invoice as a journal line anywhere. I don't want to create a "full blown" invoice with invoicelines, as the invoice is created in an external system, and I just need to register the financial part in BC

BoKDamgaard
  • 378
  • 1
  • 19

0 Answers0