# Backend

## **\[0.3.15] - 2025-09-30**

### **Updated**

* `/v1/terminal` - For this endpoint, the `merchant-id,` `branch-id`  or `terminal-id` is expected from the header to be subjected to some further checks.
  * Through this endpoint, a device list containing information about the branch ID or the mode in which the device is operating is returned.
  * If you know your fiscal id ( but don't know which branch the device belongs to (branch-id), you can query the device's ID using the specific path given below.
* `/v1/terminal/:id` - This endpoint, called with the id path, returns the branch and merchant id information to which the device belongs. This is the same as the data received from the QR screen in the Token X Connect application on the device.
  * `terminal-id` in header is also required because of access checks

## **\[0.3.6] - 2025-09-05**

### **Added**

* Added `unit` field support for products, defaulting to "**piece**" when creating/updating a basket. So, if your unit is a piece, you do not have to send it
  * For unit codes: <https://ticaret.gov.tr/gumruk-islemleri/dijital-gumruk-uygulamalari/edi-xml-referans-mesajlari/olcu-birimleri-kodlari>
  * Usage:

    ```typescript
    ..
    "items": [     
        {
                "name": "Armut",
                "price": 6000,
                "sectionNo": 1,
                "taxPercent": 1000,
                "quantity": 1500,
                "unit": "KGM"
        }    
    ],
    ..
    ```

* Added `receiptLimit` field in Get Fiscal Parameters api.

### Fixed

* Fixed errors in total calculations for baskets containing discounts

## **\[0.2.0] - 2025-08-05**

### **Updated**

* `/v1/terminal` - For this endpoint that returns the terminal list, the merchantId or branchId parameter is no longer expected from the header but in the query param.
  * query params: Either `merchantId`  or `branchId` . BranchId will be considered when both are submitted

## **\[0.1.34] - 2025-07-10**

### **Added**

* With the new backend version, **the URL for token acquisition has been changed**. All requests must now be made through the new endpoint.
* Depending on this update, **the Postman collection has been updated** and you can access it via the link below:
  * <https://documenter.getpostman.com/view/31664195/2sAY4rEQbG#a222daa0-2bd0-4448-862a-b911529a0f82>

**Note:** The integration structure, which currently requires obtaining separate credentials for each client, has been changed. The new architecture adopts a simpler, more centralized structure by defining a single client specific to each integrator. This change aims to increase manageability and security.

### Fixed

* Lock check before update basket operation

## **\[0.1.28] - 2025-05-13**

### **Added**

* `/v1/basket/:basketID` - (PUT) Update an existing basket.
* `/v1/basket/unlock` - (POST) To unlock a basket if needed.&#x20;
* `/v1/terminal` - List all terminals (with optional branch-id filter via header)

### **Updated**

* Removed the `checkNumber` uniqueness constraint when creating a basket. Integrator applications should now handle this logic within their own systems.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.tokeninc.com/token-developer-portal-1/x-platform/destek/changelog/backend.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
