> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.papertracc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.papertracc.com/_mcp/server.

# Create Bill

POST https://api.papertracc.com/v1/bills
Content-Type: application/json

Creates a bill. `bill_date`, `account_number`, `vendor_id`, and `items` are required. `allow_post` is optional; when true, the bill is posted immediately after creation (the project must have `allow_create_and_post` enabled, otherwise the request is rejected with 400).

Reference: https://api-docs.papertracc.com/papertracc/purchases/bills/create-bill

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `identity` header (required) — The identity for the active project.

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Body (application/json)

This endpoint expects an object.

- `items` (list of object, required)
  - `rate` (integer, required)
  - `detail` (string, required)
  - `quantity` (integer, required)
  - `currency_code` (string, required)
  - `amount` (integer, optional)
  - `tax_id` (string, optional)
  - `account_id` (string, optional)
  - `sku` (string, optional)
  - `vat` (string, optional)
  - `vat_rate` (double, optional)
  - `vendor_id` (string, optional)
  - `dynamic_fields` (object, optional)
- `bill_date` (datetime, required)
- `vendor_id` (string, required)
- `due_date` (datetime, optional)
- `exchange_rate` (double, optional)
- `allow_post` (boolean, optional)
- `adjustments` (list of object, optional)
  - `name` (string, required)
  - `type` (string, required)
  - `value` (double, required)
  - `amount` (integer, required)
  - `operation` (string, required)
  - `account_id` (string, required)

## Response

### 201

Created

- `data` (object, required)
  - `id` (string, required)
  - `items` (list of object, required)
    - `rate` (integer, required)
    - `amount` (integer, required)
    - `detail` (string, required)
    - `tax_id` (string, required)
    - `quantity` (integer, required)
    - `account_id` (string, required)
    - `inventory_id` (string, required)
    - `currency_code` (string, required)
    - `tax_name` (string, optional)
    - `vat` (string, optional)
  - `amount` (string, required)
  - `status` (string, required)
  - `vendor` (object, required)
    - `id` (string, required)
    - `display_name` (string, required)
  - `approval` (integer, required)
  - `due_date` (datetime, required)
  - `approvals` (list of any, required)
  - `bill_date` (datetime, required)
  - `documents` (list of any, required)
  - `account_id` (string, required)
  - `created_at` (datetime, required)
  - `project_id` (string, required)
  - `adjustments` (list of object, required)
    - `name` (string, required)
    - `type` (string, required)
    - `value` (double, required)
    - `amount` (integer, required)
    - `operation` (string, required)
    - `account_id` (string, required)
  - `prepared_by` (string, required)
  - `currency_code` (string, required)
  - `exchange_rate` (string, required)
  - `bill_reference` (string, required)
  - `journal_status` (string, required)
  - `payment_status` (enum, optional) — How far the document has been settled, derived from amount and total_paid. Independent of status, which tracks the document workflow - a sent invoice that is part paid stays SENT with a payment_status of PARTIAL.
    - Allowed values: `UNPAID`, `PARTIAL`, `PAID`
  - `journal_entry_id` (any, optional)
- `status` (boolean, required)
- `message` (string, required)

### 202

Accepted

- `data` (object, required)
  - `id` (string, required)
  - `items` (list of object, required)
    - `rate` (integer, required)
    - `amount` (integer, required)
    - `detail` (string, required)
    - `tax_id` (string, required)
    - `quantity` (integer, required)
    - `account_id` (string, required)
    - `inventory_id` (string, required)
    - `currency_code` (string, required)
    - `tax_name` (string, optional)
    - `vat` (string, optional)
  - `amount` (string, required)
  - `status` (string, required)
  - `vendor` (object, required)
    - `id` (string, required)
    - `display_name` (string, required)
  - `approval` (integer, required)
  - `due_date` (datetime, required)
  - `approvals` (list of any, required)
  - `bill_date` (datetime, required)
  - `documents` (list of any, required)
  - `account_id` (string, required)
  - `created_at` (datetime, required)
  - `project_id` (string, required)
  - `adjustments` (list of object, required)
    - `name` (string, required)
    - `type` (string, required)
    - `value` (double, required)
    - `amount` (integer, required)
    - `operation` (string, required)
    - `account_id` (string, required)
  - `prepared_by` (string, required)
  - `currency_code` (string, required)
  - `exchange_rate` (string, required)
  - `bill_reference` (string, required)
  - `journal_status` (string, required)
  - `payment_status` (enum, optional) — How far the document has been settled, derived from amount and total_paid. Independent of status, which tracks the document workflow - a sent invoice that is part paid stays SENT with a payment_status of PARTIAL.
    - Allowed values: `UNPAID`, `PARTIAL`, `PAID`
  - `journal_entry_id` (any, optional)
