Purchases

Link purchase items to DigiTax items.

Links purchase items to their corresponding DigiTax items using the supplied purchase item IDs and item IDs.

post/purchases/{purchase_id}/link-items

Request

  • Base URL
    https://api.digitax.tech/ke/v2
  • Auth
    API key in header X-API-Key

Path parameters

purchase_idstring required
Example:purchase_01HC3J1VVVM05YCTS61G7V3KC6

The DigiTax ID of the purchase whose items are being linked.

Request body

Example request

{
  "items": [
    {
      "purchase_item_id": "purchaseitem_01HC3J1VVVM05YCTS61G7V3KC6",
      "item_id": "item_01HC3J1VVVM05YCTS61G7V3KC6"
    }
  ]
}

Response

Success

idstring required

The DigiTax ID of the purchase.

registration_type_codestring required

The code identifying the registration type.

invoice_numberinteger required

The invoice number associated to the purchase.

purchase_type_codestring required

The code identifying the purchase type.

receipt_type_codestring required

The code identifying the receipt type.

payment_type_codestring required

The code identifying the payment method.

purchase_status_codestring required

The current status of the purchase.

purchase_datestring required

The purchase date (YYYYMMDD)

trader_invoice_numberstring required

The trader's invoice number associated with the purchase.

supplier_branch_idstring required

The identifier of the supplier's branch.

supplier_namestring required

The name of the supplier.

supplier_invoice_numberinteger required

The invoice number provided by the supplier.

Example response

{
  "id": "purchase_01HC3J1VVVM05YCTS61G7V3KC6",
  "registration_type_code": "A",
  "invoice_number": 4000,
  "purchase_type_code": "N",
  "receipt_type_code": "P",
  "payment_type_code": "07",
  "purchase_status_code": "06",
  "purchase_date": "20260714",
  "trader_invoice_number": "12",
  "supplier_branch_id": "00",
  "supplier_name": "KENYA REVENUE AUTHORITY",
  "supplier_invoice_number": 12,
  "item_list": [
    {
      "id": "purchaseitem_01HC3J1VVVM05YCTS61G7V3KC6",
      "quantity": 3000,
      "price": 116,
      "supply_amount": 348000,
      "item_id": "item_01HC3J1VVVM05YCTS61G7V3KC6"
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.