Tuhund - Register Purchase Invoice API

API # : 8046 | API Name : registerpurin

This API is used to register a Purchase Invoice from a Vendor in Tuhund.

URL : <domain>/apic/registerpurin
Methods Allowed : POST

This API is used to register a Purchase Invoice from a Vendor in Tuhund. It allows an external system to submit complete purchase invoice information, including vendor details, invoice details, addresses, financial information, line items, tax information and bank account details.

The API supports both existing Tuhund master records and the creation of missing master records. Where the corresponding Tuhund IDs are known, they may be provided for the vendor, branch, bank account, addresses and other master records. Such IDs must be valid and correspond to the appropriate records in Tuhund. An incorrect or invalid Tuhund ID may result in rejection of the request.

The vendor and product information can be provided in the payload to allow Tuhund to identify the corresponding master records. When master record creation is enabled, missing vendor and product records can be created automatically. A missing HS or HSN code can also be created automatically when the associated product is created. The create field controls whether missing vendor and product master records may be created.

The API supports vendor billing, shipping and delivery addresses. The billing address represents the vendor address from which the purchase invoice is raised, while the shipping address represents the vendor address from which the goods are dispatched. The delivery address represents the address where the purchased goods are received. This may be the address of the company using Tuhund or the address of an end customer when the goods are delivered directly to the customer.

The purchase invoice can also be linked to an existing record in Tuhund using the ltype and lid fields. The ltype identifies the type of linked record and lid identifies the specific record. The transaction may also be associated with a customer enquiry using eid, either directly or indirectly through another linked record.

The type field identifies the purpose of the purchase invoice and its intended accounting treatment. A value of 0 indicates that the purchase is for stock or services intended for resale. A value of 1 indicates that the purchase is for assets, including capital goods, or for internal consumption. Other values enable Tuhund to determine the appropriate treatment automatically based on historical purchase patterns.

The payload supports item-level pricing, quantities, discounts, assessable values, customs duties, taxes and other applicable charges. The assessable value is specified on a per-unit basis. Customs duty components can be supplied through the applicable customs duty rates, while applicable taxes such as GST, VAT and other country-specific taxes can be provided through the tax components.

For Indian GST transactions, the tax components represent SGST, CGST, IGST and GST Cess respectively. For other countries where e-invoicing is enabled, tax3 and taxrate3 represent VAT and its applicable rate. The remaining tax components are interpreted according to the applicable tax configuration.

The API also supports invoice-level discounts. The discount field represents an overall discount rate as a percentage, while adiscount represents an overall discount amount. Only one of these should normally be provided. When an amount-based discount is applied at the invoice level, it is treated as an amount written off and is not considered when calculating taxes.

The financials section can be used to provide the financial totals calculated by the source system. Tuhund uses these values to verify the transaction by comparing them with the totals calculated from the invoice details. This provides an additional validation mechanism to detect discrepancies between the submitted invoice and the values calculated by Tuhund.

The API can also accept a vendor bank account either by providing its existing Tuhund bankaccountid or by providing the bank account details through the bankaccount object. A bankaccountid should only be provided when the correct Tuhund bank account ID is known.

Overall, this API provides a structured mechanism for integrating vendor purchase invoices from external systems into Tuhund while supporting master data identification, optional master creation, transaction linking, address management, tax and customs information, financial validation and country-specific taxation requirements.