- `status` (boolean, required)
- `message` (string, required)

## Examples

### Create a draft bill

**Request**

```json
{
  "items": [
    {
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    }
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": false,
  "adjustments": [
    {
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a",
    "items": [
      {
        "rate": 50000,
        "amount": 500000,
        "detail": "Consulting hours",
        "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
        "quantity": 10,
        "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
        "inventory_id": "55a40b4d-a23a-49aa-a417-828913e9a5c8",
        "currency_code": "NGN"
      }
    ],
    "amount": "250000.00",
    "status": "PENDING",
    "vendor": {
      "id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
      "display_name": "Global Softworks"
    },
    "approval": 0,
    "due_date": "2026-07-18T10:00:00Z",
    "approvals": [],
    "bill_date": "2026-06-18T10:00:00Z",
    "documents": [],
    "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
    "created_at": "2026-06-18T10:00:00Z",
    "project_id": "spruce-demo",
    "adjustments": [
      {
        "name": "VAT",
        "type": "PERCENTAGE_RATE",
        "value": 7.5,
        "amount": 37500,
        "operation": "ADDITION",
        "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
      }
    ],
    "prepared_by": "user-token-hash",
    "currency_code": "NGN",
    "exchange_rate": "1.00",
    "bill_reference": "BILL-0001",
    "journal_status": "UNPOSTED"
  },
  "status": true,
  "message": "Successfully created bill"
}
```

**SDK Code**

```python Create a draft bill
import requests

url = "https://api.papertracc.com/v1/bills"

payload = {
    "items": [
        {
            "rate": 50000,
            "detail": "Consulting hours",
            "quantity": 10,
            "currency_code": "NGN",
            "amount": 500000,
            "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
            "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
            "sku": "SKU-1001"
        }
    ],
    "bill_date": "2026-06-18T10:00:00.000Z",
    "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
    "due_date": "2026-07-18T10:00:00.000Z",
    "allow_post": False,
    "adjustments": [
        {
            "name": "VAT",
            "type": "PERCENTAGE_RATE",
            "value": 7.5,
            "amount": 37500,
            "operation": "ADDITION",
            "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
        }
    ]
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create a draft bill
const url = 'https://api.papertracc.com/v1/bills';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"items":[{"rate":50000,"detail":"Consulting hours","quantity":10,"currency_code":"NGN","amount":500000,"tax_id":"78c68f6d-d734-4822-9a6c-73f517a0e5c1","account_id":"d037d299-3029-4dc7-8e72-172f80f23c4f","sku":"SKU-1001"}],"bill_date":"2026-06-18T10:00:00.000Z","vendor_id":"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51","due_date":"2026-07-18T10:00:00.000Z","allow_post":false,"adjustments":[{"name":"VAT","type":"PERCENTAGE_RATE","value":7.5,"amount":37500,"operation":"ADDITION","account_id":"2b0d1461-e52e-4a1a-a69c-11801431c2c9"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create a draft bill
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/bills"

	payload := strings.NewReader("{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": false,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create a draft bill
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/bills")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": false,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Create a draft bill
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.papertracc.com/v1/bills")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": false,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}")
  .asString();
```

