Expensicat

Documents

Document storage and management

List documents

GET
/v1/documents
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Query Parameters

cursor?string

Pagination cursor

limit?integer

Number of items per page (1-100)

Default20
Range1 <= value <= 100
category?string
Value in"receipt" | "invoice" | "contract" | "tax" | "insurance" | "legal" | "report" | "bank_statement" | "other"
folder_id?string
include_deleted?|

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

Get document counts

GET
/v1/documents/counts
AuthorizationBearer <token>

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

GET
/v1/documents/{id}
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

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

PATCH
/v1/documents/{id}
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Request Body

application/json

category?string
Value in"receipt" | "invoice" | "contract" | "tax" | "insurance" | "legal" | "report" | "bank_statement" | "other"

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

DELETE
/v1/documents/{id}
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X DELETE "https://api.expensicat.com/api/v1/documents/string"
Empty
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}

Restore document

POST
/v1/documents/{id}/restore
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

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

DELETE
/v1/documents/{id}/permanent
AuthorizationBearer <token>

Session JWT or OAuth2 access token

In: header

Path Parameters

id*string

Response Body

application/json

application/json

curl -X DELETE "https://api.expensicat.com/api/v1/documents/string/permanent"
Empty
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}