Daftra API
All Endpoints
Daftra Partners
All Endpoints
Daftra Partners
  1. Invoices
  • Welcome
  • Getting Started
  • Validation Errors
  • Authorization
    • How To Authorize
    • Generate Access Token
  • Endpoints v1
    • Site
      • GET Site Info
    • Invoices
      • GET All Invoices
        GET
      • GET Single Invoice
        GET
      • Add New Invoice
        POST
      • Bulk Add Invoices
        POST
      • Edit Invoices
        PUT
      • Delete Invoices
        DELETE
    • Estimates
      • GET All Estimates
      • GET Single Estimate
      • Add New Estimate
      • Edit Estimates
      • Delete Estimates
    • Credit Notes
      • GET All Credit Notes
      • GET Single Credit Note
      • Add New Credit Note
      • Edit Credit Notes
      • Delete Credit Notes
    • Refund Receipts
      • GET All Refund Receipts
      • GET Single Refund Receipt
      • Add New Refund Receipt
      • Edit Refund Receipts
      • Delete Refund Receipts
    • Clients
      • GET All Clients
      • GET Single Client
      • Add New Client
      • Edit Clients
      • Delete Clients
    • Suppliers
      • GET All Suppliers
      • GET Single Supplier
      • Add New Supplier
      • Edit Suppliers
      • Delete Suppliers
    • Work Orders
      • GET All Work Orders
      • GET Single Work Order
      • Add New Work Order
      • Edit Work Orders
      • Delete Work Orders
    • Client Appointments
      • GET All Client Appointments
      • GET Single Client Appointment
      • Add New Client Appointment
      • Edit Client Appointments
      • Delete Client Appointments
    • Invoice Appointments
      • GET All Invoice Appointments
      • GET Single Invoice Appointment
      • Add New Invoice Appointment
      • Edit Invoice Appointments
      • Delete Invoice Appointments
    • Estimate Appointments
      • GET All Estimate Appointments
      • GET Single Estimate Appointment
      • Add New Estimate Appointment
      • Edit Estimate Appointments
      • Delete Estimate Appointments
    • Work Order Appointments
      • GET All Work Order Appointments
      • GET Single Work Order Appointment
      • Add New Work Order Appointment
      • Edit Work Order Appointments
      • Delete Work Order Appointments
    • Notes
      • GET All Notes
      • GET Single Note
      • Add New Note
      • Edit Notes
      • Delete Notes
    • Time Tracking
      • GET All Time Tracking
      • GET Single Time Tracking
      • Add New Time Tracking
      • Edit Time Tracking
      • Delete Time Tracking
    • Invoice Payments
      • GET All Invoice Payments
      • GET Single Invoice Payment
      • Add New Invoice Payment
      • Edit Invoice Payments
      • Delete Invoice Payments
    • Client Payments
      • GET All Client Payments
      • GET Single Client Payment
      • Add New Client Payment
      • Edit Client Payments
      • Delete Client Payments
    • Products
      • GET All Products
      • GET Single Product
      • Add New Product
      • Edit Products
      • Delete Products
    • Journals
      • GET All Journals
      • GET Single Journal
      • Edit Journals
      • Delete Journals
      • Add New Journal
    • Journal Accounts
      • GET All Journal Accounts
      • GET Single Journal Account
      • Add New Journal Account
      • Edit Journal Accounts
      • Delete Journal Accounts
    • Journal Cats
      • GET All Journal Cats
      • GET Single Journal Cat
      • Add New Journal Cat
      • Edit Journal Cats
      • Delete Journal Cats
    • Expenses
      • GET All Expenses
      • GET Single Expens
      • Add New Expens
      • Edit Expenses
      • Delete Expenses
    • Incomes
      • GET All Incomes
      • GET Single Income
      • Add New Income
      • Edit Incomes
      • Delete Incomes
    • Taxes
      • GET All Taxes
      • GET Single Taxe
      • Add New Taxe
      • Edit Taxes
      • Delete Taxes
    • Purchase Invoices
      • GET All Purchase Invoices
      • GET Single Purchase Invoice
      • Add New Purchase Invoice
      • Edit Purchase Invoices
      • Delete Purchase Invoices
    • Purchase Refunds
      • GET All Purchase Refunds
      • GET Single Purchase Refund
      • Add New Purchase Refund
      • Edit Purchase Refunds
      • Delete Purchase Refunds
    • Stock Transactions
      • GET All Stock Transactions
      • GET Single Stock Transaction
      • Add New Stock Transaction
      • Edit Stock Transactions
      • Delete Stock Transactions
    • Stores
      • GET All Stores
      • GET Single Store
      • Add New Store
      • Edit Stores
      • Delete Stores
    • Treasuries
      • GET All Treasuries
      • GET Single Treasury
      • Add New Treasury
      • Edit Treasuries
      • Delete Treasuries
    • 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
      • Add New Requisition
      • Edit Requisitions
      • Delete Requisitions
    • Booking
      • Get All Bookings
      • Get Single Booking
      • Add new Booking
      • Change Booking Status
      • Convert booking to Invoice
      • 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
      • Add New Cost Center
      • Edit 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
  1. Invoices

