{"openapi":"3.0.0","components":{"examples":{},"headers":{},"parameters":{},"requestBodies":{},"responses":{},"schemas":{"ChytaError":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"id":{"type":"string"},"cause":{"type":"string"}},"required":["code","message","id"],"type":"object","additionalProperties":false},"AutoLinkAction":{"type":"string","enum":["linked","already-linked"],"description":"Resultado del auto-link de la cuenta fixture a la integration del caller:\n- `linked`: el fixture user se vinculó recién en esta llamada (mostrar\n  feedback al user explicando que la cuenta quedó vinculada).\n- `already-linked`: ya estaba vinculado de antes — el frontend NO debería\n  mostrar el mensaje \"vinculamos también la cuenta\" porque sería confuso.\n\nNote: the previous `skipped` variant was removed. Auto-link is now fail-fast:\nif any step fails the service throws rather than returning tokens silently."},"PostTestOAuthTokensResponseBody":{"properties":{"idToken":{"type":"string","description":"ID token Bearer para usar en POST /integration/payment-request."},"refreshToken":{"type":"string","description":"Refresh token para renovar cuando idToken expire."},"expiresIn":{"type":"number","format":"double","description":"TTL en segundos del idToken (Cognito default: 3600)."},"autoLinkAction":{"$ref":"#/components/schemas/AutoLinkAction","description":"Resultado del auto-link del fixture user a la integration del caller."}},"required":["idToken","refreshToken","expiresIn","autoLinkAction"],"type":"object","additionalProperties":false},"PostSimulatePaymentResponseBody":{"properties":{"simulated":{"type":"boolean"},"forcePspFailure":{"type":"boolean"},"idTransaccion":{"type":"string","description":"ID de la transacción simulada (generado por el PSP/simulator)."},"cvu":{"type":"string","description":"CVU destinatario (eco del request)."},"numeroCuenta":{"type":"string","description":"Número de cuenta resuelto del CVU destinatario."},"amount":{"type":"number","format":"double","description":"Monto (eco del request)."},"fechaOperacion":{"type":"string","description":"Fecha de operación efectiva (puede ser default si no se mandó)."}},"required":["simulated","forcePspFailure","idTransaccion","cvu","numeroCuenta","amount","fechaOperacion"],"type":"object","additionalProperties":false},"PostSimulatePaymentRequestBody":{"description":"Interfaces del simulador del portal integration-admin.\n\nMirror estable del body + response del wrapper `simulatePaymentForIntegrationAdmin`\n(que a su vez delega en `simulatePaymentV2` de chyta). Vivir acá — y no\nreusar el type de chyta — asegura que el contrato público del integration-admin\nno quede acoplado al refactor interno del service de chyta y que TSOA pueda\ngenerar el swagger sin importar tipos cross-API.","properties":{"externalAccountCvu":{"type":"string","description":"CVU origen de la transferencia simulada (cuenta externa que \"paga\")."},"externalAccountCuil":{"type":"string","description":"CUIL/CUIT del titular de la cuenta origen."},"externalAccountName":{"type":"string","description":"Nombre del titular de la cuenta origen."},"cvu":{"type":"string","description":"CVU destinatario — debe pertenecer a un payment_request del integration del caller (anti-IDOR)."},"amount":{"type":"number","format":"double","description":"Monto en pesos. Debe ser positivo."},"simulated":{"type":"boolean","description":"Marca la transacción como simulada (default true)."},"forcePspFailure":{"type":"boolean","description":"Fuerza un fallo del PSP para testear el path de error (default false)."},"fechaOperacion":{"type":"string","description":"Fecha de operación en ISO 8601. Si se omite, usa \"ahora\" en zona Argentina."}},"required":["externalAccountCvu","externalAccountCuil","externalAccountName","cvu","amount"],"type":"object","additionalProperties":false},"ClientUrlType":{"enum":["webhook","redirect_uri"],"type":"string"},"WebhookVerificationStatus":{"type":"string","enum":["ok","non_2xx","unreachable"],"description":"Outcome of the non-blocking webhook reachability test (DEV-244 B2/B3).\n- `ok`          → endpoint answered 2xx\n- `non_2xx`     → endpoint was reachable but answered a non-2xx status\n                  (e.g. it validated the validation-token and rejected)\n- `unreachable` → network/timeout/DNS error, no response at all"},"WebhookVerificationResult":{"properties":{"status":{"$ref":"#/components/schemas/WebhookVerificationStatus"},"httpStatus":{"type":"number","format":"double","description":"HTTP status the endpoint answered with. Present only when `non_2xx`."}},"required":["status"],"type":"object","additionalProperties":false},"GetClientUrlResponseBody":{"properties":{"clientUrlId":{"type":"string"},"data":{"properties":{"hasValidationToken":{"type":"boolean"},"urlType":{"$ref":"#/components/schemas/ClientUrlType"},"url":{"type":"string"}},"required":["hasValidationToken","urlType","url"],"type":"object"},"verification":{"$ref":"#/components/schemas/WebhookVerificationResult","description":"Result of the reachability test. Present only when creating/updating a\nWEBHOOK url; the test never blocks registration (warning, not error)."}},"required":["clientUrlId","data"],"type":"object","additionalProperties":false},"PostClientUrlRequestBody":{"properties":{"url":{"type":"string"},"urlType":{"$ref":"#/components/schemas/ClientUrlType"},"validationToken":{"type":"string"}},"required":["url","urlType"],"type":"object","additionalProperties":false},"PutClientUrlRequestBody":{"properties":{"url":{"type":"string"},"validationToken":{"type":"string"}},"type":"object","additionalProperties":false},"TestClientUrlResponseBody":{"properties":{"verification":{"$ref":"#/components/schemas/WebhookVerificationResult"}},"required":["verification"],"type":"object","additionalProperties":false},"PostClientResponseBody":{"properties":{"integrationClientId":{"type":"string"},"cognitoClientId":{"type":"string"},"cognitoClientSecret":{"type":"string"},"authorizationUrl":{"type":"string"},"tokenUrl":{"type":"string"},"userinfoUrl":{"type":"string"},"hostedUiUrl":{"type":"string"},"logoutUrl":{"type":"string"},"name":{"type":"string"},"companyName":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"}},"required":["integrationClientId","cognitoClientId","cognitoClientSecret","authorizationUrl","tokenUrl","userinfoUrl","hostedUiUrl","logoutUrl","name","companyName","scopes"],"type":"object","additionalProperties":false},"PostClientRequestBody":{"properties":{"name":{"type":"string"},"companyName":{"type":"string"},"contactEmail":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"logoUrl":{"type":"string"},"description":{"type":"string"},"redirectUrls":{"items":{"type":"string"},"type":"array"},"logoutUrls":{"items":{"type":"string"},"type":"array"},"firstAdminEmail":{"type":"string","description":"Email del primer admin a invitar automáticamente. Cuando se provee, el\nbackend crea el integration_client_admin tras crear el integration y\nenvía email con credenciales completas (tempPassword + clientId +\nclientSecret + URLs OAuth). Reduce friction de onboarding — el\nPLATFORM_ADMIN no tiene que copiar el secret y compartirlo manual."},"firstAdminName":{"type":"string","description":"Optional name for the first admin (used in the welcome email)."}},"required":["name","companyName","contactEmail"],"type":"object","additionalProperties":false},"PostClientAdminRequestBody":{"properties":{"email":{"type":"string"},"clientId":{"type":"string"},"name":{"type":"string"}},"required":["email","clientId"],"type":"object","additionalProperties":false},"IntegrationClientType":{"description":"Credential/setting profile of an integration_client.\nDrives what the Integration Admin Portal shows/hides per integration.\n\napi_direct → server-to-server only (Pedix-style, Cognito OAuth2 or sk_*).\nwidget     → widget embedded in merchant checkout (AutoEntrada-style).\nboth       → api_direct + widget.","enum":["api_direct","widget","both"],"type":"string"},"IntegrationClientSummary":{"description":"Listing-only shape — extiende el shape de detalle con flags de estado para\nque el portal pueda mostrar un resumen \"lista para usar / pendiente / sin\nconfigurar\" sin entrar al detalle de cada integration.\n\n- `firstAdminEmailSent`: hay al menos un admin cuyo lifecycle status no es\n  'invited' (o sea, el backend al menos intentó mandar el email — exitoso\n  `email_sent` o fallido `email_failed`).\n- `firstAdminLoggedIn`: hay al menos un admin con Cognito UserStatus\n  CONFIRMED. Implica que ya pasó por /change-password al menos una vez.\n  Se deriva de Cognito porque el flow de change-password no actualiza\n  integration_client_admin.status a 'active' todavía.\n- `webhookConfigured`: hay al menos una row en integration_client_url con\n  type='webhook' (no soft-deleted).","properties":{"integrationClientId":{"type":"string"},"cognitoClientId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"companyName":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"contactEmail":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"type":{"$ref":"#/components/schemas/IntegrationClientType"},"createDate":{"type":"string"},"firstAdminEmailSent":{"type":"boolean"},"firstAdminLoggedIn":{"type":"boolean"},"webhookConfigured":{"type":"boolean"}},"required":["integrationClientId","cognitoClientId","name","description","companyName","logoUrl","contactEmail","scopes","type","createDate","firstAdminEmailSent","firstAdminLoggedIn","webhookConfigured"],"type":"object","additionalProperties":false},"ListIntegrationClientsResponseBody":{"description":"Paginated listing envelope for `/integration-admin/setup/clients`.","properties":{"items":{"items":{"$ref":"#/components/schemas/IntegrationClientSummary"},"type":"array"},"total":{"type":"number","format":"double"},"limit":{"type":"number","format":"double"},"offset":{"type":"number","format":"double"}},"required":["items","total","limit","offset"],"type":"object","additionalProperties":false},"GetIntegrationClientResponseBody":{"description":"Public representation of an integration_client for admin portal consumption.\nExcludes sensitive fields (cognito_client_secret) and internal flags (delete_date).","properties":{"integrationClientId":{"type":"string"},"cognitoClientId":{"type":"string"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"companyName":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"contactEmail":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"type":{"$ref":"#/components/schemas/IntegrationClientType"},"createDate":{"type":"string"}},"required":["integrationClientId","cognitoClientId","name","description","companyName","logoUrl","contactEmail","scopes","type","createDate"],"type":"object","additionalProperties":false},"PatchIntegrationClientRequestBody":{"description":"Fields a PLATFORM_ADMIN or scoped INTEGRATION_ADMIN can update on their integration.\nAll fields optional — partial update semantics. Null values are NOT supported\n(schema rejects them); there is no \"clear field\" semantic in PATCH — use an\nexplicit DELETE endpoint if that becomes a product need.","properties":{"name":{"type":"string"},"description":{"type":"string"},"companyName":{"type":"string"},"logoUrl":{"type":"string"},"contactEmail":{"type":"string"},"type":{"$ref":"#/components/schemas/IntegrationClientType"}},"type":"object","additionalProperties":false},"IntegrationClientAdminStatus":{"type":"string","enum":["active","pending","unknown"],"description":"Status del admin en Cognito, normalizado para el portal.\n- `active`: el admin completó el primer login (Cognito CONFIRMED).\n- `pending`: ya fue invitado pero todavía no se logueó (FORCE_CHANGE_PASSWORD).\n- `unknown`: no se pudo determinar (Cognito devolvió error o estado raro)."},"GetClientAdminResponseBody":{"properties":{"integrationClientAdminId":{"type":"string"},"email":{"type":"string"},"status":{"$ref":"#/components/schemas/IntegrationClientAdminStatus"},"invitedAt":{"type":"string"}},"required":["integrationClientAdminId","email","status","invitedAt"],"type":"object","additionalProperties":false},"ListClientAdminsResponseBody":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GetClientAdminResponseBody"},"type":"array"},"total":{"type":"number","format":"double"}},"required":["items","total"],"type":"object","additionalProperties":false},"GetIntegrationClientUserResponseBody":{"description":"End-user (B2C) que paga a través de la integración.\nEs lo que ve el INTEGRATION_ADMIN en su sección Users.","properties":{"integrationClientUserId":{"type":"string"},"userId":{"type":"string"},"email":{"type":"string"},"joinedAt":{"type":"string"}},"required":["integrationClientUserId","userId","email","joinedAt"],"type":"object","additionalProperties":false},"ListIntegrationClientUsersResponseBody":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GetIntegrationClientUserResponseBody"},"type":"array"},"total":{"type":"number","format":"double"},"limit":{"type":"number","format":"double"},"offset":{"type":"number","format":"double"}},"required":["items","total","limit","offset"],"type":"object","additionalProperties":false},"IntegrationPaymentRequestState":{"enum":["draft","pending","total_payment","canceled","overdue","partial_payment","partial_overdue"],"type":"string"},"GetIntegrationPaymentRequestResponseBody":{"description":"Vista del payment_request para el INTEGRATION_ADMIN.","properties":{"paymentRequestId":{"type":"string"},"integrationReferenceId":{"type":"string","nullable":true},"paidAmount":{"type":"number","format":"double"},"payerEmail":{"type":"string"},"description":{"type":"string","description":"Descripción del cobro (lo que el integrador envía como `description` al crearlo)."},"createdAt":{"type":"string"},"status":{"$ref":"#/components/schemas/IntegrationPaymentRequestState","description":"Estado vigente del cobro, en el enum público de integración (inglés)."}},"required":["paymentRequestId","integrationReferenceId","paidAmount","payerEmail","description","createdAt","status"],"type":"object","additionalProperties":false},"ListIntegrationPaymentRequestsResponseBody":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GetIntegrationPaymentRequestResponseBody"},"type":"array"},"total":{"type":"number","format":"double"},"limit":{"type":"number","format":"double"},"offset":{"type":"number","format":"double"}},"required":["items","total","limit","offset"],"type":"object","additionalProperties":false}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"info":{"title":"Chytapay Integration - Admin API","version":"1.0.0","description":"API de administración para configurar URLs de webhook y redirect_uri","license":{"name":"ISC"},"contact":{"name":"Chytapay Support","email":"contacto@chytapay.com.ar","url":"https://chytapay.com.ar/api/getting-started"}},"paths":{"/my-integration/test-oauth-tokens":{"post":{"operationId":"postTestOAuthTokens","responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTestOAuthTokensResponseBody"}}}},"403":{"description":"Forbidden — not available in production","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["My Integration Test Tokens"],"security":[{"bearer":[]}],"parameters":[]}},"/my-integration/simulate-payment":{"post":{"operationId":"simulatePayment","responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSimulatePaymentResponseBody"}}}},"403":{"description":"Forbidden — CVU does not match caller integration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["My Integration Simulate"],"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSimulatePaymentRequestBody"}}}}}},"/my-integration/url":{"get":{"operationId":"getClientUrl","responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GetClientUrlResponseBody"},"type":"array"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["My Integration Url"],"security":[{"bearer":[]}],"parameters":[]},"post":{"operationId":"createClientUrl","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClientUrlResponseBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["My Integration Url"],"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostClientUrlRequestBody"}}}}}},"/my-integration/url/{clientUrlId}":{"put":{"operationId":"modifyClientUrl","responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetClientUrlResponseBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["My Integration Url"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"clientUrlId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutClientUrlRequestBody"}}}}},"delete":{"operationId":"deleteClientUrl","responses":{"204":{"description":"No content"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["My Integration Url"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"clientUrlId","required":true,"schema":{"type":"string"}}]}},"/my-integration/url/{clientUrlId}/test":{"post":{"operationId":"testClientUrl","responses":{"200":{"description":"Resultado del test","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestClientUrlResponseBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["My Integration Url"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"clientUrlId","required":true,"schema":{"type":"string"}}]}},"/setup/clients":{"post":{"operationId":"postClient","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostClientResponseBody"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostClientRequestBody"}}}}},"get":{"operationId":"listIntegrationClients","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationClientsResponseBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"PLATFORM_ADMIN: list all integration clients (admin portal overview).","tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"double","type":"number"}},{"in":"query","name":"offset","required":false,"schema":{"format":"double","type":"number"}}]}},"/setup/clients/admin":{"post":{"operationId":"createIntegrationAdmin","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"properties":{"next_steps":{"items":{"type":"string"},"type":"array"},"credentials":{"properties":{"must_change_password":{"type":"boolean"},"temporary_password":{"type":"string"}},"required":["must_change_password","temporary_password"],"type":"object"},"user":{"properties":{"integration":{"type":"string"},"email":{"type":"string"},"cognitoUser":{"type":"string"},"integrationClientAdminId":{"type":"string"}},"required":["integration","email","cognitoUser","integrationClientAdminId"],"type":"object"},"message":{"type":"string"}},"required":["next_steps","credentials","user","message"],"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostClientAdminRequestBody"}}}}}},"/setup/clients/{integrationClientId}":{"get":{"operationId":"getIntegrationClientById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationClientResponseBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"PLATFORM_ADMIN: get a specific integration client by id.\nThrows ClientNotFoundError → 404 if missing.","tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"integrationClientId","required":true,"schema":{"type":"string"}}]},"patch":{"operationId":"patchIntegrationClientById","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationClientResponseBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"PLATFORM_ADMIN: partially update an integration client.\nOnly whitelisted fields (see PatchIntegrationClientRequestBody) are accepted.\nThrows ClientNotFoundError → 404 if missing.","tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"integrationClientId","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchIntegrationClientRequestBody"}}}}},"delete":{"operationId":"deleteIntegrationClient","responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"PLATFORM_ADMIN: cascade soft-delete de la integración + sus admins +\nURLs + webhook subs en DB. Best-effort cleanup en Cognito (admins +\napp client). Pensado para que se pueda recrear con el mismo email\nsin chocar contra UsernameExistsException.","tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"integrationClientId","required":true,"schema":{"type":"string"}}]}},"/setup/clients/{integrationClientId}/admins":{"get":{"operationId":"listClientAdmins","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListClientAdminsResponseBody"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"PLATFORM_ADMIN: list admins for a specific integration client.\nEach item is enriched with Cognito UserStatus (active / pending / unknown).","tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"integrationClientId","required":true,"schema":{"type":"string"}}]}},"/setup/clients/{integrationClientId}/admins/{integrationClientAdminId}/reset-password":{"post":{"operationId":"resetClientAdminPassword","responses":{"204":{"description":"No Content"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Admin or integration not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"PLATFORM_ADMIN: reset the admin's Cognito password to a fresh temp + email\nthe new credentials. Used when the admin lost access (no recibió email,\npassword en limbo, etc.). Cognito marks the user FORCE_CHANGE_PASSWORD —\nel flow de /change-password se dispara en el primer login.","tags":["Clients","internal"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"integrationClientId","required":true,"schema":{"type":"string"}},{"in":"path","name":"integrationClientAdminId","required":true,"schema":{"type":"string"}}]}},"/my-integration/me":{"get":{"operationId":"getMyIntegration","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationClientResponseBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"Returns the integration_client the calling INTEGRATION_ADMIN administers.\nThe id is resolved by `integrationAdminAuthMiddleware` and placed in\n`res.locals.integrationClientId` BEFORE this controller runs. Missing\nvalue here means middleware misconfiguration and is treated as auth error.","tags":["My Integration"],"security":[{"bearer":[]}],"parameters":[]}},"/my-integration":{"patch":{"operationId":"patchMyIntegration","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetIntegrationClientResponseBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"Partial update of the caller's own integration.","tags":["My Integration"],"security":[{"bearer":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchIntegrationClientRequestBody"}}}}}},"/my-integration/users":{"get":{"operationId":"listMyIntegrationUsers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationClientUsersResponseBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"Paginated list of B2C end-users associated with the calling integration.\nUseful for the INTEGRATION_ADMIN to monitor adoption.","tags":["My Integration"],"security":[{"bearer":[]}],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"double","type":"number"}},{"in":"query","name":"offset","required":false,"schema":{"format":"double","type":"number"}}]}},"/my-integration/payment-requests":{"get":{"operationId":"listMyIntegrationPaymentRequests","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationPaymentRequestsResponseBody"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}}},"description":"Paginated list of payment_requests issued through the calling integration.\nOptional date range filter on create_date (inclusive bounds, ISO date strings).","tags":["My Integration"],"security":[{"bearer":[]}],"parameters":[{"in":"query","name":"limit","required":false,"schema":{"format":"double","type":"number"}},{"in":"query","name":"offset","required":false,"schema":{"format":"double","type":"number"}},{"in":"query","name":"dateFrom","required":false,"schema":{"type":"string"}},{"in":"query","name":"dateTo","required":false,"schema":{"type":"string"}}]}},"/my-integration/commerce-account/{userId}":{"delete":{"operationId":"deleteCommerceAccount","responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChytaError"},"examples":{"Example 1":{}}}}}},"description":"Unlinks a previously-linked B2C account from the calling integration.\nSoft-deletes the integration_client_user row for the (integrationClientId,\nuserId) pair.\n\nReturns 204 on success, 404 if no active link exists for that pair.\n\nMVP does NOT pre-check pending payment_requests — see service doc for the\nedge case and follow-up plan.","tags":["My Integration"],"security":[{"bearer":[]}],"parameters":[{"in":"path","name":"userId","required":true,"schema":{"type":"string"}}]}}},"servers":[{"url":"https://integration-admin-api.chytapay.com.ar","description":"PROD"},{"url":"https://integration-admin-api.test.chytapay.com.ar","description":"TEST"},{"url":"https://integration-admin-api.dev.chytapay.com.ar","description":"DEV"}]}