Overview

We are excited to introduce Version 2 of our API, featuring significant performance improvements and new capabilities to enhance your integration experience. This update builds on Version 1, optimizing core functionalities while incorporating user feedback.

The API remains backward compatible, meaning users already integrated with V1 do not need to upgrade immediately. However, some updates require attention. Below are the key changes and enhancements in this release.

Release Date: 7th - 8th March 2025

API Base URL: api.digitax.tech


V1 API Updates

Sales | Pagination Update (BREAKING CHANGE)

  • Endpoint: GET /sales
  • Change: Added before and after parameters for enhanced pagination.

Branches

The following endpoints have been removed:

  • ❌ Add Branch User
  • ❌ Add Branch Insurance

Customers

From the GET /customers/{customer_pin} endpoint, the following fields have been removed:

  • taxpayer_status_code
  • county_name
  • sub_county_name
  • tax_locality_name
  • location_description

Items

Pagination Update (BREAKING CHANGE)

  • Endpoint: GET /items
  • Change: Added before and after parameters for better pagination

Other Changes

  • Moved: /import-items/link_item/{import_item_id}/link to its own imports module.
  • ❌ Removed: Item composition endpoint
  • ❌ Removed: Ability to update an item
  • ❌ Removed: Ability to delete an item

Update and deletion will be handled on a need basis

Stock

The following stock-related endpoints have been removed:

  • ❌ Create a new master stock
  • ❌ Create a new stock movement
  • ❌ Get a list of stock movements

Impact: These functionalities are now handled internally using the POST /stock/adjust endpoint.


Version 2: New Features & Enhancements

API Documentation: View Docs

API Base URL: api.digitax.tech/ke/v2

Sales Endpoint Enhancements

New Endpoints for Sales & Credit Notes

  • Invoice Endpoint: POST /sales
  • Credit Note Endpoint: POST /credit-notes

Key Changes

  • Field Update: customer_tin is now customer_pin for sales and credit notes
  • Unique Constraint: Added for trader_invoice_number
  • Required Field: sale_date must be included in the request payload
  • Pagination: before and after parameters available in GET /sales

New Credit Notes Endpoint

  • Endpoint: POST /credit-notes
  • Fields Added:
    • returned_date
    • sale_id
    • original_trader_invoice_number

Testing Guidance

Ensure test cases cover:

  • Validation of required fields
  • Correct population of fields in API responses

Items Endpoint Updates

Pagination Enhancements

  • Change: GET /items now supports before and after pagination parameters

Import Items Update

  • Change: Creating an item from an import item has moved to the imports module

Customer Retrieval Updates

New Endpoint for Retrieving Customers

  • New Path: GET /customers
  • Previous Path: GET /branches/customers

Impact on Existing Applications

  • Path Change: Requests to /branches/customers should now use /customers
  • Query Parameter Change: Customers are now queried by customer_id instead of tpin
  • Compatibility: /branches/customers will be supported until the migration deadline, after which requests must use /customers

Testing Guidance

  • Compare responses between V1 and V2 for accuracy
  • Ensure all parameters correctly map to thecustomer_id

New Imports Endpoint

  • Description: Links import directly to an item
  • Change: The PUT method replaces POST under the items module in V2

Purchases Updates

Required Fields for Linking Purchase Items

  • Item sequence: Required
  • Unit price: Required
  • is_stock_item: Optional

Impact

These changes ensure consistency and tracking for purchased stock items

Testing Guidance

  • Ensure all required fields are included in requests
  • Run test transactions to verify correct linkages

Stock Endpoint Updates

Removed Endpoints

  • ❌ Create a new master stock
  • ❌ Create a new stock movement
  • ❌ Get a list of stock movements

Impact: These actions are now handled internally using PUT /stock/adjust

Movement Type Requirement

Testing Guidance

  • Ensure all required fields are included in the/stock/adjust requests.
  • Validate transactions to confirm correct stock adjustments.

Support & Migration Assistance

For support during migration, contact:

πŸ“§ Email: [email protected]

πŸ’¬ Support Portal: Intercom


βœ… Final Notes

  • Backward Compatibility: V1 remains functional, but V2 is recommended for better performance and features.
  • Testing is Critical: Ensure all integrations align with the new changes.