Bulk Add Invoices

Production
https://{{subdomain}}.daftra.com/api2
Production
https://{{subdomain}}.daftra.com/api2
POST
https://{{subdomain}}.daftra.com/api2
/invoices/add_bulk.json
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.).
Invoices are created one by one and the operation is not atomic — if one element fails validation the others are still created. The response is a JSON array with one result object per submitted invoice, in the same order as the request. A successful element carries the new invoice id and number; a failed element carries an error result with a message, so you must inspect each element to confirm it succeeded.
Per-element fields and defaulting behaviour are identical to Add New Invoice — see that endpoint for the full field reference.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Query Params

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff 'https://.daftra.com/api2/invoices/add_bulk.json?send=&client_id=&terminal_id=' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '[
  {
    "Invoice": {
      "client_id": 7,
      "staff_id": 1,
      "branch_id": 1,
      "client_email": "test@test.tesdttt",
      "store_id": 1,
      "type": 0,
      "currency_code": "USD",
      "date": "2026-06-17",
      "draft": false,
      "discount": 0,
      "discount_amount": 0,
      "deposit": 0,
      "notes": "Thanks for your business"
    },
    "InvoiceItem": [
      {
        "item": "Consulting service",
        "description": "Monthly retainer",
        "unit_price": 100.0,
        "quantity": 2,
        "tax1": null,
        "tax2": null,
        "product_id": 3,
        "discount": 0,
        "discount_type": 2,
        "store_id": 0,
        "lot": [],
        "expiry_date": [],
        "serials": []
      }
    ],
    "Payment": [
      {
        "payment_method": "cash",
        "amount": 200.0
      }
    ],
    "InvoiceCustomField": {},
    "Deposit": {},
    "InvoiceReminder": {},
    "Document": {},
    "DocumentTitle": {}
  },
  {
    "Invoice": {
      "client_id": 6,
      "client_email": "test@test.tesdttt",
      "staff_id": 1,
      "branch_id": 1,
      "store_id": 1,
      "type": 0,
      "currency_code": "USD",
      "date": "2026-06-17",
      "draft": false,
      "discount": 0,
      "discount_amount": 0,
      "deposit": 0,
      "notes": "Thanks for your business"
    },
    "InvoiceItem": [
      {
        "item": "Consulting service",
        "description": "Monthly retainer",
        "unit_price": 100.0,
        "quantity": 2,
        "tax1": null,
        "tax2": null,
        "product_id": 2,
        "discount": 0,
        "discount_type": 2,
        "store_id": 0,
        "lot": [],
        "expiry_date": [],
        "serials": []
      }
    ],
    "Payment": [
      {
        "payment_method": "cash",
        "amount": 200.0
      }
    ],
    "InvoiceCustomField": {},
    "Deposit": {},
    "InvoiceReminder": {},
    "Document": {},
    "DocumentTitle": {}
  }
]'
Response Response Example
[
    {
        "result": "successful",
        "code": 202,
        "id": 2415,
        "invoice_number": "0700000AAAAA0001",
        "invoice_pos_html": "string"
    }
]
Previous
Add New Invoice
Next
Edit Invoices