API: Invoice Creator

The lease endpoint is used to create invoices.

Tip: For the most current and complete API information in Property Lease Management, run the following GET command.

Copy
GET Metadata for PLM
GET https://api.businesscentral.dynamics.com/v2.0/dd24e63d-2131-4bd0-bdd5-570c473ba440/api/binarystream/plm/v1.0/$metadata

When to Use

As a best practice, use this endpoint for Creating Invoices, Charges, Terms, and Lines can be added to the leases using other API endpoints.

API Setup information
API Setup information
PLM Lease API
Object ID: 70701747
Collection:

bssiPLMInvoiceCreator

At least one of these fields is required:

  • BssiLeaseNo

  • BssiAccountNo

  • BssiChargeNo

\The following pages are affected by this resource: 

Create Invoices for a Specific Lease

Creates an invoice with the header information.

Request: 

  • POST / BssiPLMInvoiceCreator

 

Create Invoices for Specific Customer/Vendor

Request: 

  • POST / BssiPLMInvoiceCreator

Note icon. Note: If you define the AccountNo, then you will also need to define LeaseType.

API Request Examples
Request Examples
ODATA V4 example:

POST https://api.businesscentral.dynamics.com/v2.0/dd24e63d-2131-4bd0-bdd5-570c473ba440/ODataV4/Company('CRONUS%20USA%2C%20Inc.')/ BssiPLMInvoiceCreator

Select Copy to copy the sample to the clipboard.

Note icon. Note: Use the FireFox web browser when selecting Copy to ensure that the tab spaces in the code are copied correctly. With other web browsers, the tab spaces are copied as non-breaking spaces, which can cause the code to fail.

Request (json):

Sample Body:

{

"BssiAccountNo": "40000",

"BssiLeaseType": "Revenue",

"BssiToDate": “12/31/2021",

"BssiInvoiceDate": "2024-12-31",

"BssiPostingOption": "CreateInvoice"

}

 

Sample Return:

{

"@odata.context": http://bcauto220529-default:7048/BC/ODataV4/$metadata#Company('CRONUS%20USA%2C%20Inc.')/BssiPLMInvoiceCreator/$entity,

"@odata.etag": "W/\"JzE5OzkyNDE3MTIzODYzODI2MDY1MDcxOzAwOyc=\"",

"SystemId": "00000000-0000-0000-0000-000000000000",

"BssiLeaseType": "Revenue",

"BssiConsolidate": false,

"BssiFromDate": "0001-01-01",

"BssiToDate": "2021-12-31",

"BssiInvoiceDate": "2021-12-31",

"BssiPostingOption": "Post Invoice(s)",

"BssiJournalTemplate": "",

"BssiJournalBatch": "",

"BssiEmailLogFile": false,

"BssiRecipientEmailAddress": "",

"BssiLeaseNo": "",

"BssiLineNo": 0,

"BssiAccountNo": "40000",

"BssiChargeNo": "",

"BssiProcessResult": "Success",

"BssiDocumentNo": "PS-INV103388"

}

 

Create Invoices for Specific Charges

Request:

• POST // BssiPLMInvoiceCreator

 

API Request Examples
Request Examples
ODATA V4 example:

POST https://api.businesscentral.dynamics.com/v2.0/dd24e63d-2131-4bd0-bdd5-570c473ba440/ODataV4/Company('CRONUS%20USA%2C%20Inc.')/ BssiPLMInvoiceCreator

 

Sample Body:

{

"BssiAccountNo": "20000",

"BssiLeaseType": "Expense",

"BssiChargeNo": "5642",

"BssiConsolidate": true,

"BssiToDate": "2020-12-31",

"BssiInvoiceDate": "2021-12-31",

"BssiPostingOption": "CreateInvoice"

}

 

Sample Return:

{

"@odata.context": http://bcauto220529-default:7048/BC/ODataV4/$metadata#Company('CRONUS%20USA%2C%20Inc.')/BssiPLMInvoiceCreator/$entity,

"@odata.etag": "W/\"JzE5OzYxMjY5Mjk5NTMyOTA1ODAyNTcxOzAwOyc=\"",

"SystemId": "00000000-0000-0000-0000-000000000000",

"BssiLeaseType": "Expense",

"BssiConsolidate": true,

"BssiFromDate": "0001-01-01",

"BssiToDate": "2020-12-31",

"BssiInvoiceDate": "2021-12-31",

"BssiPostingOption": "Create Invoice(s)",

"BssiJournalTemplate": "",

"BssiJournalBatch": "",

"BssiEmailLogFile": false,

"BssiRecipientEmailAddress": "",

"BssiLeaseNo": "",

"BssiLineNo": 0,

"BssiAccountNo": "20000",

"BssiChargeNo": "5642",

"BssiProcessResult": "Success",

"BssiDocumentNo": "107482"

}