{"openapi":"3.1.0","info":{"title":"tidacc Reseller API","description":"Buy digital accounts from the shop with your wallet credit and receive them in the same response.\n\nAPI สำหรับตัวแทนจำหน่าย: ดูสินค้าในราคาตัวแทน สั่งซื้อด้วยเครดิตในกระเป๋า และรับบัญชีได้ทันที\n\n## Authentication\n\nSend your API key in the `X-API-Key` header on every request. Create keys on the reseller page\nof the website; the full key (`tdk_<prefix>_<secret>`) is shown only once. A key works while your\nreseller account is approved and, when the key has an IP allowlist, only from those IPs.\nCookies are ignored.\n\n## Money\n\nAmounts are integers in minor units, in fields ending in `_minor`: 1 credit = 100 (1 credit = 1 THB).\nOn products, `price_minor` is your price after your discount and `list_price_minor` the shop price.\n\n## Idempotent orders\n\n`POST /api/v1/orders` requires an `Idempotency-Key` header (1..64 characters, e.g. a new UUID per\norder). Retrying with the same key and the same body returns the original order with `200` and\ncharges nothing; the same key with a different body is `409 idempotency_conflict`.\n\n## Rate limits\n\nEach API key may send a limited number of requests per minute (set by the shop; 60 by default).\nAuthenticated responses carry `X-RateLimit-Limit` and `X-RateLimit-Remaining`. Over the limit the\nanswer is `429 rate_limited` with `Retry-After` (seconds).\n\nAfter 20 requests with a missing or invalid API key within a minute (counted from the first one),\nevery request from the same IP address is answered `429 rate_limited` with `Retry-After` for the\nrest of that minute, even with a valid key.\n\n## Pagination\n\n`GET /api/v1/orders` takes `?cursor=&limit=` (limit 1..100, default 20) and returns\n`{items, next_cursor}`. Pass `next_cursor` back as `cursor`; it is `null` on the last page.\n\n## Errors\n\nEvery error is JSON `{\"error\": {\"code\", \"message\", \"details\"?}}` (schema `ErrorBody`) with a\nmatching HTTP status. Branch on `code`; `message` is for humans and may change.\n","version":"1.0.0"},"servers":[{"url":"/"}],"paths":{"/api/v1/me":{"get":{"tags":["Account"],"summary":"Your account","description":"The shop name, wallet balance and discount of the reseller that owns the API key.","operationId":"getMe","responses":{"200":{"description":"The reseller account.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiMeView"},"example":{"balance_minor":125000,"discount_bps":1000,"shop_name":"Alice Shop"}}}},"401":{"description":"`invalid_api_key`: the `X-API-Key` header is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"`banned` (the account is banned), `reseller_not_approved` (the reseller account is not\napproved, e.g. suspended) or `ip_not_allowed` (the key's IP allowlist does not contain\nthe caller's IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"`rate_limited`: this key sent too many requests this minute, or your IP sent too many requests\nwith a missing or invalid API key; retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"`internal_error`: an unexpected server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"api_key":[]}]}},"/api/v1/openapi.json":{"get":{"tags":["Meta"],"summary":"OpenAPI document","description":"This document (OpenAPI 3.1, JSON). Public: no API key needed; limited per client IP.","operationId":"getOpenApi","responses":{"200":{"description":"The OpenAPI document.","content":{"application/json":{"schema":{}}}},"429":{"description":"`rate_limited`: too many requests from this IP; retry after `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}}}},"/api/v1/orders":{"get":{"tags":["Orders"],"summary":"List orders","description":"Your orders, newest first (orders placed on the website included), without\ntheir accounts. Pass `next_cursor` back as `cursor` for the next page.","operationId":"listOrders","parameters":[{"name":"cursor","in":"query","description":"`next_cursor` of the previous page.","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page size (default 20).","required":false,"schema":{"type":"integer","format":"int64","maximum":100,"minimum":1}}],"responses":{"200":{"description":"One page of orders.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Page_OrderSummary"},"example":{"items":[{"created_at":"2026-10-26T07:15:00Z","id":"0192d6b1-2c4e-7a8f-b3d2-5e7f9a1c3d55","order_no":123,"product_id":"0192d6a4-6f1e-7c3a-9b1d-3f6c2e8a4b10","product_name":"เน็ตฟลิกซ์ 1 เดือน","product_name_en":"Netflix 1 month","quantity":2,"source":"api","total_minor":17820,"unit_price_minor":8910}],"next_cursor":null}}}},"401":{"description":"`invalid_api_key`: the `X-API-Key` header is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"`banned` (the account is banned), `reseller_not_approved` (the reseller account is not\napproved, e.g. suspended) or `ip_not_allowed` (the key's IP allowlist does not contain\nthe caller's IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"`validation_error` on `cursor` (not a cursor from this API) or `query` (malformed query string).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"`rate_limited`: this key sent too many requests this minute, or your IP sent too many requests\nwith a missing or invalid API key; retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"`internal_error`: an unexpected server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"api_key":[]}]},"post":{"tags":["Orders"],"summary":"Buy accounts","description":"Buys `quantity` accounts of a product at your price, paid from your wallet,\nand returns them at once (the oldest accounts in stock are delivered first).\n\nSend a unique `Idempotency-Key` with every new order. Retrying with the same\nkey and the same body returns the original order with **200** and charges\nnothing; the same key with a different body is `idempotency_conflict`.","operationId":"createOrder","parameters":[{"name":"Idempotency-Key","in":"header","description":"Unique key for this purchase (1..64 visible ASCII characters, e.g. a UUID). Reuse it only to retry the same request.","required":true,"schema":{"type":"string","maxLength":64,"minLength":1},"example":"6f1c2b9e-7d4a-4c1e-9a53-0b8f7e2d1c44"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiOrder"}}},"required":true},"responses":{"200":{"description":"Replay: this `Idempotency-Key` already placed this order, which is returned unchanged (nothing is charged).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiOrderView"},"example":{"accounts":["user1@mail.com:pass123","user2@mail.com:pass456"],"order":{"created_at":"2026-10-26T07:15:00Z","id":"0192d6b1-2c4e-7a8f-b3d2-5e7f9a1c3d55","order_no":123,"product_id":"0192d6a4-6f1e-7c3a-9b1d-3f6c2e8a4b10","product_name":"เน็ตฟลิกซ์ 1 เดือน","product_name_en":"Netflix 1 month","quantity":2,"source":"api","total_minor":17820,"unit_price_minor":8910}}}}},"201":{"description":"Order placed; `accounts` holds the delivered accounts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiOrderView"},"example":{"accounts":["user1@mail.com:pass123","user2@mail.com:pass456"],"order":{"created_at":"2026-10-26T07:15:00Z","id":"0192d6b1-2c4e-7a8f-b3d2-5e7f9a1c3d55","order_no":123,"product_id":"0192d6a4-6f1e-7c3a-9b1d-3f6c2e8a4b10","product_name":"เน็ตฟลิกซ์ 1 เดือน","product_name_en":"Netflix 1 month","quantity":2,"source":"api","total_minor":17820,"unit_price_minor":8910}}}}},"401":{"description":"`invalid_api_key`: the `X-API-Key` header is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"402":{"description":"`insufficient_credit`: the wallet balance is below the total; `details: {required_minor, balance_minor}`.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"`banned` (the account is banned), `reseller_not_approved` (the reseller account is not\napproved, e.g. suspended) or `ip_not_allowed` (the key's IP allowlist does not contain\nthe caller's IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"`not_found`: unknown product.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"409":{"description":"`out_of_stock` (`details: {available}`), `product_unavailable` (the product or its category is hidden) or `idempotency_conflict` (the key was used for a different request).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"413":{"description":"`payload_too_large`: the body is over 1 MB.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"415":{"description":"`unsupported_media_type`: the body is not `application/json`.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"422":{"description":"`validation_error` on `Idempotency-Key` (missing or not 1..64 characters), `quantity` (not 1..100) or `body` (malformed JSON).","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"`rate_limited`: this key sent too many requests this minute, or your IP sent too many requests\nwith a missing or invalid API key; retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"`internal_error`: an unexpected server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"api_key":[]}]}},"/api/v1/orders/{id}":{"get":{"tags":["Orders"],"summary":"Get an order","description":"One of your orders with the accounts it delivered.","operationId":"getOrder","parameters":[{"name":"id","in":"path","description":"The order `id`.","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The order and its accounts.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiOrderView"},"example":{"accounts":["user1@mail.com:pass123","user2@mail.com:pass456"],"order":{"created_at":"2026-10-26T07:15:00Z","id":"0192d6b1-2c4e-7a8f-b3d2-5e7f9a1c3d55","order_no":123,"product_id":"0192d6a4-6f1e-7c3a-9b1d-3f6c2e8a4b10","product_name":"เน็ตฟลิกซ์ 1 เดือน","product_name_en":"Netflix 1 month","quantity":2,"source":"api","total_minor":17820,"unit_price_minor":8910}}}}},"401":{"description":"`invalid_api_key`: the `X-API-Key` header is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"`banned` (the account is banned), `reseller_not_approved` (the reseller account is not\napproved, e.g. suspended) or `ip_not_allowed` (the key's IP allowlist does not contain\nthe caller's IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"404":{"description":"`not_found`: no such order on your account.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"`rate_limited`: this key sent too many requests this minute, or your IP sent too many requests\nwith a missing or invalid API key; retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"`internal_error`: an unexpected server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"api_key":[]}]}},"/api/v1/products":{"get":{"tags":["Account"],"summary":"List products","description":"Every product on sale, in catalog order, with your unit price (`price_minor`,\nafter your discount), the list price and the number of accounts in stock.","operationId":"listProducts","responses":{"200":{"description":"Products on sale.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Items_ApiProduct"},"example":{"items":[{"category":{"name_en":"Netflix","name_th":"เน็ตฟลิกซ์","slug":"netflix"},"id":"0192d6a4-6f1e-7c3a-9b1d-3f6c2e8a4b10","list_price_minor":9900,"name_en":"Netflix 1 month","name_th":"เน็ตฟลิกซ์ 1 เดือน","price_minor":8910,"slug":"netflix-1m","stock_available":42,"warranty_days":7}]}}}},"401":{"description":"`invalid_api_key`: the `X-API-Key` header is missing, malformed, unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"403":{"description":"`banned` (the account is banned), `reseller_not_approved` (the reseller account is not\napproved, e.g. suspended) or `ip_not_allowed` (the key's IP allowlist does not contain\nthe caller's IP).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"429":{"description":"`rate_limited`: this key sent too many requests this minute, or your IP sent too many requests\nwith a missing or invalid API key; retry after `Retry-After` seconds.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"},"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}},"500":{"description":"`internal_error`: an unexpected server error.","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorBody"}}}}},"security":[{"api_key":[]}]}}},"components":{"schemas":{"ApiCategoryRef":{"type":"object","description":"The category a product is listed in.","required":["slug","name_th","name_en"],"properties":{"slug":{"type":"string"},"name_th":{"type":"string"},"name_en":{"type":"string"}}},"ApiMeView":{"type":"object","description":"The reseller account behind the API key.","required":["shop_name","balance_minor","discount_bps"],"properties":{"shop_name":{"type":"string"},"balance_minor":{"type":"integer","format":"int64","description":"Wallet balance in minor units (1 credit = 100)."},"discount_bps":{"type":"integer","format":"int32","description":"The reseller discount in basis points (1000 = 10%)."}}},"ApiOrderView":{"type":"object","description":"An order with the accounts it delivered.","required":["order","accounts"],"properties":{"order":{"$ref":"#/components/schemas/OrderSummary"},"accounts":{"type":"array","items":{"type":"string"},"description":"The delivered accounts the buyer still holds, one stock line each, in delivery order.\nA line replaced or refunded through a claim is left out; a replacement line is included."}}},"ApiProduct":{"type":"object","description":"A product on sale, priced for the reseller. Money is in minor units (1 credit = 100).","required":["id","slug","category","name_th","name_en","price_minor","list_price_minor","stock_available","warranty_days"],"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"category":{"$ref":"#/components/schemas/ApiCategoryRef"},"name_th":{"type":"string"},"name_en":{"type":"string"},"price_minor":{"type":"integer","format":"int64","description":"The reseller's unit price (after the discount)."},"list_price_minor":{"type":"integer","format":"int64"},"stock_available":{"type":"integer","format":"int64"},"warranty_days":{"type":"integer","format":"int32"}}},"CreateApiOrder":{"type":"object","description":"What to buy.","required":["product_id","quantity"],"properties":{"product_id":{"type":"string","format":"uuid","description":"The product to buy (`id` from `GET /api/v1/products`)."},"quantity":{"type":"integer","format":"int32","description":"How many accounts to buy.","maximum":100,"minimum":1}},"example":{"product_id":"0192d6a4-6f1e-7c3a-9b1d-3f6c2e8a4b10","quantity":2}},"ErrorBody":{"type":"object","description":"Every error response: a stable `code`, a message and, for some codes, `details`.","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorObject"}},"example":{"error":{"code":"out_of_stock","details":{"available":1},"message":"out of stock: 1 available"}}},"ErrorObject":{"type":"object","description":"The error.","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable `snake_case` error code; clients branch on it."},"message":{"type":"string","description":"Human-readable English message. It may change; do not parse it."},"details":{"description":"Extra data for some codes: `validation_error` -> `{fields: {name: [message]}}`,\n`insufficient_credit` -> `{required_minor, balance_minor}`, `out_of_stock` -> `{available}`,\n`conflict` -> `{field}`."}}},"Items_ApiProduct":{"type":"object","description":"A complete list (not paginated).","required":["items"],"properties":{"items":{"type":"array","items":{"type":"object","description":"A product on sale, priced for the reseller. Money is in minor units (1 credit = 100).","required":["id","slug","category","name_th","name_en","price_minor","list_price_minor","stock_available","warranty_days"],"properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"category":{"$ref":"#/components/schemas/ApiCategoryRef"},"name_th":{"type":"string"},"name_en":{"type":"string"},"price_minor":{"type":"integer","format":"int64","description":"The reseller's unit price (after the discount)."},"list_price_minor":{"type":"integer","format":"int64"},"stock_available":{"type":"integer","format":"int64"},"warranty_days":{"type":"integer","format":"int32"}}}}}},"OrderSummary":{"type":"object","description":"One order. Money is in minor units (1 credit = 100).","required":["id","order_no","product_id","product_name","product_name_en","quantity","unit_price_minor","total_minor","source","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"order_no":{"type":"integer","format":"int64"},"product_id":{"type":"string","format":"uuid"},"product_name":{"type":"string","description":"The product's Thai name when the order was placed."},"product_name_en":{"type":"string","description":"The product's English name when the order was placed; empty when the\nproduct had none (and for orders placed before this field existed).\nClients fall back to `product_name`."},"quantity":{"type":"integer","format":"int32"},"unit_price_minor":{"type":"integer","format":"int64"},"total_minor":{"type":"integer","format":"int64"},"source":{"type":"string","description":"`web` | `api`."},"created_at":{"type":"string","format":"date-time"}}},"Page_OrderSummary":{"type":"object","description":"One page of a cursor-paginated list, newest first.","required":["items","next_cursor"],"properties":{"items":{"type":"array","items":{"type":"object","description":"One order. Money is in minor units (1 credit = 100).","required":["id","order_no","product_id","product_name","product_name_en","quantity","unit_price_minor","total_minor","source","created_at"],"properties":{"id":{"type":"string","format":"uuid"},"order_no":{"type":"integer","format":"int64"},"product_id":{"type":"string","format":"uuid"},"product_name":{"type":"string","description":"The product's Thai name when the order was placed."},"product_name_en":{"type":"string","description":"The product's English name when the order was placed; empty when the\nproduct had none (and for orders placed before this field existed).\nClients fall back to `product_name`."},"quantity":{"type":"integer","format":"int32"},"unit_price_minor":{"type":"integer","format":"int64"},"total_minor":{"type":"integer","format":"int64"},"source":{"type":"string","description":"`web` | `api`."},"created_at":{"type":"string","format":"date-time"}}}},"next_cursor":{"type":["string","null"],"description":"Pass it back as `?cursor=` for the next page; `null` on the last page."}}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying (429 only)."},"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests this API key may send per 60 seconds."},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests this API key has left in the current window."}},"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your reseller API key, `tdk_<prefix>_<secret>` (create it on the reseller page of the website)."}}},"tags":[{"name":"Account","description":"Your reseller account and the products you can buy."},{"name":"Orders","description":"Buy accounts and read your orders."},{"name":"Meta","description":"This document."}]}