daftra_get_site_info
Get account info
The Daftra account this API key belongs to: id, business name, subdomain, country, timezone, date format, default currency and subscription expiry. Check the date format and currency here before creating records. GET /site_info.
Takes no parameters.
daftra_list_clients
List clients
List clients (customers), 20 per page by default. Search by name, number, email or phone with `keywords`. Each item is wrapped in a `Client` object. GET /clients.
Parameterspagelimitkeywordsassign_staff_id
daftra_get_client
Get client
One client by id (contact details, balance settings, currency, address). GET /clients/{id}.
Parametersclient_idrequired
daftra_list_invoices
List invoices
List sales invoices (and debit notes), most recent first. Filter by client, payment status, dates or free text. By default each item has the header and client; set recursive=1 for line items, payments and taxes. GET /invoices.
Parameterspagesortlimitdate_tokeywordsclient_iddate_fromdirectionrecursivedue_date_tocurrency_codedue_date_from+3 more
daftra_get_invoice
Get invoice
One standard invoice by id with line items, payments, taxes, custom fields and client. Other document types (estimate, credit note) answer 404. GET /invoices/{id}.
Parametersinvoice_idrequired
daftra_list_estimates
List estimates
List estimates (quotes), most recent first. Filter by client, status, dates or free text. GET /estimates.
Parametersnamepagelimitdate_toclient_iddate_fromcurrency_codepayment_status
daftra_get_estimate
Get estimate
One estimate (quote) by id with line items, taxes and client. GET /estimates/{id}.
Parametersestimate_idrequired
daftra_list_invoice_payments
List invoice payments
List payments recorded against invoices, most recent first. Opening-balance and client-credit payments are excluded. GET /invoice_payments.
Parametersnopagesortlimitstatusdate_toamount_toclient_iddate_fromdirectionamount_frompayment_method
daftra_list_client_payments
List client payments
List payments received from clients, most recent first. Opening-balance and client-credit payments are excluded. GET /client_payments.
Parametersnopagesortlimitstatusdate_toamount_toclient_iddate_fromdirectionamount_frompayment_method
daftra_list_products
List products
List products and services (name, code, price, stock) ordered by name. Search by name, code, barcode or tag with `keywords`. Each item is a `Product` object. GET /products.
Parameterspagelimitstatuscategorykeywordssupplier_idproduct_code
daftra_get_product
Get product
One product by id with images and categories. GET /products/{id}.
Parametersproduct_idrequired
daftra_list_product_categories
List product categories
List product categories with their parent category. GET /product_categories.
Parameterspagelimitparent_id
daftra_list_stores
List stores (warehouses)
List stores (warehouses) the key's user may view. Use the ids to filter stock transactions. GET /stores.
Parameterspagelimit
daftra_list_stock_transactions
List stock transactions
List processed stock movements (in, out, transfers), most recent first. Filter by product, store or date range. GET /stock_transactions.
Parameterspagelimitdate_tostore_iddate_fromproduct_id
daftra_list_treasuries
List treasuries and bank accounts
List treasuries and bank accounts the key's user may view, with balances. Use the ids when recording expenses. GET /treasuries.
Parameterspagelimit
daftra_list_expenses
List expenses
List expenses (money out), most recent first, with amount, vendor, category and treasury. Filter by dates, amount, category, vendor or status. GET /expenses.
Parametersnotepagesortlimitstatusvendordate_toamount_todate_fromdirectionamount_fromexpense_category_id
daftra_get_expense
Get expense
One expense by id. GET /expenses/{id}.
Parametersexpense_idrequired
daftra_list_incomes
List incomes
List incomes (money in that is not an invoice payment), most recent first. Same filters as expenses. GET /incomes.
Parametersnotepagesortlimitstatusvendordate_toamount_todate_fromdirectionamount_fromexpense_category_id
daftra_list_taxes
List taxes
List the taxes configured for the account (name, rate, active). Use the ids as tax1/tax2 on invoice lines. All taxes come in one reply. GET /taxes.
Parametersis_active
daftra_list_purchase_invoices
List purchase invoices
List purchase invoices (bills from suppliers), most recent first. Search by supplier or filter by payment status. GET /purchase_invoices.
Parameterspagelimitkeywordspayment_status
daftra_get_purchase_invoice
Get purchase invoice
One purchase invoice by id with line items, supplier, taxes and payments. GET /purchase_invoices/{id}.
Parameterspurchase_invoice_idrequired
daftra_list_suppliers
List suppliers
List suppliers. Filter by name, address, postal code, country or status. GET /suppliers.
Parametersnamepagelimitstatusaddresspostal_codecountry_code
daftra_get_supplier
Get supplier
One supplier by id. GET /suppliers/{id}.
Parameterssupplier_idrequired
daftra_list_notes
List notes
List notes recorded against clients, invoices, estimates, purchase invoices, staff, suppliers, products and work orders: text, the record it belongs to (item_type + item_id), author, follow-up status. GET /notes.
Parameterstofrompagelimit
daftra_create_client
Create client
WRITE: create a client (customer). Only business_name is required. Without an email the client is created as offline (no email sending). Returns the new client's id and client_number. POST /clients.
Parameterscitytypeemailnotesstatephone1phone2address1address2last_namefirst_namepostal_code+4 more
daftra_update_client
Update client
WRITE: change fields of an existing client. Partial update: only the fields you pass change; business_name cannot be emptied. PUT /clients/{id}.
Parameterscitytypeemailnotesstatephone1phone2address1address2client_idrequiredlast_namefirst_name+4 more
daftra_create_supplier
Create supplier
WRITE: create a supplier. business_name is required; email is required unless is_offline is true. Returns the new supplier's id. POST /suppliers.
Parameterscityemailnotesstatephone1phone2address1address2last_namefirst_nameis_offlinepostal_code+3 more
daftra_create_expense
Create expense
WRITE: record an expense (money out of a treasury). amount and date are required; the treasury defaults to the primary one and the currency to the account currency. Pass unique_id so a retry cannot create it twice. Returns the new expense id and number. POST /expenses.
Parametersdaterequirednoteamountrequiredvendorcategoryclient_idunique_idsupplier_idtreasury_idcurrency_codeexpense_numberexpense_category_id
daftra_create_invoice
Create invoice
WRITE: create a sales invoice for a client with line items. It is saved as a DRAFT unless you pass draft=false; a final invoice posts to the books and stock. Returns the new invoice id. POST /invoices.
Parametersnodatedraftitemsrequirednotesdiscountclient_idrequiredpo_numbercurrency_code
WRITE: add a note to a client, invoice, estimate, purchase invoice, supplier, product, staff member or work order. The note is private unless share_with_partner is true. POST /notes/{type}/{id}.
Parametersidrequiredbodyrequireddatetyperequiredshare_with_partner