### Retrieve System Changes Request Source: https://www.hesabfa.com/help/api/Setting Example JSON payload for the getChanges API request, including authentication credentials and the starting ID for change tracking. ```json { apiKey: 'asdfASR^%FDHdsfg456', userId: 'mail@example.com', password: '123456', loginToken: 'f6b912...45fdc', start: 1337 } ``` -------------------------------- ### Contact Save Response Example Source: https://www.hesabfa.com/help/api/Contact Example JSON response returned after a successful contact save operation. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { Code: '0001', Name: 'شرکت توحید', Company: 'شرکت توحید', FirstName: 'محمد', LastName: 'محمدی', ContactType: 2, NationalCode: '65465465465', EconomicCode: '13232323221', RegistrationNumber: '9879898798798', Title: 'شرکت توحید', Address: "", City: 'تهران', State: 'تهران', PostalCode: '2154665656', Phone: '02188664523', Fax: '02188664524', Mobile: '09361234567', Email: 'info@sample.com', Website: "", BirthDate: '2000/05/04', WeddingDate: '2021/05/14', MembershipDate: '2023/01/14', Note: "", IsShareHolder: true, IsCustomer: true, IsVendor: true, IsEmployee: false, SharePercent: 0, Liability: 0, Credits: 0, ContactCredit: 0, Tag: '', Active: true, TaxType: 5, NodeFamily: 'اشخاص:اشخاص حقوقی:سازمان ها' } } ``` -------------------------------- ### Response structure for getFiscalYears Source: https://www.hesabfa.com/help/api/Setting Example response containing a list of fiscal years with their start and end dates. ```json { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": [{ "Name": "سال مالی منتهی به 1402/12/29", "StartDate": "2023-03-20T00:00:00", "EndDate": "2024-03-19T00:00:00", "Closed": "false", "FirstYear": true }] } ``` -------------------------------- ### Contact Save Request Example Source: https://www.hesabfa.com/help/api/Contact Example JSON payload for saving or updating a contact. ```json { apiKey: 'asdfASR^%FDHdsfg456', userId: 'mail@example.com', password: '123456', loginToken: 'f6b912...45fdc', contact: { code: '0001', name: 'شرکت توحید', firstName: 'محمد', lastName: 'محمدی', contactType: 2, isShareHolder: true, isCustomer: true, isVendor: true, isEmployee: false, nodeFamily: 'اشخاص:اشخاص حقوقی:سازمان ها' } } ``` -------------------------------- ### Get Projects Response Source: https://www.hesabfa.com/help/api/Setting Returns a list of projects registered in the current fiscal year. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { [ { "Id": 2, "Title": "پروژه 1", "Active": true }, { "Id": 2, "Title": "پروژه فروش مهرماه", "Active": true } {…}, {…} ] } } ``` -------------------------------- ### Define queryInfo with filters Source: https://www.hesabfa.com/help/api/Configuration Example of applying property-based filters with specific operators and values. ```json { sortBy: 'Name', sortDesc: false, take: 10, skip: 0, filters:[ { property: 'Name', operator: '*', value: 'شرکت' }, { property: 'Liability', operator: '>', value: '100000' } ] } ``` -------------------------------- ### Response structure for getBanks Source: https://www.hesabfa.com/help/api/Setting Example response containing an array of bank accounts with their details. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: [ { "Id": 1, "Code": "0001", "AccountNumber": "4564512", "Name": "بانک ملت", "Branch": "استقلال", "Currency": "IRR" }, { "Id": 2, "Code": "0002", "AccountNumber": "57812459", "Name": "بانك تجارت", "Branch": "معلم", "Currency": "IRR" }, {...}, {...} ] } ``` -------------------------------- ### Retrieve Currency Table Response Source: https://www.hesabfa.com/help/api/Setting Example response structure for the getCurrencyTable endpoint. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { [ { "From": "USD", "To": "IRR", "Rate": 234500.0 }, { "From": "AED", "To": "IRR", "Rate": 68000.0 }, {…}, {…} ] } } ``` -------------------------------- ### Define queryInfo with search parameters Source: https://www.hesabfa.com/help/api/Configuration Example of using search strings and defining specific fields to search within. ```json { sortBy: 'Name', sortDesc: false, take: 10, skip: 0, search: "محمد", searchFields: ["name", "firstName", "lastName"] } ``` -------------------------------- ### Get Cash Accounts Response Source: https://www.hesabfa.com/help/api/Setting Example response structure for the getCashes endpoint containing a list of cash accounts. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: [ { "Id": 1, "Code": "0001", "Name": "صندوق اصلی", "Currency": "IRR" }, { "Id": 2, "Code": "0002", "Name": "صندوق فروشگاه", "Currency": "IRR" }, {...}, {...} ] } ``` -------------------------------- ### Get Fiscal Year Response Source: https://www.hesabfa.com/help/api/Setting Returns details of the current fiscal year including start and end dates. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { "Name": "سال مالی منتهی به 1399/6/31", "StartDate": "2019-03-20T00:00:00", "EndDate": "2020-09-21T00:00:00" } } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getProductCategories Source: https://www.hesabfa.com/help/api/Setting Retrieves the hierarchical tree of product categories. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getProductCategories ### Description Retrieves the hierarchical tree of product categories registered in the system. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getProductCategories ### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email/ID - **password** (string) - Required - User password ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "userId": "mail@example.com", "password": "123456" } ### Response #### Success Response (200) - **Success** (boolean) - Operation status - **ErrorCode** (integer) - Error code - **ErrorMessage** (string) - Error message - **Result** (object) - Contains the root category tree #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "Root": { "Name": "کالاها", "FullPath": "کالاها", "Children": [] } } } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getDefaultPriceList Source: https://www.hesabfa.com/help/api/Setting Retrieves the default price list. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getDefaultPriceList ### Description Retrieves the list of default prices configured in the system. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getDefaultPriceList ### Response #### Success Response (200) - **Result** (array) - List of price objects containing Title and Currency ``` -------------------------------- ### Get Petty Cash Accounts Response Source: https://www.hesabfa.com/help/api/Setting Example response structure for the getPettyCashes endpoint containing a list of petty cash accounts. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: [ { "Id": 1, "Code": "0001", "Name": "تنخواه‌گردان خانم احمدی", "Currency": "IRR", }, ] } ``` -------------------------------- ### Retrieve Item Details Response Source: https://www.hesabfa.com/help/api/Item Example JSON response containing the item details, including pricing, stock, and tax information. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { "Code": "000001", "Name": "Galaxy J7 گوشی موبایل", "Barcode": "345345345345", "ItemType": 0, "Unit": "عدد", "SubUnit": "کارتن", "ConversionFactor": 10.000000, "Stock": 10, "BuyPrice": 500000, "SellPrice": 550000, "PurchasesTitle": "Samsung Galaxy J7", "SalesTitle": "Samsung Galaxy J7", "NodeFamily": "دیجیتال:موبایل:سامسونگ", "Tag": "", "Description": "", "ProductCode": "745921", "Active": true, "TaxId": "1301234567890", "TaxUnit": "کارتن", "PriceList": [ { "Title": "عمده", "Currency": "IRR", "Price": 520000 }, { "Title": "همکار", "Currency": "IRR", "Price": 525000 }, { "Title": "مشتری ویژه", "Currency": "IRR", "Price": 540000 } ] } } ``` -------------------------------- ### Get Change Hook Request Payload Source: https://www.hesabfa.com/help/api/Hook Example JSON payload for the GetChangeHook method to retrieve current webhook settings. ```json { apiKey: 'asdfASR^%FDHdsfg456', loginToken: 'f6b912...45fdc', } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getWarehouses Source: https://www.hesabfa.com/help/api/Setting Retrieves a list of all warehouses defined in the system. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getWarehouses ### Description Retrieves a list of all warehouses defined in the system. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getWarehouses ### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email/ID - **password** (string) - Required - User password ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "userId": "mail@example.com", "password": "123456" } ### Response #### Success Response (200) - **Success** (boolean) - Operation status - **ErrorCode** (integer) - Error code - **ErrorMessage** (string) - Error message - **Result** (array) - List of warehouses #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": [ { "Id": 5, "Code": 11, "Name": "انبار اصلی" }, { "Id": 6, "Code": 12, "Name": "انبار 2" } ] } ``` -------------------------------- ### Account to IBAN Conversion Response Source: https://www.hesabfa.com/help/api/inquiry Example response structure containing the IBAN in the Data object upon success. ```json { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "Status": 1, "Message": "موفق", "Data": { "IBAN": "IR910100010000001234567890", } } } ``` -------------------------------- ### Define queryInfo with in operator Source: https://www.hesabfa.com/help/api/Configuration Example of using the 'in' operator, which requires the value to be provided as an array. ```json { take: 10, skip: 0, filters:[ { property: 'Code', operator: 'in', value: [‘000001’, ‘000002’, ‘000003’] } ] } ``` -------------------------------- ### Retrieve Receipt or Payment Request Source: https://www.hesabfa.com/help/api/ReceivePay Example request body for the receipt/get endpoint, requiring authentication credentials and specific receipt identifiers. ```json { apiKey: 'asdfASR^%FDHdsfg456', userId: 'mail@example.com', password: '123456', loginToken: 'f6b912...45fdc', type: 1, number: 1001 } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/GetCurrency Source: https://www.hesabfa.com/help/api/Setting Retrieves the default currency configured in the system. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/GetCurrency ### Description Retrieves the default currency configured in the system. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/GetCurrency ### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email/ID - **password** (string) - Required - User password ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "userId": "mail@example.com", "password": "123456" } ### Response #### Success Response (200) - **Success** (boolean) - Operation status - **ErrorCode** (integer) - Error code - **ErrorMessage** (string) - Error message - **Result** (object) - Contains the currency information #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "Currency": "IRR" } } ``` -------------------------------- ### Retrieve Receipt or Payment Response Source: https://www.hesabfa.com/help/api/ReceivePay Example response structure containing receipt details, contact information, and transaction arrays. ```json { Success: true, ErrorCode: 0, ErrorMessage: '', Result: { "Id": 100, "number": 1009, "DateTime": "2020-11-07T00:00:00", "Description": "دریافت وجه/چک از محسن کریمی", "Amount": 2500000.0000, "Currency": "IRR", "Project": "", "Items": [ { "Contact": { "Id": 3055, "Code": "000009", "Name": " محسن کریمی" }, "Amount": 2500000.0000, "Account": null, "Description": "دریافت وجه/چک از محسن کریمی" }, {...}, {...} ], "Transactions": [ { "Cash": null, "Bank": { "Id": 1004, "Code": "0001", "Name": "بانک ملت" }, "PettyCash": null, "Contact": null, "Check": null, "Account": null, "Type": "3", "Reference": null, "TransactionFee": 300.0000, "Amount": 25000000.0000 }, {...}, {...} ] "Invoice": { "Id": 1, "Number": "1002", "DateTime": "2016-06-13T00:00:00", "InvoiceType": 0 } } } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/disCountItem/getItems Source: https://www.hesabfa.com/help/api/discount Retrieves a list of discount items based on provided filters and authentication credentials. ```APIDOC ## POST https://api.hesabfa.com/v1/disCountItem/getItems ### Description Retrieves a list of discount items. Supports filtering and sorting via the queryInfo object. ### Method POST ### Endpoint https://api.hesabfa.com/v1/disCountItem/getItems ### Parameters #### Request Body - **apiKey** (string) - Required - API key for authentication - **loginToken** (string) - Required - Login token for authentication - **userId** (string) - Required - User ID - **password** (string) - Required - Password - **queryInfo** (Object) - Optional - Filtering and sorting criteria ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "loginToken": "f6b912...45fdc", "queryInfo": { "sortBy": "Id", "sortDesc": false, "take": 20, "skip": 0, "filters": [{ "property": "Title", "operator": "*", "value": "وفادار" }] } } ### Response #### Success Response (200) - **Success** (boolean) - Indicates if the request was successful - **ErrorCode** (integer) - Error code if applicable - **ErrorMessage** (string) - Error message if applicable - **Result** (Array) - List of discount items #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": [ { "Id": 1, "Title": "تخفبف 20 درصد تا سقف 100 هزار تومان مخصوص مشتریان وفادار", "Type": 6, "Info": "", "ContactCode": "", "ProductCode": "", "ValidFrom": "2024-05-22T00:00:00", "ValidTo": "2025-03-20T00:00:00", "Percent": 20.0000, "Amount": 1000000.0000, "OneTime": false, "UseCount": 0, "UseDate": "0001-01-01T00:00:00", "Tag": "" } ] } ``` -------------------------------- ### Get Salesmen Response Source: https://www.hesabfa.com/help/api/Setting Returns a list of salesmen registered in the current fiscal year. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { [ { "Id": 7, "Code": "000001", "Name": "محمد امینی", "Active": true, "Note": "دفتر مرکزی" }, { "Id": 8, "Code": "000002", "Name": "سارا شریعتی", "Active": true, "Note": "بازاریاب سایر" }, {…}, {…} ] } } ``` -------------------------------- ### Get Product Categories Response Source: https://www.hesabfa.com/help/api/Setting Response structure for the getProductCategories endpoint, returning the product category tree. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { "Root": { "Name": "کالاها", "FullPath": "کالاها", "Children": [ { "Name": "صوتی تصویری", "FullPath": " کالاها: صوتی تصویری", "Children": [] }, { "Name": "لوازم خانگی", "FullPath": " کالاها: لوازم خانگی", "Children": [ { "Name": "آشپزخانه", "FullPath": " کالاها: لوازم خانگی آشپزخانه :", "Children": [] } ] } ] } } } ``` -------------------------------- ### Balance Sheet Response Structure Source: https://www.hesabfa.com/help/api/Report Example of a successful balance sheet report response containing account details and financial totals. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { "Accounts": [ { "Account": { "Name": "دارایی‌ها", "MainAccountType": 1, "DetailType": 6 }, "Debit": 0.0, "Credit": 0.0, "TotalDebit": 938740984721.0000000000, "TotalCredit": 3345011191.0000000000, "Balance": 0.0, "TotalBalance": 935395973530.0000000000, "Children":[ { "Account": { "Name": "دارایی‌های جاری", "MainAccountType": 1, "DetailType": 6 }, "Debit": 0.0, "Credit": 0.0, "TotalDebit": 938367507121.0000000000, "TotalCredit": 3336961191.0000000000, "TotalBalance": 935030545930.0000000000, "Children": [...], }, {...}, {...}, {...}, ] }, {...}, {...}, ], "Assets": 935395973530.0000000000, "Liabilities": 934003786599.0000000000, "Equity": 1104786500.0000000000, "ProfitOrLoss": 287400431.0000000000 } } ``` -------------------------------- ### Get Currency Response Source: https://www.hesabfa.com/help/api/Setting Response structure for the GetCurrency endpoint, returning the default system currency. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { "Currency": "IRR" } } ``` -------------------------------- ### Request Warehouse Receipts Source: https://www.hesabfa.com/help/api/Warehouses Example request body for the getReceipts endpoint, including authentication credentials and query filters. ```json { apiKey: 'asdfASR^%FDHdsfg456', userId: 'mail@example.com', password: '123456', loginToken: 'f6b912...45fdc', type: 1, queryInfo:{ sortBy: 'Date', sortDesc: true, take: 20, skip: 0 } } ``` -------------------------------- ### Retrieve Accounting Document Response Source: https://www.hesabfa.com/help/api/accounting-document Example of the JSON response returned by the API, containing document details and transaction arrays. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { "Id": 2497, "Number": 415, "Reference": 441, "Date": "2022-11-26T00:00:00", "Description": "تست API", "Project": "", "Debit": 1000.0000, "Credit": 1000.0000, "Status": 1, "Transactions": [ { "Id": 14572, "AccountPath": "بدهی ها : بدهیهای جاری : پیش دریافت ها : پیش دریافت فروش", "Description": "تست API", "Info": "", "Amount": 1000.0000, "CurrencyAmount": 1000.0000, "Currency": "IRR", "Type": 1, "ContactCode": "000001", "ProductCode": "", "BankCode": "", "CashCode": "", "PettyCashCode": "" }, { "Id": 14573, "AccountPath": "دارایی ها : دارایی های جاری : موجودی نقد و بانک : صندوق", "Description": "تست API", "Info": "", "Amount": 1000.0000, "CurrencyAmount": 1000.0000, "Currency": "IRR", "Type": 0, "ContactCode": "", "ProductCode": "", "BankCode": "", "CashCode": "0001", "PettyCashCode": "" } ] } } ``` -------------------------------- ### Card Inquiry Response Source: https://www.hesabfa.com/help/api/inquiry Example response structure for a successful card inquiry, containing status and cardholder name. ```json { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "Status": 1, "Message": "موفق", "Data": { "Name": "حسن حسنی", } } } ``` -------------------------------- ### Get Inventory Quantity Response Source: https://www.hesabfa.com/help/api/Item Response structure containing a list of items with their respective quantities, pricing, and vendor details. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: [ { "Code": "000001", "Tag": "115", "Quantity": 0.000000, "Barcode": "650077842", "SellPrice": 1570000.000, "ProductCode": "PCS-873300", "LastPurchaseCost": 1220000.000, "LastVendor": { "Id": 1, "Code": "000251", "DisplayName": "شرکت آرمان شبکه" } }, { "Code": "000002", "Tag": "230", "Quantity": 16.000000, "Barcode": "89504564", "SellPrice": 275000.0000, "ProductCode": "PCS-873301", "LastPurchaseCost": 1220000.000, "LastVendor": { "Id": 1, "Code": "000251", "DisplayName": "شرکت آرمان شبکه" } }, {…}, {…} ] } ``` -------------------------------- ### Bank Transfer Response Structure Source: https://www.hesabfa.com/help/api/banktransfer Example JSON response containing a list of bank transfers and metadata about the result set. ```json { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "TotalCount": 17, "FilteredCount": 3, "From": 1, "To": 3, "List": [ { "Id": 2019, "Description": "انتقال وجه از بانک ملی به بانک دبی", "Date": "2024-07-17T00:00:00", "Project": "پروژه یک", "FromAmount": 581000000.0000, "ToAmount": 100, "FromReference": "58745", "ToReference": "AS-85/54", "FromBank": "0003", "FromCash": "", "FromPettyCash": "", "ToBank": "0007", "ToCash": "", "ToPettyCash": "", "FromTransactionFee": 35000, "ToTransactionFee": 2, "FromCurrencyRate": 1, "ToCurrencyRate": 581000 }, {…},{…} ] } } ``` -------------------------------- ### Response Journal Report Source: https://www.hesabfa.com/help/api/Report Example response structure for the journal report, including total count and a list of journal entries. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: [ { "TotalCount": 745, "FilteredCount": 0, "Description": "انتقال وجه از صندوق مرکزی به تنخواه‌گردان", "From": 21, "To": 31, "List": [ { "DateTime": "2020-08-25T00:00:00", "AccountPath": "دارایی‌ها : دارایی‌های جاری : حساب‌های دریافتنی : حساب‌های دریافتنی", "Detail": "حسین دوست", "DocumentNumber": 302, "Description": "حساب‌های دریافتنی - حسین دوست", "Type": 0 "Debit": 14175.0000, "Credit": 0.0 }, {...}, {...}, {...} ] } ``` -------------------------------- ### Retrieve System Changes Response Source: https://www.hesabfa.com/help/api/Setting Example JSON response containing an array of recent system changes, including object types, actions, and timestamps. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: [ { "Id": 1337, "DateTime": "2020-01-18T15:58:56.0629885", "Action": 123, "ObjectId": 10, "ObjectType": "Invoice", "Extra": "000254", "API": true }, { "Id": 1338, "DateTime": "2020-01-18T15:58:56.0907442", "Action": 53, "ObjectId": 12, "ObjectType": "Product", "Extra": "000128", "API": true }, { "Id": 1339, "DateTime": "2020-01-18T15:58:56.0916386", "Action": 123, "ObjectId": 13, "ObjectType": "Invoice", "Extra": "000752", "API": true }, { "Id": 1340, "DateTime": "2020-01-18T15:58:56.0922324", "Action": 31, "ObjectId": 14, "ObjectType": "Contact", "Extra": "000361", "API": true }, { "Id": 1341, "DateTime": "2020-01-18T16:05:16.554849", "Action": 32, "ObjectId": 17, "ObjectType": "Contact", "Extra": "000816", "API": true } ] } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getAccounts Source: https://www.hesabfa.com/help/api/Setting Retrieves the list of accounts. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getAccounts ### Description Retrieves the account structure including names, paths, and detail types. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getAccounts ### Response #### Success Response (200) - **Result** (array) - List of accounts containing Name, FullPath, and DetailType ``` -------------------------------- ### GET https://api.hesabfa.com/v1/document/get Source: https://www.hesabfa.com/help/api/accounting-document Retrieves a specific accounting document by its number. ```APIDOC ## GET https://api.hesabfa.com/v1/document/get ### Description Retrieves the details of an accounting document based on the provided document number. ### Method GET ### Endpoint https://api.hesabfa.com/v1/document/get ### Parameters #### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email/ID - **password** (string) - Required - User password - **loginToken** (string) - Required - Authentication token - **number** (integer) - Required - The document number to retrieve ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "userId": "mail@example.com", "password": "123456", "loginToken": "f6b912...45fdc", "number": 415 } ### Response #### Success Response (200) - **Success** (boolean) - Indicates if the request was successful - **ErrorCode** (integer) - Error code if applicable - **ErrorMessage** (string) - Error message if applicable - **Result** (object) - The accounting document object containing details like Number, Date, Description, Debit, Credit, Status, and Transactions array. #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "Id": 2497, "Number": 415, "Reference": 441, "Date": "2022-11-26T00:00:00", "Description": "تست API", "Project": "", "Debit": 1000.0000, "Credit": 1000.0000, "Status": 1, "Transactions": [ { "Id": 14572, "AccountPath": "بدهی ها : بدهیهای جاری : پیش دریافت ها : پیش دریافت فروش", "Description": "تست API", "Info": "", "Amount": 1000.0000, "CurrencyAmount": 1000.0000, "Currency": "IRR", "Type": 1, "ContactCode": "000001", "ProductCode": "", "BankCode": "", "CashCode": "", "PettyCashCode": "" } ] } } ``` -------------------------------- ### Retrieve Item Details Request Source: https://www.hesabfa.com/help/api/Item Example JSON payload for requesting item information using the required authentication credentials and item code. ```json { apiKey: 'asdfASR^%FDHdsfg456', userId: 'mail@example.com', password: '123456', loginToken: 'f6b912...45fdc', code: '000001' } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getServiceCategories Source: https://www.hesabfa.com/help/api/Setting Retrieves the hierarchical tree of service categories. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getServiceCategories ### Description Retrieves the hierarchical tree of service categories registered in the system. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getServiceCategories ### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email/ID - **password** (string) - Required - User password ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "userId": "mail@example.com", "password": "123456" } ### Response #### Success Response (200) - **Success** (boolean) - Operation status - **ErrorCode** (integer) - Error code - **ErrorMessage** (string) - Error message - **Result** (object) - Contains the root category tree #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "Root": { "Name": "خدمات", "FullPath": "خدمات", "Children": [] } } } ``` -------------------------------- ### Retrieve Contact Information Source: https://www.hesabfa.com/help/api/Contact Examples of the JSON request body for authentication and the corresponding successful response object containing contact details. ```json { apiKey: 'asdfASR^%FDHdsfg456', userId: 'mail@example.com', password: '123456', loginToken: 'f6b912...45fdc', code: '00001' } ``` ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { Code: '0001', Name: 'شرکت توحید', Company: 'شرکت توحید', FirstName: 'محمد', LastName: 'محمدی', ContactType: 2, NationalCode: '65465465465', EconomicCode: '13232323221', RegistrationNumber: '9879898798798', Title: 'شرکت توحید', Address: "", City: 'تهران', State: 'تهران', PostalCode: '2154665656', Phone: '02188664523', Fax: '02188664524', Mobile: '09361234567', Email: 'info@sample.com', Website: "", BirthDate: '2000/05/04', WeddingDate: '2021/05/14', MembershipDate: '2023/01/14', Note: "", IsShareHolder: true, IsCustomer: true, IsVendor: true, IsEmployee: false, SharePercent: 0, Liability: 0, Credits: 0, ContactCredit: 0, Tag: '', Active: true, TaxType: 5, NodeFamily: 'اشخاص:اشخاص حقوقی:سازمان ها' } } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getCashes Source: https://www.hesabfa.com/help/api/Setting Retrieves a list of all available cash accounts. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getCashes ### Description Retrieves a list of all available cash accounts in the system. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getCashes ### Parameters #### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email or ID - **password** (string) - Required - User password ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "userId": "mail@example.com", "password": "123456" } ### Response #### Success Response (200) - **Success** (boolean) - Indicates if the request was successful - **ErrorCode** (integer) - Error code if any - **ErrorMessage** (string) - Error message if any - **Result** (array) - List of cash accounts #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": [ { "Id": 1, "Code": "0001", "Name": "صندوق اصلی", "Currency": "IRR" } ] } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getCurrencyTable Source: https://www.hesabfa.com/help/api/Setting Retrieves the current currency exchange rate table. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getCurrencyTable ### Description Retrieves the table of currency exchange rates. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getCurrencyTable ### Parameters #### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email/ID - **password** (string) - Required - User password ### Response #### Success Response (200) - **Success** (boolean) - Operation status - **ErrorCode** (integer) - Error code - **ErrorMessage** (string) - Error message - **Result** (array) - List of currency exchange rates #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": [ { "From": "USD", "To": "IRR", "Rate": 234500.0 } ] } ``` -------------------------------- ### Retrieve Default Price List Request and Response Source: https://www.hesabfa.com/help/api/Setting Request payload and response structure for fetching the default price list. ```json { apiKey: 'asdfASR^%FDHdsfg456', loginToken: '...', } ``` ```json { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": [ { "Title": "عمده", "Currency": "IRR" }, { "Title": "همکار", "Currency": "IRR" }, { "Title": "مشتری ویژه", "Currency": "IRR" }, { "Title": "دلاری", "Currency": "USD" } ] } ``` -------------------------------- ### Card to IBAN Conversion Response Source: https://www.hesabfa.com/help/api/inquiry Example response structure for a successful card-to-IBAN conversion, including IBAN, bank name, and cardholder name. ```json { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": { "Status": 1, "Message": "موفق", "Data": { "IBAN": "IR910100010000001234567890", "BankName": "ملت", "Name": "حسن حسنی" } } } ``` -------------------------------- ### Get Contact Categories Response Source: https://www.hesabfa.com/help/api/Setting Returns the hierarchical structure of contact categories. ```json { Success: true, ErrorCode: 0, ErrorMessage: "", Result: { "Root": { "Name": "اشخاص", "FullPath": "اشخاص", "Children": [ { "Name": "پرسنل", "FullPath": " اشخاص: درون شرکت", "Children": [] }, { "Name": "تامین کنندگان", "FullPath": " اشخاص: تامین کنندگان", "Children": [] }, { "Name": "سازمان ها", "FullPath": " اشخاص: سازمان ها", "Children": [] } ] } } } ``` -------------------------------- ### GET https://api.hesabfa.com/v1/setting/getPettyCashes Source: https://www.hesabfa.com/help/api/Setting Retrieves a list of all available petty cash accounts. ```APIDOC ## GET https://api.hesabfa.com/v1/setting/getPettyCashes ### Description Retrieves a list of all available petty cash accounts in the system. ### Method GET ### Endpoint https://api.hesabfa.com/v1/setting/getPettyCashes ### Parameters #### Request Body - **apiKey** (string) - Required - API key for authentication - **userId** (string) - Required - User email or ID - **password** (string) - Required - User password ### Request Example { "apiKey": "asdfASR^%FDHdsfg456", "userId": "mail@example.com", "password": "123456" } ### Response #### Success Response (200) - **Success** (boolean) - Indicates if the request was successful - **ErrorCode** (integer) - Error code if any - **ErrorMessage** (string) - Error message if any - **Result** (array) - List of petty cash accounts #### Response Example { "Success": true, "ErrorCode": 0, "ErrorMessage": "", "Result": [ { "Id": 1, "Code": "0001", "Name": "تنخواه‌گردان خانم احمدی", "Currency": "IRR" } ] } ```