Documentation Index
Fetch the complete documentation index at: https://docs.foodsave.kz/llms.txt
Use this file to discover all available pages before exploring further.
POS Credentials API
Base path: /api/v1/pos
Overview
Manage POS adapter credentials and test adapter connectivity for a partner.
GET /api/v1/pos/adapters
List supported POS adapters.
PUT /api/v1/pos/credentials
Upsert credentials for a partner.
curl --request PUT \
--url https://api.foodsave.kz/api/v1/pos/credentials \
-H 'Authorization: Bearer $ADMIN_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"partnerId":"p-1","adapterName":"poster","credentialsJson":"{\"apiKey\":\"secret\"}"}'
const response = await fetch('https://api.foodsave.kz/api/v1/pos/credentials', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.ADMIN_TOKEN}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({ partnerId: 'p-1', adapterName: 'poster', credentialsJson: '{"apiKey":"secret"}' })
})
console.log(response.status)
import os
import requests
response = requests.put(
'https://api.foodsave.kz/api/v1/pos/credentials',
headers={'Authorization': f"Bearer {os.environ['ADMIN_TOKEN']}"},
json={'partnerId': 'p-1', 'adapterName': 'poster', 'credentialsJson': '{"apiKey":"secret"}'}
)
print(response.status_code)
POST /api/v1/pos/test-connection
Test a connection without saving credentials.
Errors
| Code | Meaning | How to fix |
|---|
| 401 | UNAUTHORIZED | Use admin token |
| 400 | INVALID_CREDENTIALS | Check adapter JSON schema |