Daftra API
DocsAll EndpointsDaftra Partners
DocsAll EndpointsDaftra Partners
  1. Expenses
  • Welcome
  • Getting Started
  • Authorization
  • authorization
    • Authenticate
      POST
  • Invoices
    • GET Single Invoice
      GET
    • Edit Invoices
      PUT
    • Delete Invoices
      DELETE
    • GET All Invoices
      GET
    • Add New Invoice
      POST
  • Estimates
    • GET Single Estimate
      GET
    • Edit Estimates
      PUT
    • Delete Estimates
      DELETE
    • GET All Estimates
      GET
    • Add New Estimate
      POST
  • Credit Notes
    • GET Single Credit Note
      GET
    • Edit Credit Notes
      PUT
    • Delete Credit Notes
      DELETE
    • GET All Credit Notes
      GET
    • Add New Credit Note
      POST
  • Refund Receipts
    • GET Single Refund Receipt
      GET
    • Edit Refund Receipts
      PUT
    • Delete Refund Receipts
      DELETE
    • GET All Refund Receipts
      GET
    • Add New Refund Receipt
      POST
  • Clients
    • GET Single Client
    • Edit Clients
    • Delete Clients
    • GET All Clients
    • Add New Client
  • Suppliers
    • GET Single Supplier
    • Edit Suppliers
    • Delete Suppliers
    • GET All Suppliers
    • Add New Supplier
  • Work Orders
    • GET Single Work Order
    • Edit Work Orders
    • Delete Work Orders
    • GET All Work Orders
    • Add New Work Order
  • Client Appointments
    • GET Single Client Appointment
    • Edit Client Appointments
    • Delete Client Appointments
    • GET All Client Appointments
    • Add New Client Appointment
  • Invoice Appointments
    • GET Single Invoice Appointment
    • Edit Invoice Appointments
    • Delete Invoice Appointments
    • GET All Invoice Appointments
    • Add New Invoice Appointment
  • Estimate Appointments
    • GET Single Estimate Appointment
    • Edit Estimate Appointments
    • Delete Estimate Appointments
    • GET All Estimate Appointments
    • Add New Estimate Appointment
  • Work Order Appointments
    • GET Single Work Order Appointment
    • Edit Work Order Appointments
    • Delete Work Order Appointments
    • GET All Work Order Appointments
    • Add New Work Order Appointment
  • Notes
    • GET Single Note
    • Edit Notes
    • Delete Notes
    • GET All Notes
    • Add New Note
  • Time Tracking
    • GET Single Time Tracking
    • Edit Time Tracking
    • Delete Time Tracking
    • GET All Time Tracking
    • Add New Time Tracking
  • Invoice Payments
    • GET Single Invoice Payment
    • Edit Invoice Payments
    • Delete Invoice Payments
    • GET All Invoice Payments
    • Add New Invoice Payment
  • Client Payments
    • GET Single Client Payment
    • Edit Client Payments
    • Delete Client Payments
    • GET All Client Payments
    • Add New Client Payment
  • Products
    • GET Single Product
    • Edit Products
    • Delete Products
    • GET All Products
    • Add New Product
  • Journals
    • GET Single Journal
    • Edit Journals
    • Delete Journals
    • GET All Journals
    • Add New Journal
  • Journal Accounts
    • GET Single Journal Account
    • Edit Journal Accounts
    • Delete Journal Accounts
    • GET All Journal Accounts
    • Add New Journal Account
  • Journal Cats
    • GET Single Journal Cat
    • Edit Journal Cats
    • Delete Journal Cats
    • GET All Journal Cats
    • Add New Journal Cat
  • Expenses
    • GET Single Expens
      GET
    • Edit Expenses
      PUT
    • Delete Expenses
      DELETE
    • GET All Expenses
      GET
    • Add New Expens
      POST
  • Incomes
    • GET Single Income
    • Edit Incomes
    • Delete Incomes
    • GET All Incomes
    • Add New Income
  • Taxes
    • GET Single Taxe
    • Edit Taxes
    • Delete Taxes
    • GET All Taxes
    • Add New Taxe
  • Purchase Invoices
    • GET Single Purchase Invoice
    • Edit Purchase Invoices
    • Delete Purchase Invoices
    • GET All Purchase Invoices
    • Add New Purchase Invoice
  • Purchase Refunds
    • GET Single Purchase Refund
    • Edit Purchase Refunds
    • Delete Purchase Refunds
    • GET All Purchase Refunds
    • Add New Purchase Refund
  • Stock Transactions
    • GET Single Stock Transaction
    • Edit Stock Transactions
    • Delete Stock Transactions
    • GET All Stock Transactions
    • Add New Stock Transaction
  • Stores
    • GET Single Store
    • Edit Stores
    • Delete Stores
    • GET All Stores
    • Add New Store
  • Product Categories
    • GET Single Product Category
    • GET All Product Categories
  • Staff
    • GET Single Staff
    • GET All Staff
  • Client-attendance-log
    • Add New Client-attendance-log
  • Follow Up Actions
    • GET Single Follow Up Action
    • Delete Follow Up Action
    • GET All Follow Up Actions
  • Follow Up Statuses
    • GET Single Follow Up Status
    • Delete Follow Up Status
    • GET All Follow Up Statuses
  • General Listing
    • GET General Listing
  • Site
    • GET Site Info
  • Treasuries
    • GET Single Treasury
    • Edit Treasuries
    • Delete Treasuries
    • GET All Treasuries
    • Add New Treasury
  1. Expenses

