← Purchase API
TradeChannels
Singular: TradeChannel — Base URL: https://purchase-api.ayoune.app — Access: CRUD — Machine-readable spec (JSON · YAML)
Try it now
beta
Response (live)
Requests are proxied through the consumer-app to *.ayoune.app. Tokens stay in your browser and are forwarded per call.
Example response (recorded) sample
A real, previously recorded GET /:id response of this endpoint — not the live call above. Sensitive fields are masked.
{
"payload": {
"capabilities": {
"canBuy": "scrape",
"canSell": "none"
},
"settings": {
"autoPromote": false,
"syncSchedule": "manual"
},
"lastSyncedAt": {
"outbound": "2026-10-01T23:49:01.572Z"
},
"_id": "6abef16d3e4ac8da65834a62",
"externalAccountId": "pruefer-beispiel",
"provider": "amazon",
"createdAt": "2026-10-01T23:49:01.573Z",
"label": "amazon (pruefer-beispiel)",
"shares": [],
"status": "unconfigured",
"updatedAt": "2026-10-01T23:49:01.573Z"
},
"meta": {
"links": [
{
"rel": "self",
"href": "https://purchase-api.ayoune.app/tradechannels/6abef16d3e4ac8da65834a62",
"method": "get",
"title": "GET",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"relations": [
{
"rel": "Credentials",
"title": "MODEL_CREDENTIAL",
"href": "https://api.ayoune.app/config/credentials",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "config.credentials"
},
{
"rel": "Warehouses",
"title": "MODEL_WAREHOUSE",
"href": "https://api.ayoune.app/warehouse/warehouses",
"method": "get",
"types": [
"application/json",
"application/yaml",
"text/csv"
],
"right": "warehouse.warehouses"
}
],
"debugId": "6aded63587c51abebc05d5bb",
"errors": [],
"actions": [
{
"rel": "self",
"action": "COPY",
"title": "MODEL_TRADECHANNEL",
"href": "https://api.ayoune.app/purchase/tradechannels/6abef16d3e4ac8da65834a62/copy",
"method": "post",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
},
{
"rel": "self",
"action": "DELETE",
"title": "MODEL_TRADECHANNEL",
"href": "https://api.ayoune.app/purchase/tradechannels/6abef16d3e4ac8da65834a62",
"method": "delete",
"types": [
"application/json",
"application/yaml",
"text/csv"
]
}
],
"version": {
"host": "2026.19.0",
"core": "2026.388.0"
},
"rateLimit": {
"limit": "10000",
"remaining": "9885",
"reset": "1792992269",
"resetDate": "Mon Oct 26 2026"
},
"responseTime": 268.669928,
"code": 200,
"status": "success",
"error": false
}
}
Endpoints
| Method | Path | Description | Right |
|---|---|---|---|
| GET | /tradechannels |
List with filters/pagination | purchase.tradechannels.view |
| GET | /tradechannels/:id |
Single record | purchase.tradechannels.view |
| POST | /tradechannels |
Create new record | purchase.tradechannels.new |
| PUT | /tradechannels |
Update record | purchase.tradechannels.edit |
| DELETE | /tradechannels/:id |
Delete record | purchase.tradechannels.delete |
SDK
import { aYOUne } from '@tolinax/ayoune';
const ay = new aYOUne('pat_your_token');
// List all
const list = await ay.purchase.tradeChannels.find().limit(10).exec();
// Single record
const one = await ay.purchase.tradeChannels.findById('OBJECT_ID').exec();
// Create
const created = await ay.purchase.tradeChannels.create({ name: 'Foo' });