Daftra API
All Endpoints
Daftra Partners
All Endpoints
Daftra Partners
  1. Developers Portal
  • Welcome
  • Getting Started
  • Validation Errors
  • Authorization
    • How To Authorize
    • Generate Access Token
      POST
  • Endpoints v1
    • Site
      • GET Site Info
    • Invoices
      • GET All Invoices
      • GET Single Invoice
      • Edit Invoices
      • Delete Invoices
      • Add New Invoice
    • Estimates
      • GET All Estimates
      • GET Single Estimate
      • Edit Estimates
      • Delete Estimates
      • Add New Estimate
    • Credit Notes
      • GET All Credit Notes
      • GET Single Credit Note
      • Edit Credit Notes
      • Delete Credit Notes
      • Add New Credit Note
    • Refund Receipts
      • GET All Refund Receipts
      • GET Single Refund Receipt
      • Edit Refund Receipts
      • Delete Refund Receipts
      • Add New Refund Receipt
    • Clients
      • GET All Clients
      • GET Single Client
      • Edit Clients
      • Delete Clients
      • Add New Client
    • Suppliers
      • GET All Suppliers
      • GET Single Supplier
      • Edit Suppliers
      • Delete 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 All Client Appointments
      • GET Single Client Appointment
      • Edit Client Appointments
      • Delete Client Appointments
      • Add New Client Appointment
    • Invoice Appointments
      • GET All Invoice Appointments
      • GET Single Invoice Appointment
      • Edit Invoice Appointments
      • Delete Invoice Appointments
      • Add New Invoice Appointment
    • Estimate Appointments
      • GET All Estimate Appointments
      • GET Single Estimate Appointment
      • Edit Estimate Appointments
      • Delete Estimate Appointments
      • Add New Estimate Appointment
    • Work Order Appointments
      • GET All Work Order Appointments
      • GET Single Work Order Appointment
      • Edit Work Order Appointments
      • Delete 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 All Time Tracking
      • GET Single Time Tracking
      • Edit Time Tracking
      • Delete Time Tracking
      • Add New Time Tracking
    • Invoice Payments
      • GET All Invoice Payments
      • GET Single Invoice Payment
      • Edit Invoice Payments
      • Delete Invoice Payments
      • Add New Invoice Payment
    • Client Payments
      • GET All Client Payments
      • GET Single Client Payment
      • Edit Client Payments
      • Delete Client Payments
      • Add New Client Payment
    • Products
      • GET All Products
      • GET Single Product
      • Edit Products
      • Delete Products
      • Add New Product
    • Journals
      • GET All Journals
      • GET Single Journal
      • Edit Journals
      • Delete Journals
      • Add New Journal
    • Journal Accounts
      • GET All Journal Accounts
      • GET Single Journal Account
      • Edit Journal Accounts
      • Delete 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 All Expenses
      • GET Single Expens
      • Edit Expenses
      • Delete Expenses
      • Add New Expens
    • Incomes
      • GET All Incomes
      • GET Single Income
      • Edit Incomes
      • Delete Incomes
      • Add New Income
    • Taxes
      • GET All Taxes
      • GET Single Taxe
      • Edit Taxes
      • Delete Taxes
      • Add New Taxe
    • Purchase Invoices
      • GET All Purchase Invoices
      • GET Single Purchase Invoice
      • Edit Purchase Invoices
      • Delete Purchase Invoices
      • Add New Purchase Invoice
    • Purchase Refunds
      • GET All Purchase Refunds
      • GET Single Purchase Refund
      • Edit Purchase Refunds
      • Delete Purchase Refunds
      • Add New Purchase Refund
    • Stock Transactions
      • GET All Stock Transactions
      • GET Single Stock Transaction
      • Edit Stock Transactions
      • Delete Stock Transactions
      • Add New Stock Transaction
    • Stores
      • GET All Stores
      • GET Single Store
      • Edit Stores
      • Delete Stores
      • Add New Store
    • Treasuries
      • GET All Treasuries
      • GET Single Treasury
      • Edit Treasuries
      • Delete Treasuries
      • Add New Treasury
    • Product Categories
      • GET All Product Categories
      • GET Single Product Category
    • Staff
      • GET Single Staff
      • GET All Staff
    • Client-attendance-log
      • Add New Client-attendance-log
    • General Listing
      • GET General Listing
    • Requsitions
      • GET All Requisitions
      • GET single Requisition
      • Edit Requisitions
      • Delete Requisitions
      • Add New Requisition
    • Booking
      • Add new Booking
      • Change Booking Status
      • Convert booking to Invoice
      • Get All Bookings
      • Get Single Booking
      • Delete booking
    • Advance Payment Invoices
      • GET All Advance payment
      • GET Single Advance payment
      • Add Advance Payment
  • Endpoints v2
    • What's New
      • API Improvements
      • Filtering
      • Using API v2
        • Endpoints Structure
        • Data Fetching — Filtered
    • HR
      • Leave Application
        • Get All Leave Applications
        • Get Single Leave Applications
        • Add Leave Application
        • Edit Leave Application
      • Attendance Logs
        • Get All Attendance Logs
        • Get Single Attendance Log
        • Add Attendance Log
    • Purchase Debit Note
      • Purchase Debit Note
      • Purchase Debit Note
    • Branches
      • Get All Branches
    • Product Bundles
      • Add Product bundle
    • Brands
      • Get All Brands
      • Get Single Brand
      • Add New Brand
      • Edit brand
    • Unit Templates
      • Get All Unit Templates
      • Get Single Unit Template
      • Add Unit Template
      • Edit Unit Template
    • Follow-Up Statuses
      • Get All Follow-Up Statuses
      • Get Single Follow-Up Status
      • Add New Follow-Up Status
      • Delete Follow-Up Status
    • Follow-Up Actions
      • Get All Follow-Up Actions
      • Get Single Follow-Up Action
      • Delete Follow-Up Action
    • Cost Centers
      • Get All Cost Centers
      • Get Single Cost Center
      • Edit Cost Center
      • Add New Cost Center
    • Payment Gateways
      • Get All Payment Methods
      • Get Single Payment Method
      • Add Payment Method
    • Points & Credits
      • Credit Usage
        • Get All Credit Usage
        • Get Single Credit Usage
        • Add New Credit Usage
        • Add Credit Usage Amount
        • Edit Credit Usage
        • Edit Credit Usage Amount
        • Get All Credit Usage Amount
        • Get Single Credit Usage Amount
      • Credit Types
        • Get All Credit types
        • Get Single Credit type
        • Add New Credit type
        • Edit Credit type
      • Credit Charges
        • Get All Credit Charges
        • Get Single Credit Charge
        • Add New Credit Charge
        • Edit Credit Charge
      • Packages
        • Get All Packages
        • Get Single Package
        • Add New Package
        • Edit Package
      • Packages Credit Types
        • Get All Package Credit Types
        • Get Single Package Credit Type
        • Add Package Credit Type
        • Edit Package Credit Type
    • Workflow
      • Get All Records
      • Get Single Record
      • Add New Record
      • Edit Record
    • Multity entity request
      • Overview
      • Multy Entity Request
  • Developers Portal
    • Introduction & Getting Started
    • Dashboard, Earnings & Withdrawals
    • Creating a New App
    • App Configuration
    • Managing Your App
    • Entities: Modeling Your Data
    • The Entity Builder
    • Buttons & Page Scripts
    • Integrations: Webhooks
    • Invitations, Publishing & Reviews
    • Check App Status
      GET
  1. Developers Portal

