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

# Reject Bill

PATCH https://api.papertracc.com/v1/bills/{id}/reject

Rejects a prepared bill.

Requires the `can_reject_bill` permission on the key owner's role.

**Keys:** secret key only.

Reference: https://api-docs.papertracc.com/core/purchases/bills/reject-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 workspace.

## Servers

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

## Request

### Path parameters

- `id` (string, required)

## Response

### 200

OK

- `data` (BillsIdRejectPatchResponsesContentApplicationJsonSchemaData, required)
- `status` (boolean, required)
- `message` (string, required)

## Errors

### 401 Unauthorized Error

The API key is missing or invalid, the key owner is no longer an active member of the organisation, or the key owner is not a member of the workspace in the `identity` header.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

### 403 Forbidden Error

Either the key owner's role does not include the permission this endpoint needs (`PERMISSION_DENIED`), or the service this endpoint belongs to is turned off for the workspace (`SERVICE_DISABLED`).

- `status` (boolean, required)
- `message` (string, required)
- `error_code` (enum, optional) — Machine-readable reason. Present on 402 and 403 responses.
  - Allowed values: `PERMISSION_DENIED`, `SERVICE_DISABLED`, `OPEN_API_NOT_ENABLED`
- `permission` (string, optional) — The role permission the request needs. Set when `error_code` is `PERMISSION_DENIED`.
- `service` (string, optional) — The workspace service that is turned off. Set when `error_code` is `SERVICE_DISABLED`.

## Types

### BillsIdRejectPatchResponsesContentApplicationJsonSchemaData

- `id` (string, required)
- `items` (list of BillsIdRejectPatchResponsesContentApplicationJsonSchemaDataItemsItems, required)
- `amount` (string, required)
- `status` (string, required)
- `vendor` (BillsIdRejectPatchResponsesContentApplicationJsonSchemaDataVendor, 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 BillsIdRejectPatchResponsesContentApplicationJsonSchemaDataAdjustmentsItems, required)
- `payment_schedule` (PaymentSchedule, required, nullable) — The payment schedule built from the document's payment term, or null when the document has a plain due date.
- `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)

### BillsIdRejectPatchResponsesContentApplicationJsonSchemaDataItemsItems

- `rate` (string, required) — Decimal value serialized as a string, e.g. "12.50".
- `amount` (string, required) — Decimal value serialized as a string, e.g. "12.50".
- `detail` (string, required)
- `tax_id` (string, required)
- `quantity` (double, required) — Quantity of the line, as a number with at most 4 decimal places.
- `account_id` (string, required)
- `inventory_id` (string, required)
- `currency_code` (string, required)
- `sku` (string, optional) — SKU of the inventory item the line is tied to. Empty when the line was created without a `sku`.
- `tax_name` (string, optional)
- `vat` (string, optional)
- `unit` (string, optional) — Unit of measure for the line: the item's selling unit (`EACH`, `G`, `KG`, `OZ`, `LB`, `ML`, `L`, `FL_OZ`, `CM`, `M`, `IN`, `FT`, `YD`) or the label sent on the request. Omitted when the line has no unit.
- `unit_factor` (string, optional) — Stock units held by one billed unit. Decimal value serialized as a string. Omitted when no factor was sent, in which case it is 1.

### BillsIdRejectPatchResponsesContentApplicationJsonSchemaDataVendor

- `id` (string, required)
- `display_name` (string, required)

### BillsIdRejectPatchResponsesContentApplicationJsonSchemaDataAdjustmentsItems

- `name` (string, required)
- `type` (string, required)
- `value` (string, required) — Decimal value serialized as a string, e.g. "12.50".
- `amount` (string, required) — Decimal value serialized as a string, e.g. "12.50".
- `operation` (string, required)
- `account_id` (string, required)

### PaymentSchedule

- `term_id` (string, required, nullable) — The payment term the schedule was built from.
- `name` (string, required) — The term name at the time it was applied.
- `net_days` (integer, required)
- `instalments` (list of PaymentScheduleInstalment, required) — Empty when the document has a single due date, which is then `due_date` on the document.
- `discount` (PaymentScheduleDiscount, required, nullable) — Early-payment discount on this document, or null.
- `is_layaway` (boolean, optional) — Present and true on a layaway order's schedule.
- `release_instalment` (integer, optional) — Present on a layaway order's schedule: the instalment after which the goods are released.

### PaymentScheduleInstalment

- `type` (enum, required) — `PERCENTAGE_RATE` reads `value` as a percentage of the document total. `FLAT_RATE` reads it as an amount in the document currency.
  - Allowed values: `PERCENTAGE_RATE`, `FLAT_RATE`
- `value` (string, required) — Decimal value serialized as a string.
- `net_days` (integer, required)
- `due_date` (datetime, required) — RFC 3339 timestamp. Fractional seconds are present when the underlying value has sub-second precision and are variable-length (not padded to a fixed number of digits) - they may be absent entirely, e.g. 2025-12-29T18:00:00Z, or carry up to 9 digits, e.g. 2025-12-29T18:00:00.610806Z.
- `amount` (string, required) — The share of the document total due on `due_date`. Decimal value serialized as a string.

### PaymentScheduleDiscount

- `type` (enum, required) — `PERCENTAGE_RATE` reads `value` as a percentage of the document total. `FLAT_RATE` reads it as an amount in the document currency.
  - Allowed values: `PERCENTAGE_RATE`, `FLAT_RATE`
- `value` (string, required) — Decimal value serialized as a string.
- `net_days` (integer, required)
- `deadline` (datetime, required) — The last day the discount can be taken.
- `amount` (string, required) — The discount available on this document. Decimal value serialized as a string.

## Examples

**Response**

```json
{
  "data": {
    "id": "45c6e26d-e132-4548-8e2e-5bfc467cf94a",
    "items": [
      {
        "rate": "50000.00",
        "amount": "500000.00",
        "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",
        "sku": "SKU-1001"
      }
    ],
    "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.50",
        "amount": "37500.00",
        "operation": "ADDITION",
        "account_id": "2b0d1461-e52e-4a1a-a69c-11801431c2c9"
      }
    ],
    "payment_schedule": null,
    "prepared_by": "user-token-hash",
    "currency_code": "NGN",
    "exchange_rate": "1.00",
    "bill_reference": "BILL-0001",
    "journal_status": "UNPOSTED"
  },
  "status": true,
  "message": "Successfully rejected bill"
}
```

**SDK Code**

```python Purchases_Bills_Reject Bill_example
import requests

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

headers = {"Authorization": "Bearer <apiKey>"}

response = requests.patch(url, headers=headers)

print(response.json())
```

```javascript Purchases_Bills_Reject Bill_example
const url = 'https://api.papertracc.com/v1/bills/id/reject';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <apiKey>'}};

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

```go Purchases_Bills_Reject Bill_example
package main

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

func main() {

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

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <apiKey>")

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

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

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

}
```

```ruby Purchases_Bills_Reject Bill_example
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <apiKey>'

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

```java Purchases_Bills_Reject Bill_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.papertracc.com/v1/bills/id/reject")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php Purchases_Bills_Reject Bill_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.papertracc.com/v1/bills/id/reject', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
  ],
]);

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

```csharp Purchases_Bills_Reject Bill_example
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/bills/id/reject");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Purchases_Bills_Reject Bill_example
import Foundation

let headers = ["Authorization": "Bearer <apiKey>"]

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

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()
```