API: Billing Schedule

Billing schedule endpoints are used to retrieve, create, modify, or delete billing schedules and billing schedule lines.

Tip: For the most current and complete API information in Subscription Billing, run the following GET command.

Copy
GET Metadata for Billing Schedules
GET https://api.businesscentral.dynamics.com/v2.0/dd24e63d-2131-4bd0-bdd5-570c473ba440/api/binarystream/arcb/beta/$metadata

When to Use

As a best practice, use these endpoints for creating billing schedules and their associated lines. While it's possible to publish the base pages through web services, some functionality might be missed.

Never integrate the billing schedule details directly. Instead, update the lines to ensure the details are recalculated. Usage details are updated through a separate API endpoint.

API Setup information
SBS ARCB Billing Schedule API
Object ID: 23065865
Collection: BillingSchedules
SBS ARCB Billing Schedule Lines API
Object ID: 23065866
Collection: bssiBillingSchlines
SBS ARCB Billing Schedule Lines with Deferral API
Object ID: 23065969
Collection: BillingSchedulesLineWithDeferral

The following pages are affected by this resource:

List All Billing Schedules

Displays the header information from multiple billing schedules.

  • Use the $expand URL parameter to also display line information.
  • Use the $filter URL parameter to add a query to the request.

Request: 

  • GET /BillingSchedules
  • GET /BillingSchedules?$expand=bssiBillingSchlines
  • GET /BillingSchedules?$filter=BssiStatus eq 'Active'

 

Display Specific Billing Schedule Information

Displays the header information for a specific billing schedule.

  • Use the $expand URL parameter to also display line information for that schedule.

Request: 

  • GET /BillingSchedules('{BillingScheduleNumber}')
  • GET /BillingSchedules('{BillingScheduleNumber}')?$expand=bssiBillingSchlines
  • where {BillingScheduleNumber} is the identifier of a specific billing schedule

Create Billing Schedule

Creates a billing schedule header. Lines can be included in the request by using the bssiBillingSchlines collection in the request body. Lines can also be attached separately with another API request. When using the Odata endpoint, the schedule number must be specified because web services does not support automatic numbering.

Request: 

  • POST /BillingSchedules

Attach a New Billing Schedule Line to a Specific Billing Schedule

Creates a billing schedule line on a specific billing schedule. When using the OData endpoint, you must specify both the BillingScheduleNumber and LineNo fields in the body because web services does not support automatic number series.

Request: 

  • POST /BillingSchedules('{BillingScheduleNumber}')/bssiBillingSchlines
    • where {BillingScheduleNumber} is the identifier of a specific billing schedule

Modify a Billing Schedule Header

Modifies one or more fields on a specific billing schedule header.

Request: 

  • PATCH /BillingSchedules('{BillingScheduleNumber}')
    • where {BillingScheduleNumber} is the identifier of a specific billing schedule
    • when modifying a record, you must first retrieve the record to use the "@odata.etag" value in the If-Match header

Modify a Billing Schedule Line

Modifies one or more fields on a specific billing schedule line.

Request: 

  • PATCH /BillingSchedules('{BillingScheduleNumber}')/bssiBillingSchlines({LineNo})
    • where {BillingScheduleNumber} is the identifier of a specific billing schedule
    • where {LineNo} is the identifier of a specific line on the selected billing schedule
    • when modifying a record, you must first retrieve the record to use the "@odata.etag" value in the If-Match header

Note: A new field called BssiArcbProRatePartialPeriod has been added to the Billing Schedule Line APIs. If this field is used during an Insert request, then Its value will be set from the API otherwise It will be defaulted from Billing Schedule Header.

 

Delete a Billing Schedule

Removes a specific billing schedule (header and lines).

Request: 

  • DELETE /BillingSchedules('{BillingScheduleNumber}')
    • where {BillingScheduleNumber} is the identifier of a specific billing schedule
    • when deleting a record, you must first retrieve the record to use the "@odata.etag" value in the If-Match header

Delete a Billing Schedule Line

Removes a specific billing schedule line.

Request: 

  • `DELETE /BillingSchedules('{BillingScheduleNumber}')/bssiBillingSchlines({LineNo})`
    • where {BillingScheduleNumber} is the identifier of a specific billing schedule
    • where {LineNo} is the identifier of a specific line on the selected billing schedule
    • when deleting a record, you must first retrieve the record to use the "@odata.etag" value in the If-Match header