Daftra API
All Endpoints
Daftra PartnersDevelopers Portal
All Endpoints
Daftra PartnersDevelopers Portal
  1. Entities
  • 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
      • Bulk Add Invoices
      • Bulk Add Invoices
      • Delete Sales Order
    • Estimates
      • GET All Estimates
      • GET Single Estimate
      • Add New Estimate
      • Edit Estimates
    • Credit Notes
      • GET All Credit Notes
      • GET Single Credit Note
      • Add New Credit Note
      • Edit Credit Notes
    • Refund Receipts
      • GET All Refund Receipts
      • GET Single Refund Receipt
      • Add New Refund Receipt
      • Edit Refund Receipts
      • Bulk Add Refund Receipts
    • 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
    • Suppliers
      • GET All Suppliers
      • GET Single Supplier
      • 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 Single Client Appointment
      • Delete Client Appointments
    • Invoice Appointments
      • GET Single Invoice Appointment
      • Delete Invoice Appointments
    • Estimate Appointments
      • GET Single Estimate Appointment
      • Delete Estimate Appointments
      • Update Estimate Appointment (POST alias)
    • Work Order Appointments
      • GET Single Work Order Appointment
      • Delete Work Order Appointments
      • Update Work Order Appointment (POST alias)
    • Notes
      • GET All Notes
      • GET Single Note
      • Add New Note
      • 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
      • Add New Invoice Payment
      • Edit Invoice Payments
      • Delete Invoice Payments
    • Client Payments
      • GET All Client Payments
      • Add New Client Payment
      • Delete Client Payments
    • Products
      • GET All Products
      • GET Single Product
      • Add New Product
      • Edit Products
      • Delete Products
      • List Brands
    • 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 Single Purchase Invoice
      • Delete Purchase Invoices
    • Stock Transactions
      • GET All Stock Transactions
      • GET Single Stock Transaction
      • Add New Stock Transaction
      • 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
      • Delete Treasuries
    • Product Categories
      • GET Single Product Category
      • Add New Product Category
      • Edit Product Category
      • Update Category Display Order
      • Update Category Items
    • Staff
      • GET All Staff
      • GET Single Staff
    • Client-attendance-log
      • Add New Client-attendance-log
    • General Listing
      • GET General Listing
    • Requsitions
      • GET single Requisition
      • Add New Requisition
      • Edit Requisitions
      • Trigger Requisition Update
    • 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
    • Subsciptions
      • List Subscriptions
      • View Subscription
      • Create Subscription
      • Edit Subscription
    • Shipping Options
      • List Shipping Options
  • 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 Status
      • Get All Follow-Up Statuses
      • Get Single Follow-Up Status
      • Add New Follow-Up Status
      • Delete Follow-Up Status
      • Get All Follow-Up Statuses by type
    • Follow-Up Action
      • 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
    • 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
    • Follow-Up Statuses
    • Entities
      • List entity records
        GET
      • View entity record
        GET
      • Create entity record
        POST
      • Update entity record
        PUT
      • Delete entity record
        DELETE
  • 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. Entities

Update entity record

Production
https://{{subdomain}}.daftra.com/v2/api/entity
Production
https://{{subdomain}}.daftra.com/v2/api/entity
PUT
https://{{subdomain}}.daftra.com/v2/api/entity
/v2/api/entity/{entityKey}/{id}
Update a record of any entity, addressed by its entityKey and primary key id.
This is a generic, metadata-driven endpoint. The request body is a JSON object of the field values to update; which keys are accepted and which are required is defined by the entity's field metadata, so it differs per entityKey. Use the entity schema/fields endpoints to discover an entity's fields.
On success the response carries a confirmation message and the record's id.
Authentication & authorization. Requires an OAuth2 Bearer token and the entity's update permission; otherwise the request is rejected with 401.
Note: the same operation also accepts POST /v2/api/entity/{entityKey}/{id} for web-client backward compatibility.

Request

Path Params

Header Params

Body Params application/jsonRequired

Examples

Responses

🟢200OK
application/json
Record updated.
Bodyapplication/json

🟠400Bad Request
🟠404Not Found
🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --globoff --request PUT 'https://.daftra.com/v2/api/entity/v2/api/entity/cost_center/47' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'apikey: ' \
--header 'Content-Type: application/json' \
--data '{}'
Response Response Example
200 - Example 1
{
    "message": "Cost Center Updated Successfully",
    "id": 47
}
Previous
Create entity record
Next
Delete entity record