Daftra API
All Endpoints
Daftra PartnersDevelopers Portal
All Endpoints
Daftra PartnersDevelopers Portal
  1. Detailed Stock Transactions For Each Product Report
  • Getting Started
  • Welcome
  • Authorization
    • How To Authorize
    • Generate Access Token
  • Endpoints
    • Site
      • GET Site Info
    • Sales
      • Validation Errors
      • Invoices
        • GET All Invoices
        • GET Single Invoice
        • Edit Invoice
        • Delete Invoice
        • Add New Invoice
        • Bulk Add Invoices
        • Edit Invoice Draft Status
        • Assign Work Order to Invoice
        • Add Shipping to Invoice
        • Convert Sales Order to Invoice
        • Delete Sales Order
      • Subsciptions
        • List Subscriptions
        • View Subscription
        • Create Subscription
        • Edit Subscription
        • Delete Subscription
      • Estimates
        • GET All Estimates
        • GET Single Estimate
        • Add New Estimate
        • Edit Estimate
        • Delete Estimate
      • 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
        • Bulk Add Refund Receipts
      • Invoice Payments
        • GET All Invoice Payments
        • GET Single Invoice Payment
        • Add New Invoice Payment
        • Edit Invoice Payments
        • Delete Invoice Payments
      • Invoice Appointments
        • GET All Invoice Appointments
        • GET Single Invoice Appointment
        • Add New Invoice Appointment
        • Edit Invoice Appointments
        • Delete Invoice Appointments
      • Advance Payment Invoices
        • GET All Advance Payment Invoices
        • GET Single Advance Payment Invoices
        • Add Advance Payment Invoice
      • Estimate Appointments
        • GET All Estimate Appointments
        • GET Single Estimate Appointment
        • Add New Estimate Appointment
        • Edit Estimate Appointments
        • Delete Estimate Appointments
        • Update Estimate Appointment (POST alias)
      • Shipping Options
        • List Shipping Options
      • POS
        • Get POS Shift Session
      • Follow-Up Status
        • Get All Follow-Up Statuses by type
        • Get Single Follow-Up Status
        • Delete Follow-Up Status
        • Get All Follow-Up Statuses
        • Add New Follow-Up Status
    • Clients
      • Clients
        • GET All Clients
        • GET Single Client
        • Add New Client
        • Edit Clients
        • Delete Clients
        • Assign Staff To Client
        • Client Loyalty Points
        • Bulk Add Clients
        • Client Has Membership
        • Client Attendance By Barcode
      • Client Appointments
        • GET All Client Appointments
        • GET Single Client Appointment
        • Add New Client Appointment
        • Edit Client Appointments
        • Delete Client Appointments
      • Client Payments
        • GET All Client Payments
        • GET Single Client Payment
        • Add New Client Payment
        • Edit Client Payments
        • Delete Client Payments
      • Client Attendance Log
        • Get All Client Attendance Logs
        • Get Single Client Attendance Log
        • Add New Client Attendance Log
        • Edit Client Attendance Log
        • Delete Client Attendance Log
      • Notes
        • GET All Notes
        • GET Single Note
        • Add New Note
        • Edit Notes
        • Delete Notes
      • Follow-Up Action
        • Get All Follow-Up Actions
        • Get Single Follow-Up Action
        • Delete Follow-Up Action
    • Bookings
      • Booking (Classic version)
        • Get All Bookings
        • Get Single Booking
        • Add new Booking
        • Delete booking
        • Change Booking Status
        • Convert booking to Invoice
      • Booking (Beta version)
        • Get All Bookings
        • Get Single Booking
        • Add new Booking
        • Delete booking
        • Change Booking Status
    • Work Orders
      • Work Orders
        • GET All Work Orders
        • GET Single Work Order
        • Add New Work Order
        • Edit Work Orders
        • Delete Work Orders
      • 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
        • Update Work Order Appointment (POST alias)
    • Inventory
      • Products
        • GET All Products
        • GET Single Product
        • Add New Product
        • Edit Products
        • Delete Products
        • List Brands
      • Requsitions
        • GET All Requisitions
        • GET single Requisition
        • Add New Requisition
        • Edit Requisitions
        • Delete Requisitions
        • Trigger Requisition Update
      • Product Categories
        • GET All Product Categories
        • GET Single Product Category
        • Add New Product Category
        • Edit Product Category
        • Delete Product Category
        • Update Category Display Order
        • Update Category Items
      • Stores
        • GET All Stores
        • GET Single Store
        • Add New Store
        • Edit Stores
        • Delete Stores
      • Stock Transactions
        • GET All Stock Transactions
        • GET Single Stock Transaction
        • Add New Stock Transaction
        • Edit Stock Transactions
        • Delete Stock Transactions
      • Product Bundles
        • Add Product bundle
      • Brands
        • Get All Brands
        • Get Single Brand
        • Add New Brand
        • Edit brand
        • Delete brand
      • Unit Templates
        • Get All Unit Templates
        • Get Single Unit Template
        • Add Unit Template
        • Edit Unit Template
    • Accounting
      • Journals
        • GET All Journals
        • GET Single Journal
        • Add New Journal
        • Edit Journals
        • Delete Journals
      • 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
        • Delete Journal Cats
        • Edit Journal Cats
        • Add New Journal Cat
      • Cost Centers
        • Get All Cost Centers
        • Get Single Cost Center
        • Add New Cost Center
        • Edit Cost Center
        • Delete Cost Center
    • Finance
      • Treasuries
        • GET All Treasuries
        • GET Single Treasury
        • Add New Treasury
        • Edit Treasuries
        • Delete Treasuries
        • GET Treasuries Assigned Employees
      • Expenses
        • GET All Expenses
        • GET Single Expens
        • Add New Expense
        • Edit Expenses
        • Delete Expenses
      • Incomes
        • GET All Incomes
        • GET Single Income
        • Add New Income
        • Edit Incomes
        • Delete Incomes
    • 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
      • Employee Asset
        • Asset Type
          • Get All Types
          • Get Single Type
          • Add New Type
          • Edit Type
        • Asset Location
          • Get All Locations
          • Get Single Location
          • Add New Location
          • Edit Location
        • Asset Storage
          • Get All Storages
          • Get Single Storage
          • Add New Storage
          • Edit Storage
        • Asset
          • Get All Assets
          • Get Single Asset
          • Add New Asset
          • Edit Asset
      • Organizational Structure
        • Designation
          • Get All Designations
          • Get Single Designation
          • Add New Designation
          • Edit Designation
        • Department
          • Get All Departments
          • Get Single Department
          • Add New Department
          • Edit Department
        • Employment Type
          • Get All Employment Types
          • Get Single Employment Type
          • Add New Employment Type
          • Edit Employment Type
    • Branches
      • Get All Branches
      • Get Single Branch
      • Add New Branch
      • Edit Branch
      • Delete Branch
    • Taxes
      • GET All Taxes
      • GET Single Taxe
      • Add New Taxe
      • Edit Taxes
      • Delete Taxes
    • Purchases
      • Purchase Refunds
        • GET All Purchase Refunds
        • GET Single Purchase Refund
        • Add New Purchase Refund
        • Edit Purchase Refunds
        • Delete Purchase Refunds
      • Purchase Invoices
        • GET All Purchase Invoices
        • GET Single Purchase Invoice
        • Add New Purchase Invoice
        • Edit Purchase Invoices
        • Delete Purchase Invoices
      • Purchase Orders
        • GET All Purchase Orders
        • GET Single Purchase Order
        • Add New Purchase Order
        • Edit Purchase Order
        • Delete Purchase Order
      • Purchase Debit Note
        • Purchase Debit Note
        • Purchase Debit Note
    • General Listing
      • GET General Listing
    • Payment Gateways
      • Get All Payment Methods
      • Get Single Payment Method
      • Add Payment Method
      • Add Payment Method Copy
    • Points & Credits
      • Credit Charges
        • Get All Credit Charges
        • Get Single Credit Charge
        • Add New Credit Charge
        • Edit Credit Charge
      • Credit Usage
        • Get All Credit Usage
        • Get Single Credit Usage
        • Add New Credit Usage
        • Edit Credit Usage
        • Get All Credit Usage Amount
        • Get Single Credit Usage Amount
        • Add Credit Usage Amount
        • Edit Credit Usage Amount
      • Credit Types
        • Get All Credit types
        • Get Single Credit type
        • Add New Credit type
        • Edit Credit type
      • 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
    • Multi Entity Request
      • Overview
      • Multi Entity Request
    • Suppliers
      • GET All Suppliers
      • GET Single Supplier
      • Add New Supplier
      • Edit Suppliers
      • Delete Suppliers
    • Staff
      • GET All Staff
      • GET Single Staff
      • Add New Staff
      • DELETE Staff
      • GET Send Staff Login Details
    • Time Tracking
      • GET All Time Tracking
      • GET Single Time Tracking
      • Add New Time Tracking
      • Edit Time Tracking
      • Delete Time Tracking
    • Follow-Up Statuses
      • Get All Follow-Up Statuses
      • Get Single Follow-Up Status
      • Add New Follow-Up Status
      • Delete Follow-Up Status
    • Entities
      • List entity records
      • View entity record
      • Create entity record
      • Update entity record
      • Delete entity record
    • Email And SMS Sender
      • Email Sender
      • SMS Sender
    • Reports
      • Sales
        • Sales Revenue Report
          • Sales Revenue Report
        • Invoice-Returns Cross-Reference Report
          • Invoice-Returns Cross-Reference Report
        • Invoice Net Position Report
          • Invoice Net Position Report
        • ZATCA Submission Report
          • ZATCA Submission Report
        • Product Sales Report
          • Product Sales Report
        • Payments Report
          • Payments Report
        • Advance Payments Report
          • Advance Payments Report
        • Product Sales Profit Report
          • Product Sales Profit Report
        • Profit (Stock Transactions) Report
          • Profit (Stock Transactions) Report
      • Accounting
        • Tax Details Report
          • Tax Details Report
        • Tax Summary Report
          • Tax Summary Report
        • Tax Declaration Report
          • Tax Declaration Report
        • Income Statement Report
          • Income Statement Report
        • Balance Sheet Report
          • Balance Sheet Report
        • Profit & Loss (Accrual) Report
          • Profit & Loss (Accrual) Report
        • Financial Transactions Report
          • Financial Transactions Report
        • Cash Flow Report
          • Cash Flow Report
        • Trial Balance & Nets Report
          • Trial Balance & Nets Report
        • Trial Balance Report
          • Trial Balance Report
        • Trial Nets Report
          • Trial Nets Report
        • Ledger Report
          • Ledger Report
        • Journal Transactions Report
          • Journal Transactions Report (Detailed)
        • Journals Report
          • Journals Report
        • Chart of Accounts Report
          • Chart of Accounts Directory
        • Expenses Report
          • Expenses Report (Detailed)
          • Expenses Report (Summary)
      • Detailed Stock Transactions For Each Product Report
        • Detailed Stock Transactions For Each Product Report
          GET
      • Clients Appointments Report
        • Clients Appointments Report
      • Assets Report
        • Assets Report
      • Summary Attendance Reports
        • Summary Attendance Reports
      • Bundles Report
        • Bundles Report
      • Aged Debtors (Ledger) Report
        • Aged Debtors (Ledger) Report
      • Clients Balance Report
        • Clients Balance Report
      • Clients Sales Report
        • Clients Sales Report
  • Advanced Filtering
    • API Improvements
    • Filtering
    • Endpoints Structure
    • Using API v2
      • Data Fetching — Filtered
  • 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
    • Developers Portal Endpoints
      • Activate / Deactivate App
      • Lock / Unlock Entity Record
      • Check App Status
  1. Detailed Stock Transactions For Each Product Report

