Documents
Document storage and management
List documents
Session JWT or OAuth2 access token
In: header
Query Parameters
Pagination cursor
Number of items per page (1-100)
201 <= value <= 100"receipt" | "invoice" | "contract" | "tax" | "insurance" | "legal" | "report" | "bank_statement" | "other"Response Body
application/json
application/json
curl -X GET "https://api.expensicat.com/api/v1/documents"{
"data": [
{
"id": "string",
"organization_id": "string",
"storage_object_id": "string",
"category": "receipt",
"folder_id": "string",
"deleted_at": "string",
"deleted_by": "string",
"created_at": "string",
"updated_at": "string",
"file_name": "string",
"file_path": "string",
"content_type": "string",
"size": 0,
"source": "string",
"primary_attachment": {
"attachable_type": "string",
"attachable_id": "string",
"entry_name": "string",
"invoice_number": "string"
}
}
],
"meta": {
"count": 0,
"next_cursor": "string"
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Create document
Session JWT or OAuth2 access token
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.expensicat.com/api/v1/documents" \ -H "Content-Type: application/json" \ -d '{ "category": "receipt" }'{
"data": {
"id": "string",
"organization_id": "string",
"storage_object_id": "string",
"category": "receipt",
"folder_id": "string",
"deleted_at": "string",
"deleted_by": "string",
"created_at": "string",
"updated_at": "string",
"file_name": "string",
"file_path": "string",
"content_type": "string",
"size": 0,
"source": "string",
"primary_attachment": {
"attachable_type": "string",
"attachable_id": "string",
"entry_name": "string",
"invoice_number": "string"
},
"attachments": [
{
"id": "string",
"attachable_type": "string",
"attachable_id": "string",
"is_primary": true,
"label": "string"
}
]
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Get document counts
Session JWT or OAuth2 access token
In: header
Response Body
application/json
application/json
curl -X GET "https://api.expensicat.com/api/v1/documents/counts"{
"data": {
"all": 0,
"receipt": 0,
"invoice": 0,
"contract": 0,
"tax": 0,
"insurance": 0,
"legal": 0,
"report": 0,
"bank_statement": 0,
"other": 0,
"trash": 0
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Get document
Session JWT or OAuth2 access token
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://api.expensicat.com/api/v1/documents/string"{
"data": {
"id": "string",
"organization_id": "string",
"storage_object_id": "string",
"category": "receipt",
"folder_id": "string",
"deleted_at": "string",
"deleted_by": "string",
"created_at": "string",
"updated_at": "string",
"file_name": "string",
"file_path": "string",
"content_type": "string",
"size": 0,
"source": "string",
"primary_attachment": {
"attachable_type": "string",
"attachable_id": "string",
"entry_name": "string",
"invoice_number": "string"
},
"attachments": [
{
"id": "string",
"attachable_type": "string",
"attachable_id": "string",
"is_primary": true,
"label": "string"
}
]
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Update document
Session JWT or OAuth2 access token
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://api.expensicat.com/api/v1/documents/string" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": "string",
"organization_id": "string",
"storage_object_id": "string",
"category": "receipt",
"folder_id": "string",
"deleted_at": "string",
"deleted_by": "string",
"created_at": "string",
"updated_at": "string",
"file_name": "string",
"file_path": "string",
"content_type": "string",
"size": 0,
"source": "string",
"primary_attachment": {
"attachable_type": "string",
"attachable_id": "string",
"entry_name": "string",
"invoice_number": "string"
},
"attachments": [
{
"id": "string",
"attachable_type": "string",
"attachable_id": "string",
"is_primary": true,
"label": "string"
}
]
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Delete document
Session JWT or OAuth2 access token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://api.expensicat.com/api/v1/documents/string"{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Restore document
Session JWT or OAuth2 access token
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X POST "https://api.expensicat.com/api/v1/documents/string/restore"{
"data": {
"id": "string",
"organization_id": "string",
"storage_object_id": "string",
"category": "receipt",
"folder_id": "string",
"deleted_at": "string",
"deleted_by": "string",
"created_at": "string",
"updated_at": "string",
"file_name": "string",
"file_path": "string",
"content_type": "string",
"size": 0,
"source": "string",
"primary_attachment": {
"attachable_type": "string",
"attachable_id": "string",
"entry_name": "string",
"invoice_number": "string"
},
"attachments": [
{
"id": "string",
"attachable_type": "string",
"attachable_id": "string",
"is_primary": true,
"label": "string"
}
]
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}Permanently delete document
Session JWT or OAuth2 access token
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://api.expensicat.com/api/v1/documents/string/permanent"{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": {
"property1": null,
"property2": null
}
}
}