Unified GMT purchase history
Changed onOwn purchases and wholesale orders sorted and paginated together. Wholesale accounts appear only inside their order. Search matches country names in Russian or English, phone fragments (including accounts inside wholesale orders), and order ID fragments. Pending single purchases are listed separately.
Request
- Base URLhttps://api.getmytg.com
- Auth
- API key in header x-api-key
- or HTTP bearer
Query parameters
Opt in to durable purchase status and current code_request. Without this option, legacy response fields and status semantics are preserved.
Page number.
Number of items per page.
Sort purchases by creation date
Legacy status projection: PENDING while the current retail code request is pending or failed, SUCCESS when its code is available. With include=code_request, status describes the durable purchase; code_request describes the current request. REFUND and access rules still apply.
Filter purchases by phone number fragment (partial match). Example: '123' matches '+71234567890'.
Russian or English country name fragment, phone number fragment, or order ID fragment. Use instead of phone_number.
Response
Response for status 200
Example response
{
"items": [
{
"id": 12345,
"country_code": "US",
"emoji": "🇺🇸",
"display_name": {
"ru": "США",
"en": "United States"
},
"phone_number": "+12025550123",
"price": {
"amount": "1.50",
"currency_code": "USD"
},
"status": "SUCCESS",
"purchase_type": "SINGLE",
"purchase_source": "BOT",
"verification": {
"code": "12345",
"password": "secret123",
"received_at": "2024-11-19T07:52:00.000Z"
},
"created_at": "2024-11-19T07:50:00.000Z"
}
],
"pagination": {
"current_page": 1,
"page_size": 50,
"total_items": 150,
"total_pages": 3,
"has_next": true
}
}Changes
- breaking
removed the required property
///from the response with the status - info
added the new optional
queryrequest parameterinclude - info
added the optional property
///to the response with the status
- breaking
- info
added the required property
////to the response with the status
- info