```php Create a draft bill
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/bills', [
  'body' => '{
  "items": [
    {
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    }
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": false,
  "adjustments": [
    {
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Create a draft bill
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/bills");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": false,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create a draft bill
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "items": [
    [
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    ]
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": false,
  "adjustments": [
    [
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/bills")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Create and post bill

**Request**

```json
{
  "items": [
    {
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    }
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": true,
  "adjustments": [
    {
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a",
    "items": [
      {
        "rate": 50000,
        "amount": 500000,
        "detail": "Consulting hours",
        "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
        "quantity": 10,
        "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
        "inventory_id": "55a40b4d-a23a-49aa-a417-828913e9a5c8",
        "currency_code": "NGN"
      }
    ],
    "amount": "250000.00",
    "status": "POSTED",
    "vendor": {
      "id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
      "display_name": "Global Softworks"
    },
    "approval": 0,
    "due_date": "2026-07-18T10:00:00Z",
    "approvals": [],
    "bill_date": "2026-06-18T10:00:00Z",
    "documents": [],
    "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
    "created_at": "2026-06-18T10:00:00Z",
    "project_id": "spruce-demo",
    "adjustments": [
      {
        "name": "VAT",
        "type": "PERCENTAGE_RATE",
        "value": 7.5,
        "amount": 37500,
        "operation": "ADDITION",
        "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
      }
    ],
    "prepared_by": "user-token-hash",
    "currency_code": "NGN",
    "exchange_rate": "1.00",
    "bill_reference": "BILL-0001",
    "journal_status": "POSTED"
  },
  "status": true,
  "message": "Successfully created and posted bill"
}
```

**SDK Code**

```python Create and post bill
import requests

url = "https://api.papertracc.com/v1/bills"

payload = {
    "items": [
        {
            "rate": 50000,
            "detail": "Consulting hours",
            "quantity": 10,
            "currency_code": "NGN",
            "amount": 500000,
            "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
            "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
            "sku": "SKU-1001"
        }
    ],
    "bill_date": "2026-06-18T10:00:00.000Z",
    "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
    "due_date": "2026-07-18T10:00:00.000Z",
    "allow_post": True,
    "adjustments": [
        {
            "name": "VAT",
            "type": "PERCENTAGE_RATE",
            "value": 7.5,
            "amount": 37500,
            "operation": "ADDITION",
            "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
        }
    ]
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create and post bill
const url = 'https://api.papertracc.com/v1/bills';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"items":[{"rate":50000,"detail":"Consulting hours","quantity":10,"currency_code":"NGN","amount":500000,"tax_id":"78c68f6d-d734-4822-9a6c-73f517a0e5c1","account_id":"d037d299-3029-4dc7-8e72-172f80f23c4f","sku":"SKU-1001"}],"bill_date":"2026-06-18T10:00:00.000Z","vendor_id":"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51","due_date":"2026-07-18T10:00:00.000Z","allow_post":true,"adjustments":[{"name":"VAT","type":"PERCENTAGE_RATE","value":7.5,"amount":37500,"operation":"ADDITION","account_id":"2b0d1461-e52e-4a1a-a69c-11801431c2c9"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create and post bill
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/bills"

	payload := strings.NewReader("{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create and post bill
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/bills")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Create and post bill
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.papertracc.com/v1/bills")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}")
  .asString();
```

```php Create and post bill
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/bills', [
  'body' => '{
  "items": [
    {
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    }
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": true,
  "adjustments": [
    {
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Create and post bill
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/bills");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create and post bill
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "items": [
    [
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    ]
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": true,
  "adjustments": [
    [
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/bills")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Create and post bill

**Request**

```json
{
  "items": [
    {
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    }
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": true,
  "adjustments": [
    {
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    }
  ]
}
```

**Response**

```json
{
  "data": {
    "id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a",
    "items": [
      {
        "rate": 50000,
        "amount": 500000,
        "detail": "Consulting hours",
        "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
        "quantity": 10,
        "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
        "inventory_id": "55a40b4d-a23a-49aa-a417-828913e9a5c8",
        "currency_code": "NGN"
      }
    ],
    "amount": "250000.00",
    "status": "PENDING",
    "vendor": {
      "id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
      "display_name": "Global Softworks"
    },
    "approval": 0,
    "due_date": "2026-07-18T10:00:00Z",
    "approvals": [],
    "bill_date": "2026-06-18T10:00:00Z",
    "documents": [],
    "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
    "created_at": "2026-06-18T10:00:00Z",
    "project_id": "spruce-demo",
    "adjustments": [
      {
        "name": "VAT",
        "type": "PERCENTAGE_RATE",
        "value": 7.5,
        "amount": 37500,
        "operation": "ADDITION",
        "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
      }
    ],
    "prepared_by": "user-token-hash",
    "currency_code": "NGN",
    "exchange_rate": "1.00",
    "bill_reference": "BILL-0001",
    "journal_status": "UNPOSTED"
  },
  "status": true,
  "message": "Bill created but could not be posted"
}
```

**SDK Code**

```python Create and post bill
import requests

url = "https://api.papertracc.com/v1/bills"

payload = {
    "items": [
        {
            "rate": 50000,
            "detail": "Consulting hours",
            "quantity": 10,
            "currency_code": "NGN",
            "amount": 500000,
            "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
            "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
            "sku": "SKU-1001"
        }
    ],
    "bill_date": "2026-06-18T10:00:00.000Z",
    "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
    "due_date": "2026-07-18T10:00:00.000Z",
    "allow_post": True,
    "adjustments": [
        {
            "name": "VAT",
            "type": "PERCENTAGE_RATE",
            "value": 7.5,
            "amount": 37500,
            "operation": "ADDITION",
            "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
        }
    ]
}
headers = {
    "Authorization": "Bearer <apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Create and post bill
const url = 'https://api.papertracc.com/v1/bills';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <apiKey>', 'Content-Type': 'application/json'},
  body: '{"items":[{"rate":50000,"detail":"Consulting hours","quantity":10,"currency_code":"NGN","amount":500000,"tax_id":"78c68f6d-d734-4822-9a6c-73f517a0e5c1","account_id":"d037d299-3029-4dc7-8e72-172f80f23c4f","sku":"SKU-1001"}],"bill_date":"2026-06-18T10:00:00.000Z","vendor_id":"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51","due_date":"2026-07-18T10:00:00.000Z","allow_post":true,"adjustments":[{"name":"VAT","type":"PERCENTAGE_RATE","value":7.5,"amount":37500,"operation":"ADDITION","account_id":"2b0d1461-e52e-4a1a-a69c-11801431c2c9"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Create and post bill
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/bills"

	payload := strings.NewReader("{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Create and post bill
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/bills")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java Create and post bill
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.papertracc.com/v1/bills")
  .header("Authorization", "Bearer <apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}")
  .asString();
```

```php Create and post bill
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.papertracc.com/v1/bills', [
  'body' => '{
  "items": [
    {
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    }
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": true,
  "adjustments": [
    {
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Create and post bill
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/bills");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"items\": [\n    {\n      \"rate\": 50000,\n      \"detail\": \"Consulting hours\",\n      \"quantity\": 10,\n      \"currency_code\": \"NGN\",\n      \"amount\": 500000,\n      \"tax_id\": \"78c68f6d-d734-4822-9a6c-73f517a0e5c1\",\n      \"account_id\": \"d037d299-3029-4dc7-8e72-172f80f23c4f\",\n      \"sku\": \"SKU-1001\"\n    }\n  ],\n  \"bill_date\": \"2026-06-18T10:00:00.000Z\",\n  \"vendor_id\": \"0cb2d1a5-2f50-43a1-8c3f-df06f998ef51\",\n  \"due_date\": \"2026-07-18T10:00:00.000Z\",\n  \"allow_post\": true,\n  \"adjustments\": [\n    {\n      \"name\": \"VAT\",\n      \"type\": \"PERCENTAGE_RATE\",\n      \"value\": 7.5,\n      \"amount\": 37500,\n      \"operation\": \"ADDITION\",\n      \"account_id\": \"2b0d1461-e52e-4a1a-a69c-11801431c2c9\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Create and post bill
import Foundation

let headers = [
  "Authorization": "Bearer <apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "items": [
    [
      "rate": 50000,
      "detail": "Consulting hours",
      "quantity": 10,
      "currency_code": "NGN",
      "amount": 500000,
      "tax_id": "78c68f6d-d734-4822-9a6c-73f517a0e5c1",
      "account_id": "d037d299-3029-4dc7-8e72-172f80f23c4f",
      "sku": "SKU-1001"
    ]
  ],
  "bill_date": "2026-06-18T10:00:00.000Z",
  "vendor_id": "0cb2d1a5-2f50-43a1-8c3f-df06f998ef51",
  "due_date": "2026-07-18T10:00:00.000Z",
  "allow_post": true,
  "adjustments": [
    [
      "name": "VAT",
      "type": "PERCENTAGE_RATE",
      "value": 7.5,
      "amount": 37500,
      "operation": "ADDITION",
      "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
    ]
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/bills")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```