# Billing API

The **Billing API** allows you to interact with the billing features of the Marketplace Platform programmatically. The API centralizes billing workflow, allowing you to fully automate your financial operations.&#x20;

With this API, you can create, update, retrieve, and manage financial documents through secure endpoints. The documents include invoices, credit memos, statements, journals, and custom ledgers. The API also includes endpoints for managing journal and invoice attachments.

## Core Concepts

The Billing API is built around the following core resources:

* **Credit memo** - Represents credit memos within the ERP system.
* **Custom ledger** - Represents a ledger generated by the `rating` function within the context of a specific seller. Each ledger is derived from the corresponding entries recorded in the journal.
* **Invoice** - Represents an `invoice` created in the ERP system.
* **Invoice line** - Represents a record of `invoice` generated in the ERP system.
* **Journal** - Represents the journal object, associated with the `authorization` and is generated by vendors using the raw data obtained from their services.
* **Journal charge** - Represents individual charges within a `journal`.
* **Journal attachment** - Represents files attached to journals.
* **Override** - Makes a client eligible for manual billing, bypassing the automated billing process. Assigning an `override` indicates that the client’s billing requires flexibility and will be processed manually.
* **Statement** - Represents billing entries generated within the context of a specific `agreement`, based on the corresponding `ledger`.

## Collections

The API is organized into collections, each containing a set of operations. Access to these operations varies by role, depending on whether you are a `client`, `vendor`, or `operations` user.&#x20;

Refer to the following capability matrix to see which roles are authorized to perform specific operations within each collection:

### Credit Memo <a href="#ledger-charges" id="ledger-charges"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List credit memo lines</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Get credit memo line</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>List credit memo attachments</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Get credit memo attachment</td><td>✅</td><td>❌</td><td>✅</td></tr></tbody></table>

### Custom Ledgers <a href="#ledger-charges" id="ledger-charges"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="132">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List custom ledgers</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get custom ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Create custom ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Update custom ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Delete custom ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Upload charges for custom ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Submit custom ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>List custom ledger charges</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get custom ledger charge</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get a file with custom ledger charges</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>List custom ledger attachments</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get custom ledger attachment</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Create custom ledger attachment</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Delete custom ledger attachment</td><td>❌</td><td>❌</td><td>✅</td></tr></tbody></table>

### Invoice <a href="#ledger-charges" id="ledger-charges"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List invoices</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Get invoice</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Update invoice</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>List invoice lines</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Get invoice line</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>List invoice attachments</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Get invoice attachment</td><td>✅</td><td>❌</td><td>✅</td></tr></tbody></table>

### Journal <a href="#journals-collection" id="journals-collection"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List journals</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Get journal</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Create journal</td><td>❌</td><td>✅</td><td>❌</td></tr><tr><td>Delete journal</td><td>❌</td><td>✅</td><td>❌</td></tr><tr><td>Update journal</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Upload journal charges</td><td>❌</td><td>✅</td><td>❌</td></tr><tr><td>Submit journal</td><td>❌</td><td>✅</td><td>❌</td></tr><tr><td>Regenerate journal</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Inquire journal</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Accept journal</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Complete journal</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get sellers for a journal</td><td>❌</td><td>✅</td><td>✅</td></tr></tbody></table>

### Journal Charges <a href="#journal-charges" id="journal-charges"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List journal charges</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Get journal charge</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Get a file with journal charges</td><td>❌</td><td>✅</td><td>✅</td></tr></tbody></table>

### Journal Attachments

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List journal attachments</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Get journal attachment</td><td>❌</td><td>✅</td><td>✅</td></tr><tr><td>Create journal attachment</td><td>❌</td><td>✅</td><td>❌</td></tr><tr><td>Delete journal attachment</td><td>❌</td><td>✅</td><td>❌</td></tr></tbody></table>

### Ledgers <a href="#ledgers-collection" id="ledgers-collection"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List ledgers</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Update ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Regenerate ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Accept ledger</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>List ledger charges</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get ledger charge</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get a file with ledger charges</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>List ledger attachments</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get ledger attachment</td><td>❌</td><td>❌</td><td>✅</td></tr></tbody></table>

### Overrides <a href="#ledger-charges" id="ledger-charges"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List overrides</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Get override</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Create override</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Update override</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Disable override</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Enable override</td><td>❌</td><td>❌</td><td>✅</td></tr></tbody></table>

### Statement <a href="#ledger-charges" id="ledger-charges"></a>

<table><thead><tr><th width="328">Capability</th><th width="155">Client</th><th width="130">Vendor</th><th>Operations</th></tr></thead><tbody><tr><td>List statements</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Get statement</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Retry sending a statement to ERP</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Regenerate statement</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>Cancel statement</td><td>❌</td><td>❌</td><td>✅</td></tr><tr><td>List statement charges</td><td>✅</td><td>❌</td><td>✅</td></tr><tr><td>Get statement charge</td><td>✅</td><td>❌</td><td>✅</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform.softwareone.com/developer-resources/rest-api/billing-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
