fiskaltrust / fiskaltrust/docs

android-intent.md documents endpoints that return 400, and the wrong status code for a bad token

Open
#97 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
0
Forks
0
Avg merge
5d 15h
Merged PRs (30d)
18

Description

## Summary

`poscreators/middleware-doc/possystem-api/android-intent.md` documents endpoint paths that the Android launcher rejects with HTTP 400, and documents a status code it does not return. An integrator who follows the page cannot get a working call.

## Measured

Android Launcher preview `2.0.0-beta-0048-gc192aec012`, Pixel 10 Pro, Android 17:

```
POST /echo -> 400 "The selected path '/echo' and method 'POST' is not supported."
POST /v2/echo -> 201
```

Bad access token returns **400**, not 401:

```
POST /v2/echo -> 400 "There is no match between cashboxId and accessToken"
```

## What the page says

| Location | Text | Problem |
|---|---|---|
| line 70 | *"API path (e.g., `/echo`, `/sign`, `/pay` for latest version; …)"* | the unversioned local paths return 400 |
| line 123 | `callPosSystemAPI("POST", "/echo", headers, body)` (Kotlin sample) | would fail as written |
| line 292 | `CallPosSystemAPI("POST", "/echo", headers, body);` (C#/MAUI sample) | same |
| lines 334, 342 | `**Endpoint**: /echo`, `**Endpoint**: /sign` | same |
| line 411 | `| 401 | Unauthorized | Invalid or missing access token |` | the launcher returns 400 |

Note `/pay` at line 350 is fine — the launcher's cloud branch normalises unversioned paths, so only the three **local** endpoints (`/sign`, `/echo`, `/journal`) are affected.

## Suggested handling

Please hold briefly rather than editing straight away. I filed fiskaltrust/middleware-launcher-android#147 for the launcher side. If that is fixed by accepting unversioned paths, most of this page becomes correct on its own and only the 401/400 row needs changing. If instead the launcher keeps requiring `/v2/*`, then the paths above should all be updated.

The 401 row is worth correcting either way, unless the intent is that the launcher *should* return 401 — which would make it a launcher bug rather than a docs one.

## How this was found

While testing the Android launcher for the Italian market (fiskaltrust/market-it#642).

Contributor guide

Open the contributing guide

Research direction

Start with posscreators/middleware-doc/possystem-api/android-intent.md and check the outcome of fiskaltrust/middleware-launcher-android#147 before editing. Review the listed examples and endpoint tables at lines 70, 123, 292, 334, 342, 350, and 411 against the launcher behavior. Done means the documented paths and bad-token status match the resolved API behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp, kotlin
Domain
documentation, mobile-dev
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.