# Create a Bill

> Status: beta

Creates a new bill.

## Endpoint

`POST /api/v1/spend/bills/create`

## Request Headers

- `Authorization` (string, required)
  Obtain a token via `POST /api/v1/authentication/login` with your API key and client unique identifier. Pass it as `Authorization: Bearer {{ACCESS_TOKEN}}`. Tokens expire after a configurable duration.

## Request Parameters

### Request Body

- `billing_currency` (string, required)
  Currency of the bill, as an ISO 4217 currency code.
  Possible values:
  - `UNDEFINED`
  - `AED`
  - `AFN`
  - `ALL`
  - `AMD`
  - `ANG`
  - `AOA`
  - `ARS`
  - `AUD`
  - `AWG`
  - `AZN`
  - `BAM`
  - `BBD`
  - `BDT`
  - `BGN`
  - `BHD`
  - `BIF`
  - `BMD`
  - `BND`
  - `BOB`
  - `BOV`
  - `BRL`
  - `BSD`
  - `BTN`
  - `BWP`
  - `BYN`
  - `BYR`
  - `BZD`
  - `CAD`
  - `CDF`
  - `CHE`
  - `CHF`
  - `CHW`
  - `CLF`
  - `CLP`
  - `CNY`
  - `COP`
  - `COU`
  - `CRC`
  - `CUC`
  - `CUP`
  - `CVE`
  - `CZK`
  - `DJF`
  - `DKK`
  - `DOP`
  - `DZD`
  - `EGP`
  - `ERN`
  - `ETB`
  - `EUR`
  - `FJD`
  - `FKP`
  - `GBP`
  - `GEL`
  - `GHS`
  - `GIP`
  - `GMD`
  - `GNF`
  - `GTQ`
  - `GYD`
  - `HKD`
  - `HNL`
  - `HRK`
  - `HTG`
  - `HUF`
  - `IDR`
  - `ILS`
  - `INR`
  - `IQD`
  - `IRR`
  - `ISK`
  - `JMD`
  - `JOD`
  - `JPY`
  - `KES`
  - `KGS`
  - `KHR`
  - `KMF`
  - `KPW`
  - `KRW`
  - `KWD`
  - `KYD`
  - `KZT`
  - `LAK`
  - `LBP`
  - `LKR`
  - `LRD`
  - `LSL`
  - `LTL`
  - `LYD`
  - `MAD`
  - `MDL`
  - `MGA`
  - `MKD`
  - `MMK`
  - `MNT`
  - `MOP`
  - `MRO`
  - `MRU`
  - `MUR`
  - `MVR`
  - `MWK`
  - `MXN`
  - `MXV`
  - `MYR`
  - `MZN`
  - `NAD`
  - `NGN`
  - `NIO`
  - `NOK`
  - `NPR`
  - `NZD`
  - `OMR`
  - `PAB`
  - `PEN`
  - `PGK`
  - `PHP`
  - `PKR`
  - `PLN`
  - `PYG`
  - `QAR`
  - `RON`
  - `RSD`
  - `RUB`
  - `RUR`
  - `RWF`
  - `SAR`
  - `SBD`
  - `SCR`
  - `SDG`
  - `SEK`
  - `SGD`
  - `SHP`
  - `SLL`
  - `SOS`
  - `SRD`
  - `SSP`
  - `STD`
  - `STN`
  - `SVC`
  - `SYP`
  - `SZL`
  - `THB`
  - `TJS`
  - `TMT`
  - `TND`
  - `TOP`
  - `TRY`
  - `TTD`
  - `TWD`
  - `TZS`
  - `UAH`
  - `UGX`
  - `USD`
  - `USN`
  - `USS`
  - `UYI`
  - `UYU`
  - `UZS`
  - `VEF`
  - `VES`
  - `VND`
  - `VUV`
  - `WST`
  - `XAF`
  - `XAG`
  - `XAU`
  - `XBA`
  - `XBB`
  - `XBC`
  - `XBD`
  - `XCD`
  - `XDR`
  - `XOF`
  - `XPD`
  - `XPF`
  - `XPT`
  - `XSU`
  - `XTS`
  - `XUA`
  - `XXX`
  - `YER`
  - `ZAR`
  - `ZMW`
  - `ZWL`