GET Single Expens

Production
https://{{subdomain}}.daftra.com/api2
Production
https://{{subdomain}}.daftra.com/api2
GET
https://{{subdomain}}.daftra.com/api2
/expenses/{id}{format}
Expenses
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://.daftra.com/api2/expenses/' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json'
Response Response Example
200 - Example 1
{
  "code": 200,
  "result": "successful",
  "data": {
    "Expense": {
      "id": 0,
      "amount": 0,
      "currency_code": "string",
      "vendor": "string",
      "category": "string",
      "date": "2019-08-24",
      "file": "string",
      "note": "string",
      "client_id": 0,
      "tax1_id": 0,
      "tax1_name": "string",
      "tax1_value": 0,
      "tax1_amount": 0,
      "tax1_included": true,
      "tax2_id": 0,
      "tax2_name": "string",
      "tax2_value": 0,
      "tax2_amount": 0,
      "tax2_included": true,
      "is_income": true,
      "attachments": "[\r\n 'https://s3.eu-west-1.amazonaws.com/daftra.local/files/9c3832a8/expense/d5912439-52dc-4385-a2e5-06bc9176e8bb.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXJXESINN22IBY4MO%2F20230515%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230515T101647Z&X-Amz-SignedHeaders=host&X-Amz-Expires=6000&X-Amz-Signature=a804d6a4070f36cc4f2c7a06e76b6b5d6050dd918ffa14ac5458be6efebc0e07',\r\n 'https://s3.eu-west-1.amazonaws.com/daftra.local/files/9c3832a8/expense/f75922d3-b5a1-4a7c-a174-3b9a4a960c08.png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAXJXESINN22IBY4MO%2F20230515%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20230515T101647Z&X-Amz-SignedHeaders=host&X-Amz-Expires=6000&X-Amz-Signature=ea4189619af49a92d9b98c3e98695225e55912376e0586977a99f413a286b972'\r\n ]"
    }
  },
  "pagination": {
    "prev": "/api2/clients/?page=1",
    "next": "/api2/clients/?page=3",
    "page": 2,
    "page_count": 5,
    "total_results": 98
  }
}

Request

Path Params
id
string 
required
format
string 
required
Header Params
Accept
string 
optional
Default:
application/json
Content-Type
string 
optional
Default:
application/json
Authorization
string 
optional
You can generate the bearer token using the the authorization endpoint then use it here to be able to operate over your account's data
Default:
Bearer {{access_token}}
apikey
string 
deprecated
You can find/generate your apikey(s) from inside your Daftra Account
Default:
{{apikey}}

Responses

🟢200OK
application/json
OK
Body
code
integer 
optional
Example:
200
result
string 
optional
Example:
successful
data
object 
optional
Expense
object 
optional
pagination
object (Pagination) 
optional
prev
string  | null 
optional
Example:
/api2/clients/?page=1
next
string  | null 
optional
Example:
/api2/clients/?page=3
page
integer 
optional
Example:
2
page_count
integer 
optional
Example:
5
total_results
integer 
optional
Example:
98
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
Previous
Add New Journal Cat
Next
Edit Expenses