Payload Schema :

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Purchase Invoice",
  "description": "Schema for creating or importing a purchase invoice. The payload contains purchase invoice header information, vendor details, billing, shipping and delivery addresses, financial summary, line items and bank account information.",
  "type": "object",
  "properties": {
    "purinid": {
      "type": "string",
      "description": "Unique Purchase Invoice ID. This identifies the purchase invoice within Tuhund.",
      "instructions": "Optional. Provide this value only when importing an existing purchase invoice from another system and its original ID must be retained. If omitted, Tuhund will generate the ID."
    },
    "branchid": {
      "type": "string",
      "description": "Branch ID under which the purchase invoice is created.",
      "instructions": "Required. For single-entity deployments, use \"ENTERPRISE\". For multi-branch deployments, provide the branch ID configured in Tuhund."
    },
    "prefixid": {
      "type": "string",
      "description": "Prefix ID used for purchase invoice numbering, workflow and rules.",
      "instructions": "Required."
    },
    "cinumber": {
      "type": "string",
      "description": "Supplier's commercial invoice number or purchase invoice number."
    },
    "cidate": {
      "type": "string",
      "description": "Date of the supplier invoice. Use the date format configured for the API, for example DD/MM/YYYY."
    },
    "duedate": {
      "type": "string",
      "description": "Payment due date for the purchase invoice. Use the date format configured for the API."
    },
    "currency": {
      "type": "string",
      "description": "Currency code of the purchase invoice, preferably using the standard three-letter currency code such as INR or USD."
    },
    "exchange": {
      "type": "number",
      "description": "Exchange rate used for converting the invoice currency to the company's base currency."
    },
    "lexchange": {
      "type": "number",
      "description": "Local exchange rate used for local or reporting currency calculations."
    },
    "shipmentterms": {
      "type": "string",
      "description": "Shipment or delivery terms applicable to the purchase, such as CIF Sea, FOB or EXW."
    },
    "reference": {
      "type": "string",
      "description": "External reference associated with the purchase invoice, such as a purchase order number, delivery challan number or vendor reference."
    },
    "remarks": {
      "type": "string",
      "description": "Additional remarks or instructions related to the purchase invoice."
    },
    "bankaccountid": {
      "type": "string",
      "description": "Bank account ID associated with the purchase transaction.",
      "instructions": "Optional. Provide this value if the Tuhund bank account ID for an existing vendor bank account is known. The bankaccountid must be valid and belong to the vendor. An incorrect or invalid value will result in rejection of the request. If bankaccountid is not provided, the bank account can be supplied using the bankaccount object."
    },
    "raisedby": {
      "type": "string",
      "description": "User ID of the person who raised the purchase invoice."
    },
    "approvedby": {
      "type": "string",
      "description": "User ID of the person who approved the purchase invoice."
    },
    "dispatch": {
      "type": "string",
      "description": "Mode or method of dispatch or transportation, such as By Road, By Air or By Sea."
    },
    "freight": {
      "type": "number",
      "description": "Freight or transportation charges applicable to the purchase invoice."
    },
    "othercharges": {
      "type": "number",
      "description": "Other additional charges applicable to the purchase invoice."
    },
    "autoround": {
      "type": "boolean",
      "description": "Indicates whether automatic rounding should be applied to the invoice total."
    },
    "roundoff": {
      "type": "number",
      "description": "Round-off amount applied to the invoice total."
    },
    "discount": {
      "type": "number",
      "description": "Overall discount applied to the purchase invoice, expressed as a percentage.",
      "instructions": "Optional. Provide the overall discount rate as a percentage. Use either discount or adiscount, not both. If both values are provided, Tuhund will use only one of them."
    },
    "adiscount": {
      "type": "number",
      "description": "Overall discount amount applied to the purchase invoice.",
      "instructions": "Optional. Provide the overall discount amount. Use either adiscount or discount, not both. If both values are provided, Tuhund will use only one of them.",
      "important": "An amount-based discount applied at the invoice level is treated as an amount written off and is not considered when calculating taxes."
    },
    "type": {
      "type": "integer",
      "description": "Determines the purpose and accounting treatment of the purchase invoice.",
      "instructions": "Required. Use 0 for purchases of stock or services intended for resale. Use 1 for purchases of assets, including capital goods, or for internal consumption. Any other value enables automatic classification by Tuhund, which determines the appropriate treatment based on historical purchase patterns. For example, recurring invoices from a mobile phone service provider can be automatically classified as services purchased for internal consumption based on previous transactions."
    },
    "agentid": {
      "type": "string",
      "description": "ID of the purchase or commercial agent associated with the transaction."
    },
    "cafagentid": {
      "type": "string",
      "description": "ID of the CAF agent associated with the transaction, where applicable."
    },
    "grosstotal": {
      "type": "string",
      "description": "Gross total amount of the purchase invoice before applicable additions or adjustments."
    },
    "nettotal": {
      "type": "string",
      "description": "Final net invoice amount after applicable charges, taxes, discounts and adjustments."
    },
    "tcs": {
      "type": "string",
      "description": "Tax Collected at Source amount applicable to the transaction."
    },
    "tdsapp": {
      "type": "boolean",
      "description": "Indicates whether TDS is applicable to the purchase invoice."
    },
    "ptdsrate": {
      "type": "number",
      "description": "Percentage rate of purchase TDS applicable to the transaction."
    },
    "ptds": {
      "type": "string",
      "description": "Purchase TDS amount."
    },
    "ltype": {
      "type": "integer",
      "description": "Link type identifying the type of an existing Tuhund record to which the purchase invoice is linked.",
      "instructions": "Optional. Provide the link type when the purchase invoice is associated with an existing record in Tuhund. The value must correspond to one of the supported link types. If ltype is provided, lid should also be provided to identify the linked record."
    },
    "lid": {
      "type": "string",
      "description": "ID of the existing Tuhund record to which the purchase invoice is linked.",
      "instructions": "Optional. Provide the ID of the existing Tuhund record identified by ltype. If ltype is provided, lid should also be provided."
    },
    "eid": {
      "type": "string",
      "description": "Customer Enquiry ID associated with the purchase transaction.",
      "instructions": "Optional. Required only when the purchase invoice is linked to a customer enquiry, either directly or indirectly through another linked record. Provide the Enquiry ID of the customer enquiry associated with the transaction."
    },
    "ewaybillnumber": {
      "type": "string",
      "description": "E-Way Bill number associated with the purchase transaction."
    },
    "ewaybilldate": {
      "type": "string",
      "description": "Date of the E-Way Bill."
    },
    "portcode": {
      "type": "string",
      "description": "Port code applicable to an import or export transaction."
    },
    "boenumber": {
      "type": "string",
      "description": "Bill of Entry number for an import transaction."
    },
    "boedate": {
      "type": "string",
      "description": "Bill of Entry date."
    },
    "boevalue": {
      "type": "number",
      "description": "Value declared in the Bill of Entry."
    },
    "customsapp": {
      "type": "boolean",
      "description": "Indicates whether customs-related processing is applicable."
    },
    "baseapp": {
      "type": "boolean",
      "description": "Indicates whether base tax or base-value processing is applicable."
    },
    "vatapp": {
      "type": "boolean",
      "description": "Indicates whether VAT processing is applicable."
    },
    "billingaddressid": {
      "type": "string",
      "description": "ID of the vendor's billing address from which the purchase invoice is raised.",
      "instructions": "Optional. Provide this value only when the correct Tuhund billing address ID of the vendor is known. An incorrect or invalid billingaddressid will result in rejection of the request."
    },
    "shippingaddressid": {
      "type": "string",
      "description": "ID of the vendor's shipping address from which the goods are dispatched.",
      "instructions": "Optional. Provide this value only when the correct Tuhund shipping address ID of the vendor is known. An incorrect or invalid shippingaddressid will result in rejection of the request."
    },
    "deliveryaddressid": {
      "type": "string",
      "description": "ID of the address where the purchased goods are delivered.",
      "instructions": "Optional. Provide this value only when the correct Tuhund delivery address ID is known. The delivery address may belong to the company using Tuhund or to the end customer when the goods are delivered directly to the customer. An incorrect or invalid deliveryaddressid will result in rejection of the request."
    },
    "create": {
      "type": "boolean",
      "description": "Indicates whether missing master records for the vendor and products should be created while processing the purchase invoice.",
      "instructions": "Optional. Set to true to allow Tuhund to create missing vendor and product master records when they are not found. Set to false to prevent automatic creation of missing master records."
    },
    "vendor": {
      "type": "object",
      "description": "Vendor or supplier information associated with the purchase invoice.",
      "properties": {
        "companyid": {
          "type": "string",
          "description": "Existing vendor company ID. If supplied, it identifies the vendor in Tuhund."
        },
        "companyname": {
          "type": "string",
          "description": "Legal or registered name of the vendor."
        },
        "parentid": {
          "type": "string",
          "description": "Parent company ID, where the vendor belongs to a parent company."
        },
        "parentname": {
          "type": "string",
          "description": "Name of the parent company."
        },
        "tag": {
          "type": "string",
          "description": "Vendor classification or tag."
        },
        "shortname": {
          "type": "string",
          "description": "Short or abbreviated vendor name."
        },
        "cstnumber": {
          "type": "string",
          "description": "Vendor CST registration number, where applicable."
        },
        "tin": {
          "type": "string",
          "description": "Vendor tax identification number applicable in the vendor's jurisdiction."
        },
        "pan": {
          "type": "string",
          "description": "Vendor PAN number, where applicable."
        },
        "tan": {
          "type": "string",
          "description": "Vendor TAN number, where applicable."
        },
        "cin": {
          "type": "string",
          "description": "Vendor Corporate Identification Number, where applicable."
        },
        "gstin": {
          "type": "string",
          "description": "Vendor GST registration number, where applicable."
        },
        "phone1": {
          "type": "string",
          "description": "Primary vendor telephone number."
        },
        "phone2": {
          "type": "string",
          "description": "Secondary vendor telephone number."
        },
        "fax": {
          "type": "string",
          "description": "Vendor fax number."
        },
        "email": {
          "type": "string",
          "description": "Vendor accounts or primary email address."
        },
        "address": {
          "type": "string",
          "description": "Vendor registered or principal address."
        },
        "city": {
          "type": "string",
          "description": "Vendor city."
        },
        "stateid": {
          "type": "string",
          "description": "Tuhund ID of the vendor's state or province.",
          "instructions": "Optional. Provide this value only if the correct state or province ID configured in Tuhund is known. An incorrect or invalid stateid will result in rejection of the request. The list of valid state IDs can be obtained using the Tuhund Lookup API."
        },
        "statename": {
          "type": "string",
          "description": "Name of the vendor's state or province.",
          "instructions": "Provide the state or province name. When stateid is provided, statename should correspond to the state or province identified by that stateid."
        },
        "postcode": {
          "type": "string",
          "description": "Vendor postal or ZIP code."
        },
        "countrycode": {
          "type": "string",
          "description": "Vendor country code (lower case), such as in, us or gb."
        },
        "countryname": {
          "type": "string",
          "description": "Vendor country name."
        },
        "lcompanyname": {
          "type": "string",
          "description": "Localised or local-language vendor company name."
        },
        "lparentname": {
          "type": "string",
          "description": "Localised or local-language parent company name."
        },
        "companynumber": {
          "type": "integer",
          "description": "Tuhund company number identifying the vendor.",
          "instructions": "Optional. Provide this value only if the correct companynumber assigned to the vendor in Tuhund is known. An incorrect or invalid companynumber will result in rejection of the request."
        }
      }
    },
    "billingaddress": {
      "type": "object",
      "description": "The vendor address from which the purchase invoice is raised.",
      "instructions": "Optional. Provide the vendor's billing address as shown on the purchase invoice. This is the address of the vendor from whom the goods or services are purchased and the invoice is raised.",
      "properties": {
        "addresstitle": {
          "type": "string",
          "description": "Title or description of the address."
        },
        "address": {
          "type": "string",
          "description": "Complete street or physical address."
        },
        "city": {
          "type": "string",
          "description": "City."
        },
        "stateid": {
          "type": "string",
          "description": "State or province ID."
        },
        "state": {
          "type": "string",
          "description": "State or province name."
        },
        "postcode": {
          "type": "string",
          "description": "Postal or ZIP code."
        },
        "countrycode": {
          "type": "string",
          "description": "Two-letter country code."
        },
        "countryname": {
          "type": "string",
          "description": "Country name."
        },
        "phone1": {
          "type": "string",
          "description": "Primary telephone number."
        },
        "phone2": {
          "type": "string",
          "description": "Secondary telephone number."
        },
        "fax": {
          "type": "string",
          "description": "Fax number."
        },
        "mobile": {
          "type": "string",
          "description": "Mobile telephone number."
        },
        "email": {
          "type": "string",
          "description": "Email address associated with the address."
        },
        "xc": {
          "type": "number",
          "description": "X coordinate or longitude-related location value."
        },
        "yc": {
          "type": "number",
          "description": "Y coordinate or latitude-related location value."
        }
      }
    },
    "shippingaddress": {
      "type": "object",
      "description": "The vendor address from which the goods are shipped.",
      "instructions": "Optional. Provide the vendor's shipping address when it differs from the billing address. This is the address from which the goods are dispatched or shipped to the buyer.",
      "properties": {
        "addresstitle": {
          "type": "string",
          "description": "Title or description of the address."
        },
        "address": {
          "type": "string",
          "description": "Complete shipping address."
        },
        "city": {
          "type": "string",
          "description": "City."
        },
        "stateid": {
          "type": "string",
          "description": "State or province ID."
        },
        "state": {
          "type": "string",
          "description": "State or province name."
        },
        "postcode": {
          "type": "string",
          "description": "Postal or ZIP code."
        },
        "countrycode": {
          "type": "string",
          "description": "Two-letter country code."
        },
        "countryname": {
          "type": "string",
          "description": "Country name."
        },
        "phone1": {
          "type": "string",
          "description": "Primary telephone number."
        },
        "phone2": {
          "type": "string",
          "description": "Secondary telephone number."
        },
        "fax": {
          "type": "string",
          "description": "Fax number."
        },
        "mobile": {
          "type": "string",
          "description": "Mobile telephone number."
        },
        "email": {
          "type": "string",
          "description": "Email address."
        },
        "xc": {
          "type": "number",
          "description": "X coordinate or longitude-related location value."
        },
        "yc": {
          "type": "number",
          "description": "Y coordinate or latitude-related location value."
        }
      }
    },
    "deliveryaddress": {
      "type": "object",
      "description": "Address where the purchased goods are delivered.",
      "instructions": "Optional. Provide the address of the party receiving the goods. This is normally the address of the company using Tuhund, but may be the end customer's address when the goods are delivered directly to the customer.",
      "properties": {
        "addresstitle": {
          "type": "string",
          "description": "Title or description of the address."
        },
        "address": {
          "type": "string",
          "description": "Complete delivery address."
        },
        "city": {
          "type": "string",
          "description": "City."
        },
        "stateid": {
          "type": "string",
          "description": "State or province ID."
        },
        "state": {
          "type": "string",
          "description": "State or province name."
        },
        "postcode": {
          "type": "string",
          "description": "Postal or ZIP code."
        },
        "countrycode": {
          "type": "string",
          "description": "Two-letter country code."
        },
        "countryname": {
          "type": "string",
          "description": "Country name."
        },
        "phone1": {
          "type": "string",
          "description": "Primary telephone number."
        },
        "phone2": {
          "type": "string",
          "description": "Secondary telephone number."
        },
        "fax": {
          "type": "string",
          "description": "Fax number."
        },
        "mobile": {
          "type": "string",
          "description": "Mobile telephone number."
        },
        "email": {
          "type": "string",
          "description": "Email address."
        },
        "xc": {
          "type": "number",
          "description": "X coordinate or longitude-related location value."
        },
        "yc": {
          "type": "number",
          "description": "Y coordinate or latitude-related location value."
        }
      }
    },
    "financials": {
      "type": "object",
      "description": "Financial summary of the purchase invoice, including the calculated transaction totals.",
      "instructions": "Optional. Provide the financial totals calculated by the source system. Tuhund uses these values to verify the purchase invoice by comparing them with the totals calculated from the invoice details. Any difference between the supplied values and the Tuhund-calculated values may result in rejection of the request.",
      "properties": {
        "discount": {
          "type": "number",
          "description": "Total discount applied to the invoice."
        },
        "taxablevalue": {
          "type": "number",
          "description": "Taxable value on which applicable taxes are calculated. This value includes customs duty and excise duty, where applicable, but excludes taxes calculated on top of the taxable value.",
          "instructions": "Provide the taxable value after including applicable customs duty and excise duty. Taxes such as VAT, GST and other country-specific taxes are calculated separately on top of this value."
        },
        "tax1": {
          "type": "number",
          "description": "First tax component amount. For Indian GST transactions, this represents SGST. For other countries, the tax represented by this field depends on the applicable tax configuration."
        },
        "tax2": {
          "type": "number",
          "description": "Second tax component amount. For Indian GST transactions, this represents CGST. For other countries, the tax represented by this field depends on the applicable tax configuration."
        },
        "tax3": {
          "type": "number",
          "description": "Third tax component amount. For Indian GST transactions, this represents IGST. For other countries where e-invoicing is enabled, this represents VAT."
        },
        "tax4": {
          "type": "number",
          "description": "Fourth tax component amount. For Indian GST transactions, this represents GST Cess. For other countries, the tax represented by this field depends on the applicable tax configuration."
        },
        "roundoff": {
          "type": "number",
          "description": "Round-off amount included in the final invoice total."
        },
        "total": {
          "type": "number",
          "description": "Final calculated invoice total."
        }
      }
    },
    "items": {
      "type": "array",
      "description": "List of products or services purchased through the invoice. Each item represents one invoice line.",
      "minItems": 1,
      "items": {
        "type": "object",
        "properties": {
          "productid": {
            "type": "string",
            "description": "Existing Tuhund product ID. If supplied, it identifies the product directly."
          },
          "producttype": {
            "type": "integer",
            "description": "Product type used by Tuhund."
          },
          "productnumber": {
            "type": "integer",
            "description": "Product line or product number."
          },
          "productname": {
            "type": "string",
            "description": "Name or description of the purchased product."
          },
          "description": {
            "type": "string",
            "description": "Detailed description of the product."
          },
          "brand": {
            "type": "string",
            "description": "Product brand."
          },
          "model": {
            "type": "string",
            "description": "Product model or manufacturer model number."
          },
          "pda1": {
            "type": "string",
            "description": "Product-defined attribute 1."
          },
          "pda2": {
            "type": "string",
            "description": "Product-defined attribute 2."
          },
          "pda3": {
            "type": "string",
            "description": "Product-defined attribute 3."
          },
          "pda4": {
            "type": "string",
            "description": "Product-defined attribute 4."
          },
          "hscode": {
            "type": "string",
            "description": "HS or HSN commodity classification code.",
            "instructions": "Required. Provide the applicable HS or HSN code. If the correct HS or HSN code is not known, provide \"00000000\". If the product is created in Tuhund and the HS or HSN code does not already exist, Tuhund will automatically create the corresponding HS or HSN code."
          },
          "productsize": {
            "type": "string",
            "description": "Size label or size code used to identify the product size, such as XL, L, M, 22, 24 or 26.",
            "instructions": "Optional. Provide the product's size label or size code when applicable."
          },
          "productcolor": {
            "type": "string",
            "description": "Product colour represented as a hexadecimal colour code without the leading # character.",
            "instructions": "Optional. Provide the product colour as a hexadecimal colour code without the # character. For example, use \"FF0000\" for red."
          },
          "colorname": {
            "type": "string",
            "description": "Optional. Descriptive colour name."
          },
          "keywords": {
            "type": "string",
            "description": "Additional product keywords useful for product identification or AI-assisted product matching."
          },
          "price": {
            "type": "number",
            "description": "Unit purchase price before discounts and applicable taxes."
          },
          "taxrate4": {
            "type": "number",
            "description": "Tax rate for tax component 4. For Indian GST transactions, this represents the GST Cess rate. For other countries, the tax represented by this field depends on the applicable tax configuration.",
            "instructions": "For Indian GST transactions, provide the applicable GST Cess rate. For other countries, provide this value only when the applicable tax configuration uses a fourth tax component."
          },
          "taxrate3": {
            "type": "number",
            "description": "Tax rate for tax component 3. For Indian GST transactions, this represents the IGST rate. For other countries where e-invoicing is enabled, this represents the VAT rate.",
            "instructions": "For Indian GST transactions, provide the IGST rate. For other countries where e-invoicing is enabled, provide the applicable VAT rate."
          },
          "taxrate2": {
            "type": "number",
            "description": "Tax rate for tax component 2. For Indian GST transactions, this represents the CGST rate. For other countries, the tax represented by this field depends on the applicable tax configuration.",
            "instructions": "For Indian GST transactions, provide the CGST rate. Do not use this field for IGST transactions."
          },
          "taxrate1": {
            "type": "number",
            "description": "Tax rate for tax component 1. For Indian GST transactions, this represents the SGST rate. For other countries, the tax represented by this field depends on the applicable tax configuration.",
            "instructions": "For Indian GST transactions, provide the SGST rate. Do not use this field for IGST transactions."
          },
          "customrate4": {
            "type": "number",
            "description": "Customs duty rate for component 4. Represents a cess applicable to the customs transaction.",
            "instructions": "Optional. Provide the applicable fourth customs cess rate, where applicable."
          },
          "customrate3": {
            "type": "number",
            "description": "Customs duty rate for component 3. Represents a cess applicable to the customs transaction.",
            "instructions": "Optional. Provide the applicable third customs cess rate, where applicable."
          },
          "customrate2": {
            "type": "number",
            "description": "Additional customs duty rate.",
            "instructions": "Optional. Provide the applicable additional customs duty rate, where applicable."
          },
          "customrate1": {
            "type": "number",
            "description": "Basic customs duty rate.",
            "instructions": "Optional. Provide the applicable basic customs duty rate, where applicable."
          },
          "accessablevalue": {
            "type": "number",
            "description": "Optional. Assessable value of the item per unit, used as the basis for calculating applicable customs duties and taxes."
          },
          "quantity": {
            "type": "number",
            "description": "Quantity of the product being purchased."
          },
          "discount": {
            "type": "number",
            "description": "Line-item discount rate expressed as a percentage.",
            "instructions": "Optional. Provide the discount rate as a percentage. Use either discount or adiscount, not both. If both values are provided, Tuhund will use only one of them."
          },
          "adiscount": {
            "type": "number",
            "description": "Line-item discount amount applicable per unit.",
            "instructions": "Optional. Provide the discount amount per unit. Use either adiscount or discount, not both. If both values are provided, Tuhund will use only one of them."
          }
        }
      }
    },
    "bankaccount": {
      "type": "object",
      "description": "Vendor bank account details associated with the purchase transaction.",
      "instructions": "Optional. Provide this object when the vendor bank account is not being specified using bankaccountid. The bank account details will be used to identify or create the vendor's bank account in Tuhund.",
      "properties": {
        "bankaccountid": {
          "type": "string",
          "description": "Tuhund bank account ID.",
          "instructions": "Optional. Provide this value only if the correct bank account ID assigned in Tuhund is known. Do not provide a bankaccountid if the correct Tuhund ID is not known. An incorrect or invalid bankaccountid will result in rejection of the request."
        },
        "accountnumber": {
          "type": "string",
          "description": "Bank account number."
        },
        "accounttitle": {
          "type": "string",
          "description": "Name or title of the bank account holder."
        },
        "bankname": {
          "type": "string",
          "description": "Name of the bank."
        },
        "branchname": {
          "type": "string",
          "description": "Bank branch name."
        },
        "address": {
          "type": "string",
          "description": "Bank branch address."
        },
        "city": {
          "type": "string",
          "description": "City in which the bank branch is located."
        },
        "stateid": {
          "type": "string",
          "description": "State or province ID of the bank branch."
        },
        "state": {
          "type": "string",
          "description": "State or province of the bank branch."
        },
        "postcode": {
          "type": "string",
          "description": "Postal or ZIP code of the bank branch."
        },
        "countryid": {
          "type": "string",
          "description": "Country ID of the bank account."
        },
        "swiftcode": {
          "type": "string",
          "description": "SWIFT or BIC code of the bank."
        },
        "remarks": {
          "type": "string",
          "description": "Additional remarks about the bank account."
        },
        "tag": {
          "type": "string",
          "description": "Bank account classification or tag."
        },
        "accounttype": {
          "type": "integer",
          "description": "Bank account type used by the system."
        },
        "ifsccode": {
          "type": "string",
          "description": "IFSC code of the bank branch, where applicable."
        },
        "rtgscode": {
          "type": "string",
          "description": "RTGS code of the bank, where applicable."
        },
        "isprimary": {
          "type": "boolean",
          "description": "Indicates whether this is the primary bank account."
        },
        "mstnumber": {
          "type": "string",
          "description": "Bank or master reference number, where applicable."
        }
      }
    }
  },
  "required": [
    "branchid",
    "prefixid",
    "cinumber",
    "cidate",
    "currency",
    "exchange",
    "lexchange",
    "shipmentterms",
    "type",
    "create",
    "vendor",
    "billingaddress",
    "shippingaddress",
    "deliveryaddress",
    "items"
  ]
}

