### Endpoint Get Account (OpenAPI) Source: https://context7_llms Define el endpoint para obtener información de la cuenta del usuario. Especifica la ruta, el método HTTP (GET), las posibles respuestas (200 OK y 400 Bad Request) y los esquemas de datos asociados. ```json {"openapi":"3.0.0","info":{"title":"My Title","version":"1.0.0"},"servers":[{"url":"https://localhost:44339"}],"paths":{"/subscriptions/api/Account":{"get":{"tags":["Account"],"summary":"Get account","operationId":"Account_GetAccount","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"recurringPaymentCallback":{"type":"string","nullable":true}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"code":{"type":"integer","description":"包含針對 HTTP 所定義的狀態碼值。","enum":[100,101,102,103,200,201,202,203,204,205,206,207,208,226,300,300,301,301,302,302,303,303,304,305,306,307,307,308,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,421,422,423,424,426,428,429,431,451,500,501,502,503,504,505,506,507,508,510,511]},"message":{"type":"string","nullable":true},"subCode":{"type":"integer","format":"int32"}}}}}}}}}}} ``` -------------------------------- ### GET /subscriptions/api/Subscriptors/subscriptions Source: https://context7_llms Retrieves a list of subscriptions. This endpoint provides comprehensive details about each subscription, including subscriber information, transaction history, and electronic billing status. ```APIDOC ## GET /subscriptions/api/Subscriptors/subscriptions ### Description Retrieves a list of subscriptions. This endpoint provides comprehensive details about each subscription, including subscriber information, transaction history, and electronic billing status. ### Method GET ### Endpoint /subscriptions/api/Subscriptors/subscriptions ### Parameters ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **remainingRecurrences** (integer) - The number of remaining recurrences for the subscription. - **subscriptorId** (integer) - The ID of the subscriber. - **subscriptor** (object) - Details about the subscriber. - **transactions** (array) - A list of transactions associated with the subscription. - **jobId** (string) - The ID of the associated job. - **subscriptionId** (string) - The unique identifier for the subscription. - **subscription** (object) - Details about the subscription itself. - **instrumentId** (string) - The ID of the instrument used for the subscription. - **instrument** (object) - Details about the instrument. - **electronicBillingId** (integer) - The ID for electronic billing. - **electronicBilling** (object) - Information about the electronic billing configuration. #### Response Example { "remainingRecurrences": 5, "subscriptorId": 12345, "subscriptor": { "id": 12345, "name": "John Doe", "email": "john.doe@example.com" }, "transactions": [ { "transactionId": "tx_abc123", "amount": 50.00, "date": "2023-10-27T10:00:00Z", "transactionRequestItem": { "description": "Monthly Subscription Fee" } } ], "jobId": "job_xyz789", "subscriptionId": "sub_def456", "subscription": { "plan": "Premium", "startDate": "2023-10-01T00:00:00Z" }, "instrumentId": "inst_ghi789", "instrument": { "type": "Credit Card", "last4": "1234" }, "electronicBillingId": 9876, "electronicBilling": { "internalId": 9876, "caeNumber": "CAE123456789", "series": "A", "number": 1001 } } #### Error Response (400) - **code** (integer) - The HTTP status code. - **message** (string) - A message describing the error. - **subCode** (integer) - A sub-code for the error. #### Error Response (404) - **description** - ClientSecret is wrong ``` -------------------------------- ### Asociar Suscripción vía API Source: https://context7_llms Permite vincular un tipo de suscripción a un suscriptor directamente desde tu sistema utilizando el endpoint 'subscriptors'. No requiere interacción manual en el backoffice. ```python import requests url = "https://api.example.com/subscriptors" headers = { "Content-Type": "application/json" } data = { "external_id": "SUBSCRIBER_EXTERNAL_ID", "subscription_type": "PREMIUM" } response = requests.post(url, headers=headers, json=data) if response.status_code == 200: print("Suscripción asociada exitosamente.") else: print(f"Error al asociar suscripción: {response.text}") ``` -------------------------------- ### Estructura Básica de Callback (JSON) Source: https://context7_llms Representa la estructura de datos común presente en todos los callbacks enviados por el sistema de suscripciones de Plexo. Incluye información general sobre la notificación. ```json { "NotificationType": "TipoDeNotificación", "SubscriptionId": "ID de la suscripción", "TransactionID": "ID de la transacción", "Result": true o false } ``` -------------------------------- ### Datos de Pago Fallido (PaymentFailure) Source: https://context7_llms Contiene la información específica para un callback de pago fallido. Incluye el número de intentos realizados y detalles de la suscripción fallida. ```json { "NotificationType": "PaymentFailure", "SubscriptionId": "...", "TransactionID": "...", "Result": false, "TimesAttempted": "Cantidad de intentos fallidos", "ExternalId": "ID externo del suscriptor", "SubscriptionTypeId": "...", "SubscriptionTypeName": "..." } ``` -------------------------------- ### Forzar Renovación de Suscripción (API) Source: https://context7_llms Este endpoint permite forzar manualmente la renovación de una suscripción. Es útil para iniciar un ciclo de pago o intentar una renovación que no ocurrió automáticamente. Requiere el token de la suscripción. ```bash POST /api/subscriptors/force/{subscriptionToken} ``` -------------------------------- ### Datos de Renovación Automática (RecurringPayment) Source: https://context7_llms Detalla los campos específicos incluidos en un callback de renovación automática exitosa. Proporciona información sobre el cobro, el suscriptor y los detalles de la suscripción. ```json { "NotificationType": "RecurringPayment", "SubscriptionId": "...", "TransactionID": "...", "Result": true, "BillId": "ID del cobro", "Instrument": "Medio de pago usado", "SubscriberName": "Nombre del cliente", "Amount": "Monto pagado", "PercentageTax": "Porcentaje de impuestos", "Currency": "Moneda utilizada", "PaymentDate": "Fecha del pago", "ExternalId": "ID externo (si aplica)", "SubscriptionTypeId": "...", "SubscriptionTypeName": "...", "Authorization": "...", "Ticket": "...", "Success": true, "ErrorString": null } ``` -------------------------------- ### Enumerado NotificationType (C#) Source: https://context7_llms Define los diferentes tipos de eventos que pueden ser comunicados a través de los callbacks del sistema. Incluye tipos como pagos fallidos, cancelaciones, renovaciones y registro de instrumentos. ```csharp public enum NotificationType { PaymentFailure = 0, // Pago fallido TransactionCancellation, // Cancelación de transacción SubscriptionCancellation, // Cancelación de suscripción RecurringPayment, // Renovación/pago recurrente SubscriptorData, // Datos del suscriptor InstrumentRegistration // Nuevo - Registro de instrumento (desde 13/08) } ``` -------------------------------- ### Datos de Cancelación de Transacción (TransactionCancellation) Source: https://context7_llms Detalla los campos incluidos en un callback de cancelación de transacción. Proporciona información sobre el cliente, suscriptor, transacción y el motivo de la cancelación. ```json { "NotificationType": "TransactionCancellation", "SubscriptionId": "...", "TransactionID": "...", "Result": false, "PlexoReferenceId": "ID de referencia de la transacción", "ClientId": "...", "ClientName": "...", "SubscriptorId": "...", "SubscriptorExternalId": "...", "SubscriptionName": "...", "SubscriptionTypeId": "...", "SubscriptionStatus": "...", "SubscriptionToken": "...", "TransactionAmount": "...", "Currency": "...", "TransactionDate": "...", "InstrumentId": "...", "InstrumentToken": "...", "IssuerName": "...", "Name": "...", "Status": "Estado final", "IssuerAuthCode": "...", "Ticket": "...", "ErrorText": "...", "ErrorCode": "...", "CancellationDate": "Fecha de cancelación" } ``` -------------------------------- ### Account API Source: https://context7_llms Retrieves account information. ```APIDOC ## GET /subscriptions/api/Account ### Description Get account details. ### Method GET ### Endpoint /subscriptions/api/Account ### Parameters ### Request Example (No request body for GET request) ### Response #### Success Response (200) - **recurringPaymentCallback** (string) - The callback URL for recurring payments. #### Response Example ```json { "recurringPaymentCallback": "string" } ``` #### Error Response (400) - **code** (integer) - HTTP status code. - **message** (string) - Error message. - **subCode** (integer) - Specific error code. #### Response Example ```json { "code": 400, "message": "Bad Request", "subCode": 100 } ``` ``` -------------------------------- ### Subscription Data Structure Source: https://context7_llms Describes the overall subscription data, including historic data, retry configurations, notification permissions, and links. ```json { "historicData": { "type": "array", "nullable": true, "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "integer", "format": "int32" }, "date": { "type": "string", "format": "date" }, "totalSubscriptors": { "type": "integer", "format": "int32" } } } }, "retriesConfiguration": { "type": "integer", "description": "", "enum": [ 0, 1 ] }, "notificationPermissionsId": { "type": "integer", "format": "int32" }, "notificationPermissions": { "nullable": true, "oneOf": [ { "allOf": [ { "type": "object", "additionalProperties": false }, { "type": "object", "additionalProperties": false, "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int32" }, "transactionCancellation": { "type": "boolean" }, "subscriptionCancellation": { "type": "boolean" }, "subscriptorFields": { "type": "boolean" }, "paymentSuccess": { "type": "boolean" }, "paymentFailed": { "type": "boolean" } } } ] } ] } } ``` -------------------------------- ### Cancelar Suscripción (API) Source: https://context7_llms Este endpoint se utiliza para cancelar manualmente una suscripción. Al invocarlo, la suscripción transicionará al estado 'Cancelado'. Se necesita el token de la suscripción para la operación. ```bash /cancel/{subscriptionToken} ``` -------------------------------- ### POST /subscriptions/api/Commerces Source: https://context7_llms Adds a new commerce to the system. This endpoint is useful for managing commerce data outside of the BackOffice. ```APIDOC ## POST /subscriptions/api/Commerces ### Description Adds a new commerce to the system. This endpoint is useful for managing commerce data outside of the BackOffice. ### Method POST ### Endpoint /subscriptions/api/Commerces ### Parameters #### Header Parameters - **clientSecret** (string) - Optional - The secret key for the client. - **clientId** (string) - Optional - The ID of the client. #### Request Body - **softDescriptor** (string) - Optional - The soft descriptor for the commerce. - **commerceNumber** (string) - Optional - The commerce number. - **terminalNumber** (string) - Optional - The terminal number. - **issuerId** (integer) - Required - The ID of the issuer. - **clientId** (string) - Required - The ID of the client. - **availableBanks** (string) - Optional - Information about available banks. - **acquirer** (string) - Optional - The acquirer details. - **accountNumber** (string) - Optional - The account number. - **crossBankTransfers** (string) - Optional - Information about cross-bank transfers. - **merchantCategoryCode** (string) - Optional - The merchant category code. - **rut** (string) - Optional - The RUT (Rol Único Tributario) of the commerce. ### Request Example ```json { "softDescriptor": "SOFTDESC", "commerceNumber": "12345", "terminalNumber": "67890", "issuerId": 1, "clientId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "availableBanks": "Bank A, Bank B", "acquirer": "ACME Corp", "accountNumber": "9876543210", "crossBankTransfers": "Allowed", "merchantCategoryCode": "5999", "rut": "12345678-9" } ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the created commerce. - **issuer** (object) - Details of the issuer associated with the commerce. - **id** (integer) - The issuer's ID. - **name** (string) - The issuer's name. - **issuerImageUrl** (string) - The URL of the issuer's image. - **fields** (array) - A list of fields associated with the issuer. - **labelName** (string) - The name of the field. - **fieldType** (integer) - The type of the field. - **required** (boolean) - Whether the field is required. - **client** (object) - Details of the client associated with the commerce. - **id** (string) - The client's ID. - **name** (string) - The client's name. - **legalName** (string) - The client's legal name. - **legalId** (string) - The client's legal ID. - **recurringPaymentUrl** (string) - The URL for recurring payments. - **plexoCommerceId** (integer) - The Plexo commerce ID. - **taxPercentage** (number) - The client's tax percentage. - **admin** (object) - Details of the client's administrator. - **userId** (string) - The administrator's user ID. - **userName** (string) - The administrator's username. - **clientId** (string) - The administrator's client ID. - **subscriptionTypesDto** (array) - A list of subscription types offered by the client. - **id** (integer) - The subscription type ID. - **name** (string) - The name of the subscription type. - **description** (string) - The description of the subscription type. - **frequence** (integer) - The frequency of the subscription. - **subscriptionBaseCost** (number) - The base cost of the subscription. - **currency** (integer) - The currency of the subscription cost. - **recurrence** (integer) - The recurrence pattern. - **regularType** (boolean) - Whether it's a regular subscription type. - **taxPercentage** (string) - The tax percentage for the subscription. - **commercesDto** (array) - A list of associated commerce data. - **subscriptorsDto** (array) - A list of subscribers associated with the client. - **id** (integer) - The subscriber's ID. - **externalId** (string) - The subscriber's external ID. - **email** (string) - The subscriber's email address. - **name** (string) - The subscriber's name. - **fullName** (string) - The subscriber's full name. - **postalCode** (string) - The subscriber's postal code. - **instrument** (object) - Payment instrument details of the subscriber. - **id** (string) - The payment instrument ID. - **expiration** (string) - The expiration date of the instrument. - **issuerImageUrl** (string) - The URL of the issuer's image. - **issuerName** (string) - The name of the issuer. - **name** (string) - The name of the payment instrument. - **token** (string) - The token associated with the instrument. - **plexoExtendedResponse** (string) - Extended response from Plexo. - **optionalUniqueID** (string) - An optional unique identifier. - **clientDto** (object) - Client details for the subscriber. #### Response Example ```json [ { "id": 1, "issuer": { "id": 1, "name": "Example Bank", "issuerImageUrl": "https://example.com/issuer.png", "fields": [ { "labelName": "Account Number", "fieldType": 257, "required": true } ] }, "client": { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Client Corp", "legalName": "Client Corporation Inc.", "legalId": "LEGALID123", "recurringPaymentUrl": "https://example.com/payment", "plexoCommerceId": 1001, "taxPercentage": 19.00, "admin": { "userId": "user123", "userName": "Admin User", "clientId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" }, "subscriptionTypesDto": [ { "id": 1, "name": "Basic Plan", "description": "A basic subscription plan.", "frequence": 1, "subscriptionBaseCost": 10.00, "currency": 1, "recurrence": 30, "regularType": true, "taxPercentage": "19%" } ], "commercesDto": [], "subscriptorsDto": [ { "id": 1, "externalId": "EXTID456", "email": "subscriber@example.com", "name": "John Doe", "fullName": "John Doe", "postalCode": "12345", "instrument": { "id": "guid-instrument-id", "expiration": "2025-12-31T23:59:59Z", "issuerImageUrl": "https://example.com/card.png", "issuerName": "Card Issuer", "name": "Visa **** 1234", "token": "guid-token", "plexoExtendedResponse": "Extended data", "optionalUniqueID": "unique-id" }, "clientDto": { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } } ] } } ] ``` ``` -------------------------------- ### Subscription Management API Source: https://context7_llms This section details endpoints related to the subscription management system. ```APIDOC ## GET /subscriptions/api/Subscriptors/subscriptions ### Description Retrieves a list of subscriptions along with detailed subscriptor and instrument information. ### Method GET ### Endpoint /subscriptions/api/Subscriptors/subscriptions ### Parameters #### Query Parameters - **subscriptorId** (integer) - Optional - Filters subscriptions by subscriptor ID. - **subscriptionTypeId** (integer) - Optional - Filters subscriptions by subscription type ID. ### Request Example ```json { "message": "GET request example" } ``` ### Response #### Success Response (200) - **subscriptionId** (string) - The unique identifier for the subscription. - **subscriptor** (object) - Details about the subscriptor. - **id** (integer) - The subscriptor's unique identifier. - **userId** (string) - The user ID associated with the subscriptor. - **firstName** (string) - The subscriptor's first name. - **lastName** (string) - The subscriptor's last name. - **email** (string) - The subscriptor's email address. - **twoFactorAuthenticationEnabled** (boolean) - Flag indicating if two-factor authentication is enabled. - **lockoutEnd** (string) - The date and time when user lockout ends (UTC). - **lockoutEnabled** (boolean) - Flag indicating if the user can be locked out. - **accessFailedCount** (integer) - Number of failed login attempts. - **instrument** (object) - Details about the payment instrument. - **id** (string) - The instrument's unique identifier. - **subscriptorId** (integer) - The ID of the subscriptor to whom the instrument belongs. - **instrumentToken** (string) - The token representing the payment instrument. - **name** (string) - The name of the instrument (e.g., cardholder name). - **issuerName** (string) - The name of the issuer (e.g., Visa, Mastercard). - **issuerImageUrl** (string) - URL for the issuer's logo. - **expiration** (string) - The expiration date of the instrument (YYYY-MM-DD). - **status** (integer) - The status of the instrument (0: Active, 99: Inactive). - **uniqueID** (string) - An optional unique identifier for the instrument. - **plexoExtendedResponse** (string) - Extended response data from PLEXO. #### Response Example ```json { "subscriptionId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "subscriptor": { "id": 101, "userId": "user-abc", "firstName": "John", "lastName": "Doe", "email": "john.doe@example.com", "twoFactorAuthenticationEnabled": true, "lockoutEnd": null, "lockoutEnabled": false, "accessFailedCount": 0 }, "instrument": { "id": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "subscriptorId": 101, "instrumentToken": "tok_123abc", "name": "John Doe", "issuerName": "Visa", "issuerImageUrl": "https://example.com/visa.png", "expiration": "2025-12-31", "status": 0, "uniqueID": "inst-unique-456", "plexoExtendedResponse": "Extended data" } } ``` ### Errors - **400 Bad Request**: Invalid input parameters. - **401 Unauthorized**: Authentication failed. - **404 Not Found**: No subscriptions found for the given criteria. ``` -------------------------------- ### Estructura General del Callback (C#) Source: https://context7_llms Define la estructura común para los Data Transfer Objects (DTOs) utilizados en las notificaciones de callbacks. Incluye campos para el tipo de notificación, IDs de suscripción y transacción, resultado de la operación y mensaje de error. ```csharp public class NotificationDto { public NotificationType NotificationType { get; set; } // Tipo de evento public string SubscriptionId { get; set; } // ID de la suscripción involucrada public string TransactionID { get; set; } // ID de la transacción (si aplica) public bool Result { get; set; } // Indica si la operación fue exitosa public string ErrorString { get; set; } // Mensaje de error en caso de fallo } ``` -------------------------------- ### Callback Types Source: https://context7_llms Details on the different types of callbacks sent by the Plexo subscription system, including the data included for each event. ```APIDOC ## Callback Types ### 1. RecurringPayment Sent upon successful automatic renewal payment. #### Data Included: - `BillId` (string) - ID of the charge. - `Instrument` (string) - Payment method used. - `SubscriberName` (string) - Customer name. - `Amount` (number) - Amount paid. - `PercentageTax` (number) - Tax percentage. - `Currency` (string) - Currency used. - `PaymentDate` (string) - Date of payment. - `ExternalId` (string) - External ID (if applicable). - `SubscriptionTypeId` (string) - Type ID of the subscription. - `SubscriptionTypeName` (string) - Type name of the subscription. - `Authorization` (string) - Processor authorization. - `Ticket` (string) - Processor ticket. - `Success` (boolean) - Payment result. - `ErrorString` (string) - Error reason (if Success is false). ### 2. PaymentFailure Sent when an automatic charge fails. #### Data Included: - `TimesAttempted` (integer) - Number of failed attempts. - `ExternalId` (string) - External subscriber ID. - `SubscriptionTypeId` (string) - Subscription type ID. - `SubscriptionTypeName` (string) - Subscription type name. ### 3. TransactionCancellation Sent when a transaction is cancelled. #### Data Included: - `PlexoReferenceId` (string) - Transaction reference ID. - `ClientId` (string) - Client ID. - `ClientName` (string) - Client name. - `SubscriptorId` (string) - Subscriber ID. - `SubscriptorExternalId` (string) - Subscriber external ID. - `SubscriptionName` (string) - Subscription name. - `SubscriptionTypeId` (string) - Subscription type ID. - `SubscriptionStatus` (string) - Subscription status. - `SubscriptionToken` (string) - Subscription token. - `TransactionAmount` (number) - Transaction amount. - `Currency` (string) - Currency. - `TransactionDate` (string) - Transaction date. - `InstrumentId` (string) - Instrument ID. - `InstrumentToken` (string) - Instrument token. - `IssuerName` (string) - Issuer name. - `Name` (string) - Name. - `Status` (string) - Final status. - `IssuerAuthCode` (string) - Issuer authorization code. - `Ticket` (string) - Ticket. - `ErrorText` (string) - Error text. - `ErrorCode` (string) - Error code. - `CancellationDate` (string) - Cancellation date. ### 4. Other Available Types - `SubscriptionCancellation` (string): Sent when a subscription is cancelled. - `SubscriptorData` (string): Subscriber data created or modified. - `InstrumentRegistration` (string): A new payment method is registered. ``` -------------------------------- ### Subscription Details API Source: https://context7_llms Retrieves detailed information about a specific subscription, including its transactions, payment requests, and subscriber data. ```APIDOC ## GET /subscriptions/{subscriptionId} ### Description Fetches the details of a specific subscription identified by its unique ID. This includes associated transactions, payment requests, and subscriber information. ### Method GET ### Endpoint /subscriptions/{subscriptionId} ### Parameters #### Path Parameters - **subscriptionId** (string) - Required - The unique identifier of the subscription. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the subscription. - **amount** (number) - The subscription amount. - **currency** (integer) - The currency of the subscription amount (e.g., 1 for USD, 2 for EUR). - **paymentRequestItemStatus** (integer) - The status of the payment request item (e.g., 1 for Pending, 2 for Paid, 3 for Failed). - **transactionRequestFileId** (string) - The ID of the transaction request file. - **transactionRequestFile** (object) - Details of the transaction request file, including name, URL, and client information. - **subscriptorId** (integer) - The ID of the subscriber. - **subscriptor** (object) - Information about the subscriber. - **transactions** (array) - A list of transactions associated with the subscription. - **jobId** (string) - The ID of the associated job. - **subscriptionId** (string) - The ID of the subscription (redundant if fetched by ID). - **subscription** (object) - Details of the subscription itself. - **instrumentId** (string) - The ID of the payment instrument. - **instrument** (object) - Details of the payment instrument. - **electronicBillingId** (integer) - The ID for electronic billing. - **electronicBilling** (object) - Electronic billing details. - **remainingRecurrences** (integer) - The number of remaining recurrences for the subscription. #### Response Example ```json { "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "amount": 50.00, "currency": 1, "paymentRequestItemStatus": 2, "transactionRequestFileId": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "transactionRequestFile": { "id": "f0e9d8c7-b6a5-4321-fedc-ba9876543210", "name": "Transaction File 1", "url": "http://example.com/files/tx1.pdf", "clientId": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "client": {}, "transactionRequestItems": [], "date": "2023-10-27T10:00:00Z" }, "subscriptorId": 123, "subscriptor": {}, "transactions": [], "jobId": null, "subscriptionId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "subscription": {}, "instrumentId": "g1h2i3j4-k5l6-7890-mnop-qrstuvwxyzabcd", "instrument": {}, "electronicBillingId": null, "electronicBilling": null, "remainingRecurrences": 5 } ``` ``` -------------------------------- ### Configuration: Client Secret Management Source: https://context7_llms API endpoint or section for managing the client secret used for authentication or system integration. ```APIDOC ## PUT /config/client-secret ### Description Allows updating or managing the client secret for the subscription system integration. ### Method PUT ### Endpoint `/config/client-secret` ### Parameters #### Request Body - **client_id** (string) - Required - The identifier of the client. - **new_secret** (string) - Required - The new client secret. ### Request Example ```json { "client_id": "client_abc123", "new_secret": "new_super_secret_key" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation of secret update. #### Response Example ```json { "message": "Client secret updated successfully." } ``` ``` -------------------------------- ### Subscriptions API - Create Subscriptor Source: https://context7_llms Allows for the creation of new subscriptor records within the Subscriptions API. ```APIDOC ## POST /subscriptions/api/Subscriptors ### Description Creates a new subscriptor record. ### Method POST ### Endpoint /subscriptions/api/Subscriptors ### Parameters #### Request Body - **client** (object) - Required - Contains client details. - **internalId** (integer) - Required - The internal ID of the client. - **name** (string) - Required - The name of the client. - **documentType** (string) - Required - The type of document for the client (e.g., 'CI', 'RUC'). - **documentNumber** (string) - Required - The client's document number. - **electronicBilling** (object) - Optional - Electronic billing details. - **internalId** (integer) - Required - Internal ID for electronic billing. - **caeNumber** (string) - Required - CAE number for electronic billing. - **series** (string) - Required - Series for electronic billing. - **number** (integer) - Required - Number for electronic billing. - **remainingRecurrences** (integer) - Optional - The number of remaining recurrences for the subscription. ### Request Example ```json { "client": { "internalId": 456, "name": "Acme Corporation", "documentType": "RUC", "documentNumber": "1234567890", "electronicBilling": { "internalId": 789, "caeNumber": "CAE98765432", "series": "B", "number": 2000 } }, "remainingRecurrences": 12 } ``` ### Response #### Success Response (200) - **links** (array) - An array containing the newly created subscriptor object, similar to the GET response. #### Response Example ```json { "links": [ { "externalId": "sub-67890", "firstName": null, "lastName": null, "email": null, "status": 1, "clientId": "cli-fghij", "subscriptorId": 988, "subscriptor": { "internalId": 456, "name": "Acme Corporation", "documentType": "RUC", "documentNumber": "1234567890", "electronicBilling": { "internalId": 789, "caeNumber": "CAE98765432", "series": "B", "number": 2000 } }, "canUpdateSubscriptorData": true } ] } ``` ```