- `due_date` (string, required)
  Date when the bill is due, in ISO8601 format.
- `external_id` (string, required)
  External identifier for this bill in your system.
- `invoice_number` (string, required)
  Invoice number associated with the bill.
- `issued_date` (string, required)
  Date when the bill was issued, in ISO8601 format.
- `legal_entity_id` (string, required)
  Unique identifier of the legal entity associated with the bill.
- `line_items` (array[object], required)
  List of line items on the bill.
  - `quantity` (string, required)
    Quantity of the line item.
  - `unit_price` (string, required)
    Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.
  - `accounting_field_selections` (array[object], optional)
    List of accounting fields selected for the line item.
    - `source_id` (string, format: uuid, required)
      Unique identifier of the general ledger (GL) account, tax code, or accounting field value to assign to this line item. The required `id` depends on `type`: use [List General Ledger Accounts](https://www.airwallex.com/docs/api/accounting/general_ledger_accounts/list.md) for `GENERAL_LEDGER_ACCOUNT`, [List Tax Codes](https://www.airwallex.com/docs/api/accounting/tax_codes/list.md) for `TAX_CODE`, or [List Accounting Field Values](https://www.airwallex.com/docs/api/accounting/accounting_field_values/list.md) for `OTHER`.
    - `type` (string, required)
      Type of accounting field selection.
      Possible values:
      - `GENERAL_LEDGER_ACCOUNT` — General ledger (GL) account assigned to the line item.
      - `TAX_CODE` — Tax code applied to the line item.
      - `OTHER` — Custom accounting field defined in your ERP.
  - `description` (string, optional)
    Description of the line item.
  - `purchase_order_line_item_id` (string, format: uuid, optional)
    Unique identifier of the purchase order line item associated with this bill line item.
- `request_id` (string, required)
  Unique identifier for this request to ensure idempotency. To prevent accidental duplication, clients should generate a random UUID.
- `sync_status` (string, required)
  Sync status for an accounting system.
  Possible values:
  - `NOT_SYNCED`
  - `SYNCED`
  - `SYNC_FAILED`
- `tax_status` (string, required)
  Tax status for bill creation.
  Possible values:
  - `TAX_EXCLUSIVE`
  - `TAX_INCLUSIVE`
- `vendor_id` (string, format: uuid, required)
  Unique identifier of the vendor associated with the bill.
- `description` (string, optional)
  Description of the bill.
- `purchase_order_id` (string, format: uuid, optional)
  Unique identifier of the purchase order associated with the bill.

## cURL example

```bash
curl --request POST \
  --url 'https://api.sandbox.airwallex.com/api/v1/spend/bills/create' \
  --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
  --header 'Content-Type: application/json' \
  --data '{
  "request_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
  "external_id": "BILL-EXT-001",
  "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
  "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
  "invoice_number": "INV-0001",
  "issued_date": "2025-01-10",
  "due_date": "2025-01-10",
  "billing_currency": "USD",
  "tax_status": "TAX_EXCLUSIVE",
  "sync_status": "SYNCED",
  "line_items": [
    {
      "description": "Office supplies.",
      "quantity": "10",
      "unit_price": "500.0",
      "accounting_field_selections": [
        {
          "type": "GENERAL_LEDGER_ACCOUNT",
          "source_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
        }
      ],
      "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
    }
  ],
  "description": "Office supplies for Q1 2025.",
  "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e"
}'
```

## Response

### 201 Created

**Example:**

```json
{
  "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
  "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
  "invoice_number": "INV-0001",
  "billing_amount": "551.0",
  "billing_currency": "USD",
  "status": "AWAITING_PAYMENT",
  "sync_status": "SYNCED",
  "sync_error_message": "Failed to sync bill: found a mismatch between the bill payment and bill currency.",
  "tax_status": "TAX_EXCLUSIVE",
  "description": "Office supplies for Q1 2025.",
  "approvers": [
    "approver1@airwallex.com",
    "approver2@airwallex.com"
  ],
  "issued_date": "2025-01-10",
  "due_date": "2025-01-10",
  "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
  "purchase_order_id": "ca56f0ff-8081-4db6-8333-4e011fe9561e",
  "bill_payments": [
    {
      "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
      "type": "CARD_TRANSACTION",
      "amount": "300.00",
      "currency": "USD",
      "card_transaction": {
        "card_transaction_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
        "card_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
        "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
        "card_funding_type": "CREDIT",
        "source_amount": "300.00",
        "source_currency": "USD",
        "transacted_at": "2025-01-02T00:00:00Z"
      },
      "created_at": "2025-01-02T00:00:00Z"
    },
    {
      "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
      "type": "TRANSFER",
      "amount": "251.00",
      "currency": "USD",
      "transfer": {
        "transfer_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
        "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
        "multi_bill": false,
        "source_amount": "251.00",
        "source_currency": "USD",
        "transfer_date": "2025-01-01"
      },
      "created_at": "2025-01-01T00:00:00Z"
    }
  ],
  "external_id": "BILL-EXT-001",
  "attachments": [
    {
      "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
      "content_type": "image/jpeg",
      "file_name": "flight_receipt.jpg",
      "file_url": "https://www.airwallex.com/flight_receipt.jpg",
      "created_at": "2025-02-02T00:00:00Z"
    }
  ],
  "line_items": [
    {
      "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
      "unit_price": "100.0",
      "quantity": "5",
      "description": "Office supplies.",
      "total_amount": "500.0",
      "tax_amount": "51.0",
      "accounting_field_selections": [
        {
          "type": "OTHER",
          "source_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
          "name": "Cost Center",
          "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
          "value": "Office Expense",
          "value_label": "Office Expense"
        }
      ],
      "purchase_order_line_item_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d"
    }
  ],
  "created_at": "2025-01-01T00:00:00Z",
  "updated_at": "2025-02-02T00:00:00Z"
}
```

- `approvers` (array[string], required)
  List of user emails who can approve the bill.
- `attachments` (array[object], required)
  List of file attachments associated with the bill.
  - `content_type` (string, required)
    MIME type of the attached file. Common types include `image/jpeg`, `image/png`, and `application/pdf`.
  - `created_at` (string, required)
    Timestamp for when the resource was created in ISO8601 format.
  - `file_name` (string, required)
    Original filename of the uploaded attachment, including the file extension.
  - `file_url` (string, required)
    URL to access and download the attachment file. Authentication is required.
  - `id` (string, format: uuid, required)
    Unique identifier of the attachment.
- `bill_payments` (array[object], required)
  List of payments applied to the bill.
  - `amount` (string, required)
    Amount of the payment.
  - `created_at` (string, required)
    Timestamp for when the resource was created in ISO8601 format.
  - `currency` (string, required)
    Currency of the payment, as an ISO 4217 currency code.
    Possible values:
    - `UNDEFINED`
    - `AED`
    - `AFN`
    - `ALL`
    - `AMD`
    - `ANG`
    - `AOA`
    - `ARS`
    - `AUD`
    - `AWG`
    - `AZN`
    - `BAM`
    - `BBD`
    - `BDT`
    - `BGN`
    - `BHD`
    - `BIF`
    - `BMD`
    - `BND`
    - `BOB`
    - `BOV`
    - `BRL`
    - `BSD`
    - `BTN`
    - `BWP`
    - `BYN`
    - `BYR`
    - `BZD`
    - `CAD`
    - `CDF`
    - `CHE`
    - `CHF`
    - `CHW`
    - `CLF`
    - `CLP`
    - `CNY`
    - `COP`
    - `COU`
    - `CRC`
    - `CUC`
    - `CUP`
    - `CVE`
    - `CZK`
    - `DJF`
    - `DKK`
    - `DOP`
    - `DZD`
    - `EGP`
    - `ERN`
    - `ETB`
    - `EUR`
    - `FJD`
    - `FKP`
    - `GBP`
    - `GEL`
    - `GHS`
    - `GIP`
    - `GMD`
    - `GNF`
    - `GTQ`
    - `GYD`
    - `HKD`
    - `HNL`
    - `HRK`
    - `HTG`
    - `HUF`
    - `IDR`
    - `ILS`
    - `INR`
    - `IQD`
    - `IRR`
    - `ISK`
    - `JMD`
    - `JOD`
    - `JPY`
    - `KES`
    - `KGS`
    - `KHR`
    - `KMF`
    - `KPW`
    - `KRW`
    - `KWD`
    - `KYD`
    - `KZT`
    - `LAK`
    - `LBP`
    - `LKR`
    - `LRD`
    - `LSL`
    - `LTL`
    - `LYD`
    - `MAD`
    - `MDL`
    - `MGA`
    - `MKD`
    - `MMK`
    - `MNT`
    - `MOP`
    - `MRO`
    - `MRU`
    - `MUR`
    - `MVR`
    - `MWK`
    - `MXN`
    - `MXV`
    - `MYR`
    - `MZN`
    - `NAD`
    - `NGN`
    - `NIO`
    - `NOK`
    - `NPR`
    - `NZD`
    - `OMR`
    - `PAB`
    - `PEN`
    - `PGK`
    - `PHP`
    - `PKR`
    - `PLN`
    - `PYG`
    - `QAR`
    - `RON`
    - `RSD`
    - `RUB`
    - `RUR`
    - `RWF`
    - `SAR`
    - `SBD`
    - `SCR`
    - `SDG`
    - `SEK`
    - `SGD`
    - `SHP`
    - `SLL`
    - `SOS`
    - `SRD`
    - `SSP`
    - `STD`
    - `STN`
    - `SVC`
    - `SYP`
    - `SZL`
    - `THB`
    - `TJS`
    - `TMT`
    - `TND`
    - `TOP`
    - `TRY`
    - `TTD`
    - `TWD`
    - `TZS`
    - `UAH`
    - `UGX`
    - `USD`
    - `USN`
    - `USS`
    - `UYI`
    - `UYU`
    - `UZS`
    - `VEF`
    - `VES`
    - `VND`
    - `VUV`
    - `WST`
    - `XAF`
    - `XAG`
    - `XAU`
    - `XBA`
    - `XBB`
    - `XBC`
    - `XBD`
    - `XCD`
    - `XDR`
    - `XOF`
    - `XPD`
    - `XPF`
    - `XPT`
    - `XSU`
    - `XTS`
    - `XUA`
    - `XXX`
    - `YER`
    - `ZAR`
    - `ZMW`
    - `ZWL`
  - `id` (string, format: uuid, required)
    Unique identifier of the payment.
  - `type` (string, required)
    Payment method type.
    Possible values:
    - `TRANSFER`
    - `CARD_TRANSACTION`
    - `EXTERNAL`
  - `card_transaction` (object, optional)
    Details of the card transaction used to pay the bill.
    - `account_id` (string, required)
      Unique identifier of the Airwallex account associated with the wallet that funded the card payment.
    - `card_funding_type` (string, required)
      Card funding type.
      Possible values:
      - `CREDIT`
      - `CASH`
    - `card_id` (string, format: uuid, required)
      Unique identifier of the card used for payment.
    - `card_transaction_id` (string, format: uuid, required)
      Unique identifier of the card transaction.
    - `source_amount` (string, required)
      Transaction amount in the source currency before conversion.
    - `source_currency` (string, required)
      Currency of the original card transaction, as an ISO 4217 currency code.
      Possible values:
      - `UNDEFINED`
      - `AED`
      - `AFN`
      - `ALL`
      - `AMD`
      - `ANG`
      - `AOA`
      - `ARS`
      - `AUD`
      - `AWG`
      - `AZN`
      - `BAM`
      - `BBD`
      - `BDT`
      - `BGN`
      - `BHD`
      - `BIF`
      - `BMD`
      - `BND`
      - `BOB`
      - `BOV`
      - `BRL`
      - `BSD`
      - `BTN`
      - `BWP`
      - `BYN`
      - `BYR`
      - `BZD`
      - `CAD`
      - `CDF`
      - `CHE`
      - `CHF`
      - `CHW`
      - `CLF`
      - `CLP`
      - `CNY`
      - `COP`
      - `COU`
      - `CRC`
      - `CUC`
      - `CUP`
      - `CVE`
      - `CZK`
      - `DJF`
      - `DKK`
      - `DOP`
      - `DZD`
      - `EGP`
      - `ERN`
      - `ETB`
      - `EUR`
      - `FJD`
      - `FKP`
      - `GBP`
      - `GEL`
      - `GHS`
      - `GIP`
      - `GMD`
      - `GNF`
      - `GTQ`
      - `GYD`
      - `HKD`
      - `HNL`
      - `HRK`
      - `HTG`
      - `HUF`
      - `IDR`
      - `ILS`
      - `INR`
      - `IQD`
      - `IRR`
      - `ISK`
      - `JMD`
      - `JOD`
      - `JPY`
      - `KES`
      - `KGS`
      - `KHR`
      - `KMF`
      - `KPW`
      - `KRW`
      - `KWD`
      - `KYD`
      - `KZT`
      - `LAK`
      - `LBP`
      - `LKR`
      - `LRD`
      - `LSL`
      - `LTL`
      - `LYD`
      - `MAD`
      - `MDL`
      - `MGA`
      - `MKD`
      - `MMK`
      - `MNT`
      - `MOP`
      - `MRO`
      - `MRU`
      - `MUR`
      - `MVR`
      - `MWK`
      - `MXN`
      - `MXV`
      - `MYR`
      - `MZN`
      - `NAD`
      - `NGN`
      - `NIO`
      - `NOK`
      - `NPR`
      - `NZD`
      - `OMR`
      - `PAB`
      - `PEN`
      - `PGK`
      - `PHP`
      - `PKR`
      - `PLN`
      - `PYG`
      - `QAR`
      - `RON`
      - `RSD`
      - `RUB`
      - `RUR`
      - `RWF`
      - `SAR`
      - `SBD`
      - `SCR`
      - `SDG`
      - `SEK`
      - `SGD`
      - `SHP`
      - `SLL`
      - `SOS`
      - `SRD`
      - `SSP`
      - `STD`
      - `STN`
      - `SVC`
      - `SYP`
      - `SZL`
      - `THB`
      - `TJS`
      - `TMT`
      - `TND`
      - `TOP`
      - `TRY`
      - `TTD`
      - `TWD`
      - `TZS`
      - `UAH`
      - `UGX`
      - `USD`
      - `USN`
      - `USS`
      - `UYI`
      - `UYU`
      - `UZS`
      - `VEF`
      - `VES`
      - `VND`
      - `VUV`
      - `WST`
      - `XAF`
      - `XAG`
      - `XAU`
      - `XBA`
      - `XBB`
      - `XBC`
      - `XBD`
      - `XCD`
      - `XDR`
      - `XOF`
      - `XPD`
      - `XPF`
      - `XPT`
      - `XSU`
      - `XTS`
      - `XUA`
      - `XXX`
      - `YER`
      - `ZAR`
      - `ZMW`
      - `ZWL`
    - `transacted_at` (string, required)
      Timestamp of the card transaction in ISO8601 format.
  - `transfer` (object, optional)
    Details of the transfer used to pay the bill.
    - `account_id` (string, required)
      Unique identifier of the Airwallex account associated with the wallet that funded the transfer.
    - `multi_bill` (boolean, required)
      Whether this transfer payment pays multiple bills.
    - `transfer_date` (string, required)
      Date when the transfer was made, in ISO8601 format.
    - `transfer_id` (string, format: uuid, required)
      Unique identifier of the transfer.
    - `source_amount` (string, optional)
      Transfer amount in the source currency before conversion.
    - `source_currency` (string, optional)
      Currency of the original transfer, as an ISO 4217 currency code.
      Possible values:
      - `UNDEFINED`
      - `AED`
      - `AFN`
      - `ALL`
      - `AMD`
      - `ANG`
      - `AOA`
      - `ARS`
      - `AUD`
      - `AWG`
      - `AZN`
      - `BAM`
      - `BBD`
      - `BDT`
      - `BGN`
      - `BHD`
      - `BIF`
      - `BMD`
      - `BND`
      - `BOB`
      - `BOV`
      - `BRL`
      - `BSD`
      - `BTN`
      - `BWP`
      - `BYN`
      - `BYR`
      - `BZD`
      - `CAD`
      - `CDF`
      - `CHE`
      - `CHF`
      - `CHW`
      - `CLF`
      - `CLP`
      - `CNY`
      - `COP`
      - `COU`
      - `CRC`
      - `CUC`
      - `CUP`
      - `CVE`
      - `CZK`
      - `DJF`
      - `DKK`
      - `DOP`
      - `DZD`
      - `EGP`
      - `ERN`
      - `ETB`
      - `EUR`
      - `FJD`
      - `FKP`
      - `GBP`
      - `GEL`
      - `GHS`
      - `GIP`
      - `GMD`
      - `GNF`
      - `GTQ`
      - `GYD`
      - `HKD`
      - `HNL`
      - `HRK`
      - `HTG`
      - `HUF`
      - `IDR`
      - `ILS`
      - `INR`
      - `IQD`
      - `IRR`
      - `ISK`
      - `JMD`
      - `JOD`
      - `JPY`
      - `KES`
      - `KGS`
      - `KHR`
      - `KMF`
      - `KPW`
      - `KRW`
      - `KWD`
      - `KYD`
      - `KZT`
      - `LAK`
      - `LBP`
      - `LKR`
      - `LRD`
      - `LSL`
      - `LTL`
      - `LYD`
      - `MAD`
      - `MDL`
      - `MGA`
      - `MKD`
      - `MMK`
      - `MNT`
      - `MOP`
      - `MRO`
      - `MRU`
      - `MUR`
      - `MVR`
      - `MWK`
      - `MXN`
      - `MXV`
      - `MYR`
      - `MZN`
      - `NAD`
      - `NGN`
      - `NIO`
      - `NOK`
      - `NPR`
      - `NZD`
      - `OMR`
      - `PAB`
      - `PEN`
      - `PGK`
      - `PHP`
      - `PKR`
      - `PLN`
      - `PYG`
      - `QAR`
      - `RON`
      - `RSD`
      - `RUB`
      - `RUR`
      - `RWF`
      - `SAR`
      - `SBD`
      - `SCR`
      - `SDG`
      - `SEK`
      - `SGD`
      - `SHP`
      - `SLL`
      - `SOS`
      - `SRD`
      - `SSP`
      - `STD`
      - `STN`
      - `SVC`
      - `SYP`
      - `SZL`
      - `THB`
      - `TJS`
      - `TMT`
      - `TND`
      - `TOP`
      - `TRY`
      - `TTD`
      - `TWD`
      - `TZS`
      - `UAH`
      - `UGX`
      - `USD`
      - `USN`
      - `USS`
      - `UYI`
      - `UYU`
      - `UZS`
      - `VEF`
      - `VES`
      - `VND`
      - `VUV`
      - `WST`
      - `XAF`
      - `XAG`
      - `XAU`
      - `XBA`
      - `XBB`
      - `XBC`
      - `XBD`
      - `XCD`
      - `XDR`
      - `XOF`
      - `XPD`
      - `XPF`
      - `XPT`
      - `XSU`
      - `XTS`
      - `XUA`
      - `XXX`
      - `YER`
      - `ZAR`
      - `ZMW`
      - `ZWL`
- `billing_amount` (string, required)
  Total amount of the bill.
- `created_at` (string, required)
  Timestamp for when the resource was created in ISO8601 format.
- `id` (string, format: uuid, required)
  Unique identifier of the bill.
- `legal_entity_id` (string, required)
  Unique identifier of the legal entity associated with the bill.
- `line_items` (array[object], required)
  List of line items on the bill.
  - `accounting_field_selections` (array[object], required)
    List of accounting fields selected for the line item.
    - `source_id` (string, format: uuid, required)
      Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.
    - `type` (string, required)
      Type of accounting field.
      Possible values:
      - `GENERAL_LEDGER_ACCOUNT` — General ledger (GL) account assigned to the line item.
      - `TAX_CODE` — Tax code applied to the line item.
      - `OTHER` — Custom accounting field defined in your ERP. The field name is provided in `name`.
    - `value` (string, required)
      Name of the accounting field value in the ERP.
    - `external_id` (string, optional)
      External unique identifier of the accounting field value in the ERP.
    - `name` (string, optional)
      Name of the accounting field in the ERP software. This field is populated only when `type` is set to `OTHER`.
    - `value_label` (string, optional)
      Name of the accounting field value displayed in Airwallex.
  - `id` (string, format: uuid, required)
    Unique identifier of the line item.
  - `total_amount` (string, required)
    Total amount for this line item.
  - `description` (string, optional)
    Description of the line item.
  - `purchase_order_line_item_id` (string, format: uuid, optional)
    Unique identifier of the purchase order line item associated with this bill line item.
  - `quantity` (string, optional)
    Quantity of the line item.
  - `tax_amount` (string, optional)
    Tax amount for this line item.
  - `unit_price` (string, optional)
    Unit price of the line item.
- `status` (string, required)
  Bill status.
  Possible values:
  - `DRAFT`
  - `AWAITING_APPROVAL`
  - `AWAITING_PAYMENT`
  - `PAYMENT_IN_PROGRESS`
  - `PAID`
  - `REJECTED`
  - `SCHEDULED`
- `sync_status` (string, required)
  Sync status for an accounting system.
  Possible values:
  - `NOT_SYNCED`
  - `SYNCED`
  - `SYNC_FAILED`
- `tax_status` (string, required)
  Tax status indicating whether amounts include or exclude tax.
  Possible values:
  - `TAX_EXCLUSIVE`
  - `TAX_INCLUSIVE`
  - `UNSPECIFIED`
- `updated_at` (string, required)
  Timestamp for when the resource was updated in ISO8601 format.
- `billing_currency` (string, optional)
  Currency of the bill, as an ISO 4217 currency code.
  Possible values:
  - `UNDEFINED`
  - `AED`
  - `AFN`
  - `ALL`
  - `AMD`
  - `ANG`
  - `AOA`
  - `ARS`
  - `AUD`
  - `AWG`
  - `AZN`
  - `BAM`
  - `BBD`
  - `BDT`
  - `BGN`
  - `BHD`
  - `BIF`
  - `BMD`
  - `BND`
  - `BOB`
  - `BOV`
  - `BRL`
  - `BSD`
  - `BTN`
  - `BWP`
  - `BYN`
  - `BYR`
  - `BZD`
  - `CAD`
  - `CDF`
  - `CHE`
  - `CHF`
  - `CHW`
  - `CLF`
  - `CLP`
  - `CNY`
  - `COP`
  - `COU`
  - `CRC`
  - `CUC`
  - `CUP`
  - `CVE`
  - `CZK`
  - `DJF`
  - `DKK`
  - `DOP`
  - `DZD`
  - `EGP`
  - `ERN`
  - `ETB`
  - `EUR`
  - `FJD`
  - `FKP`
  - `GBP`
  - `GEL`
  - `GHS`
  - `GIP`
  - `GMD`
  - `GNF`
  - `GTQ`
  - `GYD`
  - `HKD`
  - `HNL`
  - `HRK`
  - `HTG`
  - `HUF`
  - `IDR`
  - `ILS`
  - `INR`
  - `IQD`
  - `IRR`
  - `ISK`
  - `JMD`
  - `JOD`
  - `JPY`
  - `KES`
  - `KGS`
  - `KHR`
  - `KMF`
  - `KPW`
  - `KRW`
  - `KWD`
  - `KYD`
  - `KZT`
  - `LAK`
  - `LBP`
  - `LKR`
  - `LRD`
  - `LSL`
  - `LTL`
  - `LYD`
  - `MAD`
  - `MDL`
  - `MGA`
  - `MKD`
  - `MMK`
  - `MNT`
  - `MOP`
  - `MRO`
  - `MRU`
  - `MUR`
  - `MVR`
  - `MWK`
  - `MXN`
  - `MXV`
  - `MYR`
  - `MZN`
  - `NAD`
  - `NGN`
  - `NIO`
  - `NOK`
  - `NPR`
  - `NZD`
  - `OMR`
  - `PAB`
  - `PEN`
  - `PGK`
  - `PHP`
  - `PKR`
  - `PLN`
  - `PYG`
  - `QAR`
  - `RON`
  - `RSD`
  - `RUB`
  - `RUR`
  - `RWF`
  - `SAR`
  - `SBD`
  - `SCR`
  - `SDG`
  - `SEK`
  - `SGD`
  - `SHP`
  - `SLL`
  - `SOS`
  - `SRD`
  - `SSP`
  - `STD`
  - `STN`
  - `SVC`
  - `SYP`
  - `SZL`
  - `THB`
  - `TJS`
  - `TMT`
  - `TND`
  - `TOP`
  - `TRY`
  - `TTD`
  - `TWD`
  - `TZS`
  - `UAH`
  - `UGX`
  - `USD`
  - `USN`
  - `USS`
  - `UYI`
  - `UYU`
  - `UZS`
  - `VEF`
  - `VES`
  - `VND`
  - `VUV`
  - `WST`
  - `XAF`
  - `XAG`
  - `XAU`
  - `XBA`
  - `XBB`
  - `XBC`
  - `XBD`
  - `XCD`
  - `XDR`
  - `XOF`
  - `XPD`
  - `XPF`
  - `XPT`
  - `XSU`
  - `XTS`
  - `XUA`
  - `XXX`
  - `YER`
  - `ZAR`
  - `ZMW`
  - `ZWL`
- `description` (string, optional)
  Description of the bill.
- `due_date` (string, optional)
  Date when the bill is due, in ISO8601 format.
- `external_id` (string, optional)
  External identifier for this bill in your system.
- `invoice_number` (string, optional)
  Invoice number associated with the bill.
- `issued_date` (string, optional)
  Date when the bill was issued, in ISO8601 format.
- `purchase_order_id` (string, format: uuid, optional)
  Unique identifier of the purchase order associated with the bill.
- `sync_error_message` (string, optional)
  Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.
- `vendor_id` (string, format: uuid, optional)
  Unique identifier of the vendor associated with the bill.

## Errors

### 400 Bad request

Invalid Request.

### 404 Not found

Not found.

### 500 Server error

Internal server error.
