> This page is for version v2024-01-31.
> For other versions, use one of these documentation indexes:
> - v2024-05-25 (default): https://docs.monite.com/v-2024-05-25/llms.txt
> - v2024-01-31: https://docs.monite.com/v2024-01-31/llms.txt
> - v2023-09-01: https://docs.monite.com/v2023-09-01/llms.txt

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

# Get a receivable's history

GET https://api.sandbox.monite.com/v1/receivables/{receivable_id}/history

Returns the history of the specified accounts receivable document. The history contains all revisions of the document, status updates, and other events that occurred during the document's lifecycle. For more information, see [Document history](https://docs.monite.com/accounts-receivable/document-history).

You can filter the history by the date range and event type. Events are sorted from oldest to newest by default.

Reference: https://docs.monite.com/api/receivables/get-receivables-id-history

## Authentication

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

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Path parameters

- `receivable_id` (string, required) — ID of the accounts receivable document whose history you want to get.

### Query parameters

- `order` (enum, optional) — Sort order (ascending by default). Typically used together with the `sort` parameter.
  - Allowed values: `asc`, `desc`
- `limit` (integer, optional, default: 100) — The number of items (0 .. 100) to return in a single page of the response. The response may contain fewer items if it is the last or only page.
- `pagination_token` (string, optional) — A pagination token obtained from a previous call to this endpoint. Use it to get the next or previous page of results for your initial query. If `pagination_token` is specified, all other query parameters are ignored and inferred from the initial query. If not specified, the first page of results will be returned.
- `sort` ("timestamp", optional) — The field to sort the results by. Typically used together with the `order` parameter.
- `event_type__in` (enum, optional) — Return only the specified [event types](https://docs.monite.com/accounts-receivable/document-history#event-types). To include multiple types, repeat this parameter for each value: `event_type__in=receivable_updated&event_type__in=status_changed`
  - Allowed values: `status_changed`, `receivable_created`, `receivable_updated`, `based_on_receivable_created`, `payment_received`, `mail_sent`, `payment_reminder_mail_sent`, `overdue_reminder_mail_sent`
- `entity_user_id__in` (string, optional) — Return only events caused by the entity users with the specified IDs. To specify multiple user IDs, repeat this parameter for each ID: `entity_user_id__in=<user1>&entity_user_id__in=<user2>`
- `timestamp__gt` (datetime, optional) — Return only events that occurred after the specified date and time. The value must be in the ISO 8601 format `YYYY-MM-DDThh:mm[:ss[.ffffff]][Z|±hh:mm]`.
- `timestamp__lt` (datetime, optional) — Return only events that occurred before the specified date and time.
- `timestamp__gte` (datetime, optional) — Return only events that occurred on or after the specified date and time.
- `timestamp__lte` (datetime, optional) — Return only events that occurred before or on the specified date and time.

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

## Response

### 200

Successful Response

- `data` (list of ReceivableHistoryResponse, required)
- `next_pagination_token` (string, optional) — A token that can be sent in the `pagination_token` query parameter to get the next page of results, or `null` if there is no next page (i.e. you've reached the last page).
- `prev_pagination_token` (string, optional) — A token that can be sent in the `pagination_token` query parameter to get the previous page of results, or `null` if there is no previous page (i.e. you've reached the first page).

## Errors

### 400 Get Receivables ID History Request Bad Request Error

Bad Request

- `error` (ErrorSchema, required)

### 401 Get Receivables ID History Request Unauthorized Error

Unauthorized

- `error` (ErrorSchema, required)

### 403 Get Receivables ID History Request Forbidden Error

Forbidden

- `error` (ErrorSchema, required)

### 404 Get Receivables ID History Request Not Found Error

Not found

- `error` (ErrorSchema, required)

### 422 Get Receivables ID History Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 500 Get Receivables ID History Request Internal Server Error

Internal Server Error

- `error` (ErrorSchema, required)

## Types

### ReceivableHistoryResponse

Represents an entry in the change history of an accounts receivable document.

- `id` (string, required) — A unique ID of the history record.
- `event_data` (ReceivableHistoryResponseEventData, required) — An object containing additional information about the event or change. The object structure varies based on the `event_type`. In `receivable_created` and `receivable_updated` events, `event_data` is an empty object `{}`.
- `event_type` (enum, required) — The type of the event or change. See [Event types](https://docs.monite.com/accounts-receivable/document-history#event-types).
  - Allowed values: `status_changed`, `receivable_created`, `receivable_updated`, `based_on_receivable_created`, `payment_received`, `mail_sent`, `payment_reminder_mail_sent`, `overdue_reminder_mail_sent`
- `receivable_id` (string, required) — ID of the receivable document that was changed or triggered an event.
- `timestamp` (datetime, required) — UTC date and time when the event or change occurred.
- `current_pdf_url` (string, optional) — A URL of the PDF file that shows the document state after the change. Available only for the following event types: `receivable_created`, `receivable_updated`, `status_changed`, and `payment_received`. In other event types the `current_pdf_url` value is `null`. In `payment_received` events, the `current_pdf_url` value is available only in case of full payments and only if the entity setting `generate_paid_invoice_pdf` is `true`. Note that Monite generates PDFs asynchronously. This means that the initial value of `current_pdf_url` for the abovementioned events right after they occurred is usually `null` and the value gets populated later after the PDF document has been generated.
- `entity_user_id` (string, optional) — ID of the entity user who made the change or trigger the event, or `null` if it was done by using a partner access token.

### ErrorSchema

- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### ReceivableHistoryResponseEventData

An object containing additional information about the event or change. The object structure varies based on the `event_type`. In `receivable_created` and `receivable_updated` events, `event_data` is an empty object `{}`.

### ValidationErrorLocItem

### StatusChangedEventData

Contains information about a document's status change. See the applicable [invoice statuses](https://docs.monite.com/accounts-receivable/invoices/index), [quote statuses](https://docs.monite.com/accounts-receivable/quotes/index), and [credit note statuses](https://docs.monite.com/accounts-receivable/credit-notes#credit-note-lifecycle).

- `new_status` (enum, required) — The new status of a document.
  - Allowed values: `draft`, `issuing`, `issued`, `failed`, `accepted`, `expired`, `declined`, `recurring`, `partially_paid`, `paid`, `overdue`, `uncollectible`, `canceled`
- `old_status` (enum, required) — The old status of a document.
  - Allowed values: `draft`, `issuing`, `issued`, `failed`, `accepted`, `expired`, `declined`, `recurring`, `partially_paid`, `paid`, `overdue`, `uncollectible`, `canceled`

### ReceivableUpdatedEventData

### ReceivableCreatedEventData

### BasedOnReceivableCreatedEventData

In invoice history, this object contains information about a credit note created for this invoice. In quote history, it contains information about an invoice created from this quote.

- `receivable_id` (string, required) — The ID of the newly created receivable document.
- `type` (enum, required) — The type of the receivable document that was created based on the current document.
  - Allowed values: `quote`, `invoice`, `credit_note`

### PaymentReceivedEventData

Contains information about a payment received for an invoice.

- `amount_due` (integer, required) — The remaining amount due of the invoice, in [minor units](https://docs.monite.com/references/currencies#minor-units) of the currency. For example, $12.5 is represented as 1250.
- `amount_paid` (integer, required) — The payment amount, in minor units of the currency.
- `comment` (string, optional) — A user-defined comment about this payment, or `null` if no comment was provided. Comments are available only for payments recorded via `POST /receivables/{receivable_id}/mark_as_paid` and `POST /receivables/{receivable_id}/mark_as_partially_paid`.

### MailSentEventData

Contains information about a sent email.

- `mail_id` (string, required) — ID of the email sending operation. Can be used to get the email sending status from `GET /receivables/{receivable_id}/mails/{mail_id}`.
- `mail_status` (enum, required) — The overall email sending status across all recipients.
  - Allowed values: `pending`, `processing`, `sent`, `partially_sent`, `failed`
- `recipients` (ReceivableMailRecipients, required) — Contains a list of email recipients (To, CC, BCC) and the email sending status for each recipient.

### ReminderMailSentEventData

Contains information about an invoice reminder sent via email.

- `mail_id` (string, required) — ID of the email sending operation. Can be used to get the email sending status from `GET /receivables/{receivable_id}/mails/{mail_id}`.
- `mail_status` (enum, required) — The overall email sending status across all recipients.
  - Allowed values: `pending`, `processing`, `sent`, `partially_sent`, `failed`
- `recipients` (ReceivableMailRecipients, required) — Contains a list of email recipients (To, CC, BCC) and the email sending status for each recipient.
- `term` (enum, required) — Invoice reminder type: * `term_1` - [payment reminder](https://docs.monite.com/accounts-receivable/invoices/payment-reminders) sent before discount date 1, * `term_2` - payment reminder sent before discount date 2, * `term_final` - payment reminder sent before the invoice due date. * `overdue` - [overdue reminder](https://docs.monite.com/accounts-receivable/invoices/overdue-reminders) sent after the due date.
  - Allowed values: `term_1`, `term_2`, `term_final`, `overdue`

### ReceivableMailRecipients

- `bcc` (list of ReceivableMailRecipientState, optional)
- `cc` (list of ReceivableMailRecipientState, optional)
- `to` (list of ReceivableMailRecipientState, optional)

### ReceivableMailRecipientState

- `email` (string, required) — An email address of the recipient.
- `is_success` (boolean, required) — Whether mail was sent successfully.
- `error` (string, optional) — An error message in case the mailing was unsuccessful.

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "cd58435b-1c79-4b17-9f79-f898c93e5f97",
      "event_data": {
        "new_status": "draft",
        "old_status": "draft"
      },
      "event_type": "status_changed",
      "receivable_id": "f669a8a4-0563-4ab9-b54f-e9d700d282c5",
      "timestamp": "2024-01-15T09:30:00Z",
      "current_pdf_url": "https://monite-file-saver.example.com/12345/67890.pdf",
      "entity_user_id": "d5a577b0-01c0-4566-ac5c-44f41935e8c4"
    }
  ],
  "next_pagination_token": "next_pagination_token",
  "prev_pagination_token": "prev_pagination_token"
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/receivables/receivable_id/history"

headers = {
    "x-monite-version": "2024-01-31",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>"
}

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

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/receivables/receivable_id/history';
const options = {
  method: 'GET',
  headers: {
    'x-monite-version': '2024-01-31',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>'
  }
};

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

```go
package main

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

func main() {

	url := "https://api.sandbox.monite.com/v1/receivables/receivable_id/history"

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

	req.Header.Add("x-monite-version", "2024-01-31")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	req.Header.Add("Authorization", "Bearer <token>")

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

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

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

}
```

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

url = URI("https://api.sandbox.monite.com/v1/receivables/receivable_id/history")

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

request = Net::HTTP::Get.new(url)
request["x-monite-version"] = '2024-01-31'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'

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

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

HttpResponse<String> response = Unirest.get("https://api.sandbox.monite.com/v1/receivables/receivable_id/history")
  .header("x-monite-version", "2024-01-31")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sandbox.monite.com/v1/receivables/receivable_id/history', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2024-01-31',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/receivables/receivable_id/history");
var request = new RestRequest(Method.GET);
request.AddHeader("x-monite-version", "2024-01-31");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-01-31",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/receivables/receivable_id/history")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```