Detailed Stock Transactions For Each Product Report

Production
https://{{subdomain}}.daftara.com
Production
https://{{subdomain}}.daftara.com
GET
https://{{subdomain}}.daftara.com
/api2/reports/detailed_stock_transactions
Returns all processed stock transactions within the selected date range, grouped by product. Matches the /owner/reports/report/detailed_stock_transactions report.

Groups#

The report shows one table per currency. Inside each table, every product has a heading, a Stock Level Before line, and then its transactions. In the response, each product heading becomes one item in groups[], listed in the same order as the report (by currency, then by product).
FieldDescription
keyThe product heading as text: <product name>#<product code or id>. Doesn't change with the account language.
labelThe heading shown in the report. null for deleted products, which appear without a heading.
currencyThe currency of the table the group belongs to. null for transactions with no currency, such as transfers and some adjustments.
product_idThe product ID for all rows in the group. null when the rows belong to more than one product (deleted products).
stock_level_beforeThe Stock Level Before line: {quantity, unit}.
rowsThe product's transactions, oldest first.
subtotalsAlways null. This report has no subtotals.
totals is always null. This report has no totals line.
If a product has transactions in more than one currency, it appears in more than one group. Stock Level After and Stock Value After are calculated across all of the product's transactions by date, regardless of currency.

