### Account and Device Configuration Example Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P This snippet shows an example of how account and device configurations might be structured. It includes payment provider metadata and POS system configurations with usernames and passwords. ```json { "paymentProviderMeta":[ { "paymentProviderMetaId":"30511d88-00c4-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"SoftPosUrl", "value":"https://www.simprasuite.com/payment" }, { "paymentProviderMetaId":"675e0903-c48a-ee11-af8c-005056bf2f5c", "paymentProviderMetaCode":"SubtenantId", "value": "" } ], "posSystems":[ { "posSystemId":"GmuPos", "enabled":true, "configs":[ { "posSystemMetaId":"1a681309-eeb8-ed11-af7d-005056bf2f5c", "posSystemMetaCode":"username", "value":"76459837102" }, { "posSystemMetaId":"1b681309-eeb8-ed11-af7d-005056bf2f5c", "posSystemMetaCode":"password", "value":"2277EEFA" } ] } ], "accountId":"a632f7ae-18ad-44a6-81cb-d15bb00962b4", "serialNumber":"76459837102", "description":"Onboarding Test Cihazı 2", "slipInformation":null, "fields":[ null ], "addSlipToFooter":true } ``` -------------------------------- ### Branch Creation with Simpra Quick Setup Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P This endpoint is used to create a branch and configure Simpra Quick setup parameters. It requires detailed information about the merchant, terminal, and payment configurations. ```APIDOC ## POST /administrative/enterprise/{enterpriseId}/branch ### Description Creates a new branch for an enterprise and configures Simpra Quick setup parameters. This includes terminal definitions, payment provider details, and optional configurations like installment options and bonus support. ### Method POST ### Endpoint `/administrative/enterprise/{enterpriseId}/branch` ### Parameters #### Path Parameters - **enterpriseId** (string) - Required - The ID of the enterprise to which the branch will be added. #### Request Body - **simpraQuickSetup** (object) - Required - Configuration object for Simpra Quick setup. - **devices** (array) - Required - List of devices associated with the branch. - **terminalId** (string) - Required - The unique identifier for the terminal. - **installmentOptions** (array) - Optional - Configuration for installment payments. - **minAmount** (number) - Optional - Minimum amount for installment eligibility. - **maxAmount** (number) - Optional - Maximum amount for installment eligibility. - **rates** (array) - Optional - List of installment rates. - **count** (integer) - Required - Number of installments. - **rate** (number) - Required - Interest rate for the installment. - **paymentProvider** (object) - Required - Details of the payment provider. - **paymentProviderId** (string) - Required - Identifier for the payment provider (e.g., "SimpraPay"). - **paymentProviderApplicationId** (string) - Required - Application ID for the payment provider. - **configs** (object) - Required - Configuration settings for the payment provider. - **BonusSupport** (boolean) - Optional - Whether Bonus support is enabled (default: false). - **AcqTenantId** (string) - Required - Acquiring tenant ID (bank code). - **MerchantNameLocation** (string) - Required - Location name of the merchant. - **MerchantNameToPrint** (string) - Required - Name of the merchant to be printed on the slip. - **ProgrammeId** (string) - Required - Program ID for specific features like installments, provided by Propay. ### Request Example ```json { "simpraQuickSetup": { "devices": [ { "terminalId": "12345678", "installmentOptions": [ { "minAmount": 0, "maxAmount": 99999, "rates": [ { "count": 2, "rate": 0 }, { "count": 3, "rate": 0.10 } ] } ] } ], "paymentProvider": { "paymentProviderId": "SimpraPay", "paymentProviderApplicationId": "399e7d51-0211-ef11-af94-005056bf2f5c", "configs": { "BonusSupport": "false", "AcqTenantId": "000206", "MerchantNameLocation": "Istanbul", "MerchantNameToPrint": "Üye İş Yeri İsmi", "ProgrammeId": "Dummy_Test" } } } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of successful branch creation. #### Response Example ```json { "message": "Branch created successfully." } ``` ``` -------------------------------- ### Initial Database Script for SuperAdmin and Integration User Setup (SQL) Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/gmu-basket-api-T9VYrDdIiv This SQL script is used after the initial application setup to create the Basket tables and insert SuperAdmin and integration user records into the dbo.[User] table. It also updates modification information and enables system versioning for the User table. Ensure you replace placeholder IDs with actual GUIDs. ```sql ALTER TABLE dbo.[User] SET (SYSTEM_VERSIONING = OFF) insert into dbo.[User] (IntegrationId, Username, PasswordHash, Role, FirstName, LastName) values ('', N'okcapi@protel.com.tr', null, N'Admin', N'Okc', N'Admin'); insert into dbo.[User] (IntegrationId, Username, PasswordHash, Role, FirstName, LastName) values ('', N'okcapiint@protel.com.tr', null, N'Integration', N'Okc', N'Integration'); update dbo.[User] set ModifiedBy = (select Id from dbo.[User] where Username = N'okcapi@protel.com.tr') where ModifiedBy is null; alter table dbo.[UserHistory] alter column ModifiedBy bigint NOT NULL; alter table dbo.[User] alter column ModifiedBy bigint NOT NULL; alter table dbo.[User] set (SYSTEM_VERSIONING = ON (HISTORY_TABLE = dbo.UserHistory)); ``` -------------------------------- ### Keycloak Client Scopes Example Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/gmu-pos-kurulum-OJKUACsG5h This snippet illustrates example client scopes used in Keycloak. These scopes define permissions for clients, and if a required scope is missing from a client's token, the associated operations cannot be performed. ```text Ornek - agent/Discount.apply ---> bu scope yok ise ceke indirim uygulama yetkiniz yok demektir. agent/Order.listBranch agent/Order.refund agent/Payment.cash agent/Payment.creditCard branchMangement/Discount.create branchMangement/Product.assign branchMangement/Product.create branchMangement/ProductGroup.assign branchMangement/ProductGroup.create branchMangement/Report.manager branchMangement/Report.read ``` -------------------------------- ### Keycloak Roles Example Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/gmu-pos-kurulum-OJKUACsG5h This snippet shows example roles defined in Keycloak. Roles are used to grant permissions for specific API operations. If a user is not assigned a required role, they cannot perform actions associated with that role. ```text Ornek - Admin -- Admin apidaki islemler icin Agent -- Agent apidaki islemler icin BranchAdmin -- BranchAdmin apidaki islemler icin bunlardan admin yetkisi kullanicinizda tanimli degilse admin api herhangi bir islem gerceklestiremezsiniz. ``` -------------------------------- ### Start Simpra Quick Intent Without External Check (Kotlin) Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/basket-entegrasyonu-dZl8ihhA23 Initiates the Simpra Quick process without sending any additional data. This is the simplest way to start the process. It requires the target package name for the result. ```kotlin val intent = Intent("com.simpra.START_BASKET_PROCESS").apply { putExtra( "target_package_name_for_result", "YOUR.PACKAGE.NAME" //applicationContext.packageName ) addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK) } startActivity(intent) ``` -------------------------------- ### Account Creation API Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P Creates a new account in the Simpra Quick system. This is the first step in the onboarding process after completing GMU POS system setup. ```APIDOC ## POST /integrationapi/v1/account ### Description Creates a new account in the Simpra Quick system. The username and password provided will be used for login to the Simpra Quick Android application. The `accountId` returned in the response is crucial for subsequent device creation. ### Method POST ### Endpoint /integrationapi/v1/account ### Parameters #### Request Body - **authServerUserId** (string) - Optional - User ID from your own auth system if not using Keycloak. Must be unique across all systems. - **username** (string) - Required - The username for the Simpra Quick account. - **password** (string) - Required - The password for the Simpra Quick account. - **firstName** (string) - Optional - The first name of the account owner. - **lastName** (string) - Optional - The last name of the account owner. - **accountOwnerId** (string) - Optional - ID of the account owner. - **integrationId** (string) - Optional - ID of the integration. ### Request Example ```json { "authServerUserId": null, "username": "onboardingtest@mail.com", "password": "Quick123*", "firstName": "Onboarding", "lastName": "Test", "accountOwnerId": null, "integrationId": null } ``` ### Response #### Success Response (200) - **accountId** (string) - The unique identifier for the created account. This is used in the device creation endpoint. #### Response Example ```json { "accountId": "a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ``` -------------------------------- ### Envoy Proxy Dockerfile Configuration Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/gmu-pos-kurulum-OJKUACsG5h This example Dockerfile demonstrates how to build a custom Envoy proxy image. It copies necessary certificate and configuration files into the container, replacing the default Envoy configuration with a custom one. ```dockerfile FROM envoyproxy/envoy:v1.21.0 COPY .???.key /etc/envoy/certs/???.key COPY .???.key /etc/envoy/certs/???.key RUN rm -rf /etc/envoy/envoy.yaml COPY ./envoy.yaml /etc/envoy/envoy.yaml ``` -------------------------------- ### Redis Configuration Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/backoffice-kurulumlari-elGluGCznD Details on configuring Redis for token storage, including cluster and sentinel connection setups. ```APIDOC ## Redis Cluster Connection ### Description Configuration for connecting to a Redis cluster. This is necessary when Redis is set up in a cluster mode. ### Environment Variables - **REDIS_HOST** (string): The address of the Master Redis Node. - **REDIS_USE_CLUSTER** (boolean): Set to `true` to enable cluster mode. - **REDIS_CLUSTER_LIST** (string): A comma-separated list of all Slave Redis Node addresses in the format `redis(s)://host:port`. ### Example Cluster List `redis:192.168.1.1:1234,redis:192.168.1.2:1234,redis:192.168.1.3:1234` ### Important Note TLS and Cluster connections cannot be used simultaneously. If `REDIS_USE_CLUSTER` is `true`, then `REDIS_USE_TLS` must be `false`. ``` ```APIDOC ## Redis Sentinel Connection ### Description Configuration for connecting to Redis using Sentinel for high availability. ### Environment Variables - **REDIS_USE_SENTINEL** (boolean): Set to `true` to enable Sentinel mode. - **REDIS_SENTINEL_NAME** (string): The name of the Sentinel group in the environment. - **REDIS_SENTINEL_PASSWORD** (string): The password for the Sentinel connection. - **REDIS_SENTINEL_LIST** (string): A comma-separated list of all active Sentinel node addresses in the format `host:port`. ### Example Sentinel List `192.168.1.1:1234, 192.168.1.2:1234, 192.168.1.3:1234` ``` -------------------------------- ### Create Device with Simpra Quick API Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P This snippet illustrates the process of creating a device within the Simpra Quick system using the `POST-/integrationapi/v1/device` endpoint. It requires the `accountId` from the previous step and the device's `serialNumber`. The snippet also shows how to populate `paymentProvider` and `posSystems` using data obtained from definition endpoints. ```json { "paymentProviderId":"SimpraPay", "paymentProviderApplicationId": "399e7d51-0211-ef11-af94-005056bf2f5c", "paymentProviderConfigs":[ { "paymentProviderMetaId":"17681309-eeb8-ed11-af7d-005056bf2f5c", "paymentProviderMetaCode":"applicationLoginId", "value":"info@simprasuite.com" }, { "paymentProviderMetaId":"18681309-eeb8-ed11-af7d-005056bf2f5c", "paymentProviderMetaCode":"password", "value":"624332424Aew!fX" }, { "paymentProviderMetaId":"19681309-eeb8-ed11-af7d-005056bf2f5c", "paymentProviderMetaCode":"userHash", "value":"fcelik" }, { "paymentProviderMetaId":"0b9ae2f4-d4c3-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"BaseURL", "value":"https://propaytest.protel.com.tr" }, { "paymentProviderMetaId":"0c9ae2f4-d4c3-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"BaseURLPath", "value":"v2" }, { "paymentProviderMetaId":"0d9ae2f4-d4c3-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"DecryptionKey", "value":"YOUR_DECRYPTION_KEY" } ], "posSystems":[ { "posSystemId":"GMUPOS", "posSystemConfigs":[ { "posSystemMetaId":"a1b2c3d4-e5f6-7890-1234-567890abcdef", "posSystemMetaCode":"branchId", "value":"YOUR_BRANCH_ID" } ] } ] } ``` -------------------------------- ### Simpra Quick Kurulum Parametreleri (JSON) Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P Bu JSON yapısı, `POST-/administrative/enterprise/{enterpriseId}/branch` servisi için `simpraQuickSetup` parametrelerini göstermektedir. Terminal kimliği, taksit seçenekleri, ödeme sağlayıcı bilgileri ve banka ile ilgili yapılandırmalar bu alanda tanımlanır. ```json { "simpraQuickSetup": { "devices": [ { "terminalId": "12345678", "installmentOptions": [ { "minAmount": 0, "maxAmount": 99999, "rates": [ { "count": 2, "rate": 0 }, { "count": 3, "rate": 0.10 } ] } ] } ], "paymentProvider": { "paymentProviderId": "SimpraPay", "paymentProviderApplicationId": "399e7d51-0211-ef11-af94-005056bf2f5c", "configs": { "BonusSupport": "false", "AcqTenantId": "000206", "MerchantNameLocation": "Istanbul", "MerchantNameToPrint": "Üye İş Yeri İsmi", "ProgrammeId": "Dummy_Test" } } } } ``` -------------------------------- ### Onboarding Parameters Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/gmu-wQHsmO4ITA Parameters used in onboarding services for tenant, store, and device configurations. ```APIDOC ## Onboarding Service Parameters ### Description Parameters used in onboarding services for tenant, store, and device configurations. ### Method N/A (Configuration parameters, not an API endpoint) ### Endpoint N/A ### Parameters #### Tenant Parameters - **email** (string) - Required - Administrator's email address (1-320 characters). - **password** (string) - Required - Administrator's password (6-60 characters). - **firstName** (string) - Required - Administrator's first name (2-50 characters). - **lastName** (string) - Required - Administrator's last name (2-50 characters). - **phoneNumber** (string) - Optional - Administrator's phone number (10-13 characters). - **languageId** (integer) - Required - User's language ID. - **companyName** (string) - Required - Company name (2-200 characters). - **companyPhoneNumber** (string) - Optional - Company phone number (10-13 characters). - **companyAddress** (string) - Optional - Company address (2-250 characters). - **ownerProductId** (integer) - Optional - ID of the third-party application if the tenant registered through it. - **tenantIntegrationId** (string) - Optional - ID of the integrating party if the tenant was created via an integration (max 100 characters). - **alternateId** (string) - Optional - Alternative to IntegrationId (max 100 characters). - **tenantOwner** (string) - Optional - Name of the Tenant Owner (Reseller). #### Store Parameters - **name** (string) - Required - Store name (2-200 characters). - **taxOffice** (string) - Required - Tax office name (2-100 characters). - **website** (string) - Optional - Website URL (2-150 characters). - **email** (string) - Optional - Email address (max 320 characters). - **phoneNumber** (string) - Optional - Phone number (10-13 characters). - **fax** (string) - Optional - Fax number (10-13 characters). - **room** (string) - Optional - Room number (1-5 characters). - **streetName** (string) - Optional - Street name (2-250 characters). - **buildingName** (string) - Optional - Building name (2-50 characters). - **buildingNumber** (string) - Optional - Building number (1-5 characters). - **citySubdivisionName** (string) - Optional - District name (2-50 characters). - **cityName** (string) - Required - City name (3-30 characters). - **postalCode** (string) - Optional - Postal code (5 characters). - **countryName** (string) - Required - Country name (3-30 characters). - **tradeRegisterNo** (string) - Optional - Trade register number (0-12 characters). Either this or MERSIS number is required. - **mersisNo** (string) - Optional - MERSIS number (0-16 characters). Either this or Trade Register Number is required. - **emailServiceProductId** (integer) - Optional - Email sending service plugin ID. - **accommodationTaxEnabled** (boolean) - Optional - Indicates if accommodation tax is enabled (defaults to false). - **sendEDocumentEmailCopyTo** (string) - Optional - Email address to send a copy of invoices to the merchant. - **docType** (integer) - Required - Document type (1= EInvoice, 2= EArchive, 4= Paper, 5= EDespatch, 7= Esmm, 8= ECheck, 9= NonFinancialSlip). - **gbAlias** (string) - Optional - Sender unit alias (max 128 characters). - **integratorProductId** (integer) - Required - Integrator plugin ID. - **integratorUid** (string) - Optional - Integrator username (max 256 characters). - **integratorPwd** (string) - Optional - Integrator password (max 512 characters). - **integratorOptions** (string) - Optional - Additional integrator information (e.g., KASA, SUBE). - **xsltFileBase64** (string) - Optional - Custom XSLT template for e-documents (defaults to system template if not provided). - **xsltLogoFileBase64** (string) - Optional - Custom logo for e-documents. - **xsltFooterFileBase64** (string) - Optional - Custom HTML footer for e-documents. - **xsltSignatureFileBase64** (string) - Optional - Custom wet signature image for e-documents. - **languageId** (integer) - Optional - Language for which these settings apply. - **emailTemplateKey** (string) - Optional - Document email template ID. - **cancelEmailTemplateKey** (string) - Optional - Cancelled document email template ID. - **emailSubject** (string) - Optional - Email subject text. - **emailingInvoiceAttachmentType** (integer) - Optional - Attachment type for emailed invoices (1= PDF, 2= HTML). - **taxNo** (string) - Required - Tax identification number (VKN/TCKN) (10-11 characters). - **integrationId** (string) - Optional - ID of the integrating party if the store was created via an integration (max 100 characters). - **alternateId** (string) - Optional - Alternative to IntegrationId (max 100 characters). - **deviceApiAccessUsername** (string) - Required - Username for accessing store devices (3-254 characters). - **deviceApiAccessPassword** (string) - Required - Password for accessing store devices (6-60 characters). #### Device Parameters - **serialNumber** (string) - Required - Unique device serial number (5-128 characters). Must be unique for active devices. - **storeId** (string) - Required - ID of the store this record belongs to (min 1 character). - **brand** (string) - Optional - Device brand (2-50 characters). ### Request Example ```json { "tenant": { "email": "admin@example.com", "password": "securepassword123", "firstName": "John", "lastName": "Doe", "languageId": 1, "companyName": "Example Corp", "companyPhoneNumber": "1234567890", "companyAddress": "123 Main St, Anytown" }, "store": { "name": "Main Branch", "taxOffice": "Central Tax Office", "cityName": "Metropolis", "countryName": "Exampleland", "taxNo": "1234567890", "deviceApiAccessUsername": "storeuser", "deviceApiAccessPassword": "devicepass" }, "device": { "serialNumber": "SN1234567890", "storeId": "store-abc-123" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message of successful onboarding. #### Response Example ```json { "message": "Onboarding successful." } ``` #### Error Handling - **400 Bad Request**: Invalid input parameters or missing required fields. - **409 Conflict**: Resource already exists (e.g., duplicate serial number). - **500 Internal Server Error**: Unexpected server error. ``` -------------------------------- ### Create Account with Simpra Quick API Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P This snippet demonstrates how to create an account in the Simpra Quick system using the `POST-/integrationapi/v1/account` endpoint. The request body requires username, password, and optionally `authServerUserId`. Successful creation returns an `accountId` necessary for device creation. ```json { "authServerUserId": null, "username": "onboardingtest@mail.com", "password": "Quick123*", "firstName": "Onboarding", "lastName": "Test", "accountOwnerId": null, "integrationId": null } ``` -------------------------------- ### Create Tenant and Store Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/gmu-wQHsmO4ITA Creates a new tenant and optionally a store within that tenant. This step follows the initial user authorization. ```APIDOC ## POST /integrationapi/v2/User/CustomerByIntegration ### Description Creates a new tenant. If a store needs to be created simultaneously, the `store` object in the request body should be populated. A user for the Backoffice can be created using the `email` and `password` provided in the request body. ### Method POST ### Endpoint `/integrationapi/v2/User/CustomerByIntegration` ### Parameters #### Path Parameters - **tenantId** (string) - Required - The ID of the tenant obtained from the previous authorization step. This should be included in this call. #### Request Body - **email** (string) - Required - Email for the Backoffice user. - **password** (string) - Required - Password for the Backoffice user. - **store** (object) - Optional - If provided, a store will be created within the tenant. - **storeName** (string) - Required if `store` object is present - Name of the store. - **storeTaxNo** (string) - Required if `store` object is present - Tax number of the store. - **companyTaxNo** (string) - Required if `store` object is present - Company tax number. - **deviceApiAccessUsername** (string) - Required if `store` object is present - Username for Android POS client authorization. - **deviceApiAccessPassword** (string) - Required if `store` object is present - Password for Android POS client authorization. ### Request Example ```json { "tenantId": "your_tenant_id", "email": "backoffice_user@example.com", "password": "backoffice_password", "store": { "storeName": "Main Store", "storeTaxNo": "1234567890", "companyTaxNo": "1111111111", "deviceApiAccessUsername": "pos_user", "deviceApiAccessPassword": "pos_password" } } ``` ### Response #### Success Response (200) - **tenantId** (string) - The ID of the tenant. This is the same ID passed in the request. - **storeId** (string) - The ID of the store if it was created. This will be null if the store was not created in this request. #### Response Example ```json { "tenantId": "your_tenant_id", "storeId": "your_store_id" } ``` ``` -------------------------------- ### SendInvoiceTransactionStatusConsistencyError Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/gmu-hata-kodlari-nN6bgIVFGX This error checks the status of the transaction opened during the invoice submission process. If the transaction status is not 'Started', this error is reported. ```APIDOC ## SendInvoiceTransactionStatusConsistencyError ### Description During the invoice submission phase, the status of the opened transaction is verified. This error is generated if the transaction's status is not 'Started'. ### Method N/A (Error Code) ### Endpoint N/A (Error Code) ### Parameters - **transactionStatus** (string) - The current status of the transaction. - **mustBe** (string) - The expected status of the transaction. ### Request Example N/A ### Response #### Error Response - **errorCode** (string) - SendInvoiceTransactionStatusConsistencyError - **errorMessage** (string) - Satış (SaleTransaction) durumu {transactionStatus}. {mustBe} olmalı #### Response Example { "errorCode": "SendInvoiceTransactionStatusConsistencyError", "errorMessage": "Satış (SaleTransaction) durumu Completed. Started olmalı" } ``` -------------------------------- ### Device Creation API Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P Creates a new device and associates it with a previously created account. This endpoint also handles the configuration of payment providers and POS systems. ```APIDOC ## POST /integrationapi/v1/device ### Description Creates a new device and links it to an existing account using the `accountId` from the previous step. It also configures the device with payment provider and POS system details, which can be retrieved using separate definition endpoints. ### Method POST ### Endpoint /integrationapi/v1/device ### Parameters #### Query Parameters - **accountId** (string) - Required - The ID of the account to which the device will be linked. Obtained from the account creation response. - **serialNumber** (string) - Required - The serial number of the device as generated during GMU POS onboarding. - **paymentProviderId** (string) - Required - The ID of the payment provider. - **paymentProviderApplicationId** (string) - Required - The application ID for the payment provider. - **paymentProviderConfigs** (array) - Required - An array of configuration objects for the payment provider. - **paymentProviderMetaId** (string) - Required - The meta ID for the payment provider configuration. - **paymentProviderMetaCode** (string) - Required - The meta code for the payment provider configuration. - **value** (string) - Required - The value for the payment provider configuration. - **posSystems** (array) - Optional - An array of POS system configurations. - **posSystemId** (string) - Required - The ID of the POS system. - **posSystemMetaConfigs** (array) - Required - An array of meta configurations for the POS system. - **posSystemMetaId** (string) - Required - The meta ID for the POS system configuration. - **value** (string) - Required - The value for the POS system configuration. ### Request Example ```json { "paymentProviderId":"SimpraPay", "paymentProviderApplicationId": "399e7d51-0211-ef11-af94-005056bf2f5c", "paymentProviderConfigs":[ { "paymentProviderMetaId":"17681309-eeb8-ed11-af7d-005056bf2f5c", "paymentProviderMetaCode":"applicationLoginId", "value":"info@simprasuite.com" }, { "paymentProviderMetaId":"18681309-eeb8-ed11-af7d-005056bf2f5c", "paymentProviderMetaCode":"password", "value":"624332424Aew!fX" }, { "paymentProviderMetaId":"19681309-eeb8-ed11-af7d-005056bf2f5c", "paymentProviderMetaCode":"userHash", "value":"fcelik" }, { "paymentProviderMetaId":"0b9ae2f4-d4c3-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"BaseURL", "value":"https://propaytest.protel.com.tr" }, { "paymentProviderMetaId":"0c9ae2f4-d4c3-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"BaseURLPath", "value":"v2" }, { "paymentProviderMetaId":"0d9ae2f4-d4c3-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"DecryptionKey", "value":"YOUR_DECRYPTION_KEY" } ], "posSystems":[ { "posSystemId":"ProtelPOS", "posSystemMetaConfigs":[ { "posSystemMetaId":"a1b2c3d4-e5f6-7890-1234-567890abcdef", "value":"YOUR_POS_CONFIG_VALUE" } ] } ] } ``` ### Response #### Success Response (200) - **deviceId** (string) - The unique identifier for the created device. #### Response Example ```json { "deviceId": "f0e1d2c3-b4a5-6789-0123-456789abcdef" } ``` ``` -------------------------------- ### Get Payments API Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/basket-entegrasyonu-dZl8ihhA23 This endpoint retrieves payment information. It is essential for tracking and managing transactions. ```APIDOC ## GET /api/payments ### Description This endpoint retrieves a list of payments. It allows users to view their transaction history. ### Method GET ### Endpoint /api/payments ### Parameters #### Query Parameters - **userId** (string) - Required - The ID of the user whose payments are to be retrieved. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **payments** (array) - A list of payment objects. - **paymentId** (string) - The unique identifier for the payment. - **amount** (number) - The amount of the payment. - **date** (string) - The date the payment was made. #### Response Example ```json { "payments": [ { "paymentId": "pay_123", "amount": 100.50, "date": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Account and Device Configuration Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/simpra-quick-FcHSvR1T1P This section details the structure of account and device configuration objects, including payment provider metadata and POS system settings. ```APIDOC ## Account and Device Configuration Object ### Description Represents the configuration details for an account and its associated devices, including payment provider settings and POS system integration. ### Method N/A (This describes a data structure, not an endpoint) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body This describes the fields within the account and device configuration object: - **paymentProviders** (array) - Optional - A list of payment provider configurations. - **paymentProviderMetaId** (string) - The unique identifier for the payment provider metadata. - **paymentProviderMetaCode** (string) - The code representing the payment provider metadata (e.g., "SoftPosUrl", "SubtenantId"). - **value** (string) - The value associated with the payment provider metadata. - **posSystems** (array) - Optional - A list of Point of Sale (POS) system configurations. - **posSystemId** (string) - The identifier for the POS system (e.g., "GmuPos"). - **enabled** (boolean) - Indicates if the POS system is enabled. - **configs** (array) - Optional - Configuration settings for the POS system. - **posSystemMetaId** (string) - The unique identifier for the POS system metadata. - **posSystemMetaCode** (string) - The code representing the POS system metadata (e.g., "username", "password"). - **value** (string) - The value associated with the POS system metadata. - **accountId** (string) - Required - The unique identifier for the account. - **serialNumber** (string) - Required - The serial number of the device. - **description** (string) - Optional - A description for the account or device. - **slipInformation** (any) - Optional - Information related to slips (can be null). - **fields** (array) - Optional - Additional fields (can contain null values). - **addSlipToFooter** (boolean) - Optional - Indicates whether to add slips to the footer. ### Request Example ```json { "paymentProviders":[ { "paymentProviderMetaId":"30511d88-00c4-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"SoftPosUrl", "value":"https://www.simprasuite.com/payment" }, { "paymentProviderMetaId":"675e0903-c48a-ee11-af8c-005056bf2f5c", "paymentProviderMetaCode":"SubtenantId", "value": "" } ], "posSystems":[ { "posSystemId":"GmuPos", "enabled":true, "configs":[ { "posSystemMetaId":"1a681309-eeb8-ed11-af7d-005056bf2f5c", "posSystemMetaCode":"username", "value":"76459837102" }, { "posSystemMetaId":"1b681309-eeb8-ed11-af7d-005056bf2f5c", "posSystemMetaCode":"password", "value":"2277EEFA" } ] } ], "accountId":"a632f7ae-18ad-44a6-81cb-d15bb00962b4", "serialNumber":"76459837102", "description":"Onboarding Test Cihazı 2", "slipInformation":null, "fields":[ null ], "addSlipToFooter":true } ``` ### Response #### Success Response (200) This structure would typically be returned upon successful creation or retrieval of an account and device configuration. The exact fields returned may vary based on the operation. #### Response Example (Example response structure would be similar to the request body, potentially with added fields like creation timestamps or status indicators) ```json { "paymentProviders":[ { "paymentProviderMetaId":"30511d88-00c4-ed11-af7f-005056bf2f5c", "paymentProviderMetaCode":"SoftPosUrl", "value":"https://www.simprasuite.com/payment" }, { "paymentProviderMetaId":"675e0903-c48a-ee11-af8c-005056bf2f5c", "paymentProviderMetaCode":"SubtenantId", "value": "" } ], "posSystems":[ { "posSystemId":"GmuPos", "enabled":true, "configs":[ { "posSystemMetaId":"1a681309-eeb8-ed11-af7d-005056bf2f5c", "posSystemMetaCode":"username", "value":"76459837102" }, { "posSystemMetaId":"1b681309-eeb8-ed11-af7d-005056bf2f5c", "posSystemMetaCode":"password", "value":"2277EEFA" } ] } ], "accountId":"a632f7ae-18ad-44a6-81cb-d15bb00962b4", "serialNumber":"76459837102", "description":"Onboarding Test Cihazı 2", "slipInformation":null, "fields":[ null ], "addSlipToFooter":true } ``` ``` -------------------------------- ### Basket SDK - Get Check Details Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/sss-q0vc4PZeVP Retrieve detailed information about a specific check (basket) using its sequence number. This service is part of the Basket SDK functionality. ```APIDOC ## Get Check Details ### Description Retrieves the details of a specific check (basket) using its sequence number. This is a key operation within the Basket SDK for accessing stored check information. ### Method GET ### Endpoint `/api/checks/{chkSeq}` ### Parameters #### Path Parameters - **chkSeq** (string) - Required - The sequence number of the check whose details are to be retrieved. ### Request Example (No request body needed for this GET request) ### Response #### Success Response (200) - (Details of the check, including product information, etc. - specific fields depend on the API implementation) #### Response Example ```json { "checkSequence": "your_chkSeq", "products": [ { "productId": "prod123", "name": "Sample Product", "quantity": 2, "price": 10.50 } ], "totalAmount": 21.00 } ``` ``` -------------------------------- ### Get Invoice HTML URL Source: https://gmudocs.protel.com.tr/s/gmu-docs/doc/sss-q0vc4PZeVP After an e-document (invoice) is created, you can retrieve its HTML representation. This is achieved by using a specific method and setting up a callback. The HTML URL will be provided in the notification object. ```APIDOC ## Get Invoice HTML ### Description Retrieves the HTML URL of a created e-document (invoice). This requires setting up a callback mechanism to receive the notification containing the invoice details. ### Method (Not specified, likely a POST or GET request to a callback endpoint) ### Endpoint (Callback endpoint, details depend on implementation) ### Parameters (Callback parameters will be provided upon successful invoice creation and callback setup) ### Request Example (Not applicable, as this is a notification response) ### Response #### Success Response (Notification) - **closedCheck.invoice.invoiceInfo.htmlUrl** (string) - The URL to access the HTML version of the invoice. #### Response Example ```json { "closedCheck": { "invoice": { "invoiceInfo": { "htmlUrl": "https://example.com/path/to/invoice.html" } } } } ``` ```