Buttons & Page Scripts

Beyond data, your app can extend the Daftra interface so it feels built-in. Two tools make this possible: custom Buttons that appear inside Daftra pages, and Page Scripts that run custom logic on specific pages. Both live as tabs on the App Hub.

Buttons#

The Buttons tab lets you add your own buttons into the Daftra interface, so users can trigger your app's actions right where they need them.
When creating a button you typically set:
SettingWhat it does
IconA recognizable icon for the button.
LocationWhere the button appears in Daftra (for example, on the Invoice index page).
Active / Not ActiveWhether the button is currently shown.
OrderThe button's position relative to others.
Parameters / AttributesAdditional values the button passes or uses.
Together, location and active state decide exactly where — and whether — the button shows up.

Page Scripts#

The Page Scripts tab lets you run custom code on specific Daftra pages. To add one, create a new script — this opens the Create Script form.
The form has these fields:
FieldWhat it does
NameA name to identify the script.
Depend onAn optional plugin the script depends on (Select a Plugin).
URLThe page path where the script should run (for example, /owner/invoices/view).
Match URL exactlyWhen on, the script runs only when the page URL matches the value exactly — not just any page that starts with it.
Active ScriptWhen on, the script is live and will execute. When off, it's saved but won't run.
ScriptThe code editor where you write the script itself (wrapped in <script> tags).
How it works: the script runs automatically on pages matching the URL you set. Use Match URL exactly to limit it to one precise page, and the Active Script toggle to turn it on or off without deleting it.

Saving#

Use Save (top right) on either form to apply your changes, or Cancel to discard.
💡 Keep scripts inactive while you're still testing — toggle Active Script on only when you're ready for it to run on real pages.
Previous
The Entity Builder
Next
Integrations: Webhooks