Columns#

KeyReport columnType
transactionTransaction (<date> (#<id>), in the account's date format)text
sourceSource (<source name> (#<document number>))text
warehouseWarehousetext
quantity (+ quantity_unit)Quantity, in the transaction's unitquantity
pricePrice per Unitamount
stock_after (+ stock_after_unit)Stock Level After, in the product's unitquantity
average_unit_costAverage Unit Costamount
total_transaction_valueTotal Transaction Value (quantity × average unit cost)amount
total_transaction_priceTotal Price (quantity × price)amount
stock_value_afterStock Value After (stock level after × average unit cost)amount
Each row also includes id, date (stored date and time), product_id, source_type, order_id, order_no, warehouse_id, and currency_code (the transaction's currency).
Values are returned raw, without formatting or rounding. The report itself shows up to six decimal places.
When currency=All, price is converted to the account's main currency using the rate on each transaction's date, and all groups use the main currency. total_transaction_price is not converted.
This report has a single layout. The summary=1 parameter has no effect.
No pagination. If the result exceeds the configured stock transactions limit, the request returns 400. Use a shorter date range or add filters.
Requirements: the Inventory plugin, the Track Inventory and Add New Purchase Orders permissions, and an API key with machine access enabled.

Request

Authorization
OAuth 2.0
Password
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Token URL: https://www.daftra.com/v2/oauth/token
or
API Key
Add parameter in header
apikey
Example:
apikey: ********************
or
API Key
Add parameter in cookie
OISystem
Example:
OISystem: ********************
or
Query Params

Header Params

Responses

🟢200
application/json
The report.
Bodyapplication/json

🟠400Error400
🟠401Error401
🟠403Error403
🟠404Error404
🟠405Error405
🔴500Error500
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff 'https://.daftara.com/api2/reports/detailed_stock_transactions?from_date=2025-07-01&to_date=2025-12-31&source_type=&product_id=&item_group_id=&warehouse_id=&brand_id=&category_id=&currency=All' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json'
Response Response Example
200 - Example 1
{
    "result": "successful",
    "code": 200,
    "data": {
        "report": {
            "key": "detailed_stock_transactions",
            "title": "string"
        },
        "filters": {
            "from_date": "2019-08-24",
            "to_date": "2019-08-24",
            "brand_id": 0,
            "currency": "string",
            "source_type": [
                0
            ],
            "product_id": [
                0
            ],
            "item_group_id": [
                0
            ],
            "warehouse_id": [
                0
            ],
            "category_id": [
                0
            ]
        },
        "columns": [
            {
                "key": "string",
                "label": "string",
                "type": "text"
            }
        ],
        "groups": [
            {
                "key": "string",
                "label": "string",
                "currency": "string",
                "product_id": 0,
                "stock_level_before": {
                    "quantity": 0,
                    "unit": "string"
                },
                "rows": [
                    {
                        "id": 0,
                        "date": "string",
                        "product_id": 0,
                        "source_type": 0,
                        "order_id": 0,
                        "order_no": "string",
                        "warehouse_id": 0,
                        "transaction": "string",
                        "source": "string",
                        "warehouse": "string",
                        "quantity": 0,
                        "quantity_unit": "string",
                        "price": 0,
                        "stock_after": 0,
                        "stock_after_unit": "string",
                        "average_unit_cost": 0,
                        "total_transaction_value": 0,
                        "total_transaction_price": 0,
                        "stock_value_after": 0,
                        "currency_code": "string"
                    }
                ],
                "subtotals": null
            }
        ],
        "totals": null,
        "meta": {
            "currencies": [
                "string"
            ],
            "group_count": 0,
            "row_count": 0
        }
    }
}
Previous
Expenses Report (Summary)
Next
Clients Appointments Report