# Daftra API ## Docs - [Welcome](https://docs.daftara.dev/928427m0.md): - [Getting Started](https://docs.daftara.dev/933384m0.md): - Authorization [How To Authorize](https://docs.daftara.dev/933385m0.md): - Endpoints > Multity entity request [Overview](https://docs.daftara.dev/2219400m0.md): - Advanced Filtering [API Improvements](https://docs.daftara.dev/1258822m0.md): - Advanced Filtering [Filtering](https://docs.daftara.dev/1258824m0.md): - Advanced Filtering [Endpoints Structure](https://docs.daftara.dev/1259001m0.md): - Developers Portal [Introduction & Getting Started](https://docs.daftara.dev/2218433m0.md): - Developers Portal [Dashboard, Earnings & Withdrawals](https://docs.daftara.dev/2218914m0.md): - Developers Portal [Creating a New App](https://docs.daftara.dev/2218915m0.md): - Developers Portal [App Configuration](https://docs.daftara.dev/2218916m0.md): - Developers Portal [Managing Your App](https://docs.daftara.dev/2218917m0.md): - Developers Portal [ Entities: Modeling Your Data](https://docs.daftara.dev/2218920m0.md): - Developers Portal [The Entity Builder](https://docs.daftara.dev/2218921m0.md): - Developers Portal [Buttons & Page Scripts](https://docs.daftara.dev/2218922m0.md): - Developers Portal [Integrations: Webhooks](https://docs.daftara.dev/2218925m0.md): - Developers Portal [Invitations, Publishing & Reviews](https://docs.daftara.dev/2218928m0.md): ## API Docs - Authorization [Generate Access Token](https://docs.daftara.dev/40311723e0.md): Issues an OAuth 2.0 access token for the Daftra API. The returned token is bound to the account (tenant) identified by the request subdomain. - Endpoints > Site [GET Site Info](https://docs.daftara.dev/40960577e0.md): Returns information about the current site (account) and the authenticated principal: the business/owner profile, localization (currency, number and date formats), subscription status, and a few plugin/context flags. The payload is wrapped in a `Site` object under `data`. - Endpoints > Sales > Invoices [GET All Invoices](https://docs.daftara.dev/15115241e0.md): Returns a paginated list of the account's invoices and debit notes (and advance payments when that feature is enabled), most recent first. - Endpoints > Sales > Invoices [GET Single Invoice](https://docs.daftara.dev/15115238e0.md): Returns a single **standard invoice** by id, with full nested detail — line items, payments, taxes, documents, custom fields and the client — in one response (no `recursive` flag needed). - Endpoints > Sales > Invoices [Edit Invoice](https://docs.daftara.dev/15115239e0.md): Edit an existing **standard invoice** by id. Send via `PUT /invoices/{id}` (or `POST /invoices/{id}`) with the full invoice payload — submitted line items, payments and custom fields replace the existing ones. - Endpoints > Sales > Invoices [Delete Invoice](https://docs.daftara.dev/15115240e0.md): - Endpoints > Sales > Invoices [Add New Invoice](https://docs.daftara.dev/15115242e0.md): Creates an invoice. Only `Invoice.client_id` is required; most other fields are optional and several are filled in automatically when omitted. A successful create returns HTTP 202 with the new invoice id and number. - Endpoints > Sales > Invoices [Bulk Add Invoices](https://docs.daftara.dev/39121452e0.md): Creates multiple invoices in a single request. The request body is a **JSON array**; each element has the exact same shape as the body of **Add New Invoice** (an object with an `Invoice` member plus optional `InvoiceItem`, `Payment`, etc.). - Endpoints > Sales > Invoices [Edit Invoice Draft Status](https://docs.daftara.dev/38758418e0.md): Updates an invoice's draft status. - Endpoints > Sales > Invoices [Assign Work Order to Invoice](https://docs.daftara.dev/38758645e0.md): Assigns a work order to an existing invoice (or clears the assignment). - Endpoints > Sales > Invoices [Add Shipping to Invoice](https://docs.daftara.dev/38758708e0.md): Sets shipping details on an existing invoice. - Endpoints > Sales > Invoices [Convert Sales Order to Invoice](https://docs.daftara.dev/39121459e0.md): Converts a sales order (identified by the `id` path parameter) into a new invoice. - Endpoints > Sales > Invoices [Delete Sales Order](https://docs.daftara.dev/39121460e0.md): Deletes a sales order identified by the `id` path parameter. - Endpoints > Sales > Subsciptions [List Subscriptions](https://docs.daftara.dev/39121454e0.md): Returns a paginated list of the account's **subscriptions** (recurring invoices), most recent first. - Endpoints > Sales > Subsciptions [View Subscription](https://docs.daftara.dev/39121455e0.md): Returns a single **subscription** (recurring invoice) by id, with full nested detail — line items, payments, taxes, documents, custom fields and the client — in one response (no `recursive` flag needed). - Endpoints > Sales > Subsciptions [Create Subscription](https://docs.daftara.dev/39121456e0.md): Creates a **subscription** (recurring invoice generator) that issues invoices automatically on a schedule. - Endpoints > Sales > Subsciptions [Edit Subscription](https://docs.daftara.dev/39121457e0.md): Updates an existing **subscription** (recurring invoice generator) identified by the `id` path parameter. - Endpoints > Sales > Subsciptions [Delete Subscription](https://docs.daftara.dev/39121458e0.md): Deletes a **subscription** (recurring invoice generator) identified by the `id` path parameter. - Endpoints > Sales > Estimates [GET All Estimates](https://docs.daftara.dev/15115246e0.md): Returns a paginated list of the account's **estimates** (quotes), most recent first. - Endpoints > Sales > Estimates [GET Single Estimate](https://docs.daftara.dev/15115243e0.md): Returns a single **estimate** (quote) by id, with full nested detail — line items, payments, taxes, documents, custom fields and the client — in one response (no `recursive` flag needed). - Endpoints > Sales > Estimates [Add New Estimate](https://docs.daftara.dev/15115247e0.md): Creates a new **estimate** (quote). - Endpoints > Sales > Estimates [Edit Estimate](https://docs.daftara.dev/15115244e0.md): Updates an existing **estimate** (quote) identified by the `id` path parameter. - Endpoints > Sales > Estimates [Delete Estimate](https://docs.daftara.dev/15115245e0.md): Deletes an estimate identified by the `id` path parameter. - Endpoints > Sales > Credit Notes [GET All Credit Notes](https://docs.daftara.dev/15115251e0.md): Returns a paginated list of the account's **credit notes**, most recent first. - Endpoints > Sales > Credit Notes [GET Single Credit Note](https://docs.daftara.dev/15115248e0.md): Returns a single **credit note** by id, with full nested detail — line items, payments, taxes, documents, custom fields and the client — in one response (no `recursive` flag needed). - Endpoints > Sales > Credit Notes [Add New Credit Note](https://docs.daftara.dev/15115252e0.md): Creates a new **credit note**. - Endpoints > Sales > Credit Notes [Edit Credit Notes](https://docs.daftara.dev/15115249e0.md): Updates an existing **credit note** identified by the `id` path parameter. - Endpoints > Sales > Credit Notes [Delete Credit Notes](https://docs.daftara.dev/15115250e0.md): Deletes a credit note identified by the `id` path parameter. - Endpoints > Sales > Refund Receipts [GET All Refund Receipts](https://docs.daftara.dev/15115256e0.md): Returns a paginated list of the account's **refund receipts**, most recent first. - Endpoints > Sales > Refund Receipts [GET Single Refund Receipt](https://docs.daftara.dev/15115253e0.md): Returns a single **refund receipt** by id, with full nested detail — line items, payments, taxes, documents, custom fields and the client — in one response (no `recursive` flag needed). - Endpoints > Sales > Refund Receipts [Add New Refund Receipt](https://docs.daftara.dev/15115257e0.md): Creates a new **refund receipt** against an existing invoice. - Endpoints > Sales > Refund Receipts [Edit Refund Receipts](https://docs.daftara.dev/15115254e0.md): Updates an existing **refund receipt** identified by the `id` path parameter. - Endpoints > Sales > Refund Receipts [Delete Refund Receipts](https://docs.daftara.dev/15115255e0.md): Deletes a refund receipt identified by the `id` path parameter. - Endpoints > Sales > Refund Receipts [Bulk Add Refund Receipts](https://docs.daftara.dev/39121453e0.md): Creates multiple refund receipts in a single request. The request body is a **JSON array**; each element has the same shape as the body of **Add New Refund Receipt** (an object with an `Invoice` member — `RefundReceipt` is also accepted — plus optional `InvoiceItem`, `Payment`, etc.). - Endpoints > Sales > Invoice Payments [GET All Invoice Payments](https://docs.daftara.dev/15115306e0.md): List invoice payments, most recent first. - Endpoints > Sales > Invoice Payments [GET Single Invoice Payment](https://docs.daftara.dev/15115303e0.md): Retrieve a single invoice payment by its reference id. - Endpoints > Sales > Invoice Payments [Add New Invoice Payment](https://docs.daftara.dev/15115307e0.md): Record a payment against an invoice. - Endpoints > Sales > Invoice Payments [Edit Invoice Payments](https://docs.daftara.dev/15115304e0.md): Update an existing invoice payment. - Endpoints > Sales > Invoice Payments [Delete Invoice Payments](https://docs.daftara.dev/15115305e0.md): Delete an invoice payment by its id. - Endpoints > Sales > Invoice Appointments [GET All Invoice Appointments](https://docs.daftara.dev/15115281e0.md): Returns a paginated list of invoice appointments (follow-up appointments attached to invoices). Supports filtering by invoice, partner, action, status and appointment id. Requires permission to view appointments/notes. - Endpoints > Sales > Invoice Appointments [GET Single Invoice Appointment](https://docs.daftara.dev/15115278e0.md): Returns a single invoice appointment by id. Requires permission to view the appointment. The appointment object is returned under the `FollowUpReminder` key. - Endpoints > Sales > Invoice Appointments [Add New Invoice Appointment](https://docs.daftara.dev/15115282e0.md): Creates an invoice appointment (a follow-up appointment attached to an invoice). The appointment fields are wrapped in an `InvoiceAppointments` object; `item_id` (the invoice id) and `date` are required. Optionally include a `RecurringAppointment` object (with `recurring` set to `1`) to create a repeating appointment. Requires permission to add appointments/notes. Returns `202` with the new appointment's `id`. - Endpoints > Sales > Invoice Appointments [Edit Invoice Appointments](https://docs.daftara.dev/15115279e0.md): Updates an existing invoice appointment. Send only the fields to change, wrapped in an `InvoiceAppointments` object; omitted fields keep their current values. Requires permission to edit appointments/notes. - Endpoints > Sales > Invoice Appointments [Delete Invoice Appointments](https://docs.daftara.dev/15115280e0.md): Permanently deletes an invoice appointment by id. This is a hard delete and cannot be undone. If the appointment was the last occurrence of a recurring series, the series is removed as well. Requires permission to edit/delete appointments. - Endpoints > Sales > Advance Payment Invoices [GET All Advance payment](https://docs.daftara.dev/32868810e0.md): - Endpoints > Sales > Advance Payment Invoices [GET Single Advance payment](https://docs.daftara.dev/32868805e0.md): - Endpoints > Sales > Advance Payment Invoices [Add Advance Payment](https://docs.daftara.dev/32867460e0.md): - Endpoints > Sales > Estimate Appointments [GET All Estimate Appointments](https://docs.daftara.dev/15115286e0.md): Returns a paginated list of estimate appointments (follow-up appointments attached to estimates). Supports filtering by estimate, partner, action, status and appointment id. Requires permission to view appointments/notes. - Endpoints > Sales > Estimate Appointments [GET Single Estimate Appointment](https://docs.daftara.dev/15115283e0.md): Returns a single estimate appointment by id. Requires permission to view the appointment. The appointment object is returned under the `FollowUpReminder` key. - Endpoints > Sales > Estimate Appointments [Add New Estimate Appointment](https://docs.daftara.dev/15115287e0.md): Creates an estimate appointment (a follow-up appointment attached to an estimate). The appointment fields are wrapped in an `EstimateAppointment` object; `item_id` (the estimate id) and `date` are required. Optionally include a `RecurringAppointment` object (with `recurring` set to `1`) to create a repeating appointment. Requires permission to add appointments/notes. Returns `202` with the new appointment's `id`. - Endpoints > Sales > Estimate Appointments [Edit Estimate Appointments](https://docs.daftara.dev/15115284e0.md): Updates an existing estimate appointment. Send only the fields to change, wrapped in an `EstimateAppointment` object; omitted fields keep their current values. Requires permission to edit appointments/notes. - Endpoints > Sales > Estimate Appointments [Delete Estimate Appointments](https://docs.daftara.dev/15115285e0.md): Permanently deletes an estimate appointment by id. This is a hard delete and cannot be undone. If the appointment was the last occurrence of a recurring series, the series is removed as well. Requires permission to edit/delete appointments. - Endpoints > Sales > Estimate Appointments [Update Estimate Appointment (POST alias)](https://docs.daftara.dev/39121466e0.md): Updates an existing estimate appointment. Send only the fields to change, wrapped in an `EstimateAppointment` object; omitted fields keep their current values. Requires permission to edit appointments/notes. This `POST` route is an alias of the `PUT` update endpoint for the same path. - Endpoints > Sales > Shipping Options [List Shipping Options](https://docs.daftara.dev/39121480e0.md): Returns the account's **active** shipping options — the named delivery methods (each with a fee and an optional tax) that can be applied to invoices. - Endpoints > Sales > POS [Get POS Shift Session](https://docs.daftara.dev/39121481e0.md): Returns the configuration for the **currently open POS shift session** — the data a point-of-sale client needs to bootstrap a session: the active language and default payment method, the session's branch and store, the cashier, cash-in/cash-out links, and a set of capability and feature flags derived from your permissions and account settings. - Endpoints > Sales > Follow-Up Status [Get All Follow-Up Statuses by type](https://docs.daftara.dev/39121482e0.md): Returns every follow-up status defined for a given item type — the stages a record (client, invoice, work order, …) can move through. Requires the **Edit Client Settings** permission. Statuses are returned in their configured display order. - Endpoints > Sales > Follow-Up Status [Get Single Follow-Up Status](https://docs.daftara.dev/15115381e0.md): Returns a single follow-up status by its numeric id. Requires the **Edit Client Settings** permission. Responds with `404` when no status matches the id. - Endpoints > Sales > Follow-Up Status [Delete Follow-Up Status](https://docs.daftara.dev/15115382e0.md): Deletes a follow-up status by its numeric id. Requires the **Edit Client Settings** permission. - Endpoints > Sales > Follow-Up Status [Get All Follow-Up Statuses](https://docs.daftara.dev/15115383e0.md): - Endpoints > Sales > Follow-Up Status [Add New Follow-Up Status](https://docs.daftara.dev/37565916e0.md): - Endpoints > Clients > Clients [GET All Clients](https://docs.daftara.dev/15115261e0.md): Returns a paginated list of clients for the account. - Endpoints > Clients > Clients [GET Single Client](https://docs.daftara.dev/15115258e0.md): Returns a single client by ID, wrapped in a `Client` object. - Endpoints > Clients > Clients [Add New Client](https://docs.daftara.dev/15115262e0.md): Creates a new client. - Endpoints > Clients > Clients [Edit Clients](https://docs.daftara.dev/15115259e0.md): Updates an existing client by ID. - Endpoints > Clients > Clients [Delete Clients](https://docs.daftara.dev/15115260e0.md): Deletes a client by ID. - Endpoints > Clients > Clients [Assign Staff To Client](https://docs.daftara.dev/39121461e0.md): Assigns one or more staff members to a client. The client is identified by the `id` path parameter, and the staff member(s) are supplied in the `ItemStaff.staff_id` field (a single id or a list of ids). The supplied list **replaces** the client's existing staff assignments. Requires the **Assign Clients to Staff** permission. Returns `{"status": true}` on success. - Endpoints > Clients > Clients [Client Loyalty Points](https://docs.daftara.dev/39121462e0.md): Returns a client's loyalty-points summary: current `points`, the points-to-currency `factor`, the configured `creditType`, and the account's loyalty-points limit check. The client is identified by the `id` path parameter; there is no request body. Requires the **Client Loyalty** plugin to be enabled — when it is not, the endpoint responds with an empty object `{}`. - Endpoints > Clients > Clients [Bulk Add Clients](https://docs.daftara.dev/39121463e0.md): Creates multiple clients in a single request. The request body is a JSON **array**; each element is a client payload using the same fields as the single Add New Client endpoint (a `Client` object plus optional `ClientDetail` and `le_custom_data_client`). Clients are created in order and the response returns one result entry per element. Requires the **Add New Client** permission. - Endpoints > Clients > Clients [Client Has Membership](https://docs.daftara.dev/39121464e0.md): Resolves a client by `barcode` and reports whether they have an active membership. The barcode is supplied in the `q` query parameter; there is no request body. When the barcode resolves to a client with an active membership the response includes the `membership` record; otherwise it returns a `message` indicating no membership or that the client was not found. - Endpoints > Clients > Clients [Client Attendance By Barcode](https://docs.daftara.dev/39121465e0.md): Resolves a client by `barcode` for attendance scanning and returns the matched client record. The barcode is supplied in the `q` query parameter; there is no request body. When the barcode does not resolve to a client, a `message` of `Client Not Found` is returned. - Endpoints > Clients > Client Appointments [GET All Client Appointments](https://docs.daftara.dev/15115276e0.md): Returns a paginated list of client appointments. - Endpoints > Clients > Client Appointments [GET Single Client Appointment](https://docs.daftara.dev/15115273e0.md): Returns a single client appointment by ID. - Endpoints > Clients > Client Appointments [Add New Client Appointment](https://docs.daftara.dev/15115277e0.md): Creates a client appointment. - Endpoints > Clients > Client Appointments [Edit Client Appointments](https://docs.daftara.dev/15115274e0.md): Updates an existing client appointment by ID. - Endpoints > Clients > Client Appointments [Delete Client Appointments](https://docs.daftara.dev/15115275e0.md): Permanently deletes a client appointment by id. This is a hard delete and cannot be undone. If the appointment belongs to a recurring series and was its last remaining occurrence, the recurring series is removed as well. Requires permission to edit/delete appointments. The appointment is identified by the `id` path parameter; there is no request body. - Endpoints > Clients > Client Payments [GET All Client Payments](https://docs.daftara.dev/15115311e0.md): List client payments, most recent first. - Endpoints > Clients > Client Payments [GET Single Client Payment](https://docs.daftara.dev/15115308e0.md): Retrieve a single client payment by its reference id. - Endpoints > Clients > Client Payments [Add New Client Payment](https://docs.daftara.dev/15115312e0.md): Record a payment for a client (an on-account / client payment). - Endpoints > Clients > Client Payments [Edit Client Payments](https://docs.daftara.dev/15115309e0.md): Update an existing client payment. - Endpoints > Clients > Client Payments [Delete Client Payments](https://docs.daftara.dev/15115310e0.md): Delete a client payment by its id. - Endpoints > Clients > Client Attendance Log [Get All Client Attendance Logs](https://docs.daftara.dev/40519157e0.md): Returns a paginated list of client attendance entries (v2 native-entity). - Endpoints > Clients > Client Attendance Log [Get Single Client Attendance Log](https://docs.daftara.dev/40519156e0.md): Returns a single client attendance entry as a flat record (v2 native-entity). - Endpoints > Clients > Client Attendance Log [Add New Client Attendance Log](https://docs.daftara.dev/40519943e0.md): Records a client attendance entry (a client check-in) as a v2 native-entity. - Endpoints > Clients > Client Attendance Log [Edit Client Attendance Log](https://docs.daftara.dev/40519155e0.md): Updates an existing client attendance entry (v2 native-entity). - Endpoints > Clients > Client Attendance Log [Delete Client Attendance Log](https://docs.daftara.dev/40519712e0.md): Deletes a client attendance entry (v2 native-entity). - Endpoints > Clients > Notes [GET All Notes](https://docs.daftara.dev/15115296e0.md): Returns a paginated list of notes (and their attachments) recorded against records across the account — clients, invoices, estimates, purchase invoices, staff, suppliers, products and work orders. Each item carries the note text, the record it belongs to (`item_type` + `item_id`), the author, any follow-up action/status, and an array of attached files. Use `from` / `to` to restrict the result to a note-date range. - Endpoints > Clients > Notes [GET Single Note](https://docs.daftara.dev/15115293e0.md): Returns a single note by its identifier, including the note text, the record it is attached to (`item_type` + `item_id`), the author, any follow-up action/status, and its attached files. - Endpoints > Clients > Notes [Add New Note](https://docs.daftara.dev/15115297e0.md): Creates a note against a record. The record is identified entirely by the URL: `{type}` selects the kind of record and `{id}` is that record's id — the note's `item_type` / `item_id` are derived from the path and any values sent in the body are ignored. The author is set to the authenticated user. Optionally attach files, share the note with the client, or schedule a follow-up appointment by including a `FollowUpReminder` object. - Endpoints > Clients > Notes [Edit Notes](https://docs.daftara.dev/15115294e0.md): Updates an existing note identified by `{id}`. The note's record (`item_type` / `item_id`) and author are fixed by the stored note and cannot be changed; values sent for them in the body are ignored. The request body is wrapped in a `Note` object. - Endpoints > Clients > Notes [Delete Notes](https://docs.daftara.dev/15115295e0.md): Deletes a note by its identifier, together with its attached files. Requires permission to edit/delete notes for the note's record type. This action cannot be undone. - Endpoints > Clients > Follow-Up Action [Get All Follow-Up Actions](https://docs.daftara.dev/15115380e0.md): Returns the list of follow-up actions defined for a given record type (the reusable action labels available when logging a follow-up, e.g. *Follow-Up Call*, *Follow-Up Email*). The `type` path segment selects which record type's actions to list. Results are paginated. Requires the manage client-settings permission. - Endpoints > Clients > Follow-Up Action [Get Single Follow-Up Action](https://docs.daftara.dev/15115378e0.md): Returns a single follow-up action by its identifier, including its display label, the record type it belongs to (`item_type`), and audit timestamps. Requires the manage client-settings permission. - Endpoints > Clients > Follow-Up Action [Delete Follow-Up Action](https://docs.daftara.dev/15115379e0.md): Deletes a follow-up action by id. A follow-up action cannot be deleted while it is still assigned to a follow-up reminder — that case is rejected and the action must be unassigned first. - Endpoints > Bookings > Booking (Classic version) [Get All Bookings](https://docs.daftara.dev/40700777e0.md): Returns a paginated list of bookings for the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Bookings > Booking (Classic version) [Get Single Booking](https://docs.daftara.dev/40700778e0.md): Returns a single booking by id. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Bookings > Booking (Classic version) [Add new Booking](https://docs.daftara.dev/40700252e0.md): Creates a new booking (an appointment-style record). Provide the client, the booking date, and one or more services to book. - Endpoints > Bookings > Booking (Classic version) [Delete booking](https://docs.daftara.dev/40700421e0.md): Deletes a booking by its id. A booking can only be deleted when you have permission and it has **not** already been converted to an invoice — otherwise the request is rejected. Deleting a booking also removes its linked appointment. - Endpoints > Bookings > Booking (Classic version) [Change Booking Status](https://docs.daftara.dev/40700542e0.md): Changes the status of a booking. Pass the booking id and the target status code in the path. - Endpoints > Bookings > Booking (Classic version) [Convert booking to Invoice](https://docs.daftara.dev/40700776e0.md): Converts a booking into an invoice. On success it returns the id of the newly created invoice and marks the booking as *Invoiced*. - Endpoints > Bookings > Booking (Beta version) [Get All Bookings](https://docs.daftara.dev/40464942e0.md): Returns a paginated list of bookings for the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Bookings > Booking (Beta version) [Get Single Booking](https://docs.daftara.dev/40464930e0.md): Returns a single booking by id. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Bookings > Booking (Beta version) [Add new Booking](https://docs.daftara.dev/40464936e0.md): Creates a new booking (an appointment-style record). Provide the client, the booking date, and one or more services to book. - Endpoints > Bookings > Booking (Beta version) [Delete booking](https://docs.daftara.dev/40464943e0.md): Deletes a booking by its id. A booking can only be deleted when you have permission and it has **not** already been converted to an invoice — otherwise the request is rejected. Deleting a booking also removes its linked appointment. - Endpoints > Bookings > Booking (Beta version) [Change Booking Status](https://docs.daftara.dev/40464938e0.md): Changes the status of a booking. Pass the booking id and the target status code in the path. - Endpoints > Work Orders > Work Orders [GET All Work Orders](https://docs.daftara.dev/15115271e0.md): Returns a paginated list of work orders for the authenticated account. - Endpoints > Work Orders > Work Orders [GET Single Work Order](https://docs.daftara.dev/15115268e0.md): Returns a single work order by its identifier. - Endpoints > Work Orders > Work Orders [Add New Work Order](https://docs.daftara.dev/15115272e0.md): Creates a new work order. - Endpoints > Work Orders > Work Orders [Edit Work Orders](https://docs.daftara.dev/15115269e0.md): Updates an existing work order. - Endpoints > Work Orders > Work Orders [Delete Work Orders](https://docs.daftara.dev/15115270e0.md): Deletes a work order by its identifier. - Endpoints > Work Orders > Work Order Appointments [GET All Work Order Appointments](https://docs.daftara.dev/15115291e0.md): Returns a paginated list of work-order appointments (follow-up appointments attached to work orders). Supports filtering by work order, partner, action, status and appointment id. Requires permission to view appointments/notes. Requires the Work Orders plugin to be enabled. - Endpoints > Work Orders > Work Order Appointments [GET Single Work Order Appointment](https://docs.daftara.dev/15115288e0.md): Returns a single work-order appointment by id. Requires permission to view the appointment. The appointment object is returned under the `FollowUpReminder` key. Requires the Work Orders plugin to be enabled. - Endpoints > Work Orders > Work Order Appointments [Add New Work Order Appointment](https://docs.daftara.dev/15115292e0.md): Creates a work-order appointment (a follow-up appointment attached to a work order). The appointment fields are wrapped in a `WorkOrderAppointment` object; `item_id` (the work order id) and `date` are required. Optionally include a `RecurringAppointment` object (with `recurring` set to `1`) to create a repeating appointment. Requires permission to add appointments/notes. Returns `202` with the new appointment's `id`. Requires the Work Orders plugin to be enabled. - Endpoints > Work Orders > Work Order Appointments [Edit Work Order Appointments](https://docs.daftara.dev/15115289e0.md): Updates an existing work-order appointment. Send only the fields to change, wrapped in a `WorkOrderAppointment` object; omitted fields keep their current values. Requires permission to edit appointments/notes. Requires the Work Orders plugin to be enabled. - Endpoints > Work Orders > Work Order Appointments [Delete Work Order Appointments](https://docs.daftara.dev/15115290e0.md): Permanently deletes a work-order appointment by id. This is a hard delete and cannot be undone. If the appointment was the last occurrence of a recurring series, the series is removed as well. Requires permission to edit/delete appointments. Requires the Work Orders plugin to be enabled. - Endpoints > Work Orders > Work Order Appointments [Update Work Order Appointment (POST alias)](https://docs.daftara.dev/39121467e0.md): Updates an existing work-order appointment. Send only the fields to change, wrapped in a `WorkOrderAppointment` object; omitted fields keep their current values. Requires permission to edit appointments/notes. Requires the Work Orders plugin to be enabled. This `POST` route is an alias of the `PUT` update endpoint for the same path. - Endpoints > Inventory > Products [GET All Products](https://docs.daftara.dev/15115316e0.md): Returns a paginated list of products in the account. - Endpoints > Inventory > Products [GET Single Product](https://docs.daftara.dev/15115313e0.md): Returns a single product by its ID. - Endpoints > Inventory > Products [Add New Product](https://docs.daftara.dev/15115317e0.md): Creates a new product, service or bundle. - Endpoints > Inventory > Products [Edit Products](https://docs.daftara.dev/15115314e0.md): Updates an existing product, service or bundle. - Endpoints > Inventory > Products [Delete Products](https://docs.daftara.dev/15115315e0.md): Deletes a product, service or bundle by its ID. - Endpoints > Inventory > Products [List Brands](https://docs.daftara.dev/39121468e0.md): Returns the distinct brand names used across the account's products, ordered alphabetically. - Endpoints > Inventory > Requsitions [GET All Requisitions ](https://docs.daftara.dev/18798279e0.md): Returns a paginated list of requisitions (stock transactions: inbound, outbound and transfer movements) as JSON. - Endpoints > Inventory > Requsitions [GET single Requisition](https://docs.daftara.dev/18798317e0.md): Returns a single requisition as JSON, identified by its id. - Endpoints > Inventory > Requsitions [Add New Requisition](https://docs.daftara.dev/18798425e0.md): Creates a requisition (a stock movement: inbound, outbound or transfer) together with its line items. - Endpoints > Inventory > Requsitions [Edit Requisitions](https://docs.daftara.dev/18798404e0.md): Updates an existing requisition (identified by its id) and its line items. - Endpoints > Inventory > Requsitions [Delete Requisitions](https://docs.daftara.dev/18798419e0.md): Deletes a requisition (and its related stock movements) identified by its id. - Endpoints > Inventory > Requsitions [Trigger Requisition Update](https://docs.daftara.dev/39121474e0.md): Recomputes a requisition's stock movements and re-posts its accounting journals. Use it to re-synchronise a requisition's stock and journal entries after related data has changed. - Endpoints > Inventory > Product Categories [GET All Product Categories](https://docs.daftara.dev/15115374e0.md): Returns a paginated list of product categories. - Endpoints > Inventory > Product Categories [GET Single Product Category](https://docs.daftara.dev/15115373e0.md): Returns a single product category by its ID. - Endpoints > Inventory > Product Categories [Add New Product Category](https://docs.daftara.dev/39121469e0.md): Creates a new product category. - Endpoints > Inventory > Product Categories [Edit Product Category](https://docs.daftara.dev/39121470e0.md): Updates an existing product category. - Endpoints > Inventory > Product Categories [Delete Product Category](https://docs.daftara.dev/39121471e0.md): Deletes a product category. - Endpoints > Inventory > Product Categories [Update Category Display Order](https://docs.daftara.dev/39121472e0.md): Updates the display order of categories of a given type in bulk. - Endpoints > Inventory > Product Categories [Update Category Items](https://docs.daftara.dev/39121473e0.md): Sets which items (products) belong to one or more categories, in bulk. - Endpoints > Inventory > Stores [GET All Stores](https://docs.daftara.dev/15115366e0.md): Returns a paginated list of stores (warehouses). The result is limited to the stores the authenticated user is allowed to view. Requires the *Track Inventory* or *General Settings* permission. - Endpoints > Inventory > Stores [GET Single Store](https://docs.daftara.dev/15115363e0.md): Returns a single store (warehouse) by its id. Requires the *Track Inventory* permission. - Endpoints > Inventory > Stores [Add New Store](https://docs.daftara.dev/15115367e0.md): Creates a new store (warehouse). Requires the *General Settings* permission. The request body wraps the fields in a `Store` object. Only `name` is required. - Endpoints > Inventory > Stores [Edit Stores](https://docs.daftara.dev/15115364e0.md): Updates an existing store (warehouse) by its id. Requires the *General Settings* permission. The request body wraps the fields in a `Store` object; the id is taken from the path. - Endpoints > Inventory > Stores [Delete Stores](https://docs.daftara.dev/15115365e0.md): Deletes a store (warehouse) by its id. Requires the *General Settings* permission. - Endpoints > Inventory > Stock Transactions [GET All Stock Transactions](https://docs.daftara.dev/15115361e0.md): Returns a paginated list of **processed** stock transactions for the account. - Endpoints > Inventory > Stock Transactions [GET Single Stock Transaction](https://docs.daftara.dev/15115358e0.md): Returns a single stock transaction by its id. - Endpoints > Inventory > Stock Transactions [Add New Stock Transaction](https://docs.daftara.dev/15115362e0.md): Creates a manual stock adjustment (a stock-in or stock-out transaction) for a product in a warehouse. - Endpoints > Inventory > Stock Transactions [Edit Stock Transactions](https://docs.daftara.dev/15115359e0.md): Edits an existing stock transaction identified by `id`. The body is wrapped under a `StockTransaction` object. - Endpoints > Inventory > Stock Transactions [Delete Stock Transactions](https://docs.daftara.dev/15115360e0.md): Deletes a stock transaction by its id. - Endpoints > Inventory > Product Bundles [Add Product bundle](https://docs.daftara.dev/40945425e0.md): Adds a single **component (raw-material) line** to an existing bundle product by creating one product-bundle record. - Endpoints > Inventory > Brands [Get All Brands](https://docs.daftara.dev/40902108e0.md): Returns a **paginated** list of brands. - Endpoints > Inventory > Brands [Get Single Brand](https://docs.daftara.dev/40902379e0.md): Returns a single **brand** by id. - Endpoints > Inventory > Brands [Add New Brand](https://docs.daftara.dev/40902388e0.md): Creates a new **brand**. - Endpoints > Inventory > Brands [Edit brand](https://docs.daftara.dev/40902390e0.md): Updates an existing **brand**. - Endpoints > Inventory > Brands [Delete brand](https://docs.daftara.dev/40902385e0.md): Deletes a **brand** by id. - Endpoints > Inventory > Unit Templates [Get All Unit Templates](https://docs.daftara.dev/40963137e0.md): Returns a **paginated** list of **unit templates** (units-of-measure templates). - Endpoints > Inventory > Unit Templates [Get Single Unit Template](https://docs.daftara.dev/40963132e0.md): Returns a single **unit template** by id, **including its unit-factor sub-rows**. - Endpoints > Inventory > Unit Templates [Add Unit Template](https://docs.daftara.dev/40963135e0.md): Creates a new **unit template** — a units-of-measure template with a base unit and one or more conversion factors (sub-units). - Endpoints > Inventory > Unit Templates [Edit Unit Template](https://docs.daftara.dev/40963130e0.md): Update an existing **Unit Template** (v2 native-entity API). - Endpoints > Accounting > Journals [Delete Journals](https://docs.daftara.dev/40945251e0.md): Deletes a journal entry. Automatically-generated journals linked to a source record, and journals dated inside a closed financial period, cannot be deleted. - Endpoints > Accounting > Journals [Edit Journals](https://docs.daftara.dev/40945368e0.md): Updates an existing journal entry and replaces its line items. - Endpoints > Accounting > Journals [GET All Journals](https://docs.daftara.dev/40945255e0.md): Returns a paginated list of journal entries. Results are ordered by date (newest first) by default and can be narrowed with the filter parameters below. Non-owner staff see only the journals they are permitted to view. - Endpoints > Accounting > Journals [GET Single Journal](https://docs.daftara.dev/40945259e0.md): Returns a single journal entry with its double-entry transaction lines. - Endpoints > Accounting > Journals [Add New Journal](https://docs.daftara.dev/40945261e0.md): Creates a manual journal entry. Send the `Journal` header fields and the `JournalTransaction[]` double-entry lines. The total debit of the lines must equal the total credit, and at least one line is required. Amounts are supplied per line via `currency_debit` / `currency_credit` (in the journal currency); the base-currency `debit`/`credit` and the journal totals are calculated automatically. The journal `date` must fall within an open financial period. - Endpoints > Accounting > Journal Accounts [GET All Journal Accounts](https://docs.daftara.dev/40894808e0.md): Returns a paginated list of journal accounts (the chart-of-accounts leaf accounts). Requires the **Manage Journal Accounts** permission. Results are ordered by account code ascending. - Endpoints > Accounting > Journal Accounts [GET Single Journal Account](https://docs.daftara.dev/40894820e0.md): Returns a single journal account by ID, with recalculated balances (`total_credit`, `total_debit`, `net`) and the `can_be_hidden` / `deletable` flags. Requires the **Manage Journal Accounts** permission. - Endpoints > Accounting > Journal Accounts [Add New Journal Account](https://docs.daftara.dev/40894815e0.md): Creates a new journal account under a journal category. Requires the **Manage Journal Accounts** permission. The account `code` must be numeric and unique across all accounts and categories. Server-managed fields (totals, timestamps, ancestor category chain) are set automatically. - Endpoints > Accounting > Journal Accounts [Edit Journal Accounts](https://docs.daftara.dev/40894804e0.md): Updates an existing journal account. Requires the **Manage Journal Accounts** permission. `journal_cat_id`, `code` and `name` must be provided; `code` must be numeric and unique across all accounts and categories. - Endpoints > Accounting > Journal Accounts [Delete Journal Accounts](https://docs.daftara.dev/40894811e0.md): Deletes a journal account by ID. Requires the **Manage Journal Accounts** permission. An account cannot be deleted while it has journal transactions or is linked to other records (routes, cheques, salary components, etc.). - Endpoints > Accounting > Journal Cats [GET All Journal Cats](https://docs.daftara.dev/40908338e0.md): Returns a paginated list of journal categories (the category nodes of the chart of accounts). Requires the **Manage Journal Accounts** permission. Each item is wrapped under a `JournalCat` key. - Endpoints > Accounting > Journal Cats [GET Single Journal Cat](https://docs.daftara.dev/40910179e0.md): Retrieve a single journal category (a category node in the chart of accounts) by its ID. Requires the **Manage Journal Accounts** permission. The category is returned under the `JournalCat` key of `data`. - Endpoints > Accounting > Journal Cats [Delete Journal Cats](https://docs.daftara.dev/40910312e0.md): Deletes a journal category identified by `id`. Requires the **Manage Journal Accounts** permission. A category can only be deleted when it is empty: it must have no child categories, no child accounts, no linked auto-account routes, and must not be a system default account. - Endpoints > Accounting > Journal Cats [Edit Journal Cats](https://docs.daftara.dev/40940462e0.md): Updates an existing journal category identified by `id`. Requires the **Manage Journal Accounts** permission. A category cannot be set as its own parent, and none of its own descendant categories can be chosen as its parent. The `code` must remain numeric and unique across all journal categories and accounts. - Endpoints > Accounting > Journal Cats [Add New Journal Cat](https://docs.daftara.dev/40950136e0.md): Create a journal category — a folder in the chart of accounts that groups other categories and posting accounts. - Endpoints > Accounting > Cost Centers [Get All Cost Centers](https://docs.daftara.dev/40525906e0.md): Returns a paginated list of cost centers for the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Accounting > Cost Centers [Get Single Cost Center](https://docs.daftara.dev/40525903e0.md): Returns a single cost center by id. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Accounting > Cost Centers [Add New Cost Center](https://docs.daftara.dev/40525909e0.md): Adds a cost center. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Accounting > Cost Centers [Edit Cost Center](https://docs.daftara.dev/40525898e0.md): Edits an existing cost center. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Accounting > Cost Centers [Delete Cost Center](https://docs.daftara.dev/40526202e0.md): This endpoint let you delete Cost Center - Endpoints > Finance > Treasuries [GET All Treasuries](https://docs.daftara.dev/15115371e0.md): Returns a paginated list of treasuries and bank accounts. The result is limited to the treasuries the authenticated user is allowed to view: a staff member sees only treasuries they hold a withdraw or deposit permission on, while an account owner or admin sees all. Requires a treasury permission or the *General Settings* permission. Each item includes a computed `balance`. - Endpoints > Finance > Treasuries [GET Single Treasury](https://docs.daftara.dev/15115368e0.md): Returns a single treasury or bank account by id. Requires one of the treasury-related permissions (assigned-treasury view, change default treasury, view all journals, manage journal accounts) or the *General Settings* permission; staff additionally must hold a withdraw or deposit permission on the requested treasury. - Endpoints > Finance > Treasuries [Add New Treasury](https://docs.daftara.dev/15115372e0.md): Creates a treasury (cash account) or bank account. The request body is wrapped in a `Treasury` object. Only `name` is required; `type` defaults to Treasury and `active` defaults to inactive when omitted. Setting `is_primary` to `1` makes this the default treasury (and activates it). Requires the *General Settings* or *Manage Journal Accounts* permission. - Endpoints > Finance > Treasuries [Edit Treasuries](https://docs.daftara.dev/15115369e0.md): Updates an existing treasury or bank account by id. The request body is wrapped in a `Treasury` object; the id is taken from the path. Setting `active` to `0` also clears the primary flag, and a bank account's `currency_code` cannot be changed once it has transactions. Requires one of the treasury-related permissions or the *General Settings* / *Manage Journal Accounts* permission. (A `POST /treasuries/{id}` request is accepted as an alias for this update.) - Endpoints > Finance > Treasuries [Delete Treasuries](https://docs.daftara.dev/15115370e0.md): Deletes a treasury or bank account by id. Deletion is only allowed when the treasury is not in use: it must not be the primary treasury and must have no loans, pay-run / sales / purchase payments, bank or journal transactions, treasury transfers, cheque books, or staff using it as their default. A treasury that is in use can be deactivated instead. Requires one of the treasury-related permissions or the *General Settings* / *Manage Journal Accounts* permission. - Endpoints > Finance > Expenses [GET All Expenses](https://docs.daftara.dev/40881055e0.md): List expenses, most recent first. - Endpoints > Finance > Expenses [GET Single Expens](https://docs.daftara.dev/40881048e0.md): Retrieve a single expense by id. - Endpoints > Finance > Expenses [Add New Expens](https://docs.daftara.dev/40881052e0.md): Create an expense. - Endpoints > Finance > Expenses [Edit Expenses](https://docs.daftara.dev/40881046e0.md): Update an existing expense. - Endpoints > Finance > Expenses [Delete Expenses](https://docs.daftara.dev/40881057e0.md): Delete an expense by id. - Endpoints > Finance > Incomes [GET All Incomes](https://docs.daftara.dev/40882577e0.md): List incomes, most recent first. - Endpoints > Finance > Incomes [GET Single Income](https://docs.daftara.dev/40882576e0.md): Retrieve a single income by id. - Endpoints > Finance > Incomes [Add New Income](https://docs.daftara.dev/40882800e0.md): Create an income. - Endpoints > Finance > Incomes [Edit Incomes](https://docs.daftara.dev/40882580e0.md): Update an existing income. - Endpoints > Finance > Incomes [Delete Incomes](https://docs.daftara.dev/40882804e0.md): Delete an income by id. - Endpoints > Taxes [GET All Taxes](https://docs.daftara.dev/15115346e0.md): Returns the list of taxes configured for the account, ordered with active taxes first. Results are not paginated — every tax is returned in a single response; the `pagination` object is included only for envelope consistency with other collection endpoints. Use the optional `is_active` query parameter to filter by active state. - Endpoints > Taxes [GET Single Taxe](https://docs.daftara.dev/15115343e0.md): Returns a single tax by its identifier. - Endpoints > Taxes [Add New Taxe](https://docs.daftara.dev/15115347e0.md): Creates a new tax for the account. Only `name` and `value` are required; the owning account is assigned automatically. - Endpoints > Taxes [Edit Taxes](https://docs.daftara.dev/15115344e0.md): Updates an existing tax. Send the full set of editable fields; `name` and `value` are required. The same operation is also available via `POST /taxes/{id}`. - Endpoints > Taxes [Delete Taxes](https://docs.daftara.dev/15115345e0.md): Deletes a tax by its identifier. Deletion is blocked only when the tax is mapped in the UAE Electronic Invoice settings; otherwise the tax is removed even if it is referenced elsewhere. - Endpoints > Purchases > Purchase Refunds [GET All Purchase Refunds](https://docs.daftara.dev/15115356e0.md): Returns a paginated list of purchase refunds (purchase debit notes), most recent first. Supports free-text search and filtering by supplier, payment status, refund number, currency, date range, total range, line item, work order, and the staff member who created the refund. - Endpoints > Purchases > Purchase Refunds [GET Single Purchase Refund](https://docs.daftara.dev/15115353e0.md): Returns a single purchase refund (purchase debit note) by id, including its line items, payments, taxes, and supplier details. Requires the Inventory plugin to be active. - Endpoints > Purchases > Purchase Refunds [Add New Purchase Refund](https://docs.daftara.dev/15115357e0.md): Creates a purchase refund (purchase debit note). The request must include a `PurchaseRefund` object and at least one `PurchaseOrderItem`. Required: `PurchaseRefund.supplier_id`; each item requires `item`, `unit_price`, and `quantity`. Set `PurchaseRefund.subscription_id` to the id of the purchase invoice being refunded to link the refund to its source invoice; omit it to create a standalone refund. `currency_code`, the refund number, store, branch, and totals are assigned automatically when omitted. Send `?send=draft` to save as a draft (otherwise the refund is marked received). Requires the Inventory plugin and the *Add New Purchase Orders* permission. - Endpoints > Purchases > Purchase Refunds [Edit Purchase Refunds](https://docs.daftara.dev/15115354e0.md): Updates an existing purchase refund (purchase debit note). The request must include a `PurchaseRefund` object and at least one `PurchaseOrderItem`. Required: `PurchaseRefund.supplier_id`; each item requires `item`, `unit_price`, and `quantity`. The line items sent replace the existing ones. Payments are NOT accepted on update (this route accepts only `PurchaseRefund` and `PurchaseOrderItem`). Send `?send=draft` to keep the refund as a draft. Requires the Inventory plugin and an Edit/Delete Purchase Orders permission. - Endpoints > Purchases > Purchase Refunds [Delete Purchase Refunds](https://docs.daftara.dev/15115355e0.md): Deletes a purchase refund (purchase debit note) by id. The refund cannot be deleted when it has an accepted or modified requisition, when its requisition is already received, when it has linked refunds/credit/debit notes, or when over-draft is disabled and the items already have stock transactions. Deleting also reverses its stock transactions, journals, and supplier balance. Requires the Inventory plugin and an Edit/Delete Purchase Orders permission. - Endpoints > Purchases > Purchase Invoices [GET All Purchase Invoices](https://docs.daftara.dev/15115351e0.md): Returns a paginated list of purchase invoices, most recent first. Supports free-text search and filtering by payment status, work order, source document, line items, and custom fields. - Endpoints > Purchases > Purchase Invoices [GET Single Purchase Invoice](https://docs.daftara.dev/15115348e0.md): Returns a single purchase invoice by its identifier, including its line items, supplier, taxes, custom fields, and payments. Only records of type purchase invoice are returned; other document types yield 404. - Endpoints > Purchases > Purchase Invoices [Add New Purchase Invoice](https://docs.daftara.dev/15115352e0.md): Creates a purchase invoice. The request must include a `PurchaseOrder` object and at least one `PurchaseOrderItem`. Required: `PurchaseOrder.supplier_id`; each item requires `item`, `unit_price`, and `quantity`. `currency_code`, the invoice number, store, branch, and totals are assigned automatically when omitted. Optional `Payment` entries and `PurchaseOrderCustomField` values may be sent. Send `?send=draft` to save as a draft. - Endpoints > Purchases > Purchase Invoices [Edit Purchase Invoices](https://docs.daftara.dev/15115349e0.md): Updates an existing purchase invoice. Required: `PurchaseOrder.supplier_id`; each `PurchaseOrderItem` requires `item`, `unit_price`, and `quantity`. Custom-field values may be sent; payments are NOT accepted on update (use the payments endpoints). An invoice created from a purchase order can only be edited with the appropriate approval permission. The same operation is also available via `POST /purchase_invoices/{id}`. - Endpoints > Purchases > Purchase Invoices [Delete Purchase Invoices](https://docs.daftara.dev/15115350e0.md): Deletes a purchase invoice by its identifier. Deletion is blocked when the invoice is linked to a refund/credit/debit note, an accepted requisition, or stock transactions. - Endpoints > Purchases > Purchase Orders [GET All Purchase Orders](https://docs.daftara.dev/39121475e0.md): Legacy compatibility endpoint for listing purchase orders. - Endpoints > Purchases > Purchase Orders [GET Single Purchase Order](https://docs.daftara.dev/39121476e0.md): Returns a single purchase order as JSON, identified by its id. Only records of type Purchase Order are returned by this endpoint. - Endpoints > Purchases > Purchase Orders [Add New Purchase Order](https://docs.daftara.dev/39121477e0.md): Creates a new purchase order. - Endpoints > Purchases > Purchase Orders [Edit Purchase Order](https://docs.daftara.dev/39121478e0.md): Updates an existing purchase order. - Endpoints > Purchases > Purchase Orders [Delete Purchase Order](https://docs.daftara.dev/39121479e0.md): **Not currently available.** Although this route is registered, deleting a purchase order through the legacy REST API is not implemented: the request always returns an HTTP **404** with `{ "result": "failed", "code": 404, "message": "Invalid Endpoint" }` and no purchase order is deleted. - Endpoints > Purchases > Purchase Debit Note [Purchase Debit Note](https://docs.daftara.dev/40954008e0.md): Returns a paginated list of purchase debit notes for the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. It requires the **Inventory** plugin to be active. - Endpoints > Purchases > Purchase Debit Note [Purchase Debit Note](https://docs.daftara.dev/40696581e0.md): Creates a purchase debit note. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. It requires the **Inventory** plugin to be active. - Endpoints > Suppliers [GET All Suppliers](https://docs.daftara.dev/15115266e0.md): Returns a paginated list of suppliers. Supports filtering by name, address, postal code, country, and status. Non-owner staff see only the suppliers they are permitted to view. - Endpoints > Suppliers [GET Single Supplier](https://docs.daftara.dev/15115263e0.md): Returns a single supplier by its identifier. - Endpoints > Suppliers [Add New Supplier](https://docs.daftara.dev/15115267e0.md): Creates a new supplier. `business_name` is required; `email` is required unless the supplier is offline (`is_offline = 1`). `supplier_number` is assigned automatically when omitted. - Endpoints > Suppliers [Edit Suppliers](https://docs.daftara.dev/15115264e0.md): Updates an existing supplier. `business_name` is required; `email` is required unless the supplier is offline. The same operation is also available via `POST /suppliers/{id}`. - Endpoints > Suppliers [Delete Suppliers](https://docs.daftara.dev/15115265e0.md): Deletes a supplier by its identifier. Deletion is blocked when the supplier is referenced by a purchase quotation, purchase order, expense, or other transactions. - Endpoints > Staff [GET All Staff](https://docs.daftara.dev/40961109e0.md): Returns a paginated list of staff members, ordered by name. Deleted staff are excluded. Each item is returned under a `Staff` key; the password is never included and configured custom staff fields appear under the nested `CustomModel` object. When the Branches plugin is active, a staff caller only sees members of the branches they can access. - Endpoints > Staff [GET Single Staff](https://docs.daftara.dev/40961092e0.md): Retrieves a single staff member by id. The staff record is returned under a `Staff` key inside `data`; the password is never included. Any configured custom staff fields appear under the nested `CustomModel` object. - Endpoints > Staff [Add New Staff](https://docs.daftara.dev/40961095e0.md): Creates a new staff member. - Endpoints > Staff [DELETE Staff](https://docs.daftara.dev/40961096e0.md): Permanently deletes a staff member. Requires the **Edit Staff** permission. - Endpoints > Staff [GET Send Staff Login Details](https://docs.daftara.dev/40961107e0.md): Generates a new password for the staff member and emails their login details to their registered email address. - Endpoints > Time Tracking [GET All Time Tracking](https://docs.daftara.dev/40963961e0.md): Returns a paginated list of time-tracking entries for the current site. Requires an API key with the `time_tracking.read` scope. Callers without the *Edit all timesheets* or *Track all staff times* permission see only their own entries. - Endpoints > Time Tracking [GET Single Time Tracking](https://docs.daftara.dev/40963958e0.md): Returns a single time-tracking entry by id. Requires an API key with the `time_tracking.read` scope. Callers without the *Edit all timesheets* permission can only retrieve their own entries. - Endpoints > Time Tracking [Add New Time Tracking](https://docs.daftara.dev/40963954e0.md): Creates a time-tracking entry. Requires an API key with the `time_tracking.write` scope. Send the body nested under a `TimeTracking` object. `date` and `project_id` are required; `staff_id`, `time`, and cost/currency are filled automatically when omitted. - Endpoints > Time Tracking [Edit Time Tracking](https://docs.daftara.dev/40963959e0.md): Updates an existing time-tracking entry by id. Requires an API key with the `time_tracking.write` scope. Send the changed fields nested under a `TimeTracking` object; `date` and `project_id` must be valid. Callers without the *Edit all timesheets* permission can only update their own entries. - Endpoints > Time Tracking [Delete Time Tracking](https://docs.daftara.dev/40963989e0.md): Deletes a time-tracking entry by id. Requires an API key with the `time_tracking.write` scope. Callers without the *Edit all timesheets* permission can only delete their own entries. If the entry's date falls inside a closed accounting period, the deletion is rejected and the response body is `{"error": true, "errors": {"date": ""}}`. - Endpoints > General Listing [GET General Listing](https://docs.daftara.dev/40888644e0.md): Returns a lightweight reference list for one whitelisted model as a flat map of `id` → `title`. Handy for populating dropdowns and lookups. - Endpoints > HR > Leave Application [Get All Leave Applications](https://docs.daftara.dev/40942596e0.md): Returns a paginated list of leave applications for the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > HR > Leave Application [Get Single Leave Applications ](https://docs.daftara.dev/40942598e0.md): Returns a single leave application by id. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > HR > Leave Application [Add Leave Application](https://docs.daftara.dev/40942597e0.md): Creates a leave application for a staff member. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. The request body is a **flat JSON object** whose keys are the leave-application fields. - Endpoints > HR > Leave Application [Edit Leave Application](https://docs.daftara.dev/40942607e0.md): Updates an existing leave application, identified by the `{ID}` path segment. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. The request body is a **flat JSON object** of leave-application fields. - Endpoints > HR > Attendance Logs [Get All Attendance Logs](https://docs.daftara.dev/40447620e0.md): Returns a paginated list of attendance logs for the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > HR > Attendance Logs [Get Single Attendance Log](https://docs.daftara.dev/40447627e0.md): Returns a single attendance log by id. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > HR > Attendance Logs [Add Attendance Log](https://docs.daftara.dev/40447636e0.md): Adds an attendance log. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > HR > Employee Asset > Asset Type [Get All Types](https://docs.daftara.dev/38573105e0.md): - Endpoints > HR > Employee Asset > Asset Type [Get Single Type](https://docs.daftara.dev/38573106e0.md): - Endpoints > HR > Employee Asset > Asset Type [Add New Type](https://docs.daftara.dev/38573107e0.md): - Endpoints > HR > Employee Asset > Asset Type [Edit Type](https://docs.daftara.dev/38573108e0.md): - Endpoints > HR > Employee Asset > Asset Location [Get All Locations](https://docs.daftara.dev/38573109e0.md): - Endpoints > HR > Employee Asset > Asset Location [Get Single Location](https://docs.daftara.dev/38573110e0.md): - Endpoints > HR > Employee Asset > Asset Location [Add New Location](https://docs.daftara.dev/38573111e0.md): - Endpoints > HR > Employee Asset > Asset Location [Edit Location](https://docs.daftara.dev/38573112e0.md): - Endpoints > HR > Employee Asset > Asset Storage [Get All Storages](https://docs.daftara.dev/38573113e0.md): - Endpoints > HR > Employee Asset > Asset Storage [Get Single Storage](https://docs.daftara.dev/38573114e0.md): - Endpoints > HR > Employee Asset > Asset Storage [Add New Storage](https://docs.daftara.dev/38573115e0.md): - Endpoints > HR > Employee Asset > Asset Storage [Edit Storage](https://docs.daftara.dev/38573116e0.md): - Endpoints > HR > Employee Asset > Asset [Get All Assets](https://docs.daftara.dev/38573117e0.md): - Endpoints > HR > Employee Asset > Asset [Get Single Asset](https://docs.daftara.dev/38573118e0.md): - Endpoints > HR > Employee Asset > Asset [Add New Asset](https://docs.daftara.dev/38573119e0.md): - Endpoints > HR > Employee Asset > Asset [Edit Asset](https://docs.daftara.dev/38573120e0.md): - Endpoints > HR > Organizational Structure > Designation [Get All Designations](https://docs.daftara.dev/38766450e0.md): - Endpoints > HR > Organizational Structure > Designation [Get Single Designation](https://docs.daftara.dev/38766451e0.md): - Endpoints > HR > Organizational Structure > Designation [Add New Designation](https://docs.daftara.dev/38766452e0.md): - Endpoints > HR > Organizational Structure > Designation [Edit Designation](https://docs.daftara.dev/38766453e0.md): - Endpoints > HR > Organizational Structure > Department [Get All Departments](https://docs.daftara.dev/38770115e0.md): - Endpoints > HR > Organizational Structure > Department [Get Single Department](https://docs.daftara.dev/38770116e0.md): - Endpoints > HR > Organizational Structure > Department [Add New Department](https://docs.daftara.dev/38770117e0.md): - Endpoints > HR > Organizational Structure > Department [Edit Department](https://docs.daftara.dev/38770118e0.md): - Endpoints > HR > Organizational Structure > Employment Type [Get All Employment Types](https://docs.daftara.dev/38766454e0.md): - Endpoints > HR > Organizational Structure > Employment Type [Get Single Employment Type](https://docs.daftara.dev/38766455e0.md): - Endpoints > HR > Organizational Structure > Employment Type [Add New Employment Type](https://docs.daftara.dev/38766456e0.md): - Endpoints > HR > Organizational Structure > Employment Type [Edit Employment Type](https://docs.daftara.dev/38766457e0.md): - Endpoints > Branches [Get All Branches](https://docs.daftara.dev/40481783e0.md): Returns a paginated list of branches for the account. - Endpoints > Branches [Get Single Branch](https://docs.daftara.dev/40481781e0.md): Returns a single branch by id. - Endpoints > Branches [Add New Branch](https://docs.daftara.dev/40481705e0.md): Creates a branch. - Endpoints > Branches [Edit Branch](https://docs.daftara.dev/40482152e0.md): Updates an existing branch. This posts to the same `/v2/api/entity/branch` path as create; the record to update is identified by the **`id` in the request body**. If `id` is omitted a new branch is created instead. - Endpoints > Branches [Delete Branch](https://docs.daftara.dev/40481706e0.md): Deletes a branch by id. - Endpoints > Payment Gateways [Get All Payment Methods](https://docs.daftara.dev/40952350e0.md): Returns a paginated list of the account's payment methods. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Payment Gateways [Get Single Payment Method](https://docs.daftara.dev/40952358e0.md): Returns a single payment method by id. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Payment Gateways [Add Payment Method](https://docs.daftara.dev/40952352e0.md): Adds a payment method to the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Payment Gateways [Add Payment Method Copy](https://docs.daftara.dev/40958912e0.md): Delete a payment method to the account. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Points & Credits > Credit Charges [Get All Credit Charges](https://docs.daftara.dev/40743118e0.md): Returns a paginated list of credit charges for the account. A credit charge is an amount of a given credit type granted to a client (e.g. loyalty points, prepaid credit, or a membership allowance) that is later consumed. - Endpoints > Points & Credits > Credit Charges [Get Single Credit Charge](https://docs.daftara.dev/40743122e0.md): Returns a single credit charge by id. A credit charge is an amount of a given credit type granted to a client (e.g. loyalty points, prepaid credit, or a membership allowance) that is later consumed. - Endpoints > Points & Credits > Credit Charges [Add New Credit Charge](https://docs.daftara.dev/40743137e0.md): Creates a credit charge — an amount of a given credit type granted to a client (e.g. loyalty points, prepaid credit, or a membership allowance) that is later consumed. - Endpoints > Points & Credits > Credit Charges [Edit Credit Charge](https://docs.daftara.dev/40743115e0.md): Updates an existing credit charge. This posts to the same `/v2/api/entity/credit_charge` path as create; the record to update is identified by the **`id` in the request body**. If `id` is omitted a new record is created instead. - Endpoints > Points & Credits > Credit Usage [Get All Credit Usage](https://docs.daftara.dev/40752213e0.md): Returns a paginated list of credit usage records for the account. A credit usage records that a client consumed an amount of a given credit type (the counterpart of a credit charge). - Endpoints > Points & Credits > Credit Usage [Get Single Credit Usage ](https://docs.daftara.dev/40752204e0.md): Returns a single credit usage record by id. A credit usage records that a client consumed an amount of a given credit type (the counterpart of a credit charge). - Endpoints > Points & Credits > Credit Usage [Add New Credit Usage](https://docs.daftara.dev/40752199e0.md): Creates a credit usage — a record that a client consumed an amount of a given credit type (the counterpart of a credit charge). - Endpoints > Points & Credits > Credit Usage [Edit Credit Usage](https://docs.daftara.dev/40752264e0.md): Updates an existing credit usage. This posts to the same `/v2/api/entity/credit_usage` path as create; the record to update is identified by the **`id` in the request body**. If `id` is omitted a new record is created instead. - Endpoints > Points & Credits > Credit Usage [Get All Credit Usage Amount](https://docs.daftara.dev/40752256e0.md): Returns a paginated list of charge usage records. A charge usage links a credit charge to a credit usage and stores the amount consumed. - Endpoints > Points & Credits > Credit Usage [Get Single Credit Usage Amount](https://docs.daftara.dev/40752255e0.md): Returns a single charge usage record by id. A charge usage links a credit charge to a credit usage and stores the amount consumed. - Endpoints > Points & Credits > Credit Usage [Add Credit Usage Amount](https://docs.daftara.dev/40752203e0.md): Records an amount of credit consumed from a specific credit charge — it links a credit charge to a credit usage and stores the consumed amount. - Endpoints > Points & Credits > Credit Usage [Edit Credit Usage Amount](https://docs.daftara.dev/40752267e0.md): Updates an existing charge usage. This posts to the same `/v2/api/entity/charge_usage` path as create; the record to update is identified by the **`id` in the request body**. If `id` is omitted a new record is created instead. - Endpoints > Points & Credits > Credit Types [Get All Credit types](https://docs.daftara.dev/40750876e0.md): Returns a **paginated** list of credit types. - Endpoints > Points & Credits > Credit Types [Get Single Credit type ](https://docs.daftara.dev/40750872e0.md): Returns a single **credit type** by id. - Endpoints > Points & Credits > Credit Types [Add New Credit type](https://docs.daftara.dev/40751024e0.md): Creates a new **credit type**. - Endpoints > Points & Credits > Credit Types [Edit Credit type](https://docs.daftara.dev/40750869e0.md): Updates an existing **credit type**. - Endpoints > Points & Credits > Packages [Get All Packages](https://docs.daftara.dev/40951622e0.md): Returns a paginated list of packages (membership and credit-charge packages) for the account. - Endpoints > Points & Credits > Packages [Get Single Package](https://docs.daftara.dev/40951620e0.md): Returns a single package by its id, as a flat object (no wrapper). - Endpoints > Points & Credits > Packages [Add New Package](https://docs.daftara.dev/40951615e0.md): Creates a package (a membership subscription or a bundle of credits). The body is a flat JSON object. - Endpoints > Points & Credits > Packages [Edit Package](https://docs.daftara.dev/40951650e0.md): Updates an existing package. The package is identified by the **`id` in the request body** — this endpoint uses the same URL as *Add New Package*. - Endpoints > Points & Credits > Packages Credit Types [Get All Package Credit Types](https://docs.daftara.dev/40943491e0.md): Returns a **paginated** list of package credit types. - Endpoints > Points & Credits > Packages Credit Types [Get Single Package Credit Type](https://docs.daftara.dev/40943519e0.md): Returns a single **package credit type** by id. - Endpoints > Points & Credits > Packages Credit Types [Add Package Credit Type](https://docs.daftara.dev/40943494e0.md): Creates a **package credit type** — a link between a credit type and a package that grants a credit `amount` for that package. - Endpoints > Points & Credits > Packages Credit Types [Edit Package Credit Type](https://docs.daftara.dev/27846437e0.md): - Endpoints > Workflow [Get All Records](https://docs.daftara.dev/40949089e0.md): Returns a paginated list of records for a workflow-type entity. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Workflow [Get Single Record](https://docs.daftara.dev/40949086e0.md): Returns a single workflow-type-entity record by id. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Workflow [Add New Record](https://docs.daftara.dev/40949094e0.md): Creates a record in a workflow-type entity. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. - Endpoints > Workflow [Edit Record](https://docs.daftara.dev/40949091e0.md): Updates a record in a workflow-type entity. This is a v2 native-entity endpoint served from the `/v2/api/entity` base and authenticated with a Bearer token. Both `PUT` and `POST` to this path are accepted. - Endpoints > Multity entity request [Multi Entity Request](https://docs.daftara.dev/38332473e0.md): Fetches data for **multiple entities in a single request**. The request body is a JSON **array** of sub-requests; each sub-request independently reads one entity — either a single record (`show`) or a filtered list (`list`). - Endpoints > Follow-Up Statuses [Get All Follow-Up Statuses](https://docs.daftara.dev/40883516e0.md): Lists follow-up statuses for the account. - Endpoints > Follow-Up Statuses [Get Single Follow-Up Status](https://docs.daftara.dev/40883514e0.md): Returns a single follow-up status by id. - Endpoints > Follow-Up Statuses [Add New Follow-Up Status](https://docs.daftara.dev/40883519e0.md): Creates a follow-up status. - Endpoints > Follow-Up Statuses [Delete Follow-Up Status](https://docs.daftara.dev/40883504e0.md): Deletes a follow-up status by id (hard delete). - Endpoints > Entities [List entity records](https://docs.daftara.dev/39121483e0.md): List records of any entity, addressed by its `entityKey` (e.g. `client`, `product`, `cost_center`, `work_order`). - Endpoints > Entities [View entity record](https://docs.daftara.dev/39121484e0.md): Fetch a single record of any entity, addressed by its `entityKey` and primary key `id`. - Endpoints > Entities [Create entity record](https://docs.daftara.dev/39121485e0.md): Create a record for any entity, addressed by its `entityKey` (e.g. `client`, `cost_center`, `work_order`). - Endpoints > Entities [Update entity record](https://docs.daftara.dev/39121486e0.md): Update a record of any entity, addressed by its `entityKey` and primary key `id`. - Endpoints > Entities [Delete entity record](https://docs.daftara.dev/39121487e0.md): Delete a record of any entity, addressed by its `entityKey` and primary key `id`. - Advanced Filtering > Using API v2 [Data Fetching — Filtered](https://docs.daftara.dev/40311797e0.md): Generic, metadata-driven listing endpoint for the v2 API. It returns a **paginated, filtered, sorted** list of records for any supported entity, using a single consistent query grammar. - Developers Portal > Developers Portal Endpoints [Activate / Deactivate App](https://docs.daftara.dev/40541648e0.md): Activates or deactivates a marketplace app for the current site. - Developers Portal > Developers Portal Endpoints [Lock / Unlock Entity Record](https://docs.daftara.dev/40541651e0.md): Locks or unlocks an entity record on behalf of an installed app. - Developers Portal > Developers Portal Endpoints [Check App Status](https://docs.daftara.dev/40541653e0.md): Returns the activation status of a marketplace app for the current site.