curl --request GET \
--url https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id} \
--header 'Authorization: Bearer <token>' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}"
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "cd58435b-1c79-4b17-9f79-f898c93e5f97",
"event_data": {
"new_status": "issued",
"old_status": "draft",
"comment": "<string>"
},
"event_type": "<string>",
"receivable_id": "f669a8a4-0563-4ab9-b54f-e9d700d282c5",
"recorded_by": "user",
"timestamp": "2023-11-07T05:31:56Z",
"current_pdf_url": "https://monite-file-saver.example.com/12345/67890.pdf",
"entity_user_first_name": "Mary",
"entity_user_id": "d5a577b0-01c0-4566-ac5c-44f41935e8c4",
"entity_user_last_name": "Wong",
"entity_user_role_id": "9f8b1a2c-3d4e-4f50-a61b-7c8d9e0f1a2b",
"entity_user_role_name": "Finance admin"
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Get history record
Returns a single record from the change history of the specified accounts receivable document.
curl --request GET \
--url https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id} \
--header 'Authorization: Bearer <token>' \
--header 'x-finops-version: <x-finops-version>' \
--header 'x-organization-id: <x-organization-id>'import requests
url = "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}"
headers = {
"x-finops-version": "<x-finops-version>",
"x-organization-id": "<x-organization-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-finops-version': '<x-finops-version>',
'x-organization-id': '<x-organization-id>',
Authorization: 'Bearer <token>'
}
};
fetch('https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-finops-version: <x-finops-version>",
"x-organization-id: <x-organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-finops-version", "<x-finops-version>")
req.Header.Add("x-organization-id", "<x-organization-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}")
.header("x-finops-version", "<x-finops-version>")
.header("x-organization-id", "<x-organization-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.tesouro.com/finops/v1/receivables/{receivable_id}/history/{receivable_history_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-finops-version"] = '<x-finops-version>'
request["x-organization-id"] = '<x-organization-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "cd58435b-1c79-4b17-9f79-f898c93e5f97",
"event_data": {
"new_status": "issued",
"old_status": "draft",
"comment": "<string>"
},
"event_type": "<string>",
"receivable_id": "f669a8a4-0563-4ab9-b54f-e9d700d282c5",
"recorded_by": "user",
"timestamp": "2023-11-07T05:31:56Z",
"current_pdf_url": "https://monite-file-saver.example.com/12345/67890.pdf",
"entity_user_first_name": "Mary",
"entity_user_id": "d5a577b0-01c0-4566-ac5c-44f41935e8c4",
"entity_user_last_name": "Wong",
"entity_user_role_id": "9f8b1a2c-3d4e-4f50-a61b-7c8d9e0f1a2b",
"entity_user_role_name": "Finance admin"
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"message": "<string>"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"error": {
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The ID of the entity that owns the requested resource.
"9d2b4c8f-2087-4738-ba91-7359683c49a4"
Path Parameters
ID of the history record to return. You can get these IDs from GET /receivables/{receivable_id}/history.
ID of the accounts receivable document whose history you want to get.
Response
Successful Response
Represents an entry in the change history of an accounts receivable document.
A unique ID of the history record.
"cd58435b-1c79-4b17-9f79-f898c93e5f97"
An object containing additional information about the event or change. The object structure varies based on the event_type. In receivable_created events it carries the document's initial status and its creation source. In receivable_updated events it carries a fields map describing what changed: each entry names a field and gives its old and new values. An update where nothing tracked changed carries an empty field map ({"fields": {}}).
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
Show child attributes
Show child attributes
The type of the event or change.
ID of the receivable document that was changed or triggered an event.
"f669a8a4-0563-4ab9-b54f-e9d700d282c5"
Whether the row is attributed to an entity user or to no user: 'user' when entity_user_id is set, 'system' when it is null.
user, system UTC date and time when the event or change occurred.
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.
"https://monite-file-saver.example.com/12345/67890.pdf"
First name of the entity user who made the change, as it was at the time of the event. null on rows where it was not captured: recorded_by is system, the event predates this field, or the name could not be resolved when the row was written.
"Mary"
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.
"d5a577b0-01c0-4566-ac5c-44f41935e8c4"
Last name of the entity user who made the change, as it was at the time of the event. null on rows where it was not captured: recorded_by is system, the event predates this field, or the name could not be resolved when the row was written.
"Wong"
ID of the role the entity user held at the time of the event. null on rows where it was not captured: recorded_by is system, the event predates this field, or the role could not be resolved when the row was written.
"9f8b1a2c-3d4e-4f50-a61b-7c8d9e0f1a2b"
Display name of the role the entity user held at the time of the event. null on rows where it was not captured: recorded_by is system, the event predates this field, or the role could not be resolved when the row was written.
"Finance admin"
Was this page helpful?