> For the complete documentation index, see [llms.txt](https://docs.platform.softwareone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.platform.softwareone.com/developer-resources/rest-api/billing-api.md).

# Billing API

The **Billing API** lets you interact with the Marketplace Platform's billing features programmatically. The API centralizes billing workflow, allowing you to automate your financial operations fully.

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.

## Before you start

Review the shared API docs before you work with billing resources.

* [Authentication](/developer-resources/rest-api.md)
* [URL structure](/developer-resources/api-usage-and-reference/url-structure.md)
* [Error handling](/developer-resources/api-usage-and-reference/errors-handling.md)

## Core resources

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` 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` . A journal is generated by vendors using 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`.

## Browse 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.

Use the following links to jump to the collection you need:

* [Credit Memo](#credit-memo)
* [Custom Ledgers](#custom-ledgers)
* [Invoices](#invoices)
* [Journals](#journals)
* [Journal Charges](#journal-charges)
* [Journal Attachments](#journal-attachments)
* [Ledgers](#ledgers)
* [Overrides](#overrides)
* [Statements](#statements)

### Credit Memo

<details>

<summary>View Credit Memo operations</summary>

| Operation                                                                                                               | Method | Description                                          | Access      |
| ----------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------- | ----------- |
| [Create credit memo](/developer-resources/rest-api/billing-api/credit-memo/create-credit-memo.md)                       | POST   | Create a credit memo.                                |             |
| [List credit memos](/developer-resources/rest-api/billing-api/credit-memo/list-credit-memos.md)                         | GET    | Retrieves the credit memo collection.                | client, ops |
| [Get credit memo](/developer-resources/rest-api/billing-api/credit-memo/get-credit-memo.md)                             | GET    | Retrieves a credit memo by ID.                       | client, ops |
| [Update credit memo](/developer-resources/rest-api/billing-api/credit-memo/update-credit-memo.md)                       | PUT    | Updates properties of a credit memo.                 | client, ops |
| [Create credit memo attachment](/developer-resources/rest-api/billing-api/credit-memo/create-credit-memo-attachment.md) | POST   | Creates a credit memo attachement.                   |             |
| [List credit memo attachments](/developer-resources/rest-api/billing-api/credit-memo/list-credit-memo-attachments.md)   | GET    | Retrieves the list of attachments for a credit memo. | client, ops |
| [Get credit memo attachment](/developer-resources/rest-api/billing-api/credit-memo/get-credit-memo-attachment.md)       | GET    | Retrieves a specific credit memo attachment by ID.   | client, ops |
| [Update credit memo attachment](/developer-resources/rest-api/billing-api/credit-memo/update-credit-memo-attachment.md) | PUT    | Updates a credit memo attachement.                   | client, ops |
| [Delete credit memo attachment](/developer-resources/rest-api/billing-api/credit-memo/delete-credit-memo-attachment.md) |        | Deletes a credit memo attachment                     | client, ops |

</details>

### Custom Ledgers

<details>

<summary>View Custom Ledgers operations</summary>

| Operation                                                                                                                            | Method | Description                                                                                 | Access |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------ | ------------------------------------------------------------------------------------------- | ------ |
| [Create custom ledger](/developer-resources/rest-api/billing-api/custom-ledger-object/create-custom-ledger.md)                       | POST   | Creates a custom ledger                                                                     | ops    |
| [List custom ledgers](/developer-resources/rest-api/billing-api/custom-ledger-object/list-custom-ledgers.md)                         | GET    | Retrieves the custom ledgers collection                                                     | ops    |
| [Get custom ledger](/developer-resources/rest-api/billing-api/custom-ledger-object/get-custom-ledger.md)                             | GET    | Retrieves a custom ledger by ID                                                             | ops    |
| [Update custom ledger](/developer-resources/rest-api/billing-api/custom-ledger-object/update-custom-ledger.md)                       | PUT    | Updates properties of a custom ledger                                                       | ops    |
| [Delete custom ledger](/developer-resources/rest-api/billing-api/custom-ledger-object/delete-custom-ledger.md)                       | DELETE | Deletes a custom ledger                                                                     | ops    |
| [Upload charges](/developer-resources/rest-api/billing-api/custom-ledger-object/upload-charges-for-custom-ledger.md)                 | POST   | Uploads a file with charges; validation starts automatically                                | ops    |
| [Accept custom ledger](/developer-resources/rest-api/billing-api/custom-ledger-object/accept-custom-ledger.md)                       | POST   | Transitions custom ledger to Accepted status, finalizing charges and generating statements. | ops    |
| [List custom ledger charges](/developer-resources/rest-api/billing-api/custom-ledger-object/list-custom-ledger-charges.md)           | GET    | Returns list of all charges for the custom ledger.                                          | ops    |
| [Get custom ledger charge](/developer-resources/rest-api/billing-api/custom-ledger-object/get-custom-ledger-charge.md)               | GET    | Returns a specific charge by ID that exists in the custom ledger.                           | ops    |
| [Create custom ledger attachment](/developer-resources/rest-api/billing-api/custom-ledger-object/create-custom-ledger-attachment.md) | POST   | Creates a custom ledger attachment, uploading a file.                                       | ops    |
| [List custom ledger attachments](/developer-resources/rest-api/billing-api/custom-ledger-object/list-custom-ledger-attachments.md)   | GET    | Retrieves the list of attachments for the custom ledger.                                    | ops    |
| [Get custom ledger attachment](/developer-resources/rest-api/billing-api/custom-ledger-object/get-custom-ledger-attachment.md)       | GET    | Retrieves a specific custom ledger attachment by ID.                                        | ops    |
| [Delete custom ledger attachment](/developer-resources/rest-api/billing-api/custom-ledger-object/delete-custom-ledger-attachment.md) | DELETE | Deletes a custom ledger attachment.                                                         | ops    |

</details>

### Invoices

<details>

<summary>View Invoices operations</summary>

| Operation                                                                                                   | Method | Description                                                       | Access      |
| ----------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------- | ----------- |
| [List invoices](/developer-resources/rest-api/billing-api/invoice/list-invoices.md)                         | GET    | Retrieves the invoices collection.                                | client, ops |
| [Get invoice](/developer-resources/rest-api/billing-api/invoice/get-invoice.md)                             | GET    | Retrieves an invoice by ID.                                       | client, ops |
| [Update invoice](/developer-resources/rest-api/billing-api/invoice/update-invoice.md)                       | PUT    | Updates properties of an invoice.                                 | client, ops |
| [Create invoice attachment](/developer-resources/rest-api/billing-api/invoice/create-invoice-attachment.md) | POST   | Create an invoice attachment.                                     |             |
| [List invoice attachments](/developer-resources/rest-api/billing-api/invoice/list-invoice-attachments.md)   | GET    | Retrieves the list of attachments for an invoice.                 | client, ops |
| [Get invoice attachment](/developer-resources/rest-api/billing-api/invoice/get-invoice-attachment.md)       | GET    | Retrieves a specific invoice attachment by ID.                    | client, ops |
| [Delete invoice attachment](/developer-resources/rest-api/billing-api/invoice/delete-invoice-attachment.md) | DELETE | Deletes an invoice attachment.                                    |             |
| List of Invoice lines                                                                                       | GET    | Returns a list of all invoice lines for the invoice.              | client, ops |
| Get an invoice line                                                                                         | GET    | Returns a specific invoice line by ID that exists in the invoice. | client, ops |

</details>

### Journals

<details>

<summary>View Journals operations</summary>

| Operation                                                                                             | Method | Description                                                           | Access      |
| ----------------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------- | ----------- |
| [Create journal](/developer-resources/rest-api/billing-api/journal/create-journal.md)                 | POST   | Creates a journal.                                                    | vendor      |
| [List journals](/developer-resources/rest-api/billing-api/journal/list-journals.md)                   | GET    | Retrieves the journals collection.                                    | vendor, ops |
| [Get journal](/developer-resources/rest-api/billing-api/journal/get-journal.md)                       | GET    | Retrieves a journal by ID.                                            | vendor, ops |
| [Update journal](/developer-resources/rest-api/billing-api/journal/update-journal.md)                 | PUT    | Updates properties of a journal.                                      | vendor, ops |
| [Delete journal](/developer-resources/rest-api/billing-api/journal/delete-journal.md)                 | DELETE | Deletes a journal; vendor can delete before submission.               | vendor      |
| [Upload journal charges](/developer-resources/rest-api/billing-api/journal/upload-journal-charges.md) | POST   | Uploads a file with journal charges; validation starts automatically. | vendor      |
| [Submit journal](/developer-resources/rest-api/billing-api/journal/submit-journal.md)                 | POST   | Submits a journal for SWO review; moves status to Review.             | vendor      |
| [Regenerate journal](/developer-resources/rest-api/billing-api/journal/regenerate-journal.md)         | POST   | Regenerates a journal while in Review status.                         | ops         |
| [Enquire journal](/developer-resources/rest-api/billing-api/journal/inquire-journal.md)               | POST   | Moves journal to Inquiring status while in Review.                    | ops         |
| [Accept journal](/developer-resources/rest-api/billing-api/journal/accept-journal.md)                 | POST   | Moves journal to Accepted status while in Review.                     | ops         |
| Complete journal                                                                                      | POST   | Moves journal to Completed status.                                    | ops         |
| [Get journal sellers](/developer-resources/rest-api/billing-api/journal/get-sellers-for-a-journal.md) | GET    | Retrieves distinct sellers derived from journal charges.              | vendor, ops |

</details>

### Journal Charges

<details>

<summary>View Journal Charges operations</summary>

| Operation                                                                                                 | Method | Description                                                 | Access      |
| --------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------- | ----------- |
| [List journal charges](/developer-resources/rest-api/billing-api/journal-charges/list-journal-charges.md) | GET    | Returns list of all charges for the journal.                | vendor, ops |
| [Get journal charge](/developer-resources/rest-api/billing-api/journal-charges/get-journal-charge.md)     | GET    | Returns a specific charge by ID that exists in the journal. | vendor, ops |

</details>

### Journal Attachments

<details>

<summary>View Journal Attachments operations</summary>

| Operation                                                                                                              | Method | Description                                                                    | Access      |
| ---------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------ | ----------- |
| [Create journal attachment](/developer-resources/rest-api/billing-api/journal-attachment/create-journal-attachment.md) | POST   | Creates a journal attachment, uploading a file or specifying an external link. | vendor      |
| [List journal attachments](/developer-resources/rest-api/billing-api/journal-attachment/list-journal-attachements.md)  | GET    | Retrieves the list of attachments for the journal.                             | vendor, ops |
| [Get journal attachment](/developer-resources/rest-api/billing-api/journal-attachment/get-journal-attachment.md)       | GET    | Retrieves a specific journal attachment by ID.                                 | vendor, ops |
| [Delete journal attachment](/developer-resources/rest-api/billing-api/journal-attachment/delete-journal-attachment.md) | DELETE | Deletes a journal attachment.                                                  | vendor      |

</details>

### Ledgers

<details>

<summary>View Ledgers operations</summary>

| Operation                                                                                                | Method | Description                                                | Access |
| -------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------- | ------ |
| [List ledgers](/developer-resources/rest-api/billing-api/ledger/list-ledgers.md)                         | GET    | Retrieves the ledgers collection.                          | ops    |
| [Get ledger](/developer-resources/rest-api/billing-api/ledger/get-ledger.md)                             | GET    | Retrieves a ledger by ID.                                  | ops    |
| [Update ledger](/developer-resources/rest-api/billing-api/ledger/update-ledger.md)                       | PUT    | Updates properties of a ledger.                            | ops    |
| [Recalculate ledger](/developer-resources/rest-api/billing-api/ledger/recalculate-ledger.md)             | POST   | Recalculates a ledger.                                     | ops    |
| [Accept ledger](/developer-resources/rest-api/billing-api/ledger/accept-ledger.md)                       | POST   | Accepts a ledger.                                          | ops    |
| [List ledger charges](/developer-resources/rest-api/billing-api/ledger/list-ledger-charges.md)           | GET    | Returns list of all charges for the ledger.                | ops    |
| [Get ledger charge](/developer-resources/rest-api/billing-api/ledger/get-ledger-charge.md)               | GET    | Returns a specific charge by ID that exists in the ledger. | ops    |
| [Create ledger attachment](/developer-resources/rest-api/billing-api/ledger/create-ledger-attachment.md) | POST   | Creates a ledger attachment.                               | ops    |
| [List ledger attachments](/developer-resources/rest-api/billing-api/ledger/list-ledger-attachments.md)   | GET    | Retrieves the list of attachments for a ledger.            | ops    |
| [Get ledger attachment](/developer-resources/rest-api/billing-api/ledger/get-ledger-attachment.md)       | GET    | Retrieves a specific ledger attachment by ID.              | ops    |
| [Update ledger attachment](/developer-resources/rest-api/billing-api/ledger/update-ledger-attachment.md) | PUT    | Updates a ledger attachment.                               | ops    |
| [Delete ledger attachment](/developer-resources/rest-api/billing-api/ledger/delete-ledger-attachment.md) | DELETE | Deletes a specific ledger attachment by ID.                | ops    |

</details>

### Overrides

<details>

<summary>View Overrides operations</summary>

| Operation                                                                                | Method | Description                             | Access |
| ---------------------------------------------------------------------------------------- | ------ | --------------------------------------- | ------ |
| [Create override](/developer-resources/rest-api/billing-api/override/create-override.md) | POST   | Creates an override.                    | ops    |
| [List overrides](/developer-resources/rest-api/billing-api/override/list-overrides.md)   | GET    | Retrieves the overrides collection.     | ops    |
| [Get override](/developer-resources/rest-api/billing-api/override/get-override.md)       | GET    | Retrieves an override by ID.            | ops    |
| [Update override](/developer-resources/rest-api/billing-api/override/update-override.md) | PUT    | Updates properties of an override.      | ops    |
| Disable override                                                                         | POST   | Disables an override.                   | ops    |
| Enable override                                                                          | POST   | Enables a previously disabled override. | ops    |

</details>

### Statements

<details>

<summary>View Statements operations</summary>

| Operation                                                                                                         | Method | Description                                                  | Access      |
| ----------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------ | ----------- |
| [List statements](/developer-resources/rest-api/billing-api/statement/list-statements.md)                         | GET    | Retrieves the statements collection.                         | client, ops |
| [Get statement](/developer-resources/rest-api/billing-api/statement/get-statement.md)                             | GET    | Retrieves a statement by ID.                                 | client, ops |
| [Retry statement](/developer-resources/rest-api/billing-api/statement/retry-failed-statement.md)                  | POST   | Retries sending a statement to the ERP system.               | ops         |
| [Recalculate statement](/developer-resources/rest-api/billing-api/statement/recalculate-statement.md)             | POST   | Recalculates a statement.                                    | ops         |
| [Cancel statement](/developer-resources/rest-api/billing-api/statement/cancel-statement.md)                       | POST   | Cancels a statement.                                         | ops         |
| [List statement charges](/developer-resources/rest-api/billing-api/statement/list-statement-charges.md)           | GET    | Returns list of all charges for the statement.               | client, ops |
| [Get statement charge](/developer-resources/rest-api/billing-api/statement/get-statement-charge.md)               | GET    | Returns a specific charge by ID that exists in the statement | client, ops |
| [Create statement attachment](/developer-resources/rest-api/billing-api/statement/create-statement-attachment.md) | POST   | Create a statement attachment.                               |             |
| [Get statement attachment](/developer-resources/rest-api/billing-api/statement/get-statement-attachment.md)       | GET    | Retrieves a statement attachment by ID.                      |             |
| [Update statement attachment](/developer-resources/rest-api/billing-api/statement/update-statement-attachment.md) | PUT    | Update a statement attachment.                               |             |
| [Delete statement attachment](/developer-resources/rest-api/billing-api/statement/delete-statement-attachment.md) | DELETE | Delete a statement attachment by ID.                         |             |

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.