Request Headers :

{
  "device": "MYAPP",
  "Authentication": "YOUR_AUTHENTICATION_CODE"
} 

Request Headers Schema :

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "device": {
      "type": "string",
      "description": "A short name of your application. Device is mandatory but any value between 3 and 20 characters is accepted.",
      "minLength": 3,
      "maxLength": 20
    },
    "Authentication": {
      "type": "string",
      "description": "Authentication code generated for API call."
    }
  },
  "required": [
    "device",
    "Authentication"
  ]
}

Sample Payload :

{
  "branchid": "ENTERPRISE",
  "prefixid": "K4rR9n",
  "cinumber": "3016528339",
  "cidate": "15/09/2026",
  "duedate": "20/09/2026",
  "currency": "INR",
  "exchange": 1,
  "lexchange": 1,
  "shipmentterms": "CIF Sea",
  "reference": "Purchase Order Number PO5654",
  "remarks": "2 items short will be provided later and billed separately.",
  "dispatch": "By Road",
  "freight": 2500,
  "othercharges": 500,
  "autoround": true,
  "type": 1,
  "tcs": 0,
  "tdsapp": false,
  "ewaybillnumber": "102039447989",
  "ewaybilldate": "15/09/2026",
  "customsapp": false,
  "baseapp": false,
  "vatapp": true,
  "create": true,
  "vendor": {    
    "companyname": "Hudson Industrial Supplies Inc.",    
    "tag": "INDUSTRIAL",
    "shortname": "HUDSON",   
    "tin": "US-TIN-584729316",
    "phone1": "+12125550124",
    "phone2": "+12125550186",
    "fax": "+12125550198",
    "email": "accounts@hudsonindustrial.example",
    "address": "350 Fifth Avenue, Suite 4202",
    "city": "New York",
    "statename": "New York",
    "postcode": "10118",
    "countrycode": "us",
    "countryname": "United States",
    "lcompanyname": "Hudson Industrial Supplies Inc."
  },
  "billingaddress": {
    "addresstitle": "Billing Address",
    "address": "350 Fifth Avenue, Suite 4202",
    "city": "New York",
    "state": "New York",
    "postcode": "10118",
    "countrycode": "us",
    "countryname": "United States",
    "phone1": "+1 2125550147",
    "phone2": "+1 2125550189",
    "fax": "+1 2125550195",
    "mobile": "+1 9175550136",
    "email": "accounts@example.com",
    "xc": 40.7484,
    "yc": -73.9857
  },
  "shippingaddress": {
    "addresstitle": "Shipping Address",
    "address": "200 Park Avenue, Suite 1800",
    "city": "New York",
    "state": "New York",
    "postcode": "10166",
    "countrycode": "us",
    "countryname": "United States",
    "phone1": "+1 2125550164",
    "phone2": "+1 2125550178",
    "fax": "+1 2125550192",
    "mobile": "+1 9175550148",
    "email": "shipping@example.com",
    "xc": 40.7549,
    "yc": -73.9761
  },
  "deliveryaddress": {
    "addresstitle": "Delivery Address",
    "address": "200 Park Avenue, Warehouse 12",
    "city": "New York",
    "state": "New York",
    "postcode": "10166",
    "countrycode": "us",
    "countryname": "United States",
    "phone1": "+12125550164",
    "phone2": "+12125550178",
    "fax": "+12125550192",
    "mobile": "+19175550148",
    "email": "logistics@hudsonindustrial.example",
    "xc": 40.7549,
    "yc": -73.9761
  },
  "financials": {
    "discount": 0.0,
    "taxablevalue": 53138.51,
    "tax1": 4688.72,
    "tax2": 4688.72,
    "tax3": 0.0,
    "tax4": 0.0,
    "roundoff": 0.05,
    "total": 62516.0
  },
  "items": [
    {
      "producttype": 1,
      "productnumber": 0,
      "productname": "(P36LN-NF) LEFT UNILATERAL PRESSER FOOT",
      "description": "Pressure Foot Piping Pressure Foot for Industrial Sewing Machine Left Compatible for 1 Side Flat Needle Machine",
      "brand": "JACK",
      "model": "114416002",
      "hscode": "84518090",
      "price": 4554.55,
      "taxrate2": 9,
      "taxrate1": 9,
      "accessablevalue": 4554.55,
      "quantity": 10
    },
    {
      "adiscount": 0,
      "price": 125,
      "productname": "(3/16) 2 Needle Kansai Orginal  Spares IN",
      "brand": "KANSAI",
      "model": "14-8889-00",
      "taxrate2": 6,
      "taxrate1": 6,
      "quantity": 25
    }
  ],
  "bankaccount": {
    "accountnumber": "012345678901",
    "accounttitle": "ABC Trading Private Limited",
    "bankname": "State Bank of India",
    "branchname": "MG Road Branch",
    "address": "123 MG Road",
    "city": "Bengaluru",
    "stateid": "91012",
    "state": "Karnataka",
    "postcode": "560001",
    "countryid": "in",
    "swiftcode": "SBININBBXXX",
    "remarks": "Primary operating account",
    "tag": "Primary",
    "accounttype": 1,
    "ifsccode": "SBIN0001234",
    "rtgscode": "SBIN0001234",
    "isprimary": true,
    "mstnumber": "MST123456"
  }
}

Sample failure response :

{
	"message":"No authentication code passed.",
	"response":-1,
	"errorcode":412
}
Tuhund Logo
TUHUND®
Home About us Modules CRM HR SALES BI SERVICES MANAGEMENT INVENTORY MANAGEMENT ACCOUNTING AND FINANCE PROCUREMENT PROJECT MANAGEMENT ERP ADMINISTRATION DATA REPOSITORY API & SUB PORTALS Careers Community Blog
M Home Schedule Demo About us Community Blog
CRM HR SALES BI SERVICES MANAGEMENT INVENTORY MANAGEMENT ACCOUNTING AND FINANCE PROCUREMENT PROJECT MANAGEMENT ERP ADMINISTRATION DATA REPOSITORY API & SUB PORTALS Careers
API Documents
Request Demo