> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ap create bill

> Ap create bill

### Request body

`CreateApBillRequest`

<ParamField body="due_date" type="string" required>
  RFC 3339 due date, e.g. `2026-08-01T00:00:00Z`.
</ParamField>

<ParamField body="items" type="CreateApBillItemRequest[]" required />

<ParamField body="memo" type="string,null" />

<ParamField body="payment_terms" type="string,null" />

<ParamField body="purchase_order_id" type="string,null" />

<ParamField body="reference_number" type="string,null" />

<ParamField body="supplier_id" type="string" required />

### Responses

<ResponseField name="201" type="ApBillResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.stateset.com/api/v1/ap/bills' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "due_date": "string",
    "items": [
      {
        "account_code": null,
        "description": "string",
        "po_line_id": null,
        "quantity": "string",
        "tax_rate": null,
        "unit_price": "string"
      }
    ],
    "memo": null,
    "payment_terms": null,
    "purchase_order_id": null,
    "reference_number": null,
    "supplier_id": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "amount_due": "string",
    "amount_paid": "string",
    "bill_number": "string",
    "created_at": "string",
    "currency": "string",
    "due_date": "string",
    "id": "string",
    "status": "string",
    "subtotal": "string",
    "supplier_id": "string",
    "tax_amount": "string",
    "total_amount": "string"
  }
  ```
</ResponseExample>
