GET
/v1/admin/tickets/tradersWho a new ticket can be opened with: the firm's traders who match what was typed, or before anything is typed, the most recently active ones. Twenty at most, most recently active first. Staff are left out, as on Users.
Each says whether the trader already has an open ticket, because a trader has one at a time and the form offers that ticket instead.
Twenty is all there is, so has_more stays false even when more traders
match. Type more to narrow it down.
Needs a firm. Our own staff name one with the Propper-Workspace header.
Request
| Parameter | Description |
|---|---|
q | Part of a name or an email address, or a whole trader id. Up to 80 characters count |
curl "https://api.proppertrading.com/v1/admin/tickets/traders?q=ines.rossi" \
-H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
-H "Propper-Workspace: acme"
Response
{
"data": [
{
"object": "ticket_trader_choice",
"id": "usr_5t9et623ep5cygcm",
"name": "Ines Rossi",
"email": "[email protected]",
"avatar_url": null,
"active": true,
"open_ticket": {
"id": "tkt_tattwr6c8dunw3f9",
"subject": "Spread on gold looked wrong at the open"
}
}
],
"meta": {
"request_id": "req_01m50twwkxd8sjzv5v5k75exfr",
"has_more": false,
"next_cursor": null
}
}
| Field | Description |
|---|---|
active | False for a trader who cannot sign in |
open_ticket | The trader's open ticket, with id and subject, or null. Opening another is refused |
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | workspace_required | Asked by our own staff without naming a firm |
| 400 | validation_failed | q is not text |
| 401 | invalid_token | Not a token, or the secret does not match |
| 401 | revoked_token | Signed out here or from another device |
| 401 | expired_token | Ninety days without use, or a set expiry passed |
| 403 | admin_access_required | This account no longer helps run the environment |
| 403 | insufficient_scope | This device does not hold admin:read |
| 403 | workspace_not_permitted | The Propper-Workspace header names an environment this account cannot act in |
| 403 | forbidden | Without view_tickets and manage_tickets |