{"openapi":"3.1.0","info":{"title":"GetContact Developer API","description":"API Resmi Layanan Pengecekan GetContact untuk Bot Telegram & Website Backend.\n\nDomain Resmi: https://xsksidu.web.id\nAutentikasi: Authorization: Bearer <API_KEY>","version":"1.0.0"},"servers":[{"url":"https://xsksidu.web.id","description":"Production Server (xsksidu.web.id)"},{"url":"https://aquafresh.biz.id","description":"Legacy Alias Server (aquafresh.biz.id)"},{"url":"http://127.0.0.1:8002","description":"Local Development / Proxy Target"}],"paths":{"/api/v1/health":{"get":{"tags":["System"],"summary":"Health Check","description":"Health check endpoint to verify API and database connectivity.","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"tags":["System"],"summary":"Health Check","description":"Health check endpoint to verify API and database connectivity.","operationId":"health_check_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/account":{"get":{"tags":["Account"],"summary":"Get Account Info","description":"Retrieve account profile, balance, current check price, key status, and usage metrics.","operationId":"get_account_info_api_v1_account_get","parameters":[{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/checks":{"post":{"tags":["Checks"],"summary":"Create Check","description":"Perform a phone number check using user balance.\nFeatures:\n- Atomic balance debit and creation.\n- Zero-risk automatic refund to bot balance on empty result or provider error.\n- Idempotency support with 'Idempotency-Key' header.\n- Per-user rate limiting & concurrency protection.","operationId":"create_check_api_v1_checks_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Checks"],"summary":"List Checks","description":"List user's check history with pagination.","operationId":"list_checks_api_v1_checks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Jumlah data per halaman (1-100)","default":20,"title":"Limit"},"description":"Jumlah data per halaman (1-100)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset data","default":0,"title":"Offset"},"description":"Offset data"},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/checks/{check_id}":{"get":{"tags":["Checks"],"summary":"Get Check Detail","description":"Retrieve details and results of a specific check transaction.\nGuarantees cross-user data isolation: only the owner can access their transaction.","operationId":"get_check_detail_api_v1_checks__check_id__get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/documentation":{"get":{"tags":["Documentation"],"summary":"Get Documentation","description":"Returns the visual developer documentation guide.","operationId":"get_documentation_api_documentation_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/api/v1/webhook/janspayment":{"post":{"tags":["Webhooks"],"summary":"Webhook Janspayment","description":"Official webhook receiver for JansPayment QRIS gateway (https://janspayment.com/docs).\nValidates HMAC-SHA256 signature against raw body and timestamp.\nGuarantees strict idempotency and atomic balance/check execution.","operationId":"webhook_janspayment_api_v1_webhook_janspayment_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/webhook/sewapay":{"post":{"tags":["Webhooks"],"summary":"Webhook Sewapay","description":"Legacy webhook receiver for Sewapay invoices.","operationId":"webhook_sewapay_api_v1_webhook_sewapay_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"CheckRequestBody":{"properties":{"phone":{"type":"string","title":"Phone","description":"Nomor telepon yang ingin dicek (contoh: '081234567890' atau '+6281234567890')"}},"type":"object","required":["phone"],"title":"CheckRequestBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}