Daftra API
DocsAll EndpointsDaftra Partners
DocsAll EndpointsDaftra Partners
  1. Auth
  • Welcome
  • Getting Started
  • Authorization
  • All Endpoints
    • Auth
      • Generate Access Token
        POST
    • 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 All Notes
      • GET Single Note
      • Edit Notes
      • Delete 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 All Journal Cats
      • GET Single Journal Cat
      • Edit Journal Cats
      • Delete 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 All Staff
      • GET Single Staff
    • Client-attendance-log
      • Add New Client-attendance-log
    • Follow Up Actions
      • GET All Follow Up Actions
      • GET Single Follow Up Action
      • Delete Follow Up Action
    • Follow Up Statuses
      • GET All Follow Up Statuses
      • GET Single Follow Up Status
      • Delete Follow Up Status
    • General Listing
      • GET General Listing
    • Site
      • GET Site Info
  1. Auth

Generate Access Token

Production
https://{{subdomain}}.daftra.com
Production
https://{{subdomain}}.daftra.com
POST
https://{{subdomain}}.daftra.com
/v2/oauth/token
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://.daftra.com/v2/oauth/token' \
--header 'Accept: application/json' \
--form 'client_secret="jCfy6cMh1X6NTxR3OWLuvEFa0si5uZKr05UeoAEs"' \
--form 'client_id="1"' \
--form 'grant_type="password"' \
--form 'username=""' \
--form 'password=""'
Response Response Example
{
    "token_type": "Bearer",
    "expires_in": 94694400,
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiMjA3MzU4MzdkNjdiNWJjYmMzZGRjMTE4NjJiOThjNWE1ZTBkYzdkNWE3ODliNmE3NmI1MjY3MjZiZWU3M2RlYjA5ZWQ1MWRiNzBkZDdmMWQiLCJpYXQiOjE3NDQ2MjA5MjIuMjU4NzM5OSwiZXhwIjoxODM5MzE1MzgyLjI0NjM3Miwic3ViIjoiNDA2MzI3MSIsInNjb3BlcyI6W10sInByb3ZpZGVyIjoib3duZXIiLCJuYmYiOjE3NDQ1MzQ1ODIuMjU4NzU4MX0.QBCnITMq1eIcdr0jx3JkJxU3QzB-PGPCAF0bKLbDOUmQf_o_XGUoEkLTQen75aBM9faIteUrfCwxZ4I8h_LoB-eprQK4Qxg-pbTLOoEixv6WMKTGL_AwCVpuWFoPWbSKVRDb43yFqGoLHuKLBe9-3I2fIjlXguvGbODaECEeL-cJkab6-oqlidiH9dpB-hFqQv1Nsd3uQUxu6C5PJDFyI1si10xy80Hu3jlMX7OS2V8SkFhsq11l2xTgHDDsXf9z4spp3di7dUzoXgFPFoXlp47zGRvc8kNLkr8_Dz3omttPsm82mKZNsCwAatac6Fxw7PJlHjTaTmSukHx9YAd9Nuc6q_AZ_7y2YhvYBj1DhxeVLb-i2BlxXTTJYgjZhqgLvh--4Z5XZCiXv2tagSKggNhNIoKKDftsEDYY8_5fWddMOeRI085yuB5vyrNrnGmv4E8_9VQI43nGuUyVWOFp5EvfQSPB8Db0byG95aSl9ub2d2Akclt3aZ9fWgV3Agxu34x6EQ1YGBrwoHJ_0XvUOWhI3T4_N1lmQapnpVhAEfvyVKccS1jAFO18OvKN-depxYzNIkkbnrxZ9uEsRpsj44oJlSt8QYKKSDn1t9gObkRWLqdmltgayskP4F1Rm2OE-b3FagG_IeKUyua5SFtsi_EU4JP37Kz2yqJWF5yW4R0",
    "refresh_token": "def50200fcb939ed9b9d75a0a9193135250cc7efe5248a55c62715c22b0b38fe68c039f2fa1dcdf1d1ea6d45b29729506558341783734dc0360ea6de5190281cd068c5e1a9a5a1c1d540de5c888e7727d6fa46087726ff6566774230a252dce8952c46bbc80100033d01768f6fe6c0b4ca9425f9b5442b0ecb748fcd7d157a52ec2486746723134052e276d760e333bd6177b30cbd0bd744f9aacde79ba65522298e49decc5194e03b683804176f116626cc8897399fa46996e7f5bc2c5946583c8787dcfd6e28f7febc6aa9fea4468b01e2c0d3ee52ff89cf14446a962544a8a58448082c0bb2e9e4bcf007f734a5b68334d1a1bb029402ad11f2c067425e60787ea467ca9547f7de03edbfa74264b362b34fdcef74b7cc383e4cda7a32b080a9dee0be786c62260960e33a87850156fb64ce9bcdb0fbbb0d72475c1268b6e8fb3de85643e6b5e5ef205fa0e3016a37f9408f01ebcfd020d9cb71c147578cd2f8bd4f14b241cf301a"
}

Request

Header Params
Accept
string 
optional
Default:
application/json
Content-Type
string 
optional
Default:
application/json
Body Params multipart/form-data
client_secret
string 
required
Example:
jCfy6cMh1X6NTxR3OWLuvEFa0si5uZKr05UeoAEs
client_id
string 
required
Example:
1
grant_type
string 
required
Example:
password
username
string 
required
Example:
{{username}}
password
string 
required
Example:
{{password}}

Responses

🟢200Success
application/json
Body
token_type
string 
optional
expires_in
integer 
optional
access_token
string 
optional
refresh_token
string 
optional
Previous
Authorization
Next
GET All Invoices