> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/extensions/comarch.md).

# Comarch

## Get the Comarch configuration

> Returns the current Comarch configuration for this tenant.\
> Secret values are never returned; the response contains \`hasClientSecret\` and \`kafkaConnection.hasPassword\`\
> so callers can determine whether required secrets are already configured.\
> Returns 404 when Comarch is not configured.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Comarch"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ComarchConfigurationResponse":{"required":["connection","providers","rateLimit"],"type":"object","properties":{"connection":{"description":"Connection settings.","$ref":"#/components/schemas/ComarchConnectionResponse"},"providers":{"description":"Provider-specific settings.","$ref":"#/components/schemas/ComarchProvidersConfiguration"},"kafkaConnection":{"description":"Optional Kafka connection settings.","$ref":"#/components/schemas/ComarchKafkaConnectionResponse"},"rateLimit":{"description":"Client-side rate limiting settings.","$ref":"#/components/schemas/ComarchRateLimitSettings"}},"additionalProperties":false,"description":"Response body for Comarch configuration."},"ComarchConnectionResponse":{"required":["baseUrl","clientId","hasClientSecret","partnerCode","programCode"],"type":"object","properties":{"baseUrl":{"type":"string","description":"Root URL of the Comarch CLM B2B Gateway API.","format":"uri"},"clientId":{"minLength":1,"type":"string","description":"OAuth2 client credentials – client ID."},"programCode":{"minLength":1,"type":"string","description":"Program code used to identify the loyalty program in Comarch CLM."},"partnerCode":{"minLength":1,"type":"string","description":"Code of the Comarch partner."},"hasClientSecret":{"type":"boolean","description":"Whether a client secret is currently stored in the secret repository."}},"additionalProperties":false,"description":"Connection settings section of the Comarch GET response body."},"ComarchProvidersConfiguration":{"required":["customer"],"type":"object","properties":{"customer":{"description":"Customer provider settings.","$ref":"#/components/schemas/ComarchCustomerConfiguration"}},"additionalProperties":false,"description":"Providers section shared between the Comarch request and response bodies."},"ComarchCustomerConfiguration":{"type":"object","properties":{"retrieveCustomerTransactionBalance":{"type":"boolean","description":"Whether to fetch customer transaction balance.","default":false}},"additionalProperties":false,"description":"Customer provider settings shared between the Comarch request and response bodies."},"ComarchKafkaConnectionResponse":{"required":["bootstrapServers","hasPassword","topic","username"],"type":"object","properties":{"bootstrapServers":{"minLength":1,"type":"string","description":"Comma-separated list of Kafka bootstrap servers."},"username":{"minLength":1,"type":"string","description":"Username used for Kafka authentication."},"topic":{"minLength":1,"type":"string","description":"Kafka topic name where Comarch events are published."},"hasPassword":{"type":"boolean","description":"Whether a Kafka password is currently stored in the secret repository."}},"additionalProperties":false,"description":"Kafka connection settings section of the Comarch GET response body."},"ComarchRateLimitSettings":{"type":"object","properties":{"throttlingLimit":{"type":"integer","description":"Maximum number of requests allowed per second. Default 80.","format":"int32","default":80}},"additionalProperties":false,"description":"Client-side rate limiting settings shared between the Comarch request and response bodies."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/comarch":{"get":{"tags":["Comarch"],"summary":"Get the Comarch configuration","description":"Returns the current Comarch configuration for this tenant.\nSecret values are never returned; the response contains `hasClientSecret` and `kafkaConnection.hasPassword`\nso callers can determine whether required secrets are already configured.\nReturns 404 when Comarch is not configured.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Configuration returned.","content":{"text/plain":{"schema":{"description":"Response body for Comarch configuration.","$ref":"#/components/schemas/ComarchConfigurationResponse"}},"application/json":{"schema":{"description":"Response body for Comarch configuration.","$ref":"#/components/schemas/ComarchConfigurationResponse"}},"text/json":{"schema":{"description":"Response body for Comarch configuration.","$ref":"#/components/schemas/ComarchConfigurationResponse"}}}},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller lacks required scope.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"Comarch is not configured for this tenant.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Set Comarch configuration

> Creates or updates Comarch configuration.\
> Omit \`connection.clientSecret\` to keep the currently stored client secret.\
> When \`kafkaConnection\` is provided, omit \`kafkaConnection.password\` to keep the currently stored Kafka password.\
> When \`kafkaConnection\` is omitted, Kafka configuration is removed.\
> Returns 400 if a required secret is missing and no previously stored value exists.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Comarch"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"SetComarchRequest":{"required":["connection","providers"],"type":"object","properties":{"connection":{"description":"Connection settings.","$ref":"#/components/schemas/ComarchConnectionRequest"},"providers":{"description":"Provider-specific settings.","$ref":"#/components/schemas/ComarchProvidersConfiguration"},"kafkaConnection":{"description":"Optional Kafka connection settings.","$ref":"#/components/schemas/ComarchKafkaConnectionRequest"},"rateLimit":{"description":"Optional client-side rate limiting settings. When omitted, defaults are used (80 req/s, enabled).","$ref":"#/components/schemas/ComarchRateLimitSettings"}},"additionalProperties":false,"description":"Request body for setting Comarch configuration."},"ComarchConnectionRequest":{"required":["baseUrl","clientId","partnerCode","programCode"],"type":"object","properties":{"baseUrl":{"type":"string","description":"Root URL of the Comarch CLM B2B Gateway API.","format":"uri"},"clientId":{"minLength":1,"type":"string","description":"OAuth2 client credentials – client ID."},"programCode":{"minLength":1,"type":"string","description":"Program code used to identify the loyalty program in Comarch CLM."},"partnerCode":{"minLength":1,"type":"string","description":"Code of the Comarch partner."},"clientSecret":{"type":["null","string"],"description":"OAuth2 client secret.\nStored in the secret repository under `COMARCH-CLIENTSECRET`.\nWhen omitted, the existing secret is preserved."}},"additionalProperties":false,"description":"Connection settings section of the Comarch PUT request body."},"ComarchProvidersConfiguration":{"required":["customer"],"type":"object","properties":{"customer":{"description":"Customer provider settings.","$ref":"#/components/schemas/ComarchCustomerConfiguration"}},"additionalProperties":false,"description":"Providers section shared between the Comarch request and response bodies."},"ComarchCustomerConfiguration":{"type":"object","properties":{"retrieveCustomerTransactionBalance":{"type":"boolean","description":"Whether to fetch customer transaction balance.","default":false}},"additionalProperties":false,"description":"Customer provider settings shared between the Comarch request and response bodies."},"ComarchKafkaConnectionRequest":{"required":["bootstrapServers","topic","username"],"type":"object","properties":{"bootstrapServers":{"minLength":1,"type":"string","description":"Comma-separated list of Kafka bootstrap servers."},"username":{"minLength":1,"type":"string","description":"Username used for Kafka authentication."},"topic":{"minLength":1,"type":"string","description":"Kafka topic name where Comarch events are published."},"password":{"type":["null","string"],"description":"Password used for Kafka authentication.\nStored in the secret repository under `COMARCH-KAFKAPASSWORD`.\nWhen omitted, the existing secret is preserved."}},"additionalProperties":false,"description":"Kafka connection settings section of the Comarch PUT request body."},"ComarchRateLimitSettings":{"type":"object","properties":{"throttlingLimit":{"type":"integer","description":"Maximum number of requests allowed per second. Default 80.","format":"int32","default":80}},"additionalProperties":false,"description":"Client-side rate limiting settings shared between the Comarch request and response bodies."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/comarch":{"put":{"tags":["Comarch"],"summary":"Set Comarch configuration","description":"Creates or updates Comarch configuration.\nOmit `connection.clientSecret` to keep the currently stored client secret.\nWhen `kafkaConnection` is provided, omit `kafkaConnection.password` to keep the currently stored Kafka password.\nWhen `kafkaConnection` is omitted, Kafka configuration is removed.\nReturns 400 if a required secret is missing and no previously stored value exists.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"description":"Request body for setting Comarch configuration.","$ref":"#/components/schemas/SetComarchRequest"}},"text/json":{"schema":{"description":"Request body for setting Comarch configuration.","$ref":"#/components/schemas/SetComarchRequest"}},"application/*+json":{"schema":{"description":"Request body for setting Comarch configuration.","$ref":"#/components/schemas/SetComarchRequest"}}},"required":true},"responses":{"204":{"description":"Configuration saved."},"400":{"description":"Request body is invalid or a client secret is required but missing.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller lacks required scope.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Delete Comarch configuration

> Removes Comarch configuration for the tenant and deletes stored Comarch secrets.\
> This operation is idempotent: it succeeds even when configuration or secrets are already absent.

```json
{"openapi":"3.1.1","info":{"title":"Neostore internal API","version":"v1"},"tags":[{"name":"Comarch"}],"servers":[{"url":"https://app.neostore.cloud","description":"Production Server"},{"url":"https://app-qa.neostore.cloud","description":"Staging Server"}],"security":[{"admin-bearer":["ScopedAuthorizeRequirement"]},{"apiKey":["ScopedAuthorizeRequirement"]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/extensions/comarch":{"delete":{"tags":["Comarch"],"summary":"Delete Comarch configuration","description":"Removes Comarch configuration for the tenant and deletes stored Comarch secrets.\nThis operation is idempotent: it succeeds even when configuration or secrets are already absent.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Configuration deleted."},"401":{"description":"Caller not authenticated.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"Caller lacks required scope.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thewalletcrew.io/api-reference/extensions/comarch.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
