> For the complete documentation index, see [llms.txt](https://docs.zwapgrid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zwapgrid.com/api.1/use-cases/invoicing.md).

# Invoicing

Supplier and sales invoices are fundamental documents in a business's accounting, but they represent opposite sides of a transaction from the perspective of a single company.

### Sales Invoices

A sales invoice is a commercial document that a business issues to a customer. It is a formal request for payment for goods or services that have been sold and delivered.

* Purpose: To inform the customer of the amount owed and to provide them with the necessary details to make a payment. It serves as proof of a sale and a legal record of the transaction.
* Role in Accounting:
  * When a sales invoice is issued, the business's accounting system records an increase in revenue and an increase in accounts receivable (money owed to the business).
  * When the customer pays, the accounts receivable balance is decreased, and the cash balance is increased.

### Supplier Invoices

A supplier invoice (also known as a purchase invoice or vendor invoice) is a document that a business receives from a vendor or supplier. It is a request for payment for goods or services the business has purchased.

* Purpose: To inform the business of the amount it owes to the supplier for products or services received. It is a critical document for managing and paying a business's expenses.
* Role in Accounting:
  * When a supplier invoice is received, the business's accounting system records an increase in an expense (or an asset, depending on the purchase) and an increase in accounts payable (money owed by the business).
  * When the business pays the invoice, the accounts payable balance is decreased, and the cash balance is decreased.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zwapgrid.com/api.1/use-cases/invoicing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
