# Welcome to Gormic Developer Platform

## Overview

#### Build on Gormic. Extend it. Integrate with it.

Our platform gives developers and partners the tools to create powerful, purpose-built solutions for the F\&B industry. Whether you're building custom internal tools, connecting third-party systems, or launching your own apps in the Gormic Marketplace, you're in the right place.

## Integrate with Gormic

Gormic provides secure, well-documented APIs and SDKs that let you:

* Connect your products or services to our POS, CRM, Flow, and Self.
* Automate internal operations, data syncs, or reporting workflows
* Enable your clients to work more efficiently inside the Gormic ecosystem

We built Gormic to be open, so you can innovate for your own goals and your customers' needs.

## Partner With Us

We welcome partners to build on the Gormic platform. You'll get access to a sandbox environment for development, and you can publish your integration to our marketplace.


# Preparing Your Account

Before you can start integrating with our APIs or using our SDKs, you need to prepare your account with the necessary access and configuration. This includes creating a service user, assigning proper permissions.

## Creating a Service User

A **Service User** is a non-human user intended for API interactions. It's typically tied to your integration and used to authenticate API requests.

To create a service user:

1. Navigate to **Console** > **Users**
2. Click **Add User** and choose `Service User` as the type
3. Generate an **API Key** for this user
4. Save the token securely, you’ll use this to authenticate your requests

> **Important**: Store the API key securely. It won't be shown again. You can always revoke or regenerate it later.

## Assigning Permissions

Service users need permissions to access specific APIs and resources.

To assign permissions:

1. Go to **Console** > **Roles**
2. Create or choose an existing role.
3. Grant necessary permission for the services you'll use.
4. Assign the role to your service user

## Obtaining Organization Key

Gormic supports multiple organizations within a single account. To interact with our APIs at the organization level, you'll need your **Organization Key**, which uniquely identifies your organization.

To find your Organization Key:

1. Log in to the **Console**.
2. Use L**auncher** (top-left) to select your organization.
3. Navigate to **Settings**.
4. Select the **General** tab.
5. Locate the **Organization Key** field, copy this value for use in your API requests.

## Sandbox Enrollment

If you're not yet subscribed to a production plan **and you want to become a partner**, you can use our **Sandbox Environment** to test and develop your integration.

Learn more on this page:

{% content-ref url="/pages/dHTxoCmJIGp0CUKNVYLc" %}
[Becoming a Partner](/partners-and-marketplace/becoming-a-partner)
{% endcontent-ref %}


# Making Your First API Call

Now that you have your **App Key** and **Organization Key**, you're ready to make your first authenticated API call and verify everything is working correctly.

## Compose Your HTTP Request

Here’s a sample `curl` request to list all products:

```
curl -X GET https://rest.gormic.app/v1/core/categories \
  -H "Authorization: Bearer <App Key>" \
  -H "g-organization: xgh6fg"
```

## Expected Response

```
{
    "app": "gormic-core",
    "data": {
        "items": [
            {
                "locales": {
                    "ar": {
                        "name": "مشروبات"
                    },
                    "en": {
                        "name": "Drinks"
                    }
                },
                "createdAt": "2025-05-09T14:39:24.454Z",
                "createdBy": "gw82cg/g5qv2i",
                "createdVia": "g5qv2i",
                "id": "8c253c58-67f2-448b-b128-0fbb8e7045aa"
            },
            {
                "locales": {
                    "ar": {
                        "name": "بيتزا",
                        "description": ""
                    },
                    "en": {
                        "name": "Pizza",
                        "description": ""
                    }
                },
                "sort": "3",
                "createdAt": "2025-07-08T14:00:59.324Z",
                "createdBy": "gw82cg/g5qv2i",
                "createdVia": "rlk01f",
                "id": "c14c9afe-a6be-454e-a833-de54a1008397"
            }
        ]
    },
    "instanceId": "g5qv2i"
}
```


# Limits

To ensure fair usage and maintain platform stability, we enforce a daily rate limit on API requests.

## Daily Request Limit

This limit applies across all endpoints and environments (sandbox and production) and is reset every 24 hours at **00:00 UTC**.

## What Happens If You Exceed the Limit?

If your organization exceeds the daily limit:

* API requests will return a `429 Too Many Requests` status
* Retry attempts should be delayed until the limit resets

## Need More Capacity?

If your use case requires a higher daily limit, contact us at **<developers@gormic.com>** to discuss custom plans or usage reviews.


# Core

Core APIs provides access to foundational data used across all services and solutions.<br>

With these APIs, you can manage products, categories, branches, floorplans, tables, schedules, and other essential componenets.


# Legal Entities

## GET /v1/core/legal-entities

> Lists all legal entities

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListLegalEntitiesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListLegalEntities_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListLegalEntities_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LegalEntityM"}},"next":{"type":"string"}},"required":["items"]},"LegalEntityM":{"type":"object","properties":{"crn":{"type":"string"},"vatNumber":{"type":"string"},"businessName":{"type":"string"},"businessCategory":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["crn","vatNumber","businessName","businessCategory","uid"]}}},"paths":{"/v1/core/legal-entities":{"get":{"operationId":"LegalEntities_listCategories","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLegalEntitiesApiResponse"}}}}},"summary":"Lists all legal entities","tags":["Legal Entities"]}}}}
```

## GET /v1/core/legal-entities/{uid}

> Returns a specific legal entity

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetLegalEntityApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetLegalEntity_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetLegalEntity_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetLegalEntity_Data_Item"}},"required":["item"]},"GetLegalEntity_Data_Item":{"type":"object","properties":{"crn":{"type":"string"},"vatNumber":{"type":"string"},"businessName":{"type":"string"},"businessCategory":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["crn","vatNumber","businessName","businessCategory","uid"]},"GetLegalEntityApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetLegalEntity_Error"}},"required":["error"]},"GetLegalEntity_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetLegalEntity_ErrorCodes_enum"}]}},"required":["code"]},"GetLegalEntity_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/legal-entities/{uid}":{"get":{"operationId":"LegalEntities_getCategory","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLegalEntityApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLegalEntityApiError"}}}}},"summary":"Returns a specific legal entity","tags":["Legal Entities"]}}}}
```

## GET /v1/core/legal-entities/export

> Exports all legal entities with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportLegalEntitiesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportLegalEntities_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportLegalEntities_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LegalEntityM"}},"next":{"type":"string"}},"required":["items"]},"LegalEntityM":{"type":"object","properties":{"crn":{"type":"string"},"vatNumber":{"type":"string"},"businessName":{"type":"string"},"businessCategory":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["crn","vatNumber","businessName","businessCategory","uid"]}}},"paths":{"/v1/core/legal-entities/export":{"get":{"operationId":"LegalEntities_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportLegalEntitiesApiResponse"}}}}},"summary":"Exports all legal entities with support for incremental fetching.","tags":["Legal Entities"]}}}}
```


# Branches

## GET /v1/core/branches

> List all branches.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetBranchesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetBranches_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetBranches_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BranchMap"}}},"required":["items"]},"BranchMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"legalEntityUid":{"type":"string"},"defaultSubinventoryUid":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressM_d6a023c9"},"scheduleUid":{"type":"string"},"siteProductListUids":{"type":"array","items":{"type":"string"}},"posProductListUids":{"type":"array","items":{"type":"string"}},"tableProductListUids":{"type":"array","items":{"type":"string"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"AddressM_d6a023c9":{"type":"object","properties":{}}}},"paths":{"/v1/core/branches":{"get":{"operationId":"Branches_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBranchesApiResponse"}}}}},"summary":"List all branches.","tags":["Branches"]}}}}
```

## GET /v1/core/branches/{uid}

> Get a branch by id.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetBranchApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetBranch_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetBranch_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetBranch_Data_Item"},"schedule":{"$ref":"#/components/schemas/ScheduleM_7937212b"}},"required":["item"]},"GetBranch_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"legalEntityUid":{"type":"string"},"defaultSubinventoryUid":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressM_d6a023c9"},"scheduleUid":{"type":"string"},"siteProductListUids":{"type":"array","items":{"type":"string"}},"posProductListUids":{"type":"array","items":{"type":"string"}},"tableProductListUids":{"type":"array","items":{"type":"string"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"AddressM_d6a023c9":{"type":"object","properties":{}},"ScheduleM_7937212b":{"type":"object","properties":{}},"GetBranchApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetBranch_Error"}},"required":["error"]},"GetBranch_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetBranch_ErrorCodes_enum"}]}},"required":["code"]},"GetBranch_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/branches/{uid}":{"get":{"operationId":"Branches_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBranchApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBranchApiError"}}}}},"summary":"Get a branch by id.","tags":["Branches"]}}}}
```

## GET /v1/core/branches/export

> Exports all branches with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportBranchesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportBranches_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportBranches_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BranchMap"}},"next":{"type":"string"}},"required":["items"]},"BranchMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"legalEntityUid":{"type":"string"},"defaultSubinventoryUid":{"type":"string"},"address":{"$ref":"#/components/schemas/AddressM_d6a023c9"},"scheduleUid":{"type":"string"},"siteProductListUids":{"type":"array","items":{"type":"string"}},"posProductListUids":{"type":"array","items":{"type":"string"}},"tableProductListUids":{"type":"array","items":{"type":"string"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"AddressM_d6a023c9":{"type":"object","properties":{}}}},"paths":{"/v1/core/branches/export":{"get":{"operationId":"Branches_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportBranchesApiResponse"}}}}},"summary":"Exports all branches with support for incremental fetching.","tags":["Branches"]}}}}
```


# Categories

## GET /v1/core/categories

> List all categories of products.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetCategoriesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetCategories_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetCategories_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CategoryMap"}},"next":{"type":"string"}},"required":["items"]},"CategoryMap":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/core/categories":{"get":{"operationId":"Categories_listCategories","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCategoriesApiResponse"}}}}},"summary":"List all categories of products.","tags":["Categories"]}}}}
```

## POST /v1/core/categories

> Creates a new category

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateCategoryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateCategory_Params"}},"required":["params"]},"CreateCategory_Params":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/CreateCategory_Params_Locales"},"sort":{"type":"number"}},"required":["locales"]},"CreateCategory_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateCategory_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateCategory_Params_Locales_En"}},"required":["ar","en"]},"CreateCategory_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateCategory_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateCategory_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateCategory_Data_Item"}},"required":["item"]},"CreateCategory_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/core/categories":{"post":{"operationId":"Categories_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryApiResponse"}}}}},"summary":"Creates a new category","tags":["Categories"]}}}}
```

## GET /v1/core/categories/{uid}

> Returns a specific category

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetCategory_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetCategory_Data_Item"}},"required":["item"]},"GetCategory_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"GetCategoryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetCategory_Error"}},"required":["error"]},"GetCategory_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetCategory_ErrorCodes_enum"}]}},"required":["code"]},"GetCategory_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/categories/{uid}":{"get":{"operationId":"Categories_getCategory","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCategoryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCategoryApiError"}}}}},"summary":"Returns a specific category","tags":["Categories"]}}}}
```

## DELETE /v1/core/categories/{uid}

> Deletes a specific category

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteCategory_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/core/categories/{uid}":{"delete":{"operationId":"Categories_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCategoryApiResponse"}}}}},"summary":"Deletes a specific category","tags":["Categories"]}}}}
```

## PATCH /v1/core/categories/{uid}

> Updates a specific categoy

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateCategoryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateCategory_Params"}},"required":["params"]},"UpdateCategory_Params":{"type":"object","properties":{"id":{"type":"string"},"image":{"type":"string","nullable":true},"locales":{"type":"object"},"sort":{"type":"number"}},"required":["id"]},"UpdateCategoryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateCategory_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateCategory_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateCategory_Data_Item"}},"required":["item"]},"UpdateCategory_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"UpdateCategoryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateCategory_Error"}},"required":["error"]},"UpdateCategory_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateCategory_ErrorCodes_enum"}]}},"required":["code"]},"UpdateCategory_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/core/categories/{uid}":{"patch":{"operationId":"Categories_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryApiError"}}}}},"summary":"Updates a specific categoy","tags":["Categories"]}}}}
```

## GET /v1/core/categories/export

> Exports all categories with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportCategoriesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportCategories_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportCategories_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CategoryMap"}},"next":{"type":"string"}},"required":["items"]},"CategoryMap":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/core/categories/export":{"get":{"operationId":"Categories_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportCategoriesApiResponse"}}}}},"summary":"Exports all categories with support for incremental fetching.","tags":["Categories"]}}}}
```


# Products

## GET /v1/core/products

> List all products.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListProductsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListProducts_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListProducts_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductMapSummary"}}},"required":["items"]},"ProductMapSummary":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"categoryId":{"type":"string"},"taxGroupUid":{"type":"string"},"category":{"$ref":"#/components/schemas/ProductMapSummary_Category"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}}},"required":["price","locales","uid","id","categoryId","category","comboGroups"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductMapSummary_Category":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"ComboGroupM":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]}}},"paths":{"/v1/core/products":{"get":{"operationId":"Products_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProductsApiResponse"}}}}},"summary":"List all products.","tags":["Products"]}}}}
```

## POST /v1/core/products

> Creates new product.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateProductApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateProduct_Params"}},"required":["params"]},"CreateProduct_Params":{"type":"object","properties":{"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"categoryId":{"type":"string"},"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/CreateProduct_Params_Locales"},"price":{"type":"number"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"posImageUrl":{"type":"string"},"taxGroupUid":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/CreateProduct_Params_ComboGroupsItem"}}},"required":["categoryId","locales","price"]},"CreateProduct_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateProduct_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateProduct_Params_Locales_En"}},"required":["ar","en"]},"CreateProduct_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateProduct_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateProduct_Params_ComboGroupsItem":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/CreateProduct_Params_ComboGroupsItem_Locales"},"min":{"type":"number"},"max":{"type":"number"},"options":{"type":"array","items":{"$ref":"#/components/schemas/CreateProduct_Params_ComboGroupsItem_OptionsItem"}}},"required":["locales","min","max","options"]},"CreateProduct_Params_ComboGroupsItem_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateProduct_Params_ComboGroupsItem_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateProduct_Params_ComboGroupsItem_Locales_En"}},"required":["ar","en"]},"CreateProduct_Params_ComboGroupsItem_Locales_Ar":{"type":"object","properties":{}},"CreateProduct_Params_ComboGroupsItem_Locales_En":{"type":"object","properties":{}},"CreateProduct_Params_ComboGroupsItem_OptionsItem":{"type":"object","properties":{"productUid":{"type":"string"},"upcharge":{"type":"number"},"selected":{"type":"boolean"}},"required":["productUid","upcharge"]},"CreateProductApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateProduct_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateProduct_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateProduct_Data_Item"}},"required":["item"]},"CreateProduct_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"category":{"$ref":"#/components/schemas/CreateProduct_Data_Item_Category"},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentMap"}},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"uomAssignments":{"type":"array","items":{"$ref":"#/components/schemas/UomAssignmentM"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}}},"required":["price","locales","uid","id","category","modifiers","listUids","uomAssignments","comboGroups"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateProduct_Data_Item_Category":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"ModifierAssignmentMap":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentMap"}}},"required":["options"]},"ModifierOptionAssignmentMap":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"},"modifierOption":{"type":"string"}},"required":["uid","id","locales","multiple","modifierOption"]},"UomAssignmentM":{"type":"object","properties":{"conversionRate":{"type":"number"},"purchasable":{"type":"boolean","nullable":true},"barcode":{"type":"string","nullable":true},"uid":{"type":"string"},"uomUid":{"type":"string"}},"required":["conversionRate","uid","uomUid"]},"ComboGroupM":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"CreateProductApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateProduct_Error"}},"required":["error"]},"CreateProduct_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateProduct_ErrorCodes_enum"}]}},"required":["code"]},"CreateProduct_ErrorCodes_enum":{"type":"string","enum":["INVALID_PRICE"]}}},"paths":{"/v1/core/products":{"post":{"operationId":"Products_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductApiError"}}}}},"summary":"Creates new product.","tags":["Products"]}}}}
```

## GET /v1/core/products/{uid}

> Returns a product.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetProductApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetProduct_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetProduct_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetProduct_Data_Item"}},"required":["item"]},"GetProduct_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"category":{"$ref":"#/components/schemas/GetProduct_Data_Item_Category"},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentMap"}},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"uomAssignments":{"type":"array","items":{"$ref":"#/components/schemas/UomAssignmentM"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}}},"required":["price","locales","uid","id","category","modifiers","listUids","uomAssignments","comboGroups"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"GetProduct_Data_Item_Category":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"ModifierAssignmentMap":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentMap"}}},"required":["options"]},"ModifierOptionAssignmentMap":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"},"modifierOption":{"type":"string"}},"required":["uid","id","locales","multiple","modifierOption"]},"UomAssignmentM":{"type":"object","properties":{"conversionRate":{"type":"number"},"purchasable":{"type":"boolean","nullable":true},"barcode":{"type":"string","nullable":true},"uid":{"type":"string"},"uomUid":{"type":"string"}},"required":["conversionRate","uid","uomUid"]},"ComboGroupM":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"GetProductApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetProduct_Error"}},"required":["error"]},"GetProduct_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetProduct_ErrorCodes_enum"}]}},"required":["code"]},"GetProduct_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/products/{uid}":{"get":{"operationId":"Products_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductApiError"}}}}},"summary":"Returns a product.","tags":["Products"]}}}}
```

## DELETE /v1/core/products/{uid}

> Deletes a product.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteProductApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/DeleteProduct_Params"}},"required":["params"]},"DeleteProduct_Params":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"paths":{"/v1/core/products/{uid}":{"delete":{"operationId":"Products_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProductApiRequest"}}}}},"summary":"Deletes a product.","tags":["Products"]}}}}
```

## PATCH /v1/core/products/{uid}

> Updates a product.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateProductApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateProduct_Params"}},"required":["params"]},"UpdateProduct_Params":{"type":"object","properties":{"categoryId":{"type":"string"},"image":{"type":"string","nullable":true},"locales":{"type":"object"},"price":{"type":"number"},"calories":{"type":"number","nullable":true},"sort":{"type":"number","nullable":true},"allergies":{"type":"object"},"active":{"type":"boolean","nullable":true},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"taxGroupUid":{"type":"string"},"sku":{"type":"string"},"bomUid":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"uomAssingments":{"type":"array","items":{"$ref":"#/components/schemas/UpdateProduct_Params_UomAssingmentsItem"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/UpdateProduct_Params_ComboGroupsItem"}}},"required":["price"]},"UpdateProduct_Params_UomAssingmentsItem":{"type":"object","properties":{"uomUid":{"type":"string"},"conversionRate":{"type":"number"},"purchasable":{"type":"boolean","nullable":true},"barcode":{"type":"string","nullable":true}},"required":["uomUid","conversionRate","purchasable","barcode"]},"UpdateProduct_Params_ComboGroupsItem":{"type":"object","properties":{"uid":{"type":"string"},"locales":{"$ref":"#/components/schemas/UpdateProduct_Params_ComboGroupsItem_Locales"},"min":{"type":"number"},"max":{"type":"number"},"options":{"type":"array","items":{"$ref":"#/components/schemas/UpdateProduct_Params_ComboGroupsItem_OptionsItem"}}},"required":["uid","locales","min","max","options"]},"UpdateProduct_Params_ComboGroupsItem_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/UpdateProduct_Params_ComboGroupsItem_Locales_Ar"},"en":{"$ref":"#/components/schemas/UpdateProduct_Params_ComboGroupsItem_Locales_En"}},"required":["ar","en"]},"UpdateProduct_Params_ComboGroupsItem_Locales_Ar":{"type":"object","properties":{}},"UpdateProduct_Params_ComboGroupsItem_Locales_En":{"type":"object","properties":{}},"UpdateProduct_Params_ComboGroupsItem_OptionsItem":{"type":"object","properties":{"uid":{"type":"string"},"productUid":{"type":"string"},"upcharge":{"type":"number"},"selected":{"type":"boolean"}},"required":["uid","productUid","upcharge"]},"UpdateProductApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateProduct_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateProduct_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateProduct_Data_Item"}},"required":["item"]},"UpdateProduct_Data_Item":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"category":{"$ref":"#/components/schemas/UpdateProduct_Data_Item_Category"},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentMap"}},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"uomAssignments":{"type":"array","items":{"$ref":"#/components/schemas/UomAssignmentM"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}}},"required":["price","locales","uid","id","category","modifiers","listUids","uomAssignments","comboGroups"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"UpdateProduct_Data_Item_Category":{"type":"object","properties":{"image":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"}},"required":["locales","uid","id"]},"ModifierAssignmentMap":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentMap"}}},"required":["options"]},"ModifierOptionAssignmentMap":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"},"modifierOption":{"type":"string"}},"required":["uid","id","locales","multiple","modifierOption"]},"UomAssignmentM":{"type":"object","properties":{"conversionRate":{"type":"number"},"purchasable":{"type":"boolean","nullable":true},"barcode":{"type":"string","nullable":true},"uid":{"type":"string"},"uomUid":{"type":"string"}},"required":["conversionRate","uid","uomUid"]},"ComboGroupM":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"UpdateProductApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateProduct_Error"}},"required":["error"]},"UpdateProduct_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateProduct_ErrorCodes_enum"}]}},"required":["code"]},"UpdateProduct_ErrorCodes_enum":{"type":"string","enum":["INVALID_PRICE","NoChanges","UOM_NOT_FOUND"]}}},"paths":{"/v1/core/products/{uid}":{"patch":{"operationId":"Products_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductApiError"}}}}},"summary":"Updates a product.","tags":["Products"]}}}}
```

## GET /v1/core/products/export

> Exports all products with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportProductsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportProducts_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportProducts_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductM"}},"next":{"type":"string"}},"required":["items"]},"ProductM":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"categoryId":{"type":"string"},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentM"}}},"required":["price","locales","uid","id","categoryId","comboGroups","modifiers"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ComboGroupM":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"ModifierAssignmentM":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentM"}}},"required":["id","options"]},"ModifierOptionAssignmentM":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["id"]}}},"paths":{"/v1/core/products/export":{"get":{"operationId":"Products_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportProductsApiResponse"}}}}},"summary":"Exports all products with support for incremental fetching.","tags":["Products"]}}}}
```


# Modifiers

## GET /v1/core/modifiers

> Lists all modifiers

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetModifiersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetModifiers_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetModifiers_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ModifierMap"}}},"required":["items"]},"ModifierMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ModifierOptionMap":{"type":"object","properties":{"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","id","locales","multiple"]}}},"paths":{"/v1/core/modifiers":{"get":{"operationId":"Modifiers_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetModifiersApiResponse"}}}}},"summary":"Lists all modifiers","tags":["Modifiers"]}}}}
```

## POST /v1/core/modifiers

> Creates a new modifier

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateModifierApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateModifier_Params"}},"required":["params"]},"CreateModifier_Params":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/CreateModifier_Params_Locales"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"}},"required":["locales"]},"CreateModifier_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateModifier_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateModifier_Params_Locales_En"}},"required":["ar","en"]},"CreateModifier_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]},"CreateModifier_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}},"required":["name","description"]},"CreateModifierApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateModifier_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateModifier_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateModifier_Data_Item"}},"required":["item"]},"CreateModifier_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ModifierOptionMap":{"type":"object","properties":{"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","id","locales","multiple"]}}},"paths":{"/v1/core/modifiers":{"post":{"operationId":"Modifiers_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModifierApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModifierApiResponse"}}}}},"summary":"Creates a new modifier","tags":["Modifiers"]}}}}
```

## GET /v1/core/modifiers/{uid}

> Returns a modifier

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetModifierApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetModifier_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetModifier_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetModifier_Data_Item"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["item","options"]},"GetModifier_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ModifierOptionMap":{"type":"object","properties":{"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","id","locales","multiple"]},"GetModifierApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetModifier_Error"}},"required":["error"]},"GetModifier_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetModifier_ErrorCodes_enum"}]}},"required":["code"]},"GetModifier_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/modifiers/{uid}":{"get":{"operationId":"Modifiers_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetModifierApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetModifierApiError"}}}}},"summary":"Returns a modifier","tags":["Modifiers"]}}}}
```

## DELETE /v1/core/modifiers/{uid}

> Deletes a modifier

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteModifierApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteModifier_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteModifier_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/core/modifiers/{uid}":{"delete":{"operationId":"Modifiers_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteModifierApiResponse"}}}}},"summary":"Deletes a modifier","tags":["Modifiers"]}}}}
```

## PATCH /v1/core/modifiers/{uid}

> Updates a modifier

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateModifierApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateModifier_Params"}},"required":["params"]},"UpdateModifier_Params":{"type":"object","properties":{"id":{"type":"string"},"locales":{"type":"object"},"minSelection":{"type":"number","nullable":true},"maxSelection":{"type":"number","nullable":true}},"required":["id"]},"UpdateModifierApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateModifier_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateModifier_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateModifier_Data_Item"}},"required":["item"]},"UpdateModifier_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ModifierOptionMap":{"type":"object","properties":{"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","id","locales","multiple"]},"UpdateModifierApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateModifier_Error"}},"required":["error"]},"UpdateModifier_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateModifier_ErrorCodes_enum"}]}},"required":["code"]},"UpdateModifier_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/core/modifiers/{uid}":{"patch":{"operationId":"Modifiers_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModifierApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModifierApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModifierApiError"}}}}},"summary":"Updates a modifier","tags":["Modifiers"]}}}}
```

## GET /v1/core/modifiers/export

> Exports all modifiers with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportModifiersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportModifiers_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportModifiers_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ModifierMap"}},"next":{"type":"string"}},"required":["items"]},"ModifierMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","uid","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ModifierOptionMap":{"type":"object","properties":{"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","id","locales","multiple"]}}},"paths":{"/v1/core/modifiers/export":{"get":{"operationId":"Modifiers_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportModifiersApiResponse"}}}}},"summary":"Exports all modifiers with support for incremental fetching.","tags":["Modifiers"]}}}}
```

## POST /v1/core/modifier-options

> Creates a new modifier option

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateModifierOptionApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateModifierOption_Params"}},"required":["params"]},"CreateModifierOption_Params":{"type":"object","properties":{"modifierId":{"type":"string"},"locales":{"$ref":"#/components/schemas/CreateModifierOption_Params_Locales"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"productUid":{"type":"string"},"uomUid":{"type":"string"}},"required":["modifierId","locales"]},"CreateModifierOption_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateModifierOption_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateModifierOption_Params_Locales_En"}},"required":["ar","en"]},"CreateModifierOption_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateModifierOption_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateModifierOptionApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateModifierOption_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateModifierOption_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateModifierOption_Data_Item"}},"required":["item"]},"CreateModifierOption_Data_Item":{"type":"object","properties":{"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","id","locales","multiple"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/core/modifier-options":{"post":{"operationId":"ModifierOptions_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModifierOptionApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateModifierOptionApiResponse"}}}}},"summary":"Creates a new modifier option","tags":["Modifiers"]}}}}
```

## DELETE /v1/core/modifier-options/{modifierId}/{id}

> Deletes a modifier option

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteModifierOptionApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteModifierOption_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteModifierOption_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/core/modifier-options/{modifierId}/{id}":{"delete":{"operationId":"ModifierOptions_delete","parameters":[{"name":"modifierId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteModifierOptionApiResponse"}}}}},"summary":"Deletes a modifier option","tags":["Modifiers"]}}}}
```

## PATCH /v1/core/modifier-options/{modifierId}/{id}

> Updates a modifier option

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateModifierOptionApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateModifierOption_Params"}},"required":["params"]},"UpdateModifierOption_Params":{"type":"object","properties":{"modifierId":{"type":"string"},"id":{"type":"string"},"locales":{"type":"object"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"productUid":{"type":"string"},"uomAssignmentUid":{"type":"string"}},"required":["modifierId","id"]},"UpdateModifierOptionApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateModifierOption_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateModifierOption_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateModifierOption_Data_Item"}},"required":["item"]},"UpdateModifierOption_Data_Item":{"type":"object","properties":{"uid":{"type":"string"},"id":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","id","locales","multiple"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"UpdateModifierOptionApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateModifierOption_Error"}},"required":["error"]},"UpdateModifierOption_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateModifierOption_ErrorCodes_enum"}]}},"required":["code"]},"UpdateModifierOption_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/core/modifier-options/{modifierId}/{id}":{"patch":{"operationId":"ModifierOptions_update","parameters":[{"name":"modifierId","required":true,"in":"path","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModifierOptionApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModifierOptionApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateModifierOptionApiError"}}}}},"summary":"Updates a modifier option","tags":["Modifiers"]}}}}
```


# Product Lists

## GET /v1/core/product-lists

> List all Product Lists

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListProductListsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListProductLists_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListProductLists_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductListM"}},"next":{"type":"string"}},"required":["items"]},"ProductListM":{"type":"object","properties":{"type":{"type":"string","enum":["custom","menu"]},"group":{"type":"object"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ProductListEntryM"}}},"required":["type","locales","uid","entries"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductListEntryM":{"type":"object","properties":{"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]}}},"paths":{"/v1/core/product-lists":{"get":{"operationId":"ProductLists_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProductListsApiResponse"}}}}},"summary":"List all Product Lists","tags":["Product Lists"]}}}}
```

## POST /v1/core/product-lists

> Creates a new Product List

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateProductListApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateProductList_Params"}},"required":["params"]},"CreateProductList_Params":{"type":"object","properties":{"type":{"type":"string","enum":["custom","menu"]},"group":{"type":"object"},"locales":{"$ref":"#/components/schemas/CreateProductList_Params_Locales"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/CreateProductList_Params_EntriesItem"}}},"required":["type","locales","entries"]},"CreateProductList_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateProductList_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateProductList_Params_Locales_En"}},"required":["ar","en"]},"CreateProductList_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateProductList_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateProductList_Params_EntriesItem":{"type":"object","properties":{"productId":{"type":"string"},"sort":{"type":"number","nullable":true}},"required":["productId"]},"CreateProductListApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateProductList_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateProductList_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateProductList_Data_Item"}},"required":["item"]},"CreateProductList_Data_Item":{"type":"object","properties":{"type":{"type":"string","enum":["custom","menu"]},"group":{"type":"object"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ProductListEntryM"}}},"required":["type","locales","uid","entries"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductListEntryM":{"type":"object","properties":{"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]}}},"paths":{"/v1/core/product-lists":{"post":{"operationId":"ProductLists_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductListApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductListApiResponse"}}}}},"summary":"Creates a new Product List","tags":["Product Lists"]}}}}
```

## GET /v1/core/product-lists/{uid}

> Returns a Product List

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetProductListApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetProductList_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetProductList_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetProductList_Data_Item"}},"required":["item"]},"GetProductList_Data_Item":{"type":"object","properties":{"type":{"type":"string","enum":["custom","menu"]},"group":{"type":"object"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ProductListEntryM"}}},"required":["type","locales","uid","entries"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductListEntryM":{"type":"object","properties":{"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"GetProductListApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetProductList_Error"}},"required":["error"]},"GetProductList_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetProductList_ErrorCodes_enum"}]}},"required":["code"]},"GetProductList_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/core/product-lists/{uid}":{"get":{"operationId":"ProductLists_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductListApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProductListApiError"}}}}},"summary":"Returns a Product List","tags":["Product Lists"]}}}}
```

## DELETE /v1/core/product-lists/{uid}

> Deletes a Product List

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteProductListApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteProductList_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteProductList_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/core/product-lists/{uid}":{"delete":{"operationId":"ProductLists_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProductListApiResponse"}}}}},"summary":"Deletes a Product List","tags":["Product Lists"]}}}}
```

## PATCH /v1/core/product-lists/{uid}

> Updates a Product List

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateProductListApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateProductList_Params"}},"required":["params"]},"UpdateProductList_Params":{"type":"object","properties":{"group":{"type":"object"},"locales":{"$ref":"#/components/schemas/__type_174bf132"}}},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"UpdateProductListApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateProductList_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateProductList_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateProductList_Data_Item"}},"required":["item"]},"UpdateProductList_Data_Item":{"type":"object","properties":{"type":{"type":"string","enum":["custom","menu"]},"group":{"type":"object"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ProductListEntryM"}}},"required":["type","locales","uid","entries"]},"ProductListEntryM":{"type":"object","properties":{"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"UpdateProductListApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateProductList_Error"}},"required":["error"]},"UpdateProductList_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateProductList_ErrorCodes_enum"}]}},"required":["code"]},"UpdateProductList_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/core/product-lists/{uid}":{"patch":{"operationId":"ProductLists_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductListApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductListApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductListApiError"}}}}},"summary":"Updates a Product List","tags":["Product Lists"]}}}}
```

## GET /v1/core/product-lists/export

> Exports all products with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportProductListsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportProductLists_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportProductLists_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ProductListM"}},"next":{"type":"string"}},"required":["items"]},"ProductListM":{"type":"object","properties":{"type":{"type":"string","enum":["custom","menu"]},"group":{"type":"object"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/ProductListEntryM"}}},"required":["type","locales","uid","entries"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductListEntryM":{"type":"object","properties":{"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]}}},"paths":{"/v1/core/product-lists/export":{"get":{"operationId":"ProductLists_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportProductListsApiResponse"}}}}},"summary":"Exports all products with support for incremental fetching.","tags":["Product Lists"]}}}}
```

## POST /v1/core/product-list-entries

> Creates an entry within a product list

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateProductListEntryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateProductListEntry_Params"}},"required":["params"]},"CreateProductListEntry_Params":{"type":"object","properties":{"listUid":{"type":"string"},"productUid":{"type":"string"},"sort":{"type":"number","nullable":true}},"required":["listUid","productUid","sort"]},"CreateProductListEntryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateProductListEntry_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateProductListEntry_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateProductListEntry_Data_Item"},"product":{"$ref":"#/components/schemas/ProductM_b729d490"},"category":{"$ref":"#/components/schemas/CategoryMap_3a2b06ed"}},"required":["item"]},"CreateProductListEntry_Data_Item":{"type":"object","properties":{"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"ProductM_b729d490":{"type":"object","properties":{}},"CategoryMap_3a2b06ed":{"type":"object","properties":{}}}},"paths":{"/v1/core/product-list-entries":{"post":{"operationId":"ProductListEntries_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductListEntryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductListEntryApiResponse"}}}}},"summary":"Creates an entry within a product list","tags":["Product Lists"]}}}}
```

## DELETE /v1/core/product-list-entries/{uid}

> Deletes a Product List Entry

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteProductListEntryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteProductListEntry_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteProductListEntry_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/core/product-list-entries/{uid}":{"delete":{"operationId":"ProductListEntries_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteProductListEntryApiResponse"}}}}},"summary":"Deletes a Product List Entry","tags":["Product Lists"]}}}}
```

## PATCH /v1/core/product-list-entries/{uid}

> Updates an entry within a product list

```json
{"openapi":"3.0.0","info":{"title":"Gormic Core API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateProductListEntryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateProductListEntry_Params"}},"required":["params"]},"UpdateProductListEntry_Params":{"type":"object","properties":{"uid":{"type":"string"},"sort":{"type":"number","nullable":true}},"required":["uid"]},"UpdateProductListEntryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateProductListEntry_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateProductListEntry_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateProductListEntry_Data_Item"}},"required":["item"]},"UpdateProductListEntry_Data_Item":{"type":"object","properties":{"sort":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"}},"required":["uid","productUid"]},"UpdateProductListEntryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateProductListEntry_Error"}},"required":["error"]},"UpdateProductListEntry_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateProductListEntry_ErrorCodes_enum"}]}},"required":["code"]},"UpdateProductListEntry_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/core/product-list-entries/{uid}":{"patch":{"operationId":"ProductListEntries_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductListEntryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductListEntryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductListEntryApiError"}}}}},"summary":"Updates an entry within a product list","tags":["Product Lists"]}}}}
```


# Order Management

Order Management provides APIs to create, update, and track orders throughout their lifecycle.\
With these APIs, you can manage orders, payments, and invoicing operations.<br>

These APIs are primarily used with Gormic POS and Self products and support integration with kitchen systems and third-party platforms for consistent order handling across all channels.


# Orders

## GET /v1/om/orders

> List all orders.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetOrdersV2ApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetOrdersV2_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetOrdersV2_Data":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderM"}},"users":{"type":"array","items":{"$ref":"#/components/schemas/UserMap"}},"customers":{"type":"array","items":{"$ref":"#/components/schemas/UserMap"}},"tables":{"type":"array","items":{"$ref":"#/components/schemas/TableSummaryM"}},"areas":{"type":"array","items":{"$ref":"#/components/schemas/AreaSummaryM"}},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodMap"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductM"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryMap"}},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/DiscountMap"}},"nextId":{"type":"string"},"query":{"$ref":"#/components/schemas/ListQueryResult_18e58b0e"}},"required":["orders"]},"OrderM":{"type":"object","properties":{"branchUid":{"type":"string"},"businessDate":{"type":"string"},"numberOfGuests":{"type":"number"},"type":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]},"status":{"type":"string","enum":["canceled","closed","open"]},"closedAt":{"type":"string","nullable":true},"canceledAt":{"type":"string"},"readyForPickup":{"type":"boolean"},"readyForPickupAt":{"type":"string"},"callNumber":{"type":"number"},"callSource":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"noteToKitchen":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"total":{"type":"number"},"gross":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"totalDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"totalLineDiscounts":{"type":"number"},"balanceDue":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"appendLoyaltyBenefits":{"type":"boolean","nullable":true},"shipTo":{"$ref":"#/components/schemas/OrderM_ShipTo"},"displayId":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"channelOrderDisplayId":{"type":"string"},"prepareTime":{"type":"number"},"estimatedPickupAt":{"type":"string"},"estimatedDeliveryAt":{"type":"string"},"externalData":{"$ref":"#/components/schemas/Record_5494b96e"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"fuid":{"type":"string"},"branchId":{"type":"string"},"formattedShortNumber":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["cancel","close","delete","edit","ready-for-pickup","void"]}},"paidAmount":{"type":"number"},"userUid":{"type":"string"},"customerUid":{"type":"string"},"tableUids":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentM"}},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM"}},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/OrderM_AlertsItem"}},"channelUid":{"type":"string"},"externalId":{"type":"string"},"estimatedReadyAt":{"type":"string"},"sessionUid":{"type":"string"}},"required":["branchUid","businessDate","type","status","checkPrintCount","invoicePrintCount","total","gross","subtotal","tax","totalDiscount","subtotalDiscount","taxDiscount","totalLineDiscounts","balanceDue","prepaidTaxable","prepaidTax","totalPrepaid","id","uid","fuid","branchId","formattedShortNumber","can","paidAmount","userUid","customerUid","tableUids","lines","appliedDiscounts","payments","invoices","alerts"]},"OrderM_ShipTo":{"type":"object","properties":{"building":{"type":"string"},"street":{"type":"string"},"secondary":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"uid":{"type":"string"}},"required":["building","street","postalCode","city","uid"]},"Record_5494b96e":{"type":"object","properties":{}},"OrderLineM":{"type":"object","properties":{"quantity":{"type":"number"},"note":{"type":"string"},"seats":{"type":"array","items":{"type":"number"}},"course":{"type":"number"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"productType":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sentAt":{"type":"string"},"sentPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"firePrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"voidPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"lastPrintTime":{"type":"string"},"firedAt":{"type":"string"},"voidedAt":{"type":"string","nullable":true},"voidReasonId":{"type":"string","nullable":true},"voidWaste":{"type":"boolean","nullable":true},"requestedAt":{"type":"string","nullable":true},"acceptedAt":{"type":"string","nullable":true},"rejectedAt":{"type":"string","nullable":true},"rejectReasonId":{"type":"string","nullable":true},"price":{"type":"number"},"amount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"gross":{"type":"number"},"dueAmount":{"type":"number"},"orderDiscountsSubtotal":{"type":"number"},"orderDiscountsTax":{"type":"number"},"orderAppliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_OrderAppliedDiscountsItem"}},"voucherUid":{"type":"string"},"invoiceId":{"type":"string"},"comboLineId":{"type":"string"},"comboOptionUid":{"type":"string"},"locked":{"type":"boolean","nullable":true},"lockedBy":{"type":"string"},"lockedAt":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"uomUid":{"type":"string"},"appliedModifiers":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_AppliedModifiersItem"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"can":{"type":"array","items":{"type":"string","enum":["accept","comp","delete","discount","edit","fire","reject","request","send","void"]}},"subinventoryUid":{"type":"string"},"returns":{"type":"array","items":{"$ref":"#/components/schemas/ReturnLineM"}},"returnedQuantity":{"type":"number"}},"required":["quantity","seats","status","price","amount","tax","subtotal","taxRate","subtotalDiscounts","taxDiscounts","totalDiscounts","gross","dueAmount","orderDiscountsSubtotal","orderDiscountsTax","orderAppliedDiscounts","invoiceId","id","uid","productUid","appliedModifiers","appliedDiscounts","can","returns","returnedQuantity"]},"OrderLineM_OrderAppliedDiscountsItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"}},"required":["id","amount","subtotal","tax"]},"OrderLineM_AppliedModifiersItem":{"type":"object","properties":{"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/AppliedModifierOptionM"}}},"required":["id","options"]},"AppliedModifierOptionM":{"type":"object","properties":{"quantity":{"type":"number"},"amount":{"type":"number"},"price":{"type":"number"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"modifierUid":{"type":"string"}},"required":["quantity","amount","visible","id","modifierUid"]},"AppliedDiscountM":{"type":"object","properties":{"type":{"type":"string","enum":["custom-fixed","custom-percent","fixed","percent","reprice","unknown"]},"value":{"type":"number"},"excludeTax":{"type":"boolean"},"source":{"type":"string","enum":["deliverect","discount","loyalty-level","loyalty-points","loyalty-program","loyalty-tag"]},"sourceId":{"type":"string"},"locales":{"$ref":"#/components/schemas/Record_5494b96e"},"amount":{"type":"number"},"subtotalAmount":{"type":"number"},"taxAmount":{"type":"number"},"reasonId":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true},"invoiceId":{"type":"string","nullable":true},"id":{"type":"string"}},"required":["type","value","excludeTax","amount","subtotalAmount","taxAmount","id"]},"ReturnLineM":{"type":"object","properties":{"quantity":{"type":"number"},"waste":{"type":"boolean"},"invoiceId":{"type":"string"},"reasonId":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"}},"required":["quantity","waste","invoiceId","price","amount","subtotal","tax","gross","id","uid"]},"PaymentM":{"type":"object","properties":{"type":{"type":"string","enum":["receipt","refund"]},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"completedAt":{"type":"string"},"reversedAt":{"type":"string"},"custom":{"type":"boolean"},"amount":{"type":"number"},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"invoiceId":{"type":"string"},"note":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["confirm","delete","edit","pay","print","refund"]}},"methodUid":{"type":"string"}},"required":["type","status","custom","amount","invoiceId","id","can"]},"InvoiceM":{"type":"object","properties":{"type":{"type":"string","enum":["credit-note","debit-note","prepayment","standard"]},"status":{"type":"string","enum":["closed","open"]},"number":{"type":"number"},"source":{"type":"string"},"closedAt":{"type":"string"},"referenceInvoiceId":{"type":"string"},"applyExpiresAt":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"totalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"taxable":{"type":"number"},"total":{"type":"number"},"totalLineDiscounts":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"balanceDue":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"paidAmount":{"type":"number"},"appliedInvoices":{"type":"array","items":{"$ref":"#/components/schemas/AppliedInvoiceM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM_LinesItem"}},"can":{"type":"array","items":{"type":"string","enum":["close","delete","pre-print","print","send","update"]}}},"required":["type","status","totalDiscount","taxDiscount","subtotalDiscount","subtotal","tax","gross","taxable","total","totalLineDiscounts","prepaidTaxable","prepaidTax","totalPrepaid","balanceDue","id","uid","paidAmount","appliedInvoices","appliedDiscounts","lines","can"]},"AppliedInvoiceM":{"type":"object","properties":{"code":{"type":"string"},"balance":{"type":"number"},"taxableBalance":{"type":"number"},"taxBalance":{"type":"number"},"sourceDate":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["code","balance","taxableBalance","taxBalance","sourceDate","uid"]},"InvoiceM_LinesItem":{"type":"object","properties":{"id":{"type":"string"},"uid":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"dueAmount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"gross":{"type":"number"},"quantity":{"type":"number"},"productUid":{"type":"string"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"referenceLineId":{"type":"string"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}}},"required":["id","uid","price","amount","dueAmount","tax","subtotal","taxRate","gross","quantity","productUid","subtotalDiscounts","taxDiscounts","totalDiscounts","status","appliedDiscounts"]},"OrderM_AlertsItem":{"type":"object","properties":{"type":{"type":"string","enum":["order-not-sent","pending-order-request"]}},"required":["type"]},"UserMap":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"TableSummaryM":{"type":"object","properties":{"name":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"circle":{"type":"boolean","nullable":true},"minSeats":{"type":"number"},"maxSeats":{"type":"number"},"archived":{"type":"boolean"},"id":{"type":"string"},"areaId":{"type":"string"}},"required":["name","x","y","width","height","minSeats","maxSeats","id","areaId"]},"AreaSummaryM":{"type":"object","properties":{"locales":{"type":"object"},"backgroundImage":{"type":"string"},"id":{"type":"string"},"branchId":{"type":"string"}},"required":["locales","id","branchId"]},"PaymentMethodMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductM":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"type":"object"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"posImageUrl":{"type":"string"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"voucherValidaty":{"type":"number"},"voucherPayLimit":{"type":"number"},"voucherSharingLimit":{"type":"number"},"voucherAccess":{"type":"string","enum":["anonymous","holder"]},"voucherDirectPay":{"type":"boolean"},"voucherTopup":{"type":"boolean"},"voucherAutoTopup":{"type":"boolean"},"voucherActivationEndDate":{"type":"string"},"id":{"type":"string"},"categoryId":{"type":"string"},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentM"}}},"required":["price","locales","id","categoryId","comboGroups","modifiers"]},"ComboGroupM":{"type":"object","properties":{"locales":{"type":"object"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUId":{"type":"string"}},"required":["uid","productUId"]},"ModifierAssignmentM":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentM"}}},"required":["id","options"]},"ModifierOptionAssignmentM":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["id"]},"CategoryMap":{"type":"object","properties":{"image":{"type":"string"},"locales":{"type":"object"},"sort":{"type":"number","nullable":true},"id":{"type":"string"}},"required":["locales","id"]},"DiscountMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"ListQueryResult_18e58b0e":{"type":"object","properties":{}},"GetOrdersV2ApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetOrdersV2_Error"}},"required":["error"]},"GetOrdersV2_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetOrdersV2_ErrorCodes_enum"}]}},"required":["code"]},"GetOrdersV2_ErrorCodes_enum":{"type":"string","enum":["INVALID_FROM_ID","INVALID_PARAM_BUSINESS_DATE"]}}},"paths":{"/v1/om/orders":{"get":{"operationId":"Orders_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrdersV2ApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrdersV2ApiError"}}}}},"summary":"List all orders.","tags":["Orders"]}}}}
```

## POST /v1/om/orders

> Creates a new Order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateOrderApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateOrder_Params"}},"required":["params"]},"CreateOrder_Params":{"type":"object","properties":{"branchId":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"customerId":{"type":"string"},"userId":{"type":"string"},"numberOfGuests":{"type":"number"},"type":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]},"appendLoyaltyBenefits":{"type":"boolean"},"invoiceType":{"type":"string","enum":["prepayment","standard"]},"callNumber":{"type":"number"},"callSource":{"type":"string"},"deviceId":{"type":"string"},"applyExpiresAt":{"type":"string"},"externalId":{"type":"string"},"externalData":{"$ref":"#/components/schemas/__type_174bf132"},"shipTo":{"$ref":"#/components/schemas/CreateOrder_Params_ShipTo"},"displayId":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"channelUid":{"type":"string"},"channelOrderDisplayId":{"type":"string"},"noteToKitchen":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"prepareTime":{"type":"number"},"estimatedPickupAt":{"type":"string"},"estimatedDeliveryAt":{"type":"string"}},"required":["branchId","type"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateOrder_Params_ShipTo":{"type":"object","properties":{"building":{"type":"string"},"street":{"type":"string"},"secondary":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"uid":{"type":"string"}},"required":["building","street","postalCode","city","uid"]},"CreateOrderApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateOrder_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateOrder_Data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"paths":{"/v1/om/orders":{"post":{"operationId":"Orders_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderApiResponse"}}}}},"summary":"Creates a new Order.","tags":["Orders"]}}}}
```

## GET /v1/om/orders/{uid}

> Returns an order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetOrderV2ApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetOrderV2_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetOrderV2_Data":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/GetOrderV2_Data_Order"},"user":{"$ref":"#/components/schemas/UserMap_1_89800dd9"},"customer":{"$ref":"#/components/schemas/UserMap_1_89800dd9"},"tables":{"type":"array","items":{"$ref":"#/components/schemas/TableSummaryM"}},"areas":{"type":"array","items":{"$ref":"#/components/schemas/AreaSummaryM"}},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodMap"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierMap"}},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/DiscountMap"}}},"required":["order"]},"GetOrderV2_Data_Order":{"type":"object","properties":{"branchUid":{"type":"string"},"businessDate":{"type":"string"},"numberOfGuests":{"type":"number"},"type":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]},"status":{"type":"string","enum":["canceled","closed","open"]},"closedAt":{"type":"string","nullable":true},"canceledAt":{"type":"string"},"readyForPickup":{"type":"boolean"},"readyForPickupAt":{"type":"string"},"callNumber":{"type":"number"},"callSource":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"noteToKitchen":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"total":{"type":"number"},"gross":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"totalDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"totalLineDiscounts":{"type":"number"},"balanceDue":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"appendLoyaltyBenefits":{"type":"boolean","nullable":true},"shipTo":{"$ref":"#/components/schemas/GetOrderV2_Data_Order_ShipTo"},"displayId":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"channelOrderDisplayId":{"type":"string"},"prepareTime":{"type":"number"},"estimatedPickupAt":{"type":"string"},"estimatedDeliveryAt":{"type":"string"},"externalData":{"$ref":"#/components/schemas/Record_5494b96e"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"fuid":{"type":"string"},"branchId":{"type":"string"},"formattedShortNumber":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["cancel","close","delete","edit","ready-for-pickup","void"]}},"paidAmount":{"type":"number"},"userUid":{"type":"string"},"customerUid":{"type":"string"},"tableUids":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentM"}},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM"}},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/GetOrderV2_Data_Order_AlertsItem"}},"channelUid":{"type":"string"},"externalId":{"type":"string"},"estimatedReadyAt":{"type":"string"},"sessionUid":{"type":"string"}},"required":["branchUid","businessDate","type","status","checkPrintCount","invoicePrintCount","total","gross","subtotal","tax","totalDiscount","subtotalDiscount","taxDiscount","totalLineDiscounts","balanceDue","prepaidTaxable","prepaidTax","totalPrepaid","id","uid","fuid","branchId","formattedShortNumber","can","paidAmount","userUid","customerUid","tableUids","lines","appliedDiscounts","payments","invoices","alerts"]},"GetOrderV2_Data_Order_ShipTo":{"type":"object","properties":{"building":{"type":"string"},"street":{"type":"string"},"secondary":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"uid":{"type":"string"}},"required":["building","street","postalCode","city","uid"]},"Record_5494b96e":{"type":"object","properties":{}},"OrderLineM":{"type":"object","properties":{"quantity":{"type":"number"},"note":{"type":"string"},"seats":{"type":"array","items":{"type":"number"}},"course":{"type":"number"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"productType":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sentAt":{"type":"string"},"sentPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"firePrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"voidPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"lastPrintTime":{"type":"string"},"firedAt":{"type":"string"},"voidedAt":{"type":"string","nullable":true},"voidReasonId":{"type":"string","nullable":true},"voidWaste":{"type":"boolean","nullable":true},"requestedAt":{"type":"string","nullable":true},"acceptedAt":{"type":"string","nullable":true},"rejectedAt":{"type":"string","nullable":true},"rejectReasonId":{"type":"string","nullable":true},"price":{"type":"number"},"amount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"gross":{"type":"number"},"dueAmount":{"type":"number"},"orderDiscountsSubtotal":{"type":"number"},"orderDiscountsTax":{"type":"number"},"orderAppliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_OrderAppliedDiscountsItem"}},"voucherUid":{"type":"string"},"invoiceId":{"type":"string"},"comboLineId":{"type":"string"},"comboOptionUid":{"type":"string"},"locked":{"type":"boolean","nullable":true},"lockedBy":{"type":"string"},"lockedAt":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"uomUid":{"type":"string"},"appliedModifiers":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_AppliedModifiersItem"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"can":{"type":"array","items":{"type":"string","enum":["accept","comp","delete","discount","edit","fire","reject","request","send","void"]}},"subinventoryUid":{"type":"string"},"returns":{"type":"array","items":{"$ref":"#/components/schemas/ReturnLineM"}},"returnedQuantity":{"type":"number"}},"required":["quantity","seats","status","price","amount","tax","subtotal","taxRate","subtotalDiscounts","taxDiscounts","totalDiscounts","gross","dueAmount","orderDiscountsSubtotal","orderDiscountsTax","orderAppliedDiscounts","invoiceId","id","uid","productUid","appliedModifiers","appliedDiscounts","can","returns","returnedQuantity"]},"OrderLineM_OrderAppliedDiscountsItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"}},"required":["id","amount","subtotal","tax"]},"OrderLineM_AppliedModifiersItem":{"type":"object","properties":{"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/AppliedModifierOptionM"}}},"required":["id","options"]},"AppliedModifierOptionM":{"type":"object","properties":{"quantity":{"type":"number"},"amount":{"type":"number"},"price":{"type":"number"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"modifierUid":{"type":"string"}},"required":["quantity","amount","visible","id","modifierUid"]},"AppliedDiscountM":{"type":"object","properties":{"type":{"type":"string","enum":["custom-fixed","custom-percent","fixed","percent","reprice","unknown"]},"value":{"type":"number"},"excludeTax":{"type":"boolean"},"source":{"type":"string","enum":["deliverect","discount","loyalty-level","loyalty-points","loyalty-program","loyalty-tag"]},"sourceId":{"type":"string"},"locales":{"$ref":"#/components/schemas/Record_5494b96e"},"amount":{"type":"number"},"subtotalAmount":{"type":"number"},"taxAmount":{"type":"number"},"reasonId":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true},"invoiceId":{"type":"string","nullable":true},"id":{"type":"string"}},"required":["type","value","excludeTax","amount","subtotalAmount","taxAmount","id"]},"ReturnLineM":{"type":"object","properties":{"quantity":{"type":"number"},"waste":{"type":"boolean"},"invoiceId":{"type":"string"},"reasonId":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"}},"required":["quantity","waste","invoiceId","price","amount","subtotal","tax","gross","id","uid"]},"PaymentM":{"type":"object","properties":{"type":{"type":"string","enum":["receipt","refund"]},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"completedAt":{"type":"string"},"reversedAt":{"type":"string"},"custom":{"type":"boolean"},"amount":{"type":"number"},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"invoiceId":{"type":"string"},"note":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["confirm","delete","edit","pay","print","refund"]}},"methodUid":{"type":"string"}},"required":["type","status","custom","amount","invoiceId","id","can"]},"InvoiceM":{"type":"object","properties":{"type":{"type":"string","enum":["credit-note","debit-note","prepayment","standard"]},"status":{"type":"string","enum":["closed","open"]},"number":{"type":"number"},"source":{"type":"string"},"closedAt":{"type":"string"},"referenceInvoiceId":{"type":"string"},"applyExpiresAt":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"totalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"taxable":{"type":"number"},"total":{"type":"number"},"totalLineDiscounts":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"balanceDue":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"paidAmount":{"type":"number"},"appliedInvoices":{"type":"array","items":{"$ref":"#/components/schemas/AppliedInvoiceM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM_LinesItem"}},"can":{"type":"array","items":{"type":"string","enum":["close","delete","pre-print","print","send","update"]}}},"required":["type","status","totalDiscount","taxDiscount","subtotalDiscount","subtotal","tax","gross","taxable","total","totalLineDiscounts","prepaidTaxable","prepaidTax","totalPrepaid","balanceDue","id","uid","paidAmount","appliedInvoices","appliedDiscounts","lines","can"]},"AppliedInvoiceM":{"type":"object","properties":{"code":{"type":"string"},"balance":{"type":"number"},"taxableBalance":{"type":"number"},"taxBalance":{"type":"number"},"sourceDate":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["code","balance","taxableBalance","taxBalance","sourceDate","uid"]},"InvoiceM_LinesItem":{"type":"object","properties":{"id":{"type":"string"},"uid":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"dueAmount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"gross":{"type":"number"},"quantity":{"type":"number"},"productUid":{"type":"string"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"referenceLineId":{"type":"string"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}}},"required":["id","uid","price","amount","dueAmount","tax","subtotal","taxRate","gross","quantity","productUid","subtotalDiscounts","taxDiscounts","totalDiscounts","status","appliedDiscounts"]},"GetOrderV2_Data_Order_AlertsItem":{"type":"object","properties":{"type":{"type":"string","enum":["order-not-sent","pending-order-request"]}},"required":["type"]},"UserMap_1_89800dd9":{"type":"object","properties":{}},"TableSummaryM":{"type":"object","properties":{"name":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"circle":{"type":"boolean","nullable":true},"minSeats":{"type":"number"},"maxSeats":{"type":"number"},"archived":{"type":"boolean"},"id":{"type":"string"},"areaId":{"type":"string"}},"required":["name","x","y","width","height","minSeats","maxSeats","id","areaId"]},"AreaSummaryM":{"type":"object","properties":{"locales":{"type":"object"},"backgroundImage":{"type":"string"},"id":{"type":"string"},"branchId":{"type":"string"}},"required":["locales","id","branchId"]},"PaymentMethodMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductM":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"type":"object"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"posImageUrl":{"type":"string"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"voucherValidaty":{"type":"number"},"voucherPayLimit":{"type":"number"},"voucherSharingLimit":{"type":"number"},"voucherAccess":{"type":"string","enum":["anonymous","holder"]},"voucherDirectPay":{"type":"boolean"},"voucherTopup":{"type":"boolean"},"voucherAutoTopup":{"type":"boolean"},"voucherActivationEndDate":{"type":"string"},"id":{"type":"string"},"categoryId":{"type":"string"},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentM"}}},"required":["price","locales","id","categoryId","comboGroups","modifiers"]},"ComboGroupM":{"type":"object","properties":{"locales":{"type":"object"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUId":{"type":"string"}},"required":["uid","productUId"]},"ModifierAssignmentM":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentM"}}},"required":["id","options"]},"ModifierOptionAssignmentM":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["id"]},"ModifierMap":{"type":"object","properties":{"locales":{"type":"object"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","id"]},"ModifierOptionMap":{"type":"object","properties":{"id":{"type":"string"},"locales":{"type":"object"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["id","locales","multiple"]},"DiscountMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"GetOrderV2ApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetOrderV2_Error"}},"required":["error"]},"GetOrderV2_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetOrderV2_ErrorCodes_enum"}]}},"required":["code"]},"GetOrderV2_ErrorCodes_enum":{"type":"string","enum":["INVALID_ORDER_ID","NotFound"]}}},"paths":{"/v1/om/orders/{uid}":{"get":{"operationId":"Orders_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderV2ApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderV2ApiError"}}}}},"summary":"Returns an order.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}

> Updates an order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateOrderApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateOrder_Params"}},"required":["params"]},"UpdateOrder_Params":{"type":"object","properties":{"tableIds":{"type":"array","items":{"type":"string"}},"customerId":{"type":"string","nullable":true},"userId":{"type":"string"},"numberOfGuests":{"type":"number"},"noteToKitchen":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"type":{"type":"object"},"externalData":{"$ref":"#/components/schemas/__type_174bf132"},"readyForPickup":{"type":"boolean"},"prepareTime":{"type":"number"},"estimatedPickupAt":{"type":"string"},"estimatedDeliveryAt":{"type":"string"}}},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"UpdateOrderApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateOrder_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateOrder_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"UpdateOrderApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateOrder_Error"}},"required":["error"]},"UpdateOrder_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateOrder_ErrorCodes_enum"}]}},"required":["code"]},"UpdateOrder_ErrorCodes_enum":{"type":"string","enum":["NoChanges","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/orders/{uid}":{"patch":{"operationId":"Orders_001_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderApiError"}}}}},"summary":"Updates an order.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}/close

> Finalizes and closes the specified order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CloseOrderApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CloseOrder_Params"}},"required":["params"]},"CloseOrder_Params":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CloseOrderApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CloseOrder_Error"}},"required":["error"]},"CloseOrder_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CloseOrder_ErrorCodes_enum"}]}},"required":["code"]},"CloseOrder_ErrorCodes_enum":{"type":"string","enum":["ALREADY_CLOSED","CONTAINS_REQUEST","INVOICE_NOT_CLOSED","LINES_NOT_SENT","NO_INVOICE","PAYMENT_NOT_COMPLETE"]}}},"paths":{"/v1/om/orders/{uid}/close":{"patch":{"operationId":"Orders_close","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseOrderApiRequest"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseOrderApiError"}}}}},"summary":"Finalizes and closes the specified order.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}/cancel

> Cancels an order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CancelOrder":{"type":"object","properties":{"Params":{"$ref":"#/components/schemas/CancelOrder_Params"},"Data":{"$ref":"#/components/schemas/CancelOrder_Data"},"ErrorCodes":{"type":"string","enum":["ALREADY_CLOSED","ALREADY_PAID","CONTAIN_LINES"]}},"required":["Params","Data","ErrorCodes"]},"CancelOrder_Params":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CancelOrder_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"CancelOrderApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CancelOrder_Error"}},"required":["error"]},"CancelOrder_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CancelOrder_ErrorCodes_enum"}]}},"required":["code"]},"CancelOrder_ErrorCodes_enum":{"type":"string","enum":["ALREADY_CLOSED","ALREADY_PAID","CONTAIN_LINES"]}}},"paths":{"/v1/om/orders/{uid}/cancel":{"patch":{"operationId":"Orders_cancel","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrder"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderApiError"}}}}},"summary":"Cancels an order.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}/void

> Voids an order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"VoidOrderApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/VoidOrder_Params"}},"required":["params"]},"VoidOrder_Params":{"type":"object","properties":{"waste":{"type":"boolean"},"reasonId":{"type":"string"}},"required":["waste","reasonId"]},"VoidOrderApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/VoidOrder_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"VoidOrder_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"VoidOrderApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/VoidOrder_Error"}},"required":["error"]},"VoidOrder_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/VoidOrder_ErrorCodes_enum"}]}},"required":["code"]},"VoidOrder_ErrorCodes_enum":{"type":"string","enum":["ALREADY_CLOSED","ALREADY_PAID","INVALID_OPERATION"]}}},"paths":{"/v1/om/orders/{uid}/void":{"patch":{"operationId":"Orders_void","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidOrderApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidOrderApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidOrderApiError"}}}}},"summary":"Voids an order.","tags":["Orders"]}}}}
```

## GET /v1/om/orders/export

> Exports all orders with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}}},"paths":{"/v1/om/orders/export":{"get":{"operationId":"Orders_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Exports all orders with support for incremental fetching.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}/discount

> Applies a discount at order level.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ApplyDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/ApplyDiscount_Params"}},"required":["params"]},"ApplyDiscount_Params":{"type":"object","properties":{"discountId":{"type":"string"},"source":{"type":"string","enum":["deliverect","discount","loyalty-level","loyalty-points","loyalty-program","loyalty-tag"]},"reasonId":{"type":"string"},"comment":{"type":"string"}},"required":["discountId"]},"ApplyDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ApplyDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ApplyDiscount_Data":{"type":"object","properties":{}},"ApplyDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApplyDiscount_Error"}},"required":["error"]},"ApplyDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ApplyDiscount_ErrorCodes_enum"}]}},"required":["code"]},"ApplyDiscount_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","InvalidDeviceId","NO_PERMISSION","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED","REASON_REQUIRED"]}}},"paths":{"/v1/om/orders/{uid}/discount":{"patch":{"operationId":"Orders_discount","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyDiscountApiError"}}}}},"summary":"Applies a discount at order level.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}/update-discount

> Updates applied discount at order level.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateAppliedDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateAppliedDiscount_Params"}},"required":["params"]},"UpdateAppliedDiscount_Params":{"type":"object","properties":{"discountId":{"type":"string"},"source":{"type":"string","enum":["deliverect","discount","loyalty-level","loyalty-points","loyalty-program","loyalty-tag"]},"reasonId":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true}},"required":["discountId"]},"UpdateAppliedDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateAppliedDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateAppliedDiscount_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"UpdateAppliedDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateAppliedDiscount_Error"}},"required":["error"]},"UpdateAppliedDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateAppliedDiscount_ErrorCodes_enum"}]}},"required":["code"]},"UpdateAppliedDiscount_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","NO_PERMISSION","NoChanges","NotFound","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED","REASON_DISABLED","REASON_NOT_FOUND","REASON_REQUIRED"]}}},"paths":{"/v1/om/orders/{uid}/update-discount":{"patch":{"operationId":"Orders_updateDiscount","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedDiscountApiError"}}}}},"summary":"Updates applied discount at order level.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}/cancel-discount

> Cancels a discount at order level.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CancelDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CancelDiscount_Params"}},"required":["params"]},"CancelDiscount_Params":{"type":"object","properties":{"discountId":{"type":"string"}},"required":["discountId"]},"CancelDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CancelDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CancelDiscount_Data":{"type":"object","properties":{}},"CancelDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CancelDiscount_Error"}},"required":["error"]},"CancelDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CancelDiscount_ErrorCodes_enum"}]}},"required":["code"]},"CancelDiscount_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","NO_PERMISSION","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/orders/{uid}/cancel-discount":{"patch":{"operationId":"Orders_002_cancelDiscount","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelDiscountApiError"}}}}},"summary":"Cancels a discount at order level.","tags":["Orders"]}}}}
```

## PATCH /v1/om/orders/{uid}/custom-discount

> Applies a custom discount at order level.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ApplyCustomDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/ApplyCustomDiscount_Params"}},"required":["params"]},"ApplyCustomDiscount_Params":{"type":"object","properties":{"type":{"type":"string","enum":["custom-fixed","custom-percent","unknown"]},"value":{"type":"number"},"excludeTax":{"type":"boolean"},"source":{"type":"string","enum":["deliverect","discount","loyalty-level","loyalty-points","loyalty-program","loyalty-tag"]},"sourceId":{"type":"string"},"locales":{"$ref":"#/components/schemas/__type_174bf132"},"subtotalAmount":{"type":"number"},"taxAmount":{"type":"number"}},"required":["type","value"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ApplyCustomDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ApplyCustomDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ApplyCustomDiscount_Data":{"type":"object","properties":{}},"ApplyCustomDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApplyCustomDiscount_Error"}},"required":["error"]},"ApplyCustomDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ApplyCustomDiscount_ErrorCodes_enum"}]}},"required":["code"]},"ApplyCustomDiscount_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","InvalidDeviceId","NO_PERMISSION","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/orders/{uid}/custom-discount":{"patch":{"operationId":"Orders_customDiscount","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyCustomDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyCustomDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyCustomDiscountApiError"}}}}},"summary":"Applies a custom discount at order level.","tags":["Orders"]}}}}
```

## GET /v1/om/orders/by-external/{externalId}

> Returns an order by external ID.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetOrderByExternalIdApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetOrderByExternalId_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetOrderByExternalId_Data":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/GetOrderByExternalId_Data_Order"},"user":{"$ref":"#/components/schemas/UserMap_1_89800dd9"},"customer":{"$ref":"#/components/schemas/UserMap_1_89800dd9"},"tables":{"type":"array","items":{"$ref":"#/components/schemas/TableSummaryM"}},"areas":{"type":"array","items":{"$ref":"#/components/schemas/AreaSummaryM"}},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodMap"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierMap"}},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/DiscountMap"}}},"required":["order"]},"GetOrderByExternalId_Data_Order":{"type":"object","properties":{"branchUid":{"type":"string"},"businessDate":{"type":"string"},"numberOfGuests":{"type":"number"},"type":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]},"status":{"type":"string","enum":["canceled","closed","open"]},"closedAt":{"type":"string","nullable":true},"canceledAt":{"type":"string"},"readyForPickup":{"type":"boolean"},"readyForPickupAt":{"type":"string"},"callNumber":{"type":"number"},"callSource":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"noteToKitchen":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"total":{"type":"number"},"gross":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"totalDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"totalLineDiscounts":{"type":"number"},"balanceDue":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"appendLoyaltyBenefits":{"type":"boolean","nullable":true},"shipTo":{"$ref":"#/components/schemas/GetOrderByExternalId_Data_Order_ShipTo"},"displayId":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"channelOrderDisplayId":{"type":"string"},"prepareTime":{"type":"number"},"estimatedPickupAt":{"type":"string"},"estimatedDeliveryAt":{"type":"string"},"externalData":{"$ref":"#/components/schemas/Record_5494b96e"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"fuid":{"type":"string"},"branchId":{"type":"string"},"formattedShortNumber":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["cancel","close","delete","edit","ready-for-pickup","void"]}},"paidAmount":{"type":"number"},"userUid":{"type":"string"},"customerUid":{"type":"string"},"tableUids":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentM"}},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM"}},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/GetOrderByExternalId_Data_Order_AlertsItem"}},"channelUid":{"type":"string"},"externalId":{"type":"string"},"estimatedReadyAt":{"type":"string"},"sessionUid":{"type":"string"}},"required":["branchUid","businessDate","type","status","checkPrintCount","invoicePrintCount","total","gross","subtotal","tax","totalDiscount","subtotalDiscount","taxDiscount","totalLineDiscounts","balanceDue","prepaidTaxable","prepaidTax","totalPrepaid","id","uid","fuid","branchId","formattedShortNumber","can","paidAmount","userUid","customerUid","tableUids","lines","appliedDiscounts","payments","invoices","alerts"]},"GetOrderByExternalId_Data_Order_ShipTo":{"type":"object","properties":{"building":{"type":"string"},"street":{"type":"string"},"secondary":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"uid":{"type":"string"}},"required":["building","street","postalCode","city","uid"]},"Record_5494b96e":{"type":"object","properties":{}},"OrderLineM":{"type":"object","properties":{"quantity":{"type":"number"},"note":{"type":"string"},"seats":{"type":"array","items":{"type":"number"}},"course":{"type":"number"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"productType":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sentAt":{"type":"string"},"sentPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"firePrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"voidPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"lastPrintTime":{"type":"string"},"firedAt":{"type":"string"},"voidedAt":{"type":"string","nullable":true},"voidReasonId":{"type":"string","nullable":true},"voidWaste":{"type":"boolean","nullable":true},"requestedAt":{"type":"string","nullable":true},"acceptedAt":{"type":"string","nullable":true},"rejectedAt":{"type":"string","nullable":true},"rejectReasonId":{"type":"string","nullable":true},"price":{"type":"number"},"amount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"gross":{"type":"number"},"dueAmount":{"type":"number"},"orderDiscountsSubtotal":{"type":"number"},"orderDiscountsTax":{"type":"number"},"orderAppliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_OrderAppliedDiscountsItem"}},"voucherUid":{"type":"string"},"invoiceId":{"type":"string"},"comboLineId":{"type":"string"},"comboOptionUid":{"type":"string"},"locked":{"type":"boolean","nullable":true},"lockedBy":{"type":"string"},"lockedAt":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"uomUid":{"type":"string"},"appliedModifiers":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_AppliedModifiersItem"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"can":{"type":"array","items":{"type":"string","enum":["accept","comp","delete","discount","edit","fire","reject","request","send","void"]}},"subinventoryUid":{"type":"string"},"returns":{"type":"array","items":{"$ref":"#/components/schemas/ReturnLineM"}},"returnedQuantity":{"type":"number"}},"required":["quantity","seats","status","price","amount","tax","subtotal","taxRate","subtotalDiscounts","taxDiscounts","totalDiscounts","gross","dueAmount","orderDiscountsSubtotal","orderDiscountsTax","orderAppliedDiscounts","invoiceId","id","uid","productUid","appliedModifiers","appliedDiscounts","can","returns","returnedQuantity"]},"OrderLineM_OrderAppliedDiscountsItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"}},"required":["id","amount","subtotal","tax"]},"OrderLineM_AppliedModifiersItem":{"type":"object","properties":{"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/AppliedModifierOptionM"}}},"required":["id","options"]},"AppliedModifierOptionM":{"type":"object","properties":{"quantity":{"type":"number"},"amount":{"type":"number"},"price":{"type":"number"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"modifierUid":{"type":"string"}},"required":["quantity","amount","visible","id","modifierUid"]},"AppliedDiscountM":{"type":"object","properties":{"type":{"type":"string","enum":["custom-fixed","custom-percent","fixed","percent","reprice","unknown"]},"value":{"type":"number"},"excludeTax":{"type":"boolean"},"source":{"type":"string","enum":["deliverect","discount","loyalty-level","loyalty-points","loyalty-program","loyalty-tag"]},"sourceId":{"type":"string"},"locales":{"$ref":"#/components/schemas/Record_5494b96e"},"amount":{"type":"number"},"subtotalAmount":{"type":"number"},"taxAmount":{"type":"number"},"reasonId":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true},"invoiceId":{"type":"string","nullable":true},"id":{"type":"string"}},"required":["type","value","excludeTax","amount","subtotalAmount","taxAmount","id"]},"ReturnLineM":{"type":"object","properties":{"quantity":{"type":"number"},"waste":{"type":"boolean"},"invoiceId":{"type":"string"},"reasonId":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"}},"required":["quantity","waste","invoiceId","price","amount","subtotal","tax","gross","id","uid"]},"PaymentM":{"type":"object","properties":{"type":{"type":"string","enum":["receipt","refund"]},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"completedAt":{"type":"string"},"reversedAt":{"type":"string"},"custom":{"type":"boolean"},"amount":{"type":"number"},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"invoiceId":{"type":"string"},"note":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["confirm","delete","edit","pay","print","refund"]}},"methodUid":{"type":"string"}},"required":["type","status","custom","amount","invoiceId","id","can"]},"InvoiceM":{"type":"object","properties":{"type":{"type":"string","enum":["credit-note","debit-note","prepayment","standard"]},"status":{"type":"string","enum":["closed","open"]},"number":{"type":"number"},"source":{"type":"string"},"closedAt":{"type":"string"},"referenceInvoiceId":{"type":"string"},"applyExpiresAt":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"totalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"taxable":{"type":"number"},"total":{"type":"number"},"totalLineDiscounts":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"balanceDue":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"paidAmount":{"type":"number"},"appliedInvoices":{"type":"array","items":{"$ref":"#/components/schemas/AppliedInvoiceM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM_LinesItem"}},"can":{"type":"array","items":{"type":"string","enum":["close","delete","pre-print","print","send","update"]}}},"required":["type","status","totalDiscount","taxDiscount","subtotalDiscount","subtotal","tax","gross","taxable","total","totalLineDiscounts","prepaidTaxable","prepaidTax","totalPrepaid","balanceDue","id","uid","paidAmount","appliedInvoices","appliedDiscounts","lines","can"]},"AppliedInvoiceM":{"type":"object","properties":{"code":{"type":"string"},"balance":{"type":"number"},"taxableBalance":{"type":"number"},"taxBalance":{"type":"number"},"sourceDate":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["code","balance","taxableBalance","taxBalance","sourceDate","uid"]},"InvoiceM_LinesItem":{"type":"object","properties":{"id":{"type":"string"},"uid":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"dueAmount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"gross":{"type":"number"},"quantity":{"type":"number"},"productUid":{"type":"string"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"referenceLineId":{"type":"string"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}}},"required":["id","uid","price","amount","dueAmount","tax","subtotal","taxRate","gross","quantity","productUid","subtotalDiscounts","taxDiscounts","totalDiscounts","status","appliedDiscounts"]},"GetOrderByExternalId_Data_Order_AlertsItem":{"type":"object","properties":{"type":{"type":"string","enum":["order-not-sent","pending-order-request"]}},"required":["type"]},"UserMap_1_89800dd9":{"type":"object","properties":{}},"TableSummaryM":{"type":"object","properties":{"name":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"circle":{"type":"boolean","nullable":true},"minSeats":{"type":"number"},"maxSeats":{"type":"number"},"archived":{"type":"boolean"},"id":{"type":"string"},"areaId":{"type":"string"}},"required":["name","x","y","width","height","minSeats","maxSeats","id","areaId"]},"AreaSummaryM":{"type":"object","properties":{"locales":{"type":"object"},"backgroundImage":{"type":"string"},"id":{"type":"string"},"branchId":{"type":"string"}},"required":["locales","id","branchId"]},"PaymentMethodMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductM":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"type":"object"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"posImageUrl":{"type":"string"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"voucherValidaty":{"type":"number"},"voucherPayLimit":{"type":"number"},"voucherSharingLimit":{"type":"number"},"voucherAccess":{"type":"string","enum":["anonymous","holder"]},"voucherDirectPay":{"type":"boolean"},"voucherTopup":{"type":"boolean"},"voucherAutoTopup":{"type":"boolean"},"voucherActivationEndDate":{"type":"string"},"id":{"type":"string"},"categoryId":{"type":"string"},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentM"}}},"required":["price","locales","id","categoryId","comboGroups","modifiers"]},"ComboGroupM":{"type":"object","properties":{"locales":{"type":"object"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUId":{"type":"string"}},"required":["uid","productUId"]},"ModifierAssignmentM":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentM"}}},"required":["id","options"]},"ModifierOptionAssignmentM":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["id"]},"ModifierMap":{"type":"object","properties":{"locales":{"type":"object"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","id"]},"ModifierOptionMap":{"type":"object","properties":{"id":{"type":"string"},"locales":{"type":"object"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["id","locales","multiple"]},"DiscountMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"GetOrderByExternalIdApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetOrderByExternalId_Error"}},"required":["error"]},"GetOrderByExternalId_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetOrderByExternalId_ErrorCodes_enum"}]}},"required":["code"]},"GetOrderByExternalId_ErrorCodes_enum":{"type":"string","enum":["INVALID_ORDER_ID","NotFound"]}}},"paths":{"/v1/om/orders/by-external/{externalId}":{"get":{"operationId":"Orders_getByExternalId","parameters":[{"name":"externalId","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderByExternalIdApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderByExternalIdApiError"}}}}},"summary":"Returns an order by external ID.","tags":["Orders"]}}}}
```

## GET /v1/om/orders/by-table/{tableUid}

> Returns the current open order for the specified table.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetOrderByTableApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetOrderByTable_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetOrderByTable_Data":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/GetOrderByTable_Data_Order"},"user":{"$ref":"#/components/schemas/UserMap_1_89800dd9"},"customer":{"$ref":"#/components/schemas/UserMap_1_89800dd9"},"tables":{"type":"array","items":{"$ref":"#/components/schemas/TableSummaryM"}},"areas":{"type":"array","items":{"$ref":"#/components/schemas/AreaSummaryM"}},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodMap"}},"products":{"type":"array","items":{"$ref":"#/components/schemas/ProductM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierMap"}},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/DiscountMap"}}},"required":["order"]},"GetOrderByTable_Data_Order":{"type":"object","properties":{"branchUid":{"type":"string"},"businessDate":{"type":"string"},"numberOfGuests":{"type":"number"},"type":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]},"status":{"type":"string","enum":["canceled","closed","open"]},"closedAt":{"type":"string","nullable":true},"canceledAt":{"type":"string"},"readyForPickup":{"type":"boolean"},"readyForPickupAt":{"type":"string"},"callNumber":{"type":"number"},"callSource":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"noteToKitchen":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"total":{"type":"number"},"gross":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"totalDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"totalLineDiscounts":{"type":"number"},"balanceDue":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"appendLoyaltyBenefits":{"type":"boolean","nullable":true},"shipTo":{"$ref":"#/components/schemas/GetOrderByTable_Data_Order_ShipTo"},"displayId":{"type":"string","nullable":true},"source":{"type":"string","nullable":true},"channelOrderDisplayId":{"type":"string"},"prepareTime":{"type":"number"},"estimatedPickupAt":{"type":"string"},"estimatedDeliveryAt":{"type":"string"},"externalData":{"$ref":"#/components/schemas/Record_5494b96e"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"fuid":{"type":"string"},"branchId":{"type":"string"},"formattedShortNumber":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["cancel","close","delete","edit","ready-for-pickup","void"]}},"paidAmount":{"type":"number"},"userUid":{"type":"string"},"customerUid":{"type":"string"},"tableUids":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/PaymentM"}},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM"}},"alerts":{"type":"array","items":{"$ref":"#/components/schemas/GetOrderByTable_Data_Order_AlertsItem"}},"channelUid":{"type":"string"},"externalId":{"type":"string"},"estimatedReadyAt":{"type":"string"},"sessionUid":{"type":"string"}},"required":["branchUid","businessDate","type","status","checkPrintCount","invoicePrintCount","total","gross","subtotal","tax","totalDiscount","subtotalDiscount","taxDiscount","totalLineDiscounts","balanceDue","prepaidTaxable","prepaidTax","totalPrepaid","id","uid","fuid","branchId","formattedShortNumber","can","paidAmount","userUid","customerUid","tableUids","lines","appliedDiscounts","payments","invoices","alerts"]},"GetOrderByTable_Data_Order_ShipTo":{"type":"object","properties":{"building":{"type":"string"},"street":{"type":"string"},"secondary":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"uid":{"type":"string"}},"required":["building","street","postalCode","city","uid"]},"Record_5494b96e":{"type":"object","properties":{}},"OrderLineM":{"type":"object","properties":{"quantity":{"type":"number"},"note":{"type":"string"},"seats":{"type":"array","items":{"type":"number"}},"course":{"type":"number"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"productType":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sentAt":{"type":"string"},"sentPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"firePrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"voidPrinting":{"$ref":"#/components/schemas/Record_5494b96e"},"lastPrintTime":{"type":"string"},"firedAt":{"type":"string"},"voidedAt":{"type":"string","nullable":true},"voidReasonId":{"type":"string","nullable":true},"voidWaste":{"type":"boolean","nullable":true},"requestedAt":{"type":"string","nullable":true},"acceptedAt":{"type":"string","nullable":true},"rejectedAt":{"type":"string","nullable":true},"rejectReasonId":{"type":"string","nullable":true},"price":{"type":"number"},"amount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"gross":{"type":"number"},"dueAmount":{"type":"number"},"orderDiscountsSubtotal":{"type":"number"},"orderDiscountsTax":{"type":"number"},"orderAppliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_OrderAppliedDiscountsItem"}},"voucherUid":{"type":"string"},"invoiceId":{"type":"string"},"comboLineId":{"type":"string"},"comboOptionUid":{"type":"string"},"locked":{"type":"boolean","nullable":true},"lockedBy":{"type":"string"},"lockedAt":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"uomUid":{"type":"string"},"appliedModifiers":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineM_AppliedModifiersItem"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"can":{"type":"array","items":{"type":"string","enum":["accept","comp","delete","discount","edit","fire","reject","request","send","void"]}},"subinventoryUid":{"type":"string"},"returns":{"type":"array","items":{"$ref":"#/components/schemas/ReturnLineM"}},"returnedQuantity":{"type":"number"}},"required":["quantity","seats","status","price","amount","tax","subtotal","taxRate","subtotalDiscounts","taxDiscounts","totalDiscounts","gross","dueAmount","orderDiscountsSubtotal","orderDiscountsTax","orderAppliedDiscounts","invoiceId","id","uid","productUid","appliedModifiers","appliedDiscounts","can","returns","returnedQuantity"]},"OrderLineM_OrderAppliedDiscountsItem":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"}},"required":["id","amount","subtotal","tax"]},"OrderLineM_AppliedModifiersItem":{"type":"object","properties":{"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/AppliedModifierOptionM"}}},"required":["id","options"]},"AppliedModifierOptionM":{"type":"object","properties":{"quantity":{"type":"number"},"amount":{"type":"number"},"price":{"type":"number"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"modifierUid":{"type":"string"}},"required":["quantity","amount","visible","id","modifierUid"]},"AppliedDiscountM":{"type":"object","properties":{"type":{"type":"string","enum":["custom-fixed","custom-percent","fixed","percent","reprice","unknown"]},"value":{"type":"number"},"excludeTax":{"type":"boolean"},"source":{"type":"string","enum":["deliverect","discount","loyalty-level","loyalty-points","loyalty-program","loyalty-tag"]},"sourceId":{"type":"string"},"locales":{"$ref":"#/components/schemas/Record_5494b96e"},"amount":{"type":"number"},"subtotalAmount":{"type":"number"},"taxAmount":{"type":"number"},"reasonId":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true},"invoiceId":{"type":"string","nullable":true},"id":{"type":"string"}},"required":["type","value","excludeTax","amount","subtotalAmount","taxAmount","id"]},"ReturnLineM":{"type":"object","properties":{"quantity":{"type":"number"},"waste":{"type":"boolean"},"invoiceId":{"type":"string"},"reasonId":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"uid":{"type":"string"}},"required":["quantity","waste","invoiceId","price","amount","subtotal","tax","gross","id","uid"]},"PaymentM":{"type":"object","properties":{"type":{"type":"string","enum":["receipt","refund"]},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"completedAt":{"type":"string"},"reversedAt":{"type":"string"},"custom":{"type":"boolean"},"amount":{"type":"number"},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"invoiceId":{"type":"string"},"note":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["confirm","delete","edit","pay","print","refund"]}},"methodUid":{"type":"string"}},"required":["type","status","custom","amount","invoiceId","id","can"]},"InvoiceM":{"type":"object","properties":{"type":{"type":"string","enum":["credit-note","debit-note","prepayment","standard"]},"status":{"type":"string","enum":["closed","open"]},"number":{"type":"number"},"source":{"type":"string"},"closedAt":{"type":"string"},"referenceInvoiceId":{"type":"string"},"applyExpiresAt":{"type":"string"},"checkPrintCount":{"type":"number"},"invoicePrintCount":{"type":"number"},"totalDiscount":{"type":"number"},"taxDiscount":{"type":"number"},"subtotalDiscount":{"type":"number"},"subtotal":{"type":"number"},"tax":{"type":"number"},"gross":{"type":"number"},"taxable":{"type":"number"},"total":{"type":"number"},"totalLineDiscounts":{"type":"number"},"prepaidTaxable":{"type":"number"},"prepaidTax":{"type":"number"},"totalPrepaid":{"type":"number"},"balanceDue":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"paidAmount":{"type":"number"},"appliedInvoices":{"type":"array","items":{"$ref":"#/components/schemas/AppliedInvoiceM"}},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceM_LinesItem"}},"can":{"type":"array","items":{"type":"string","enum":["close","delete","pre-print","print","send","update"]}}},"required":["type","status","totalDiscount","taxDiscount","subtotalDiscount","subtotal","tax","gross","taxable","total","totalLineDiscounts","prepaidTaxable","prepaidTax","totalPrepaid","balanceDue","id","uid","paidAmount","appliedInvoices","appliedDiscounts","lines","can"]},"AppliedInvoiceM":{"type":"object","properties":{"code":{"type":"string"},"balance":{"type":"number"},"taxableBalance":{"type":"number"},"taxBalance":{"type":"number"},"sourceDate":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"}},"required":["code","balance","taxableBalance","taxBalance","sourceDate","uid"]},"InvoiceM_LinesItem":{"type":"object","properties":{"id":{"type":"string"},"uid":{"type":"string"},"price":{"type":"number"},"amount":{"type":"number"},"dueAmount":{"type":"number"},"tax":{"type":"number"},"subtotal":{"type":"number"},"taxRate":{"type":"number"},"gross":{"type":"number"},"quantity":{"type":"number"},"productUid":{"type":"string"},"subtotalDiscounts":{"type":"number"},"taxDiscounts":{"type":"number"},"totalDiscounts":{"type":"number"},"referenceLineId":{"type":"string"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"appliedDiscounts":{"type":"array","items":{"$ref":"#/components/schemas/AppliedDiscountM"}}},"required":["id","uid","price","amount","dueAmount","tax","subtotal","taxRate","gross","quantity","productUid","subtotalDiscounts","taxDiscounts","totalDiscounts","status","appliedDiscounts"]},"GetOrderByTable_Data_Order_AlertsItem":{"type":"object","properties":{"type":{"type":"string","enum":["order-not-sent","pending-order-request"]}},"required":["type"]},"UserMap_1_89800dd9":{"type":"object","properties":{}},"TableSummaryM":{"type":"object","properties":{"name":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"circle":{"type":"boolean","nullable":true},"minSeats":{"type":"number"},"maxSeats":{"type":"number"},"archived":{"type":"boolean"},"id":{"type":"string"},"areaId":{"type":"string"}},"required":["name","x","y","width","height","minSeats","maxSeats","id","areaId"]},"AreaSummaryM":{"type":"object","properties":{"locales":{"type":"object"},"backgroundImage":{"type":"string"},"id":{"type":"string"},"branchId":{"type":"string"}},"required":["locales","id","branchId"]},"PaymentMethodMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ProductM":{"type":"object","properties":{"image":{"type":"string"},"price":{"type":"number"},"locales":{"type":"object"},"calories":{"type":"number"},"sort":{"type":"number"},"allergies":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"posImageUrl":{"type":"string"},"type":{"type":"string","enum":["combo","prepared","raw","service","wallet-voucher"]},"sku":{"type":"string"},"inventory":{"type":"boolean"},"primaryUomUid":{"type":"string"},"voucherValidaty":{"type":"number"},"voucherPayLimit":{"type":"number"},"voucherSharingLimit":{"type":"number"},"voucherAccess":{"type":"string","enum":["anonymous","holder"]},"voucherDirectPay":{"type":"boolean"},"voucherTopup":{"type":"boolean"},"voucherAutoTopup":{"type":"boolean"},"voucherActivationEndDate":{"type":"string"},"id":{"type":"string"},"categoryId":{"type":"string"},"taxGroupUid":{"type":"string"},"bomUid":{"type":"string"},"listUids":{"type":"array","items":{"type":"string"}},"comboGroups":{"type":"array","items":{"$ref":"#/components/schemas/ComboGroupM"}},"modifiers":{"type":"array","items":{"$ref":"#/components/schemas/ModifierAssignmentM"}}},"required":["price","locales","id","categoryId","comboGroups","modifiers"]},"ComboGroupM":{"type":"object","properties":{"locales":{"type":"object"},"min":{"type":"number"},"max":{"type":"number"},"uid":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ComboOptionM"}}},"required":["locales","min","max","uid","options"]},"ComboOptionM":{"type":"object","properties":{"upcharge":{"type":"number"},"selected":{"type":"boolean"},"uid":{"type":"string"},"productUId":{"type":"string"}},"required":["uid","productUId"]},"ModifierAssignmentM":{"type":"object","properties":{"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionAssignmentM"}}},"required":["id","options"]},"ModifierOptionAssignmentM":{"type":"object","properties":{"defaultQuantity":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["id"]},"ModifierMap":{"type":"object","properties":{"locales":{"type":"object"},"minSelection":{"type":"number"},"maxSelection":{"type":"number"},"id":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ModifierOptionMap"}}},"required":["locales","id"]},"ModifierOptionMap":{"type":"object","properties":{"id":{"type":"string"},"locales":{"type":"object"},"price":{"type":"number"},"isActive":{"type":"boolean"},"sortNumber":{"type":"number"},"multiple":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uomAssignmentUid":{"type":"string"},"uomUid":{"type":"string"},"productUid":{"type":"string"}},"required":["id","locales","multiple"]},"DiscountMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"GetOrderByTableApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetOrderByTable_Error"}},"required":["error"]},"GetOrderByTable_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetOrderByTable_ErrorCodes_enum"}]}},"required":["code"]},"GetOrderByTable_ErrorCodes_enum":{"type":"string","enum":["NO_ACTIVE_ORDER"]}}},"paths":{"/v1/om/orders/by-table/{tableUid}":{"get":{"operationId":"Orders_getByTable","parameters":[{"name":"tableUid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderByTableApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrderByTableApiError"}}}}},"summary":"Returns the current open order for the specified table.","tags":["Orders"]}}}}
```


# Order Lines

## POST /v1/om/order-lines

> Creates a new order line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateOrderLineApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateOrderLine_Params"}},"required":["params"]},"CreateOrderLine_Params":{"type":"object","properties":{"orderId":{"type":"string"},"productId":{"type":"string"},"quantity":{"type":"number"},"seats":{"type":"array","items":{"type":"number"}},"course":{"type":"number"},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"invoiceId":{"type":"string"},"comboLineId":{"type":"string"},"comboOptionUid":{"type":"string"},"price":{"type":"number"},"skipCalculate":{"type":"boolean"},"note":{"type":"string"},"locked":{"type":"boolean","nullable":true}},"required":["orderId","productId","quantity"]},"CreateOrderLineApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateOrderLine_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateOrderLine_Data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CreateOrderLineApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateOrderLine_Error"}},"required":["error"]},"CreateOrderLine_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateOrderLine_ErrorCodes_enum"}]}},"required":["code"]},"CreateOrderLine_ErrorCodes_enum":{"type":"string","enum":["INVALID_QUANTITY","INVOICE_CLOSED","INVOICE_NOT_FOUND","InvalidDeviceId","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/order-lines":{"post":{"description":"","operationId":"OrderLines_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderLineApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderLineApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderLineApiError"}}}}},"summary":"Creates a new order line.","tags":["Order Lines"]}}}}
```

## DELETE /v1/om/order-lines/{uid}

> Deletes a draft order line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteOrderLineApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/DeleteOrderLine_Params"}},"required":["params"]},"DeleteOrderLine_Params":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"}},"required":["id","orderId"]},"DeleteOrderLineApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/DeleteOrderLine_Error"}},"required":["error"]},"DeleteOrderLine_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/DeleteOrderLine_ErrorCodes_enum"}]}},"required":["code"]},"DeleteOrderLine_ErrorCodes_enum":{"type":"string","enum":["INVALID_OPERATION","INVOICE_CLOSED","INVOICE_NOT_FOUND","LINE_LOCKED","NOT_FOUND","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/order-lines/{uid}":{"delete":{"operationId":"OrderLines_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteOrderLineApiRequest"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteOrderLineApiError"}}}}},"summary":"Deletes a draft order line.","tags":["Order Lines"]}}}}
```

## PATCH /v1/om/order-lines/{uid}

> Updates an order line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateOrderLineApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateOrderLine_Params"}},"required":["params"]},"UpdateOrderLine_Params":{"type":"object","properties":{"quantity":{"type":"number"},"seats":{"type":"array","items":{"type":"number"}},"status":{"type":"string","enum":["Comped","Draft","Fired","New","Ready","Rejected","Request","Sent","Served","Voided"]},"course":{"type":"number"},"note":{"type":"string"},"invoiceId":{"type":"string"},"locked":{"type":"boolean","nullable":true}}},"UpdateOrderLineApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateOrderLine_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateOrderLine_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"UpdateOrderLineApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateOrderLine_Error"}},"required":["error"]},"UpdateOrderLine_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateOrderLine_ErrorCodes_enum"}]}},"required":["code"]},"UpdateOrderLine_ErrorCodes_enum":{"type":"string","enum":["INVALID_QUANTITY","INVOICE_CLOSED","INVOICE_NOT_FOUND","LINE_LOCKED","NoChanges","NotFound","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/order-lines/{uid}":{"patch":{"description":"","operationId":"OrderLines_001_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderLineApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderLineApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderLineApiError"}}}}},"summary":"Updates an order line.","tags":["Order Lines"]}}}}
```

## PATCH /v1/om/order-lines/{uid}/void

> Voids an order line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"VoidOrderLineApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/VoidOrderLine_Params"}},"required":["params"]},"VoidOrderLine_Params":{"type":"object","properties":{"waste":{"type":"boolean"},"reasonId":{"type":"string"}},"required":["waste","reasonId"]},"VoidOrderLineApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/VoidOrderLine_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"VoidOrderLine_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"VoidOrderLineApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/VoidOrderLine_Error"}},"required":["error"]},"VoidOrderLine_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/VoidOrderLine_ErrorCodes_enum"}]}},"required":["code"]},"VoidOrderLine_ErrorCodes_enum":{"type":"string","enum":["INVALID_OPERATION","INVOICE_CLOSED","INVOICE_NOT_FOUND","LINE_LOCKED","MISSING_PRODUCT","NOT_FOUND","NO_PERMISSION","ORDER_CANCELED","ORDER_CLOSED","PRINTERS_NOT_DEFINED","PRINTERS_OFFLINE","REASON_DISABLED","REASON_NOT_FOUND"]}}},"paths":{"/v1/om/order-lines/{uid}/void":{"patch":{"operationId":"OrderLines_void","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidOrderLineApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidOrderLineApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidOrderLineApiError"}}}}},"summary":"Voids an order line.","tags":["Order Lines"]}}}}
```

## PATCH /v1/om/order-lines/{uid}/apply-modifier

> Applies a modifier to order line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ApplyModifierApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/ApplyModifier_Params"}},"required":["params"]},"ApplyModifier_Params":{"type":"object","properties":{"modifierId":{"type":"string"},"options":{"type":"array","items":{"$ref":"#/components/schemas/ApplyModifier_Params_OptionsItem"}}},"required":["modifierId","options"]},"ApplyModifier_Params_OptionsItem":{"type":"object","properties":{"id":{"type":"string"},"quantity":{"type":"number"},"price":{"type":"number"}},"required":["id","quantity"]},"ApplyModifierApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ApplyModifier_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ApplyModifier_Data":{"type":"object","properties":{}},"ApplyModifierApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApplyModifier_Error"}},"required":["error"]},"ApplyModifier_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ApplyModifier_ErrorCodes_enum"}]}},"required":["code"]},"ApplyModifier_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","LINE_LOCKED","LINE_NOT_FOUND","OPTION_NOT_FOUND","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/order-lines/{uid}/apply-modifier":{"patch":{"operationId":"OrderLines_modify","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyModifierApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyModifierApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyModifierApiError"}}}}},"summary":"Applies a modifier to order line.","tags":["Order Lines"]}}}}
```

## PATCH /v1/om/order-lines/{uid}/update-modifier

> Updates applied modifier option.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateAppliedModifierApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateAppliedModifier_Params"}},"required":["params"]},"UpdateAppliedModifier_Params":{"type":"object","properties":{"modifierId":{"type":"string"},"modifierOptionId":{"type":"string"},"quantity":{"type":"number"}},"required":["modifierId","modifierOptionId"]},"UpdateAppliedModifierApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateAppliedModifier_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateAppliedModifier_Data":{"type":"object","properties":{}},"ApplyModifierApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApplyModifier_Error"}},"required":["error"]},"ApplyModifier_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ApplyModifier_ErrorCodes_enum"}]}},"required":["code"]},"ApplyModifier_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","LINE_LOCKED","LINE_NOT_FOUND","OPTION_NOT_FOUND","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/order-lines/{uid}/update-modifier":{"patch":{"operationId":"OrderLines_updateModifier","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedModifierApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedModifierApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyModifierApiError"}}}}},"summary":"Updates applied modifier option.","tags":["Order Lines"]}}}}
```

## PATCH /v1/om/order-lines/{uid}/discount

> Applies a discount at line level

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ApplyLineDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/ApplyLineDiscount_Params"}},"required":["params"]},"ApplyLineDiscount_Params":{"type":"object","properties":{"discountId":{"type":"string"},"reasonId":{"type":"string"},"comment":{"type":"string"}},"required":["discountId"]},"ApplyLineDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ApplyLineDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ApplyLineDiscount_Data":{"type":"object","properties":{}},"ApplyLineDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApplyLineDiscount_Error"}},"required":["error"]},"ApplyLineDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ApplyLineDiscount_ErrorCodes_enum"}]}},"required":["code"]},"ApplyLineDiscount_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","LINE_NOT_FOUND","NO_PERMISSION","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED","REASON_REQUIRED"]}}},"paths":{"/v1/om/order-lines/{uid}/discount":{"patch":{"operationId":"OrderLines_discount","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyLineDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyLineDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyLineDiscountApiError"}}}}},"summary":"Applies a discount at line level","tags":["Order Lines"]}}}}
```

## PATCH /v1/om/order-lines/{uid}/update-discount

> Updates applied discount at line level.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateAppliedLineDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateAppliedLineDiscount_Params"}},"required":["params"]},"UpdateAppliedLineDiscount_Params":{"type":"object","properties":{"discountId":{"type":"string"},"reasonId":{"type":"string","nullable":true},"comment":{"type":"string","nullable":true}},"required":["discountId"]},"UpdateAppliedLineDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateAppliedLineDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateAppliedLineDiscount_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"UpdateAppliedLineDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateAppliedLineDiscount_Error"}},"required":["error"]},"UpdateAppliedLineDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateAppliedLineDiscount_ErrorCodes_enum"}]}},"required":["code"]},"UpdateAppliedLineDiscount_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","LINE_NOT_FOUND","NO_PERMISSION","NoChanges","NotFound","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED","REASON_DISABLED","REASON_NOT_FOUND","REASON_REQUIRED"]}}},"paths":{"/v1/om/order-lines/{uid}/update-discount":{"patch":{"operationId":"OrderLines_updateDiscount","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedLineDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedLineDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAppliedLineDiscountApiError"}}}}},"summary":"Updates applied discount at line level.","tags":["Order Lines"]}}}}
```

## PATCH /v1/om/order-lines/{uid}/cancel-discount

> Cancels a discount at order level.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CancelLineDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CancelLineDiscount_Params"}},"required":["params"]},"CancelLineDiscount_Params":{"type":"object","properties":{"discountId":{"type":"string"}},"required":["discountId"]},"CancelLineDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CancelLineDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CancelLineDiscount_Data":{"type":"object","properties":{}},"CancelLineDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CancelLineDiscount_Error"}},"required":["error"]},"CancelLineDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CancelLineDiscount_ErrorCodes_enum"}]}},"required":["code"]},"CancelLineDiscount_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","NO_PERMISSION","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED"]}}},"paths":{"/v1/om/order-lines/{uid}/cancel-discount":{"patch":{"operationId":"OrderLines_002_cancelDiscount","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelLineDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelLineDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelLineDiscountApiError"}}}}},"summary":"Cancels a discount at order level.","tags":["Order Lines"]}}}}
```


# Invoices

## POST /v1/om/invoices

> Creates a new invoice associated with specified order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateInvoiceApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateInvoice_Params"}},"required":["params"]},"CreateInvoice_Params":{"type":"object","properties":{"orderId":{"type":"string"},"type":{"type":"string","enum":["credit-note","debit-note","prepayment","standard"]},"referenceInvoiceId":{"type":"string"},"applyExpiresAt":{"type":"string"}},"required":["orderId"]},"CreateInvoiceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateInvoice_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateInvoice_Data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CreateInvoiceApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateInvoice_Error"}},"required":["error"]},"CreateInvoice_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateInvoice_ErrorCodes_enum"}]}},"required":["code"]},"CreateInvoice_ErrorCodes_enum":{"type":"string","enum":["NON_STANDARD_REF_INVOICE","ORDER_CANCELED","ORDER_CLOSED","REF_INVOICE_NOT_FOUND","REF_INVOICE_STILL_OPEN","TYPE_NOT_SUPPORTED"]}}},"paths":{"/v1/om/invoices":{"post":{"description":"","operationId":"Invoices_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceApiError"}}}}},"summary":"Creates a new invoice associated with specified order.","tags":["Invoices"]}}}}
```

## DELETE /v1/om/invoices/{uid}

> Delates an invoice.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteInvoiceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteInvoice_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteInvoice_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"DeleteInvoiceApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/DeleteInvoice_Error"}},"required":["error"]},"DeleteInvoice_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/DeleteInvoice_ErrorCodes_enum"}]}},"required":["code"]},"DeleteInvoice_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_CONTAIN_LINES","INVOICE_NOT_FOUND","NOT_ALLOWED","NotFound","ORDER_CANCELED","ORDER_CLOSED"]}}},"paths":{"/v1/om/invoices/{uid}":{"delete":{"description":"","operationId":"Invoices_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteInvoiceApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteInvoiceApiError"}}}}},"summary":"Delates an invoice.","tags":["Invoices"]}}}}
```

## PATCH /v1/om/invoices/{uid}

> Updates an invoice.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateInvoiceApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateInvoice_Params"}},"required":["params"]},"UpdateInvoice_Params":{"type":"object","properties":{"orderId":{"type":"string"},"id":{"type":"string"},"referenceInvoiceId":{"type":"string"},"applyExpiresAt":{"type":"string"}},"required":["orderId","id"]},"UpdateInvoiceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateInvoice_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateInvoice_Data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"UpdateInvoiceApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateInvoice_Error"}},"required":["error"]},"UpdateInvoice_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateInvoice_ErrorCodes_enum"}]}},"required":["code"]},"UpdateInvoice_ErrorCodes_enum":{"type":"string","enum":["NoChanges","NotFound"]}}},"paths":{"/v1/om/invoices/{uid}":{"patch":{"description":"","operationId":"Invoices_001_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceApiError"}}}}},"summary":"Updates an invoice.","tags":["Invoices"]}}}}
```

## PATCH /v1/om/invoices/{uid}/close

> Finalizes and closes an invoice.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CloseInvoiceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CloseInvoice_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CloseInvoice_Data":{"type":"object","properties":{"invoiceNumber":{"type":"number"},"invoiceSource":{"type":"string"},"invoicedAt":{"type":"string"}},"required":["invoiceNumber","invoiceSource","invoicedAt"]},"CloseInvoiceApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CloseInvoice_Error"}},"required":["error"]},"CloseInvoice_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CloseInvoice_ErrorCodes_enum"}]}},"required":["code"]},"CloseInvoice_ErrorCodes_enum":{"type":"string","enum":["ALREADY_CLOSED","CUSTOMER_REQUIRED","DRAFT_LINES_EXISTS","GIFT_CARD_RECIPIENT_NOT_EXIST","INVALID_GIFT_CARD_RECIPIENT_PHONE","INVOICE_EMPTY","MISSING_GIFT_CARD_RECIPIENT","ORDER_CANCELED","ORDER_CLOSED","ORDER_NOT_CLOSED","PAYMENT_NOT_COMPLETE"]}}},"paths":{"/v1/om/invoices/{uid}/close":{"patch":{"operationId":"Invoices_close","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseInvoiceApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloseInvoiceApiError"}}}}},"summary":"Finalizes and closes an invoice.","tags":["Invoices"]}}}}
```

## POST /v1/om/invoices/{uid}/send

> Sends invoice via email to customer.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"EmailInvoiceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/EmailInvoice_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"EmailInvoice_Data":{"type":"object","properties":{"success":{"type":"boolean"},"messageId":{"type":"string"}},"required":["success"]},"EmailInvoiceApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/EmailInvoice_Error"}},"required":["error"]},"EmailInvoice_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/EmailInvoice_ErrorCodes_enum"}]}},"required":["code"]},"EmailInvoice_ErrorCodes_enum":{"type":"string","enum":["EMAIL_NOT_DEFINED","INVOICE_NOT_CLOSED","INVOICE_NOT_FOUND","INVOICE_NOT_GENERATED"]}}},"paths":{"/v1/om/invoices/{uid}/send":{"post":{"operationId":"Invoices_updateModifier","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInvoiceApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailInvoiceApiError"}}}}},"summary":"Sends invoice via email to customer.","tags":["Invoices"]}}}}
```


# Payments

## POST /v1/om/payments

> Creates a payment for the specified order.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreatePaymentApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreatePayment_Params"}},"required":["params"]},"CreatePayment_Params":{"type":"object","properties":{"orderId":{"type":"string"},"type":{"type":"string","enum":["receipt","refund"]},"custom":{"type":"boolean"},"amount":{"type":"number"},"methodId":{"type":"string"},"customerUid":{"type":"string"},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"invoiceId":{"type":"string"},"note":{"type":"string","nullable":true}},"required":["orderId","type"]},"CreatePaymentApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreatePayment_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreatePayment_Data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"CreatePaymentApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreatePayment_Error"}},"required":["error"]},"CreatePayment_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreatePayment_ErrorCodes_enum"}]}},"required":["code"]},"CreatePayment_ErrorCodes_enum":{"type":"string","enum":["INVALID_STATUS","INVOICE_CLOSED","INVOICE_NOT_FOUND","InvalidParameter","LIMIT_REACHED","MethodNotFound","ORDER_CANCELED","ORDER_CLOSED"]}}},"paths":{"/v1/om/payments":{"post":{"description":"","operationId":"Payments_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentApiError"}}}}},"summary":"Creates a payment for the specified order.","tags":["Payments"]}}}}
```

## DELETE /v1/om/payments/{uid}

> Deletes a payment.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeletePaymentApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeletePayment_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeletePayment_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentM"}},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodMap"}}},"required":["items","paymentMethods"]},"PaymentM":{"type":"object","properties":{"type":{"type":"string","enum":["receipt","refund"]},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"completedAt":{"type":"string"},"reversedAt":{"type":"string"},"custom":{"type":"boolean"},"amount":{"type":"number"},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"invoiceId":{"type":"string"},"note":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["confirm","delete","edit","pay","print","refund"]}},"methodUid":{"type":"string"}},"required":["type","status","custom","amount","invoiceId","id","can"]},"PaymentMethodMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"DeletePaymentApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/DeletePayment_Error"}},"required":["error"]},"DeletePayment_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/DeletePayment_ErrorCodes_enum"}]}},"required":["code"]},"DeletePayment_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","NotFound","ORDER_CANCELED","ORDER_CLOSED","PAYMENT_COMPLETED","PAYMENT_IN_PROGRESS"]}}},"paths":{"/v1/om/payments/{uid}":{"delete":{"description":"","operationId":"Payments_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePaymentApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePaymentApiError"}}}}},"summary":"Deletes a payment.","tags":["Payments"]}}}}
```

## PATCH /v1/om/payments/{uid}

> Updates a payament.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdatePaymentApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdatePayment_Params"}},"required":["params"]},"UpdatePayment_Params":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"amount":{"type":"number"},"methodId":{"type":"string"},"custom":{"type":"boolean"},"correction":{"type":"boolean"},"customerUid":{"type":"string"},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"note":{"type":"string","nullable":true}},"required":["id","orderId"]},"UpdatePaymentApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdatePayment_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdatePayment_Data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"UpdatePaymentApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdatePayment_Error"}},"required":["error"]},"UpdatePayment_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdatePayment_ErrorCodes_enum"}]}},"required":["code"]},"UpdatePayment_ErrorCodes_enum":{"type":"string","enum":["CHANGE_STATUS_NOT_ALLOWED","INVALID_STATUS","INVOICE_CLOSED","INVOICE_NOT_FOUND","InvalidParameter","LIMIT_REACHED","MethodNotFound","NoChanges","NotFound","ORDER_CANCELED","ORDER_CLOSED","PAYMENT_COMPLETED"]}}},"paths":{"/v1/om/payments/{uid}":{"patch":{"description":"","operationId":"Payments_001_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentApiError"}}}}},"summary":"Updates a payament.","tags":["Payments"]}}}}
```

## PATCH /v1/om/payments/{uid}/confirm

> Marks a payment as completed.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ConfirmPaymentApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/ConfirmPayment_Params"}},"required":["params"]},"ConfirmPayment_Params":{"type":"object","properties":{"id":{"type":"string"},"orderId":{"type":"string"},"customerUid":{"type":"string"},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"}},"required":["id","orderId"]},"ConfirmPaymentApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ConfirmPayment_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ConfirmPayment_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentM"}},"paymentMethods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodMap"}}},"required":["items","paymentMethods"]},"PaymentM":{"type":"object","properties":{"type":{"type":"string","enum":["receipt","refund"]},"status":{"type":"string","enum":["complete","pending","progress","reversed"]},"completedAt":{"type":"string"},"reversedAt":{"type":"string"},"custom":{"type":"boolean"},"amount":{"type":"number"},"sourcePaymentId":{"type":"string","nullable":true},"transactionRef":{"type":"string","nullable":true},"attrs":{"type":"object"},"invoiceId":{"type":"string"},"note":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"can":{"type":"array","items":{"type":"string","enum":["confirm","delete","edit","pay","print","refund"]}},"methodUid":{"type":"string"}},"required":["type","status","custom","amount","invoiceId","id","can"]},"PaymentMethodMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"ConfirmPaymentApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ConfirmPayment_Error"}},"required":["error"]},"ConfirmPayment_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ConfirmPayment_ErrorCodes_enum"}]}},"required":["code"]},"ConfirmPayment_ErrorCodes_enum":{"type":"string","enum":["INVALID_OPERATION","METHOD_NOT_SELECTED","MethodNotFound","NO_PERMISSION","NoChanges","NotFound","ORDER_CANCELED","ORDER_CLOSED"]}}},"paths":{"/v1/om/payments/{uid}/confirm":{"patch":{"operationId":"Payments_confirm","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPaymentApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPaymentApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPaymentApiError"}}}}},"summary":"Marks a payment as completed.","tags":["Payments"]}}}}
```


# Returns

## POST /v1/om/return-lines

> Creates a return line for a specified order line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateReturnLineApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateReturnLine_Params"}},"required":["params"]},"CreateReturnLine_Params":{"type":"object","properties":{"lineId":{"type":"string"},"orderId":{"type":"string"},"invoiceId":{"type":"string"},"quantity":{"type":"number"},"reasonId":{"type":"string"},"waste":{"type":"boolean"}},"required":["lineId","orderId","invoiceId","quantity","waste"]},"CreateReturnLineApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateReturnLine_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateReturnLine_Data":{"type":"object","properties":{"uid":{"type":"string"}},"required":["uid"]},"CreateReturnLineApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateReturnLine_Error"}},"required":["error"]},"CreateReturnLine_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateReturnLine_ErrorCodes_enum"}]}},"required":["code"]},"CreateReturnLine_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","LIMIT_EXCEEDED","LINE_NOT_FOUND","NoChanges","NotFound","ORDER_CANCELED","ORDER_CLOSED","REASON_DISABLED","REASON_NOT_FOUND"]}}},"paths":{"/v1/om/return-lines":{"post":{"operationId":"ReturnLines_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReturnLineApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReturnLineApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReturnLineApiError"}}}}},"summary":"Creates a return line for a specified order line.","tags":["Returns"]}}}}
```

## DELETE /v1/om/return-lines/{uid}

> Deletes a return line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteReturnLineApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteReturnLine_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteReturnLine_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"DeleteReturnLineApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/DeleteReturnLine_Error"}},"required":["error"]},"DeleteReturnLine_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/DeleteReturnLine_ErrorCodes_enum"}]}},"required":["code"]},"DeleteReturnLine_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","NO_PERMISSION","NoChanges","NotFound","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED","REASON_DISABLED","REASON_NOT_FOUND"]}}},"paths":{"/v1/om/return-lines/{uid}":{"delete":{"operationId":"ReturnLines_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteReturnLineApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteReturnLineApiError"}}}}},"summary":"Deletes a return line.","tags":["Returns"]}}}}
```

## PATCH /v1/om/return-lines/{uid}

> Updates a return line.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateReturnLineApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateReturnLine_Params"}},"required":["params"]},"UpdateReturnLine_Params":{"type":"object","properties":{"uid":{"type":"string"},"waste":{"type":"boolean"},"reasonId":{"type":"string"},"quantity":{"type":"number"}},"required":["uid"]},"UpdateReturnLineApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateReturnLine_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateReturnLine_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"UpdateReturnLineApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateReturnLine_Error"}},"required":["error"]},"UpdateReturnLine_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateReturnLine_ErrorCodes_enum"}]}},"required":["code"]},"UpdateReturnLine_ErrorCodes_enum":{"type":"string","enum":["INVOICE_CLOSED","INVOICE_NOT_FOUND","LIMIT_EXCEEDED","LINE_NOT_FOUND","NO_PERMISSION","NoChanges","ORDER_CANCELED","ORDER_CLOSED","ORDER_INVOICED","REASON_DISABLED","REASON_NOT_FOUND"]}}},"paths":{"/v1/om/return-lines/{uid}":{"patch":{"operationId":"ReturnLines_001_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReturnLineApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReturnLineApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReturnLineApiError"}}}}},"summary":"Updates a return line.","tags":["Returns"]}}}}
```


# Discounts

## GET /v1/om/discounts

> Lists all discounts.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetDiscountsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetDiscounts_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetDiscounts_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DiscountMap"}}},"required":["items"]},"DiscountMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]}}},"paths":{"/v1/om/discounts":{"get":{"operationId":"Discounts_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDiscountsApiResponse"}}}}},"summary":"Lists all discounts.","tags":["Discounts"]}}}}
```

## POST /v1/om/discounts

> Creates a new discount.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateDiscount_Params"}},"required":["params"]},"CreateDiscount_Params":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/CreateDiscount_Params_Locales"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"isActive":{"type":"boolean"},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"minTotal":{"type":"number"},"withoutModifiers":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"}},"required":["locales","type","value","qualifications","orderTypes"]},"CreateDiscount_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateDiscount_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateDiscount_Params_Locales_En"}},"required":["ar","en"]},"CreateDiscount_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateDiscount_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"CreateDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateDiscount_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateDiscount_Data_Item"}},"required":["item"]},"CreateDiscount_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]}}},"paths":{"/v1/om/discounts":{"post":{"operationId":"Discounts_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDiscountApiResponse"}}}}},"summary":"Creates a new discount.","tags":["Discounts"]}}}}
```

## GET /v1/om/discounts/{uid}

> Returns a discount.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetDiscountsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetDiscounts_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetDiscounts_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DiscountMap"}}},"required":["items"]},"DiscountMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]}}},"paths":{"/v1/om/discounts/{uid}":{"get":{"operationId":"Discounts_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDiscountsApiResponse"}}}}},"summary":"Returns a discount.","tags":["Discounts"]}}}}
```

## PATCH /v1/om/discounts/{uid}

> Updates a discount.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateDiscountApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateDiscount_Params"}},"required":["params"]},"UpdateDiscount_Params":{"type":"object","properties":{"id":{"type":"string"},"locales":{"type":"object"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"isActive":{"type":"boolean"},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"minTotal":{"type":"number"},"withoutModifiers":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"}},"required":["id"]},"UpdateDiscountApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateDiscount_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateDiscount_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateDiscount_Data_Item"}},"required":["item"]},"UpdateDiscount_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"UpdateDiscountApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateDiscount_Error"}},"required":["error"]},"UpdateDiscount_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateDiscount_ErrorCodes_enum"}]}},"required":["code"]},"UpdateDiscount_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/om/discounts/{uid}":{"patch":{"operationId":"Discounts_001_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDiscountApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDiscountApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDiscountApiError"}}}}},"summary":"Updates a discount.","tags":["Discounts"]}}}}
```

## GET /v1/om/discounts/export

> Exports all orders with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportDiscountsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportDiscounts_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportDiscounts_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/DiscountMap"}},"next":{"type":"string"}},"required":["items"]},"DiscountMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"type":{"type":"string","enum":["fixed","percent","reprice"]},"value":{"type":"number"},"qualifications":{"type":"array","items":{"type":"string","enum":["line","order"]}},"orderTypes":{"type":"array","items":{"type":"string","enum":["delivery","dine-in","pickup","to-go"]}},"max":{"type":"number"},"isActive":{"type":"boolean"},"excludeTax":{"type":"boolean"},"reasonRequired":{"type":"boolean"},"commentRequired":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM"}}},"required":["locales","type","value","qualifications","orderTypes","isActive","excludeTax","id","rules"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"DiscountRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DiscountRuleM_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]},"id":{"type":"string"}},"required":["conditions","action","id"]},"DiscountRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["level","order-type","product-type"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]}}},"paths":{"/v1/om/discounts/export":{"get":{"operationId":"Discounts_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportDiscountsApiResponse"}}}}},"summary":"Exports all orders with support for incremental fetching.","tags":["Discounts"]}}}}
```


# Payment Methods

## GET /v1/om/payment-methods

> Lists all payment methods.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetPaymentMethodsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetPaymentMethods_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetPaymentMethods_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodMap"}}},"required":["items"]},"PaymentMethodMap":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]}}},"paths":{"/v1/om/payment-methods":{"get":{"operationId":"PaymentMethods_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentMethodsApiResponse"}}}}},"summary":"Lists all payment methods.","tags":["Payment Methods"]}}}}
```

## GET /v1/om/payment-methods/{uid}

> Returns a payment method.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetPaymentMethodApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetPaymentMethod_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetPaymentMethod_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetPaymentMethod_Data_Item"}},"required":["item"]},"GetPaymentMethod_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"visible":{"type":"boolean"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["locales","visible","id"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true}},"required":["name"]},"GetPaymentMethodApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetPaymentMethod_Error"}},"required":["error"]},"GetPaymentMethod_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetPaymentMethod_ErrorCodes_enum"}]}},"required":["code"]},"GetPaymentMethod_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/om/payment-methods/{uid}":{"get":{"operationId":"PaymentMethods_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentMethodApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentMethodApiError"}}}}},"summary":"Returns a payment method.","tags":["Payment Methods"]}}}}
```

## GET /v1/om/payment-methods/export

> Exports all orders with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Order Management & POS API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}}},"paths":{"/v1/om/payment-methods/export":{"get":{"operationId":"PaymentMethods_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Exports all orders with support for incremental fetching.","tags":["Payment Methods"]}}}}
```


# Flow

Flow provides APIs to manage reservations, waitlists, and real-time guest status.\
With these APIs, you can track seating availability, wait times, party sizes, and table assignments.<br>

These capabilities support integrations that improve guest experience, optimize seating workflows, and enhance planning and forecasting for front-of-house operations.


# Reservations

## GET /v1/flow/reservations

> Lists all reservations.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListReservationsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListReservations_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListReservations_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReservationM"}}},"required":["items"]},"ReservationM":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"code":{"type":"string"},"businessDate":{"type":"string"},"time":{"type":"string"},"numberOfGuests":{"type":"number"},"actualNumberOfGuests":{"type":"number"},"status":{"type":"string","enum":["canceled","confirmed","declined","left","new","no-show","seated"]},"duration":{"type":"number"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"note":{"type":"string","nullable":true},"areaId":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"paid":{"type":"boolean","nullable":true},"ages":{"type":"array","items":{"$ref":"#/components/schemas/ReservationM_AgesItem"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"branchId":{"type":"string"},"customerUid":{"type":"string"},"customer":{"$ref":"#/components/schemas/ReservationM_Customer"},"tableIds":{"type":"array","items":{"type":"string"}},"can":{"type":"array","items":{"type":"string","enum":["cancel","delete","update","update-time"]}},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"feeOrderUid":{"type":"string"},"scheduledOrderUid":{"type":"string"},"experienceUids":{"type":"array","items":{"type":"string"}}},"required":["type","code","businessDate","time","numberOfGuests","actualNumberOfGuests","status","duration","uid","branchId","customerUid","customer","tableIds","can","labels"]},"ReservationM_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"ReservationM_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]}}},"paths":{"/v1/flow/reservations":{"get":{"operationId":"Reservations_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReservationsApiResponse"}}}}},"summary":"Lists all reservations.","tags":["Reservations"]}}}}
```

## POST /v1/flow/reservations

> Creates a new reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateReservationApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateReservation_Params"}},"required":["params"]},"CreateReservation_Params":{"type":"object","properties":{"branchId":{"type":"string"},"customerId":{"type":"string"},"time":{"type":"string"},"numberOfGuests":{"type":"number"},"status":{"type":"string","enum":["canceled","confirmed","declined","left","new","no-show","seated"]},"duration":{"type":"number"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"note":{"type":"string"},"areaId":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"reference":{"type":"string"},"internalNote":{"type":"string","nullable":true},"experienceUids":{"type":"array","items":{"type":"string"}},"ages":{"type":"array","items":{"$ref":"#/components/schemas/CreateReservation_Params_AgesItem"}}},"required":["branchId","customerId","time","tableIds"]},"CreateReservation_Params_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"CreateReservationApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateReservation_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateReservation_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/CreateReservation_Data_Item"}},"required":["item"]},"CreateReservation_Data_Item":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"code":{"type":"string"},"businessDate":{"type":"string"},"time":{"type":"string"},"numberOfGuests":{"type":"number"},"actualNumberOfGuests":{"type":"number"},"status":{"type":"string","enum":["canceled","confirmed","declined","left","new","no-show","seated"]},"duration":{"type":"number"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"note":{"type":"string","nullable":true},"areaId":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"paid":{"type":"boolean","nullable":true},"ages":{"type":"array","items":{"$ref":"#/components/schemas/CreateReservation_Data_Item_AgesItem"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"branchId":{"type":"string"},"customerUid":{"type":"string"},"customer":{"$ref":"#/components/schemas/CreateReservation_Data_Item_Customer"},"tableIds":{"type":"array","items":{"type":"string"}},"can":{"type":"array","items":{"type":"string","enum":["cancel","delete","update","update-time"]}},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"feeOrderUid":{"type":"string"},"scheduledOrderUid":{"type":"string"},"experienceUids":{"type":"array","items":{"type":"string"}}},"required":["type","code","businessDate","time","numberOfGuests","actualNumberOfGuests","status","duration","uid","branchId","customerUid","customer","tableIds","can","labels"]},"CreateReservation_Data_Item_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"CreateReservation_Data_Item_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]},"CreateReservationApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateReservation_Error"}},"required":["error"]},"CreateReservation_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateReservation_ErrorCodes_enum"}]}},"required":["code"]},"CreateReservation_ErrorCodes_enum":{"type":"string","enum":["BELOW_GUESTS_LIMIT","EXPEREINCE_NOT_FOUND","GUESTS_LIMIT_EXCEEDED","NO_TABLE_AVAILABLE","SELECTED_TABLES_UNAVAILABLE"]}}},"paths":{"/v1/flow/reservations":{"post":{"operationId":"Reservations_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReservationApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReservationApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReservationApiError"}}}}},"summary":"Creates a new reservation.","tags":["Reservations"]}}}}
```

## GET /v1/flow/reservations/{uid}

> Returns a specific reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetReservationApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetReservation_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetReservation_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetReservation_Data_Item"}},"required":["item"]},"GetReservation_Data_Item":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"code":{"type":"string"},"businessDate":{"type":"string"},"time":{"type":"string"},"numberOfGuests":{"type":"number"},"actualNumberOfGuests":{"type":"number"},"status":{"type":"string","enum":["canceled","confirmed","declined","left","new","no-show","seated"]},"duration":{"type":"number"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"note":{"type":"string","nullable":true},"areaId":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"paid":{"type":"boolean","nullable":true},"ages":{"type":"array","items":{"$ref":"#/components/schemas/GetReservation_Data_Item_AgesItem"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"branchId":{"type":"string"},"customerUid":{"type":"string"},"customer":{"$ref":"#/components/schemas/GetReservation_Data_Item_Customer"},"tableIds":{"type":"array","items":{"type":"string"}},"can":{"type":"array","items":{"type":"string","enum":["cancel","delete","update","update-time"]}},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"feeOrderUid":{"type":"string"},"scheduledOrderUid":{"type":"string"},"experienceUids":{"type":"array","items":{"type":"string"}}},"required":["type","code","businessDate","time","numberOfGuests","actualNumberOfGuests","status","duration","uid","branchId","customerUid","customer","tableIds","can","labels"]},"GetReservation_Data_Item_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"GetReservation_Data_Item_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]},"GetReservationApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetReservation_Error"}},"required":["error"]},"GetReservation_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetReservation_ErrorCodes_enum"}]}},"required":["code"]},"GetReservation_ErrorCodes_enum":{"type":"string","enum":["COMPACT_INACTIVE","MISSING_ID","NO_CREATE_ACTION","NotFound"]}}},"paths":{"/v1/flow/reservations/{uid}":{"get":{"operationId":"Reservations_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReservationApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReservationApiError"}}}}},"summary":"Returns a specific reservation.","tags":["Reservations"]}}}}
```

## DELETE /v1/flow/reservations/{uid}

> Deletes a specific reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteReservationApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteReservation_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteReservation_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/flow/reservations/{uid}":{"delete":{"operationId":"Reservations_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteReservationApiResponse"}}}}},"summary":"Deletes a specific reservation.","tags":["Reservations"]}}}}
```

## PATCH /v1/flow/reservations/{uid}

> Updates a specific reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateReservationApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateReservation_Params"}},"required":["params"]},"UpdateReservation_Params":{"type":"object","properties":{"time":{"type":"string"},"numberOfGuests":{"type":"number"},"status":{"type":"string","enum":["canceled","confirmed","declined","left","new","no-show","seated"]},"duration":{"type":"number"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"note":{"type":"string","nullable":true},"areaId":{"type":"string","nullable":true},"tableIds":{"type":"object"},"internalNote":{"type":"string","nullable":true},"paid":{"type":"boolean","nullable":true},"ages":{"type":"array","items":{"$ref":"#/components/schemas/UpdateReservation_Params_AgesItem"}}}},"UpdateReservation_Params_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"UpdateReservationApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateReservation_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateReservation_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateReservation_Data_Item"}},"required":["item"]},"UpdateReservation_Data_Item":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"code":{"type":"string"},"businessDate":{"type":"string"},"time":{"type":"string"},"numberOfGuests":{"type":"number"},"actualNumberOfGuests":{"type":"number"},"status":{"type":"string","enum":["canceled","confirmed","declined","left","new","no-show","seated"]},"duration":{"type":"number"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"note":{"type":"string","nullable":true},"areaId":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"paid":{"type":"boolean","nullable":true},"ages":{"type":"array","items":{"$ref":"#/components/schemas/UpdateReservation_Data_Item_AgesItem"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"branchId":{"type":"string"},"customerUid":{"type":"string"},"customer":{"$ref":"#/components/schemas/UpdateReservation_Data_Item_Customer"},"tableIds":{"type":"array","items":{"type":"string"}},"can":{"type":"array","items":{"type":"string","enum":["cancel","delete","update","update-time"]}},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"feeOrderUid":{"type":"string"},"scheduledOrderUid":{"type":"string"},"experienceUids":{"type":"array","items":{"type":"string"}}},"required":["type","code","businessDate","time","numberOfGuests","actualNumberOfGuests","status","duration","uid","branchId","customerUid","customer","tableIds","can","labels"]},"UpdateReservation_Data_Item_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"UpdateReservation_Data_Item_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]},"UpdateReservationApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateReservation_Error"}},"required":["error"]},"UpdateReservation_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateReservation_ErrorCodes_enum"}]}},"required":["code"]},"UpdateReservation_ErrorCodes_enum":{"type":"string","enum":["ACTION_NOT_ALLOWED","BELOW_GUESTS_LIMIT","NO_TABLE_AVAILABLE","NoChanges","SELECTED_TABLES_UNAVAILABLE","TABLES_NOT_SELECTED"]}}},"paths":{"/v1/flow/reservations/{uid}":{"patch":{"operationId":"Reservations_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReservationApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReservationApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateReservationApiError"}}}}},"summary":"Updates a specific reservation.","tags":["Reservations"]}}}}
```

## GET /v1/flow/reservations/export

> Exports all reservations with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportReservationsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportReservations_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportReservations_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ReservationM"}},"next":{"type":"string"}},"required":["items"]},"ReservationM":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"code":{"type":"string"},"businessDate":{"type":"string"},"time":{"type":"string"},"numberOfGuests":{"type":"number"},"actualNumberOfGuests":{"type":"number"},"status":{"type":"string","enum":["canceled","confirmed","declined","left","new","no-show","seated"]},"duration":{"type":"number"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"note":{"type":"string","nullable":true},"areaId":{"type":"string","nullable":true},"reference":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"paid":{"type":"boolean","nullable":true},"ages":{"type":"array","items":{"$ref":"#/components/schemas/ReservationM_AgesItem"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"branchId":{"type":"string"},"customerUid":{"type":"string"},"customer":{"$ref":"#/components/schemas/ReservationM_Customer"},"tableIds":{"type":"array","items":{"type":"string"}},"can":{"type":"array","items":{"type":"string","enum":["cancel","delete","update","update-time"]}},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"feeOrderUid":{"type":"string"},"scheduledOrderUid":{"type":"string"},"experienceUids":{"type":"array","items":{"type":"string"}}},"required":["type","code","businessDate","time","numberOfGuests","actualNumberOfGuests","status","duration","uid","branchId","customerUid","customer","tableIds","can","labels"]},"ReservationM_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"ReservationM_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]}}},"paths":{"/v1/flow/reservations/export":{"get":{"operationId":"Reservations_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportReservationsApiResponse"}}}}},"summary":"Exports all reservations with support for incremental fetching.","tags":["Reservations"]}}}}
```

## GET /v1/flow/reservations/availability

> Exports all reservations with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetReservationAvailability_Params_AgesItem":{"type":"object","properties":{"id":{"type":"string"},"count":{"type":"number"}},"required":["id","count"]},"GetReservationAvailabilityApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetReservationAvailability_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetReservationAvailability_Data":{"type":"object","properties":{"businessDate":{"type":"string"},"slots":{"type":"array","items":{"$ref":"#/components/schemas/GetReservationAvailability_Data_SlotsItem"}}},"required":["businessDate","slots"]},"GetReservationAvailability_Data_SlotsItem":{"type":"object","properties":{"time":{"type":"string"},"isoTime":{"type":"string"},"tables":{"type":"array","items":{"$ref":"#/components/schemas/TableSummaryM"}},"experienceUids":{"type":"array","items":{"type":"string"}}},"required":["time","isoTime","tables","experienceUids"]},"TableSummaryM":{"type":"object","properties":{"name":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"width":{"type":"number"},"height":{"type":"number"},"circle":{"type":"boolean","nullable":true},"minSeats":{"type":"number"},"maxSeats":{"type":"number"},"archived":{"type":"boolean"},"active":{"type":"boolean"},"id":{"type":"string"},"areaId":{"type":"string"}},"required":["name","x","y","width","height","minSeats","maxSeats","active","id","areaId"]},"GetReservationAvailabilityApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetReservationAvailability_Error"}},"required":["error"]},"GetReservationAvailability_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetReservationAvailability_ErrorCodes_enum"}]}},"required":["code"]},"GetReservationAvailability_ErrorCodes_enum":{"type":"string","enum":["BELOW_GUESTS_LIMIT","BUSINESS_HOURS_NOT_DEFINED","COMPACT_INACTIVE","EXPEREINCE_NOT_FOUND","MISSING_ID","NO_ACTIVE_SCHEDULE_PLAN","NO_CREATE_ACTION","NO_SCHEDULE_DEFINED","NotFound"]}}},"paths":{"/v1/flow/reservations/availability":{"get":{"operationId":"Reservations_availability","parameters":[{"name":"branchId","required":true,"in":"query","schema":{"type":"string"}},{"name":"businessDate","required":false,"in":"query","schema":{"type":"string"}},{"name":"numberOfGuests","required":true,"in":"query","schema":{"type":"number"}},{"name":"duration","required":false,"in":"query","schema":{"type":"number"}},{"name":"time","required":false,"in":"query","schema":{"type":"string"}},{"name":"areaId","required":false,"in":"query","schema":{"type":"string"}},{"name":"tableIds","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"updatedSourceId","required":false,"in":"query","schema":{"type":"string"}},{"name":"experienceUids","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"ages","required":false,"in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/GetReservationAvailability_Params_AgesItem"}}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReservationAvailabilityApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetReservationAvailabilityApiError"}}}}},"summary":"Exports all reservations with support for incremental fetching.","tags":["Reservations"]}}}}
```

## GET /v1/flow/reservations/by-customer/{uid}

> Lists all reservations for a spesific customer.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListCustomerReservationsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListCustomerReservations_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListCustomerReservations_Data":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object"}},"next":{"type":"string"}},"required":["items"]}}},"paths":{"/v1/flow/reservations/by-customer/{uid}":{"get":{"operationId":"Reservations_byCustomer","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCustomerReservationsApiResponse"}}}}},"summary":"Lists all reservations for a spesific customer.","tags":["Reservations"]}}}}
```


# Waitlist

## POST /v1/flow/waitlist

> Creates a new waitlist reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateWaitEntryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateWaitEntry_Params"}},"required":["params"]},"CreateWaitEntry_Params":{"type":"object","properties":{"branchId":{"type":"string"},"customerId":{"type":"string"},"numberOfGuests":{"type":"number"},"note":{"type":"string"},"areaId":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"duration":{"type":"number"},"internalNote":{"type":"string","nullable":true}},"required":["branchId","customerId","numberOfGuests"]},"CreateWaitEntryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateWaitEntry_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateWaitEntry_Data":{"type":"object","properties":{"waitEntry":{"$ref":"#/components/schemas/CreateWaitEntry_Data_WaitEntry"}},"required":["waitEntry"]},"CreateWaitEntry_Data_WaitEntry":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"businessDate":{"type":"string"},"status":{"type":"string","enum":["admitted","canceled","declined","left","seated","waiting"]},"code":{"type":"string"},"numberOfGuests":{"type":"number"},"areaId":{"type":"string"},"duration":{"type":"number"},"note":{"type":"string"},"admittedAt":{"type":"string"},"declinedAt":{"type":"string"},"canceledAt":{"type":"string"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"customer":{"$ref":"#/components/schemas/CreateWaitEntry_Data_WaitEntry_Customer"},"number":{"type":"number"},"position":{"type":"number"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/WaitNotificationMap"}},"can":{"type":"array","items":{"type":"string","enum":["admit","cancel","decline","edit","left","notify","resume","seat"]}},"estimatedSeatAt":{"type":"string"},"estimatedLeaveAt":{"type":"string"},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"flowEntryUid":{"type":"string"}},"required":["type","businessDate","status","code","numberOfGuests","duration","uid","id","tableIds","customer","number","position","notifications","can","labels"]},"CreateWaitEntry_Data_WaitEntry_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"WaitNotificationMap":{"type":"object","properties":{"time":{"type":"string"},"status":{"type":"string","enum":["Failed","Pending","Sent"]},"error":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"text":{"type":"string"}},"required":["time","status","id","text"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]},"CreateWaitEntryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateWaitEntry_Error"}},"required":["error"]},"CreateWaitEntry_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateWaitEntry_ErrorCodes_enum"}]}},"required":["code"]},"CreateWaitEntry_ErrorCodes_enum":{"type":"string","enum":["COMPACT_INACTIVE","CUSTOMER_NOT_FOUND","MISSING_ID","NO_CREATE_ACTION","NO_TABLE_AVAILABLE","NotFound","SELECTED_TABLES_UNAVAILABLE","WAITPERIOD_NOT_FOUND"]}}},"paths":{"/v1/flow/waitlist":{"post":{"operationId":"Waitlist_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWaitEntryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWaitEntryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWaitEntryApiError"}}}}},"summary":"Creates a new waitlist reservation.","tags":["Waitlist"]}}}}
```

## PATCH /v1/flow/waitlist/{uid}

> Updates a specific waitlist reservation.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateWaitEntryApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateWaitEntry_Params"}},"required":["params"]},"UpdateWaitEntry_Params":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["admitted","canceled","declined","left","seated","waiting"]},"numberOfGuests":{"type":"number","nullable":true},"duration":{"type":"number"},"areaId":{"type":"string"},"tableIds":{"type":"object"},"note":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true}},"required":["id"]},"UpdateWaitEntryApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateWaitEntry_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateWaitEntry_Data":{"type":"object","properties":{"waitEntry":{"$ref":"#/components/schemas/UpdateWaitEntry_Data_WaitEntry"}},"required":["waitEntry"]},"UpdateWaitEntry_Data_WaitEntry":{"type":"object","properties":{"type":{"type":"string","enum":["queue","request","reservation"]},"businessDate":{"type":"string"},"status":{"type":"string","enum":["admitted","canceled","declined","left","seated","waiting"]},"code":{"type":"string"},"numberOfGuests":{"type":"number"},"areaId":{"type":"string"},"duration":{"type":"number"},"note":{"type":"string"},"admittedAt":{"type":"string"},"declinedAt":{"type":"string"},"canceledAt":{"type":"string"},"seatedAt":{"type":"string"},"leftAt":{"type":"string"},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"id":{"type":"string"},"tableIds":{"type":"array","items":{"type":"string"}},"customer":{"$ref":"#/components/schemas/UpdateWaitEntry_Data_WaitEntry_Customer"},"number":{"type":"number"},"position":{"type":"number"},"notifications":{"type":"array","items":{"$ref":"#/components/schemas/WaitNotificationMap"}},"can":{"type":"array","items":{"type":"string","enum":["admit","cancel","decline","edit","left","notify","resume","seat"]}},"estimatedSeatAt":{"type":"string"},"estimatedLeaveAt":{"type":"string"},"recommendedTableIds":{"type":"array","items":{"type":"string"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelAssignmentM"}},"flowEntryUid":{"type":"string"}},"required":["type","businessDate","status","code","numberOfGuests","duration","uid","id","tableIds","customer","number","position","notifications","can","labels"]},"UpdateWaitEntry_Data_WaitEntry_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"passcode":{"type":"string","nullable":true},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"WaitNotificationMap":{"type":"object","properties":{"time":{"type":"string"},"status":{"type":"string","enum":["Failed","Pending","Sent"]},"error":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"text":{"type":"string"}},"required":["time","status","id","text"]},"LabelAssignmentM":{"type":"object","properties":{"uid":{"type":"string"},"labelUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","labelUid"]},"UpdateWaitEntryApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateWaitEntry_Error"}},"required":["error"]},"UpdateWaitEntry_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateWaitEntry_ErrorCodes_enum"}]}},"required":["code"]},"UpdateWaitEntry_ErrorCodes_enum":{"type":"string","enum":["NoChanges","TABLE_NOT_SELECTED"]}}},"paths":{"/v1/flow/waitlist/{uid}":{"patch":{"operationId":"Waitlist_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWaitEntryApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWaitEntryApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWaitEntryApiError"}}}}},"summary":"Updates a specific waitlist reservation.","tags":["Waitlist"]}}}}
```


# Experiences

## GET /v1/flow/experiences

> Lists all experiences.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListExperiencesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListExperiences_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListExperiences_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExperienceM"}},"next":{"type":"string"}},"required":["items"]},"ExperienceM":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minGuests":{"type":"number","nullable":true},"maxGuests":{"type":"number","nullable":true},"sort":{"type":"number","nullable":true},"feeInvoiceType":{"type":"object"},"feePerGuest":{"type":"boolean","nullable":true},"feeAppendLoyaltyBenefits":{"type":"boolean"},"default":{"type":"boolean","nullable":true},"image":{"type":"string","nullable":true},"ageGroups":{"type":"array","items":{"$ref":"#/components/schemas/ExperienceM_AgeGroupsItem"}},"sortNumber":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"productListUid":{"type":"string"},"optionalProductListUid":{"type":"string"}},"required":["locales","uid"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"ExperienceM_AgeGroupsItem":{"type":"object","properties":{"id":{"type":"string"},"counted":{"type":"boolean"},"productUid":{"type":"string"},"locales":{"type":"object"}},"required":["id","counted","locales"]}}},"paths":{"/v1/flow/experiences":{"get":{"operationId":"Experiences_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListExperiencesApiResponse"}}}}},"summary":"Lists all experiences.","tags":["Experiences"]}}}}
```

## POST /v1/flow/experiences

> Creates a new experience.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateExperienceApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateExperience_Params"}},"required":["params"]},"CreateExperience_Params":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/CreateExperience_Params_Locales"},"effectiveRules":{"type":"array","items":{"$ref":"#/components/schemas/CreateExperience_Params_EffectiveRulesItem"}},"minGuests":{"type":"number","nullable":true},"maxGuests":{"type":"number","nullable":true},"sort":{"type":"number","nullable":true},"feeInvoiceType":{"type":"object"},"feePerGuest":{"type":"boolean","nullable":true},"feeAppendLoyaltyBenefits":{"type":"boolean"},"minScheduledItems":{"type":"number","nullable":true},"minScheduledPaymentPercent":{"type":"number","nullable":true},"default":{"type":"boolean","nullable":true},"image":{"type":"string","nullable":true},"lastSeatingAdjustment":{"type":"number"},"confirmWinow":{"type":"number","nullable":true},"confirmWinowMethod":{"type":"object"},"autoCanceled":{"type":"boolean","nullable":true},"ageGroups":{"type":"array","items":{"type":"object"}},"productUid":{"type":"string"},"productList":{"type":"string"},"optionalProductList":{"type":"string"},"sortNumber":{"type":"number","nullable":true}},"required":["locales"]},"CreateExperience_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/CreateExperience_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/CreateExperience_Params_Locales_En"}},"required":["ar","en"]},"CreateExperience_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"CreateExperience_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"CreateExperience_Params_EffectiveRulesItem":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CreateExperience_Params_EffectiveRulesItem_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]}},"required":["conditions","action"]},"CreateExperience_Params_EffectiveRulesItem_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["area","branch","period","table"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"CreateExperienceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateExperience_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateExperience_Data":{"type":"object","properties":{"succeed":{"type":"boolean"},"uid":{"type":"string"}},"required":["succeed","uid"]}}},"paths":{"/v1/flow/experiences":{"post":{"operationId":"Experiences_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExperienceApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExperienceApiResponse"}}}}},"summary":"Creates a new experience.","tags":["Experiences"]}}}}
```

## GET /v1/flow/experiences/{uid}

> Returns a specific experience.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetExperienceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetExperience_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetExperience_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetExperience_Data_Item"}},"required":["item"]},"GetExperience_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minGuests":{"type":"number","nullable":true},"maxGuests":{"type":"number","nullable":true},"sort":{"type":"number","nullable":true},"feeInvoiceType":{"type":"object"},"feePerGuest":{"type":"boolean","nullable":true},"feeAppendLoyaltyBenefits":{"type":"boolean"},"default":{"type":"boolean","nullable":true},"image":{"type":"string","nullable":true},"ageGroups":{"type":"array","items":{"$ref":"#/components/schemas/GetExperience_Data_Item_AgeGroupsItem"}},"sortNumber":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"productListUid":{"type":"string"},"optionalProductListUid":{"type":"string"}},"required":["locales","uid"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"GetExperience_Data_Item_AgeGroupsItem":{"type":"object","properties":{"id":{"type":"string"},"counted":{"type":"boolean"},"productUid":{"type":"string"},"locales":{"type":"object"}},"required":["id","counted","locales"]},"GetExperienceApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetExperience_Error"}},"required":["error"]},"GetExperience_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetExperience_ErrorCodes_enum"}]}},"required":["code"]},"GetExperience_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/flow/experiences/{uid}":{"get":{"operationId":"Experiences_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExperienceApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetExperienceApiError"}}}}},"summary":"Returns a specific experience.","tags":["Experiences"]}}}}
```

## DELETE /v1/flow/experiences/{uid}

> Deletes a specific experience.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteExperienceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteExperience_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteExperience_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/flow/experiences/{uid}":{"delete":{"operationId":"Experiences_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteExperienceApiResponse"}}}}},"summary":"Deletes a specific experience.","tags":["Experiences"]}}}}
```

## PATCH /v1/flow/experiences/{uid}

> Updates a specific experience

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateExperienceApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateExperience_Params"}},"required":["params"]},"UpdateExperience_Params":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/UpdateExperience_Params_Locales"},"effectiveRules":{"type":"array","items":{"$ref":"#/components/schemas/UpdateExperience_Params_EffectiveRulesItem"}},"minGuests":{"type":"number","nullable":true},"maxGuests":{"type":"number","nullable":true},"sort":{"type":"number","nullable":true},"feeInvoiceType":{"type":"object"},"feePerGuest":{"type":"boolean","nullable":true},"feeAppendLoyaltyBenefits":{"type":"boolean"},"minScheduledItems":{"type":"number","nullable":true},"minScheduledPaymentPercent":{"type":"number","nullable":true},"default":{"type":"boolean","nullable":true},"image":{"type":"string","nullable":true},"lastSeatingAdjustment":{"type":"number"},"confirmWinow":{"type":"number","nullable":true},"confirmWinowMethod":{"type":"object"},"autoCanceled":{"type":"boolean","nullable":true},"ageGroups":{"type":"object"},"productUid":{"type":"string"},"productList":{"type":"string"},"optionalProductList":{"type":"string"},"sortNumber":{"type":"number","nullable":true}},"required":["locales"]},"UpdateExperience_Params_Locales":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/UpdateExperience_Params_Locales_Ar"},"en":{"$ref":"#/components/schemas/UpdateExperience_Params_Locales_En"}},"required":["ar","en"]},"UpdateExperience_Params_Locales_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"UpdateExperience_Params_Locales_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"UpdateExperience_Params_EffectiveRulesItem":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/UpdateExperience_Params_EffectiveRulesItem_ConditionsItem"}},"action":{"type":"string","enum":["exclude","include"]}},"required":["conditions","action"]},"UpdateExperience_Params_EffectiveRulesItem_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["area","branch","period","table"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"UpdateExperienceApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateExperience_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateExperience_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/UpdateExperience_Data_Item"}},"required":["item"]},"UpdateExperience_Data_Item":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minGuests":{"type":"number","nullable":true},"maxGuests":{"type":"number","nullable":true},"sort":{"type":"number","nullable":true},"feeInvoiceType":{"type":"object"},"feePerGuest":{"type":"boolean","nullable":true},"feeAppendLoyaltyBenefits":{"type":"boolean"},"default":{"type":"boolean","nullable":true},"image":{"type":"string","nullable":true},"ageGroups":{"type":"array","items":{"$ref":"#/components/schemas/UpdateExperience_Data_Item_AgeGroupsItem"}},"sortNumber":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"productListUid":{"type":"string"},"optionalProductListUid":{"type":"string"}},"required":["locales","uid"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"UpdateExperience_Data_Item_AgeGroupsItem":{"type":"object","properties":{"id":{"type":"string"},"counted":{"type":"boolean"},"productUid":{"type":"string"},"locales":{"type":"object"}},"required":["id","counted","locales"]},"UpdateExperienceApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateExperience_Error"}},"required":["error"]},"UpdateExperience_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateExperience_ErrorCodes_enum"}]}},"required":["code"]},"UpdateExperience_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/flow/experiences/{uid}":{"patch":{"operationId":"Experiences_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExperienceApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExperienceApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateExperienceApiError"}}}}},"summary":"Updates a specific experience","tags":["Experiences"]}}}}
```

## GET /v1/flow/experiences/export

> Exports all experiences with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Flow API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportExperiencesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportExperiences_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportExperiences_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ExperienceM"}},"next":{"type":"string"}},"required":["items"]},"ExperienceM":{"type":"object","properties":{"locales":{"$ref":"#/components/schemas/__type_174bf132"},"minGuests":{"type":"number","nullable":true},"maxGuests":{"type":"number","nullable":true},"sort":{"type":"number","nullable":true},"feeInvoiceType":{"type":"object"},"feePerGuest":{"type":"boolean","nullable":true},"feeAppendLoyaltyBenefits":{"type":"boolean"},"default":{"type":"boolean","nullable":true},"image":{"type":"string","nullable":true},"ageGroups":{"type":"array","items":{"$ref":"#/components/schemas/ExperienceM_AgeGroupsItem"}},"sortNumber":{"type":"number","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"productUid":{"type":"string"},"productListUid":{"type":"string"},"optionalProductListUid":{"type":"string"}},"required":["locales","uid"]},"__type_174bf132":{"type":"object","properties":{"ar":{"$ref":"#/components/schemas/__type_174bf132_Ar"},"en":{"$ref":"#/components/schemas/__type_174bf132_En"}},"required":["ar","en"]},"__type_174bf132_Ar":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"__type_174bf132_En":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"content":{"type":"string","nullable":true}},"required":["name"]},"ExperienceM_AgeGroupsItem":{"type":"object","properties":{"id":{"type":"string"},"counted":{"type":"boolean"},"productUid":{"type":"string"},"locales":{"type":"object"}},"required":["id","counted","locales"]}}},"paths":{"/v1/flow/experiences/export":{"get":{"operationId":"Experiences_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportExperiencesApiResponse"}}}}},"summary":"Exports all experiences with support for incremental fetching.","tags":["Experiences"]}}}}
```


# CRM

Gormic CRM enables customer engagement through loyalty programs, personalized campaigns, automatic segmentation, and automated journeys.<br>

With these APIs, you can segment your audience, track customer behavior, manage loyalty points, and trigger targeted messages based on real-time activity.


# Customers

## GET /v1/crm/customers

> List all users.

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListUsersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListUsers_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListUsers_Data":{"type":"object","properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/UserMap"}},"next":{"type":"string"},"query":{"$ref":"#/components/schemas/ListQueryResult_a9067b59"}},"required":["users"]},"UserMap":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"archivedBy":{"type":"string","nullable":true},"archivedVia":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","number","id"]},"ListQueryResult_a9067b59":{"type":"object","properties":{}}}},"paths":{"/v1/crm/customers":{"get":{"operationId":"Customers_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUsersApiResponse"}}}}},"summary":"List all users.","tags":["Customers"]}}}}
```

## POST /v1/crm/customers

> Creates a new user.

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateUserApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateUser_Params"}},"required":["params"]},"CreateUser_Params":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCallingCode":{"type":"string"},"cityId":{"type":"string"},"birthDate":{"type":"string"},"gender":{"type":"string","enum":["F","M"]},"passcode":{"type":"string"},"number":{"type":"string"},"unsubscribed":{"type":"boolean"},"internalNote":{"type":"string","nullable":true}},"required":["firstName","phone"]},"CreateUserApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateUser_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateUser_Data":{"type":"object","properties":{"succeed":{"type":"boolean"},"id":{"type":"string"}},"required":["succeed","id"]},"CreateUserApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/CreateUser_Error"}},"required":["error"]},"CreateUser_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/CreateUser_ErrorCodes_enum"}]}},"required":["code"]},"CreateUser_ErrorCodes_enum":{"type":"string","enum":["DUPLICATE_PHONE"]}}},"paths":{"/v1/crm/customers":{"post":{"operationId":"Customers_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserApiError"}}}}},"summary":"Creates a new user.","tags":["Customers"]}}}}
```

## GET /v1/crm/customers/{uid}

> Returns a specific user.

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetUserApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetUser_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetUser_Data":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/GetUser_Data_User"}},"required":["user"]},"GetUser_Data_User":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"archivedBy":{"type":"string","nullable":true},"archivedVia":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","number","id"]},"GetUserApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetUser_Error"}},"required":["error"]},"GetUser_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetUser_ErrorCodes_enum"}]}},"required":["code"]},"GetUser_ErrorCodes_enum":{"type":"string","enum":["COMPACT_INACTIVE","MISSING_ID","NO_CREATE_ACTION","NotFound"]}}},"paths":{"/v1/crm/customers/{uid}":{"get":{"operationId":"Customers_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserApiError"}}}}},"summary":"Returns a specific user.","tags":["Customers"]}}}}
```

## DELETE /v1/crm/customers/{uid}

> Deletes a new user.

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteUserApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteUser_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteUser_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/crm/customers/{uid}":{"delete":{"operationId":"Customers_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteUserApiResponse"}}}}},"summary":"Deletes a new user.","tags":["Customers"]}}}}
```

## PATCH /v1/crm/customers/{uid}

> Updates a specific user.

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateUserApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateUser_Params"}},"required":["params"]},"UpdateUser_Params":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string"},"gender":{"type":"string","enum":["F","M"]},"passcode":{"type":"string"},"number":{"type":"string"},"unsubscribed":{"type":"boolean"},"internalNote":{"type":"string","nullable":true}},"required":["id"]},"UpdateUserApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateUser_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateUser_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"UpdateUserApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateUser_Error"}},"required":["error"]},"UpdateUser_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateUser_ErrorCodes_enum"}]}},"required":["code"]},"UpdateUser_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/crm/customers/{uid}":{"patch":{"operationId":"Customers_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserApiError"}}}}},"summary":"Updates a specific user.","tags":["Customers"]}}}}
```

## GET /v1/crm/customers/export

> Exports all users with support for incremental fetching.

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ExportUsersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ExportUsers_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ExportUsers_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/UserMap"}},"next":{"type":"string"}},"required":["items"]},"UserMap":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string","nullable":true},"email":{"type":"string"},"phone":{"type":"string"},"phoneCountry":{"type":"string"},"phoneCountryCalling":{"type":"string"},"number":{"type":"string"},"cityId":{"type":"string","nullable":true},"birthDate":{"type":"string","nullable":true},"gender":{"type":"object"},"unsubscribed":{"type":"boolean","nullable":true},"internalNote":{"type":"string","nullable":true},"archivedAt":{"type":"string","nullable":true},"archivedBy":{"type":"string","nullable":true},"archivedVia":{"type":"string","nullable":true},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"}},"required":["firstName","phone","phoneCountry","phoneCountryCalling","number","id"]}}},"paths":{"/v1/crm/customers/export":{"get":{"operationId":"Customers_export","parameters":[{"name":"updatedSince","required":false,"in":"query","schema":{"type":"string"}},{"name":"offset","required":false,"in":"query","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportUsersApiResponse"}}}}},"summary":"Exports all users with support for incremental fetching.","tags":["Customers"]}}}}
```


# Addresses

## POST /v1/crm/addresses

> Creates a new address for a specific user

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateAddressApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateAddress_Params"}},"required":["params"]},"CreateAddress_Params":{"type":"object","properties":{"userId":{"type":"string"},"id":{"type":"string"},"building":{"type":"string"},"street":{"type":"string"},"secondary":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"instructions":{"type":"string"}},"required":["userId","building","street","postalCode","city","country","instructions"]},"CreateAddressApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateAddress_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateAddress_Data":{"type":"object","properties":{"succeed":{"type":"boolean"},"uid":{"type":"string"}},"required":["succeed","uid"]}}},"paths":{"/v1/crm/addresses":{"post":{"operationId":"Addresses_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAddressApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAddressApiResponse"}}}}},"summary":"Creates a new address for a specific user","tags":["Addresses"]}}}}
```

## DELETE /v1/crm/addresses/{uid}

> Deletes an address.

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteAddressApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteAddress_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteAddress_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/crm/addresses/{uid}":{"delete":{"operationId":"Addresses_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAddressApiResponse"}}}}},"summary":"Deletes an address.","tags":["Addresses"]}}}}
```

## PATCH /v1/crm/addresses/{uid}

> Updates a new address for a specific user

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateAddressApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateAddress_Params"}},"required":["params"]},"UpdateAddress_Params":{"type":"object","properties":{"uid":{"type":"string"},"building":{"type":"string"},"street":{"type":"string"},"secondary":{"type":"string"},"district":{"type":"string"},"postalCode":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"instructions":{"type":"string"}},"required":["uid"]},"UpdateAddressApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateAddress_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateAddress_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"UpdateAddressApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateAddress_Error"}},"required":["error"]},"UpdateAddress_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateAddress_ErrorCodes_enum"}]}},"required":["code"]},"UpdateAddress_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/crm/addresses/{uid}":{"patch":{"operationId":"Addresses_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAddressApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAddressApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAddressApiError"}}}}},"summary":"Updates a new address for a specific user","tags":["Addresses"]}}}}
```


# Levels

## GET /v1/crm/levels

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListLevelsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListLevels_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListLevels_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LevelMap"}}},"required":["items"]},"LevelMap":{"type":"object","properties":{"locales":{"type":"object"},"sortNumber":{"type":"number","nullable":true},"alias":{"type":"string","nullable":true},"rewardQualPoints":{"type":"number","nullable":true},"rewardQualPeriod":{"type":"object"},"rewardRetention":{"type":"object"},"pointsConvertRate":{"type":"number"},"rewardValidaty":{"type":"object"},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/BenefitMap"}}},"required":["locales","id","benefits"]},"BenefitMap":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","type","amount","id","uid","rules"]},"BenefitRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM_ConditionsItem"}},"action":{"type":"string","enum":["apply","exclude"]},"sortNumber":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["conditions","action","sortNumber","id","uid"]},"BenefitRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["basic.date","basic.day","basic.time"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]}}},"paths":{"/v1/crm/levels":{"get":{"operationId":"Levels_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLevelsApiResponse"}}}}},"tags":["Levels"]}}}}
```

## GET /v1/crm/levels/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetLevelApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetLevel_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetLevel_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetLevel_Data_Item"}},"required":["item"]},"GetLevel_Data_Item":{"type":"object","properties":{"locales":{"type":"object"},"sortNumber":{"type":"number","nullable":true},"alias":{"type":"string","nullable":true},"rewardQualPoints":{"type":"number","nullable":true},"rewardQualPeriod":{"type":"object"},"rewardRetention":{"type":"object"},"pointsConvertRate":{"type":"number"},"rewardValidaty":{"type":"object"},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/BenefitMap"}}},"required":["locales","id","benefits"]},"BenefitMap":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","type","amount","id","uid","rules"]},"BenefitRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM_ConditionsItem"}},"action":{"type":"string","enum":["apply","exclude"]},"sortNumber":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["conditions","action","sortNumber","id","uid"]},"BenefitRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["basic.date","basic.day","basic.time"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"GetLevelApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetLevel_Error"}},"required":["error"]},"GetLevel_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetLevel_ErrorCodes_enum"}]}},"required":["code"]},"GetLevel_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/crm/levels/{uid}":{"get":{"operationId":"Levels_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLevelApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLevelApiError"}}}}},"tags":["Levels"]}}}}
```


# Profiles

## GET /v1/crm/profiles

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListMembershipsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListMemberships_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListMemberships_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/MemebershipMapSummary"}}},"required":["items"]},"MemebershipMapSummary":{"type":"object","properties":{"sequence":{"type":"number"},"number":{"type":"string"},"joiningDate":{"type":"string","nullable":true},"workEmail":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"pointsAvailable":{"type":"number"},"pointsPending":{"type":"number"},"pointsOnhold":{"type":"number"},"id":{"type":"string"}},"required":["id"]}}},"paths":{"/v1/crm/profiles":{"get":{"operationId":"Profiles_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMembershipsApiResponse"}}}}},"tags":["Profiles"]}}}}
```

## GET /v1/crm/profiles/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetMembershipApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetMembership_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetMembership_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetMembership_Data_Item"}},"required":["item"]},"GetMembership_Data_Item":{"type":"object","properties":{"sequence":{"type":"number"},"number":{"type":"string"},"joiningDate":{"type":"string","nullable":true},"workEmail":{"type":"string","nullable":true},"internalNote":{"type":"string","nullable":true},"pointsAvailable":{"type":"number"},"pointsPending":{"type":"number"},"pointsOnhold":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"id":{"type":"string"},"level":{"$ref":"#/components/schemas/GetMembership_Data_Item_Level"},"enrollments":{"type":"array","items":{"$ref":"#/components/schemas/ProgramEnrollmentMap"}},"partners":{"type":"array","items":{"$ref":"#/components/schemas/PartnerMap"}},"tagAssignments":{"type":"array","items":{"$ref":"#/components/schemas/TagAssignmentM"}}},"required":["id","level","enrollments","partners","tagAssignments"]},"GetMembership_Data_Item_Level":{"type":"object","properties":{"locales":{"type":"object"},"sortNumber":{"type":"number","nullable":true},"alias":{"type":"string","nullable":true},"rewardQualPoints":{"type":"number","nullable":true},"rewardQualPeriod":{"type":"object"},"rewardRetention":{"type":"object"},"pointsConvertRate":{"type":"number"},"rewardValidaty":{"type":"object"},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/MembershipLevelBenefitM"}}},"required":["locales","id","benefits"]},"MembershipLevelBenefitM":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"applicable":{"type":"boolean"},"overwritten":{"type":"boolean"}},"required":["locales","type","amount","id","uid","rules","applicable","overwritten"]},"BenefitRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM_ConditionsItem"}},"action":{"type":"string","enum":["apply","exclude"]},"sortNumber":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["conditions","action","sortNumber","id","uid"]},"BenefitRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["basic.date","basic.day","basic.time"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"ProgramEnrollmentMap":{"type":"object","properties":{"startTime":{"type":"string"},"endTime":{"type":"string"},"ended":{"type":"boolean"},"endedAt":{"type":"string","nullable":true},"id":{"type":"string"},"program":{"$ref":"#/components/schemas/ProgramEnrollmentMap_Program"}},"required":["startTime","id","program"]},"ProgramEnrollmentMap_Program":{"type":"object","properties":{"locales":{"type":"object"},"excludedLevels":{"type":"object"},"period":{"type":"number","nullable":true},"periodUnit":{"type":"object"},"alias":{"type":"string","nullable":true},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/BenefitMapWithEnrollment"}}},"required":["locales","id","benefits"]},"BenefitMapWithEnrollment":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"isEffective":{"type":"boolean"},"effectiveStartTime":{"type":"string"},"effectiveEndTime":{"type":"string"},"applicable":{"type":"boolean"},"overwritten":{"type":"boolean"}},"required":["locales","type","amount","id","uid","rules","isEffective","effectiveStartTime","applicable","overwritten"]},"PartnerMap":{"type":"object","properties":{"domain":{"type":"string"},"locales":{"type":"object"},"id":{"type":"string"},"programs":{"type":"array","items":{"$ref":"#/components/schemas/ProgramMap"}}},"required":["domain","locales","id","programs"]},"ProgramMap":{"type":"object","properties":{"locales":{"type":"object"},"excludedLevels":{"type":"object"},"period":{"type":"number","nullable":true},"periodUnit":{"type":"object"},"alias":{"type":"string","nullable":true},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/BenefitMap"}}},"required":["locales","id","benefits"]},"BenefitMap":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","type","amount","id","uid","rules"]},"TagAssignmentM":{"type":"object","properties":{"eligible":{"type":"boolean"},"effectiveStartTime":{"type":"string"},"effectiveEndTime":{"type":"string","nullable":true},"attrs":{"$ref":"#/components/schemas/Record_5494b96e"},"uid":{"type":"string"},"tagUid":{"type":"string"},"customerUid":{"type":"string"},"effective":{"type":"boolean"},"tag":{"$ref":"#/components/schemas/TagAssignmentM_Tag"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/TagAssignmentBenefitM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["eligible","effectiveStartTime","uid","tagUid","customerUid","effective","tag","benefits"]},"Record_5494b96e":{"type":"object","properties":{}},"TagAssignmentM_Tag":{"type":"object","properties":{"type":{"type":"string","enum":["auto","campaign-status","manual"]},"locales":{"type":"object"},"sortBy":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["type","locales","uid"]},"TagAssignmentBenefitM":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"applicable":{"type":"boolean"},"overwritten":{"type":"boolean"}},"required":["locales","type","amount","id","uid","rules","applicable","overwritten"]},"GetMembershipApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetMembership_Error"}},"required":["error"]},"GetMembership_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetMembership_ErrorCodes_enum"}]}},"required":["code"]},"GetMembership_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/crm/profiles/{uid}":{"get":{"operationId":"Profiles_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMembershipApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMembershipApiError"}}}}},"tags":["Profiles"]}}}}
```


# Tags

## GET /v1/crm/tags

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListTagsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListTags_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListTags_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TagM"}},"next":{"type":"string"}},"required":["items"]},"TagM":{"type":"object","properties":{"type":{"type":"string","enum":["auto","campaign-status","manual"]},"locales":{"type":"object"},"sortBy":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["type","locales","uid"]}}},"paths":{"/v1/crm/tags":{"get":{"operationId":"Tags_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTagsApiResponse"}}}}},"tags":["Tags"]}}}}
```

## GET /v1/crm/tags/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetTagApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetTag_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetTag_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetTag_Data_Item"},"dataModels":{"type":"array","items":{"$ref":"#/components/schemas/GetTag_Data_DataModelsItem"}}},"required":["item"]},"GetTag_Data_Item":{"type":"object","properties":{"type":{"type":"string","enum":["auto","campaign-status","manual"]},"locales":{"type":"object"},"sortBy":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["type","locales","uid"]},"GetTag_Data_DataModelsItem":{"type":"object","properties":{"uid":{"type":"string"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/GetTag_Data_DataModelsItem_ColumnsItem"}}},"required":["uid","columns"]},"GetTag_Data_DataModelsItem_ColumnsItem":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["date","jsonb","numeric","text","timestamptz"]},"attribute":{"type":"string"},"cid":{"type":"string"},"lov":{"type":"array","items":{"type":"object"}},"locales":{"type":"object"}},"required":["name","type"]},"GetTagApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetTag_Error"}},"required":["error"]},"GetTag_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetTag_ErrorCodes_enum"}]}},"required":["code"]},"GetTag_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/crm/tags/{uid}":{"get":{"operationId":"Tags_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTagApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTagApiError"}}}}},"tags":["Tags"]}}}}
```

## GET /v1/crm/tags/{uid}/customers

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"FetchTagCustomersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/FetchTagCustomers_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"FetchTagCustomers_Data":{"type":"object","properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/FetchTagCustomers_Data_CustomersItem"}},"count":{"type":"number"},"next":{"type":"string"}},"required":["customers"]},"FetchTagCustomers_Data_CustomersItem":{"type":"object","properties":{"customerUid":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gender":{"type":"string"},"tagEligible":{"type":"string"},"tagAssigned":{"type":"string"},"tagEffectiveStartTime":{"type":"string"},"tagEffectiveEndTime":{"type":"string","nullable":true},"tagAssignmentUid":{"type":"string","nullable":true}},"required":["customerUid","firstName","lastName","gender","tagEligible","tagAssigned","tagEffectiveStartTime","tagEffectiveEndTime","tagAssignmentUid"]},"FetchTagCustomersApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/FetchTagCustomers_Error"}},"required":["error"]},"FetchTagCustomers_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/FetchTagCustomers_ErrorCodes_enum"}]}},"required":["code"]},"FetchTagCustomers_ErrorCodes_enum":{"type":"string","enum":["UNSUPPORTED_DATA_MODEL_PARAM"]}}},"paths":{"/v1/crm/tags/{uid}/customers":{"get":{"operationId":"Tags_listCustomers","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchTagCustomersApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchTagCustomersApiError"}}}}},"tags":["Tags"]}}}}
```

## GET /v1/crm/tag-assignments/{customerUid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListTagAssignemntsApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListTagAssignemnts_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListTagAssignemnts_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/TagAssignmentM"}},"next":{"type":"string"}},"required":["items"]},"TagAssignmentM":{"type":"object","properties":{"eligible":{"type":"boolean"},"effectiveStartTime":{"type":"string"},"effectiveEndTime":{"type":"string","nullable":true},"attrs":{"$ref":"#/components/schemas/Record_5494b96e"},"uid":{"type":"string"},"tagUid":{"type":"string"},"customerUid":{"type":"string"},"effective":{"type":"boolean"},"tag":{"$ref":"#/components/schemas/TagAssignmentM_Tag"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/TagAssignmentBenefitM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["eligible","effectiveStartTime","uid","tagUid","customerUid","effective","tag","benefits"]},"Record_5494b96e":{"type":"object","properties":{}},"TagAssignmentM_Tag":{"type":"object","properties":{"type":{"type":"string","enum":["auto","campaign-status","manual"]},"locales":{"type":"object"},"sortBy":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["type","locales","uid"]},"TagAssignmentBenefitM":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"applicable":{"type":"boolean"},"overwritten":{"type":"boolean"}},"required":["locales","type","amount","id","uid","rules","applicable","overwritten"]},"BenefitRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM_ConditionsItem"}},"action":{"type":"string","enum":["apply","exclude"]},"sortNumber":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["conditions","action","sortNumber","id","uid"]},"BenefitRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["basic.date","basic.day","basic.time"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]}}},"paths":{"/v1/crm/tag-assignments/{customerUid}":{"get":{"operationId":"TagAssignments_get","parameters":[{"name":"customerUid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTagAssignemntsApiResponse"}}}}},"tags":["Tags"]}}}}
```

## POST /v1/crm/tag-assignments

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateTagAssignmentApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateTagAssignment_Params"}},"required":["params"]},"CreateTagAssignment_Params":{"type":"object","properties":{"tagUid":{"type":"string"},"customerUid":{"type":"string"},"eligible":{"type":"boolean"},"effectiveStartTime":{"type":"string"},"effectiveEndTime":{"type":"string","nullable":true},"attrs":{"$ref":"#/components/schemas/__type_174bf132"}},"required":["tagUid","customerUid","effectiveStartTime"]},"__type_174bf132":{"type":"object","properties":{}},"CreateTagAssignmentApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateTagAssignment_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateTagAssignment_Data":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}},"paths":{"/v1/crm/tag-assignments":{"post":{"operationId":"TagAssignments_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTagAssignmentApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTagAssignmentApiResponse"}}}}},"tags":["Tags"]}}}}
```

## DELETE /v1/crm/tag-assignments/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteTagAssignmentApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteTagAssignment_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteTagAssignment_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/crm/tag-assignments/{uid}":{"delete":{"operationId":"TagAssignments_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTagAssignmentApiResponse"}}}}},"tags":["Tags"]}}}}
```

## PATCH /v1/crm/tag-assignments/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"UpdateTagAssignmentApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/UpdateTagAssignment_Params"}},"required":["params"]},"UpdateTagAssignment_Params":{"type":"object","properties":{"uid":{"type":"string"},"eligible":{"type":"boolean"},"effectiveStartTime":{"type":"string"},"effectiveEndTime":{"type":"string","nullable":true},"attrs":{"$ref":"#/components/schemas/__type_174bf132"}},"required":["uid"]},"__type_174bf132":{"type":"object","properties":{}},"UpdateTagAssignmentApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/UpdateTagAssignment_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"UpdateTagAssignment_Data":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]},"UpdateTagAssignmentApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/UpdateTagAssignment_Error"}},"required":["error"]},"UpdateTagAssignment_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/UpdateTagAssignment_ErrorCodes_enum"}]}},"required":["code"]},"UpdateTagAssignment_ErrorCodes_enum":{"type":"string","enum":["NoChanges"]}}},"paths":{"/v1/crm/tag-assignments/{uid}":{"patch":{"operationId":"TagAssignments_update","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTagAssignmentApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTagAssignmentApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTagAssignmentApiError"}}}}},"tags":["Tags"]}}}}
```


# Partners

## GET /v1/crm/partners

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListPartnersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListPartners_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListPartners_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PartnerMapSummary"}}},"required":["items"]},"PartnerMapSummary":{"type":"object","properties":{"domain":{"type":"string"},"locales":{"type":"object"},"id":{"type":"string"}},"required":["domain","locales","id"]}}},"paths":{"/v1/crm/partners":{"get":{"operationId":"Partners_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPartnersApiResponse"}}}}},"tags":["Partners"]}}}}
```

## GET /v1/crm/partners/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetPartnerApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetPartner_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetPartner_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetPartner_Data_Item"}},"required":["item"]},"GetPartner_Data_Item":{"type":"object","properties":{"domain":{"type":"string"},"locales":{"type":"object"},"id":{"type":"string"},"programs":{"type":"array","items":{"$ref":"#/components/schemas/ProgramMap"}}},"required":["domain","locales","id","programs"]},"ProgramMap":{"type":"object","properties":{"locales":{"type":"object"},"excludedLevels":{"type":"object"},"period":{"type":"number","nullable":true},"periodUnit":{"type":"object"},"alias":{"type":"string","nullable":true},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/BenefitMap"}}},"required":["locales","id","benefits"]},"BenefitMap":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","type","amount","id","uid","rules"]},"BenefitRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM_ConditionsItem"}},"action":{"type":"string","enum":["apply","exclude"]},"sortNumber":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["conditions","action","sortNumber","id","uid"]},"BenefitRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["basic.date","basic.day","basic.time"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"GetPartnerApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetPartner_Error"}},"required":["error"]},"GetPartner_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetPartner_ErrorCodes_enum"}]}},"required":["code"]},"GetPartner_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/crm/partners/{uid}":{"get":{"operationId":"Partners_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPartnerApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPartnerApiError"}}}}},"tags":["Partners"]}}}}
```

## GET /v1/crm/partners/{uid}/customers

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"FetchTagCustomersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/FetchTagCustomers_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"FetchTagCustomers_Data":{"type":"object","properties":{"customers":{"type":"array","items":{"$ref":"#/components/schemas/FetchTagCustomers_Data_CustomersItem"}},"count":{"type":"number"},"next":{"type":"string"}},"required":["customers"]},"FetchTagCustomers_Data_CustomersItem":{"type":"object","properties":{"customerUid":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"gender":{"type":"string"},"tagEligible":{"type":"string"},"tagAssigned":{"type":"string"},"tagEffectiveStartTime":{"type":"string"},"tagEffectiveEndTime":{"type":"string","nullable":true},"tagAssignmentUid":{"type":"string","nullable":true}},"required":["customerUid","firstName","lastName","gender","tagEligible","tagAssigned","tagEffectiveStartTime","tagEffectiveEndTime","tagAssignmentUid"]},"FetchTagCustomersApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/FetchTagCustomers_Error"}},"required":["error"]},"FetchTagCustomers_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/FetchTagCustomers_ErrorCodes_enum"}]}},"required":["code"]},"FetchTagCustomers_ErrorCodes_enum":{"type":"string","enum":["UNSUPPORTED_DATA_MODEL_PARAM"]}}},"paths":{"/v1/crm/partners/{uid}/customers":{"get":{"operationId":"Partners_listCustomers","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchTagCustomersApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchTagCustomersApiError"}}}}},"tags":["Partners"]}}}}
```

## POST /v1/crm/partners/{uid}/member

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"AddPartnerMemberApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/AddPartnerMember_Params"}},"required":["params"]},"AddPartnerMember_Params":{"type":"object","properties":{"membershipId":{"type":"string"}},"required":["membershipId"]},"AddPartnerMemberApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/AddPartnerMember_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"AddPartnerMember_Data":{"type":"object","properties":{"succeed":{"type":"boolean"},"programs":{"type":"array","items":{"$ref":"#/components/schemas/ProgramMap"}}},"required":["succeed","programs"]},"ProgramMap":{"type":"object","properties":{"locales":{"type":"object"},"excludedLevels":{"type":"object"},"period":{"type":"number","nullable":true},"periodUnit":{"type":"object"},"alias":{"type":"string","nullable":true},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/BenefitMap"}}},"required":["locales","id","benefits"]},"BenefitMap":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","type","amount","id","uid","rules"]},"BenefitRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM_ConditionsItem"}},"action":{"type":"string","enum":["apply","exclude"]},"sortNumber":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["conditions","action","sortNumber","id","uid"]},"BenefitRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["basic.date","basic.day","basic.time"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"AddPartnerMemberApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/AddPartnerMember_Error"}},"required":["error"]},"AddPartnerMember_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/AddPartnerMember_ErrorCodes_enum"}]}},"required":["code"]},"AddPartnerMember_ErrorCodes_enum":{"type":"string","enum":["AlreadyLinked","AttemptsExceeded","EmailNotMatch","InvalidOTP","InvalidOTPToken","OTPExpired","UnknowPartner"]}}},"paths":{"/v1/crm/partners/{uid}/member":{"post":{"operationId":"Partners_addMember","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPartnerMemberApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPartnerMemberApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPartnerMemberApiError"}}}}},"tags":["Partners"]}}}}
```

## DELETE /v1/crm/partners/{uid}/member/{membershipUid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"RemovePartnerMemberApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/RemovePartnerMember_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"RemovePartnerMember_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"RemovePartnerMemberApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/RemovePartnerMember_Error"}},"required":["error"]},"RemovePartnerMember_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/RemovePartnerMember_ErrorCodes_enum"}]}},"required":["code"]},"RemovePartnerMember_ErrorCodes_enum":{"type":"string","enum":["NOT_BELONG_TO_PARTNER"]}}},"paths":{"/v1/crm/partners/{uid}/member/{membershipUid}":{"delete":{"operationId":"Partners_deleteMember","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"membershipUid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovePartnerMemberApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemovePartnerMemberApiError"}}}}},"tags":["Partners"]}}}}
```

## POST /v1/crm/partners/register

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"RegisterPartnererMemberApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/RegisterPartnererMember_Params"}},"required":["params"]},"RegisterPartnererMember_Params":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]},"RegisterPartnererMemberApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/RegisterPartnererMember_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"RegisterPartnererMember_Data":{"type":"object","properties":{"token":{"type":"string"},"creationTime":{"type":"number"},"life":{"type":"number"}},"required":["token","creationTime","life"]},"RegisterPartnererMemberApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/RegisterPartnererMember_Error"}},"required":["error"]},"RegisterPartnererMember_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/RegisterPartnererMember_ErrorCodes_enum"}]}},"required":["code"]},"RegisterPartnererMember_ErrorCodes_enum":{"type":"string","enum":["AlreadyLinked","InvalidToken","UnknowPartner"]}}},"paths":{"/v1/crm/partners/register":{"post":{"operationId":"Partners_register","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPartnererMemberApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPartnererMemberApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterPartnererMemberApiError"}}}}},"tags":["Partners"]}}}}
```

## POST /v1/crm/partners/verify

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"VerifyPartnerRegistrationApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/VerifyPartnerRegistration_Params"}},"required":["params"]},"VerifyPartnerRegistration_Params":{"type":"object","properties":{"email":{"type":"string"},"otp":{"type":"string"},"otpToken":{"type":"string"}},"required":["email","otp","otpToken"]},"VerifyPartnerRegistrationApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/VerifyPartnerRegistration_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"VerifyPartnerRegistration_Data":{"type":"object","properties":{"succeed":{"type":"boolean"},"programs":{"type":"array","items":{"$ref":"#/components/schemas/ProgramMap"}}},"required":["succeed","programs"]},"ProgramMap":{"type":"object","properties":{"locales":{"type":"object"},"excludedLevels":{"type":"object"},"period":{"type":"number","nullable":true},"periodUnit":{"type":"object"},"alias":{"type":"string","nullable":true},"id":{"type":"string"},"benefits":{"type":"array","items":{"$ref":"#/components/schemas/BenefitMap"}}},"required":["locales","id","benefits"]},"BenefitMap":{"type":"object","properties":{"locales":{"type":"object"},"type":{"type":"string","enum":["dicount-flat","discount-absolute","discount-percent","free-dessert","free-drink","priority"]},"amount":{"type":"number"},"discountRef":{"type":"string","nullable":true},"sortNumber":{"type":"number","nullable":true},"id":{"type":"string"},"uid":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","type","amount","id","uid","rules"]},"BenefitRuleM":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/BenefitRuleM_ConditionsItem"}},"action":{"type":"string","enum":["apply","exclude"]},"sortNumber":{"type":"number"},"id":{"type":"string"},"uid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["conditions","action","sortNumber","id","uid"]},"BenefitRuleM_ConditionsItem":{"type":"object","properties":{"key":{"type":"string","enum":["basic.date","basic.day","basic.time"]},"operator":{"type":"string","enum":["contains","endsWith","equals","greater","greaterOrEquals","in","less","lessOrEquals","notEquals","startsWith"]},"value":{"type":"string"}},"required":["key","operator","value"]},"VerifyPartnerRegistrationApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/VerifyPartnerRegistration_Error"}},"required":["error"]},"VerifyPartnerRegistration_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/VerifyPartnerRegistration_ErrorCodes_enum"}]}},"required":["code"]},"VerifyPartnerRegistration_ErrorCodes_enum":{"type":"string","enum":["AlreadyLinked","AttemptsExceeded","EmailNotMatch","InvalidOTP","InvalidOTPToken","OTPExpired","UnknowPartner"]}}},"paths":{"/v1/crm/partners/verify":{"post":{"operationId":"Partners_verify","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyPartnerRegistrationApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyPartnerRegistrationApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyPartnerRegistrationApiError"}}}}},"tags":["Partners"]}}}}
```


# Feedbacks

## GET /v1/crm/feedback-responses

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListFeedbackResponsesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListFeedbackResponses_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListFeedbackResponses_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackResponseM"}},"next":{"type":"string"}},"required":["items"]},"FeedbackResponseM":{"type":"object","properties":{"uid":{"type":"string"},"customerUid":{"type":"string"},"feedbacks":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","customerUid","feedbacks"]},"FeedbackM":{"type":"object","properties":{"score":{"type":"number"},"sentimentScore":{"type":"number"},"summaryComment":{"type":"string"},"uid":{"type":"string"},"subjectUid":{"type":"string"},"factorUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["score","uid","subjectUid","factorUid"]}}},"paths":{"/v1/crm/feedback-responses":{"get":{"operationId":"FeedbackResponses_list","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFeedbackResponsesApiResponse"}}}}},"tags":["Feedbacks"]}}}}
```

## POST /v1/crm/feedback-responses

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"CreateFeedbackResponseApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/CreateFeedbackResponse_Params"}},"required":["params"]},"CreateFeedbackResponse_Params":{"type":"object","properties":{"customerUid":{"type":"string"}},"required":["customerUid"]},"CreateFeedbackResponseApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/CreateFeedbackResponse_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"CreateFeedbackResponse_Data":{"type":"object","properties":{"uid":{"type":"string"}},"required":["uid"]}}},"paths":{"/v1/crm/feedback-responses":{"post":{"operationId":"FeedbackResponses_create","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeedbackResponseApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeedbackResponseApiResponse"}}}}},"tags":["Feedbacks"]}}}}
```

## GET /v1/crm/feedback-responses/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetFeedbackResponseApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetFeedbackResponse_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetFeedbackResponse_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetFeedbackResponse_Data_Item"},"subjects":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackSubjectM"}},"factors":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackFactorM"}}},"required":["item"]},"GetFeedbackResponse_Data_Item":{"type":"object","properties":{"uid":{"type":"string"},"customerUid":{"type":"string"},"feedbacks":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","customerUid","feedbacks"]},"FeedbackM":{"type":"object","properties":{"score":{"type":"number"},"sentimentScore":{"type":"number"},"summaryComment":{"type":"string"},"uid":{"type":"string"},"subjectUid":{"type":"string"},"factorUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["score","uid","subjectUid","factorUid"]},"FeedbackSubjectM":{"type":"object","properties":{"locales":{"type":"object"},"weight":{"type":"number"},"contextAttrs":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackSubjectM_ContextAttrsItem"}},"uid":{"type":"string"},"organizationUid":{"type":"string"},"parentUid":{"type":"string"},"factorUids":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","uid","organizationUid","factorUids"]},"FeedbackSubjectM_ContextAttrsItem":{"type":"object","properties":{"key":{"type":"string"},"required":{"type":"boolean"}},"required":["key","required"]},"FeedbackFactorM":{"type":"object","properties":{"locales":{"type":"object"},"weight":{"type":"number"},"uid":{"type":"string"},"organizationUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["locales","uid","organizationUid"]},"GetFeedbackResponseApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetFeedbackResponse_Error"}},"required":["error"]},"GetFeedbackResponse_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetFeedbackResponse_ErrorCodes_enum"}]}},"required":["code"]},"GetFeedbackResponse_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/crm/feedback-responses/{uid}":{"get":{"operationId":"FeedbackResponses_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFeedbackResponseApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetFeedbackResponseApiError"}}}}},"tags":["Feedbacks"]}}}}
```

## DELETE /v1/crm/feedback-responses/{uid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"DeleteFeedbackResponseApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/DeleteFeedbackResponse_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"DeleteFeedbackResponse_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]}}},"paths":{"/v1/crm/feedback-responses/{uid}":{"delete":{"operationId":"FeedbackResponses_delete","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFeedbackResponseApiResponse"}}}}},"tags":["Feedbacks"]}}}}
```

## GET /v1/crm/feedback-responses/by-customer/{customerUid}

>

```json
{"openapi":"3.0.0","info":{"title":"Gormic CRM API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListFeedbackCustomerResponsesApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListFeedbackCustomerResponses_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListFeedbackCustomerResponses_Data":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackResponseM"}},"next":{"type":"string"}},"required":["items"]},"FeedbackResponseM":{"type":"object","properties":{"uid":{"type":"string"},"customerUid":{"type":"string"},"feedbacks":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackM"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["uid","customerUid","feedbacks"]},"FeedbackM":{"type":"object","properties":{"score":{"type":"number"},"sentimentScore":{"type":"number"},"summaryComment":{"type":"string"},"uid":{"type":"string"},"subjectUid":{"type":"string"},"factorUid":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"}},"required":["score","uid","subjectUid","factorUid"]}}},"paths":{"/v1/crm/feedback-responses/by-customer/{customerUid}":{"get":{"operationId":"FeedbackResponses_listByCustomer","parameters":[{"name":"customerUid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListFeedbackCustomerResponsesApiResponse"}}}}},"tags":["Feedbacks"]}}}}
```


# Gift Cards

**Gift Cards** provide APIs to issue, redeem, and manage digital gift cards.\
With these APIs, you can create new gift cards, track balances, and handle redemptions or top-ups in real time.

These APIs are primarily used with Gormic POS and Self and support integration with loyalty platforms, and custom customer engagement workflows.


# Vouchers

## GET /v1/gift-cards/vouchers/by-customer/{customerUid}

> Lists all vouchers associated with a specific customer

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ListCustomerVouchersApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ListCustomerVouchers_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ListCustomerVouchers_Data":{"type":"object","properties":{"vouchers":{"type":"array","items":{"$ref":"#/components/schemas/VoucherM"}},"next":{"type":"string"}},"required":["vouchers"]},"VoucherM":{"type":"object","properties":{"amount":{"type":"number"},"activatedAt":{"type":"string"},"sharedAt":{"type":"string"},"activationEndDate":{"type":"string"},"validity":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"uid":{"type":"string"},"productId":{"type":"string"},"customerId":{"type":"string"},"holderId":{"type":"string"},"sharedTo":{"$ref":"#/components/schemas/UserMap_1_45e463b4"},"expiresAt":{"type":"string"},"expired":{"type":"boolean"},"balance":{"type":"number"},"accountUid":{"type":"string"}},"required":["amount","uid","balance"]},"UserMap_1_45e463b4":{"type":"object","properties":{}}}},"paths":{"/v1/gift-cards/vouchers/by-customer/{customerUid}":{"get":{"operationId":"Vouchers_list","parameters":[{"name":"customerUid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCustomerVouchersApiResponse"}}}}},"summary":"Lists all vouchers associated with a specific customer","tags":["Vouchers"]}}}}
```

## GET /v1/gift-cards/vouchers/{uid}

> Returns a specific voucher

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetVoucherApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetVoucher_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetVoucher_Data":{"type":"object","properties":{"voucher":{"$ref":"#/components/schemas/GetVoucher_Data_Voucher"}},"required":["voucher"]},"GetVoucher_Data_Voucher":{"type":"object","properties":{"amount":{"type":"number"},"activatedAt":{"type":"string"},"sharedAt":{"type":"string"},"activationEndDate":{"type":"string"},"validity":{"type":"number"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"uid":{"type":"string"},"productId":{"type":"string"},"customerId":{"type":"string"},"holderId":{"type":"string"},"sharedTo":{"$ref":"#/components/schemas/UserMap_1_45e463b4"},"expiresAt":{"type":"string"},"expired":{"type":"boolean"},"balance":{"type":"number"},"accountUid":{"type":"string"}},"required":["amount","uid","balance"]},"UserMap_1_45e463b4":{"type":"object","properties":{}},"GetVoucherApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetVoucher_Error"}},"required":["error"]},"GetVoucher_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetVoucher_ErrorCodes_enum"}]}},"required":["code"]},"GetVoucher_ErrorCodes_enum":{"type":"string","enum":["COMPACT_INACTIVE","MISSING_ID","NO_CREATE_ACTION","NotFound"]}}},"paths":{"/v1/gift-cards/vouchers/{uid}":{"get":{"operationId":"Vouchers_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVoucherApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVoucherApiError"}}}}},"summary":"Returns a specific voucher","tags":["Vouchers"]}}}}
```

## PATCH /v1/gift-cards/vouchers/{uid}/activate

> Activates a specific voucher

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ActivateVoucherApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/ActivateVoucher_Params"}},"required":["params"]},"ActivateVoucher_Params":{"type":"object","properties":{"customerId":{"type":"string"},"orderId":{"type":"string"},"message":{"type":"string"}}},"ActivateVoucherApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ActivateVoucher_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ActivateVoucher_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"ActivateVoucherApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ActivateVoucher_Error"}},"required":["error"]},"ActivateVoucher_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ActivateVoucher_ErrorCodes_enum"}]}},"required":["code"]},"ActivateVoucher_ErrorCodes_enum":{"type":"string","enum":["ALREADY_ACTIVE","VOUCHER_EXPIRED"]}}},"paths":{"/v1/gift-cards/vouchers/{uid}/activate":{"patch":{"operationId":"Vouchers_activate","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateVoucherApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateVoucherApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateVoucherApiError"}}}}},"summary":"Activates a specific voucher","tags":["Vouchers"]}}}}
```

## POST /v1/gift-cards/vouchers/{uid}/redeem

> Initiates a redemption transaction using a specific voucher.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"PayWithVoucherApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/PayWithVoucher_Params"}},"required":["params"]},"PayWithVoucher_Params":{"type":"object","properties":{"amount":{"type":"number"},"reference":{"type":"string"}},"required":["amount"]},"PayWithVoucherApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/PayWithVoucher_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"PayWithVoucher_Data":{"type":"object","properties":{"transaction":{"$ref":"#/components/schemas/PayWithVoucher_Data_Transaction"}},"required":["transaction"]},"PayWithVoucher_Data_Transaction":{"type":"object","properties":{"type":{"type":"string","enum":["payment","refund","topup","transfer"]},"status":{"type":"string","enum":["applied","pending","reversed"]},"time":{"type":"string"},"amount":{"type":"number"},"description":{"type":"string"},"reversed":{"type":"boolean"},"reference":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"uid":{"type":"string"},"accountUid":{"type":"string"},"transferToAccountUid":{"type":"string"}},"required":["type","status","time","amount","uid","accountUid"]},"PayWithVoucherApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/PayWithVoucher_Error"}},"required":["error"]},"PayWithVoucher_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/PayWithVoucher_ErrorCodes_enum"}]}},"required":["code"]},"PayWithVoucher_ErrorCodes_enum":{"type":"string","enum":["ALREADY_REDEAMED_TO_WALLET","LOW_BALANCE","NON_HOLDER","NotFound","PAY_COUNT_LIMIT_EXCEEDED","VOUCHER_EXPIRED","VOUCHER_INACTIVE"]}}},"paths":{"/v1/gift-cards/vouchers/{uid}/redeem":{"post":{"operationId":"Vouchers_redeem","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWithVoucherApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWithVoucherApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWithVoucherApiError"}}}}},"summary":"Initiates a redemption transaction using a specific voucher.","tags":["Vouchers"]}}}}
```

## POST /v1/gift-cards/vouchers/redeem-with-code

> Redeem a specific voucher using its voucher code

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"PayWithVoucherCodeApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/PayWithVoucherCode_Params"}},"required":["params"]},"PayWithVoucherCode_Params":{"type":"object","properties":{"code":{"type":"string"},"amount":{"type":"number"},"reference":{"type":"string"}},"required":["code","amount"]},"PayWithVoucherCodeApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/PayWithVoucherCode_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"PayWithVoucherCode_Data":{"type":"object","properties":{"transaction":{"$ref":"#/components/schemas/PayWithVoucherCode_Data_Transaction"}},"required":["transaction"]},"PayWithVoucherCode_Data_Transaction":{"type":"object","properties":{"type":{"type":"string","enum":["payment","refund","topup","transfer"]},"status":{"type":"string","enum":["applied","pending","reversed"]},"time":{"type":"string"},"amount":{"type":"number"},"description":{"type":"string"},"reversed":{"type":"boolean"},"reference":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"uid":{"type":"string"},"accountUid":{"type":"string"},"transferToAccountUid":{"type":"string"}},"required":["type","status","time","amount","uid","accountUid"]},"PayWithVoucherCodeApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/PayWithVoucherCode_Error"}},"required":["error"]},"PayWithVoucherCode_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/PayWithVoucherCode_ErrorCodes_enum"}]}},"required":["code"]},"PayWithVoucherCode_ErrorCodes_enum":{"type":"string","enum":["ALREADY_REDEAMED","ALREADY_REDEAMED_TO_WALLET","LOW_BALANCE","NON_HOLDER","NotFound","PAY_COUNT_LIMIT_EXCEEDED","VOUCHER_EXPIRED","VOUCHER_INACTIVE"]}}},"paths":{"/v1/gift-cards/vouchers/redeem-with-code":{"post":{"operationId":"Vouchers_redeemWithCode","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWithVoucherCodeApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWithVoucherCodeApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayWithVoucherCodeApiError"}}}}},"summary":"Redeem a specific voucher using its voucher code","tags":["Vouchers"]}}}}
```


# Transactions

## GET /v1/gift-cards/transactions/{uid}

> Returns a specific transaction

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetTransactionApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetTransaction_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetTransaction_Data":{"type":"object","properties":{"transaction":{"$ref":"#/components/schemas/GetTransaction_Data_Transaction"}},"required":["transaction"]},"GetTransaction_Data_Transaction":{"type":"object","properties":{"type":{"type":"string","enum":["payment","refund","topup","transfer"]},"status":{"type":"string","enum":["applied","pending","reversed"]},"time":{"type":"string"},"amount":{"type":"number"},"description":{"type":"string"},"reversed":{"type":"boolean"},"reference":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"uid":{"type":"string"},"accountUid":{"type":"string"},"transferToAccountUid":{"type":"string"}},"required":["type","status","time","amount","uid","accountUid"]},"GetTransactionApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetTransaction_Error"}},"required":["error"]},"GetTransaction_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetTransaction_ErrorCodes_enum"}]}},"required":["code"]},"GetTransaction_ErrorCodes_enum":{"type":"string","enum":["COMPACT_INACTIVE","MISSING_ID","NO_CREATE_ACTION","NotFound"]}}},"paths":{"/v1/gift-cards/transactions/{uid}":{"get":{"operationId":"Transactions_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransactionApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTransactionApiError"}}}}},"summary":"Returns a specific transaction","tags":["Transactions"]}}}}
```

## POST /v1/gift-cards/transactions/{uid}/send-otp

> Sends a verification SMS to customer with OTP to authorize a specific transaction. OTP is used later with applyWithOTP.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"SendTransactionOTPApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/SendTransactionOTP_Params"}},"required":["params"]},"SendTransactionOTP_Params":{"type":"object","properties":{"lang":{"type":"string"}},"required":["lang"]},"SendTransactionOTPApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/SendTransactionOTP_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"SendTransactionOTP_Data":{"type":"object","properties":{"token":{"type":"string"},"customer":{"$ref":"#/components/schemas/SendTransactionOTP_Data_Customer"}},"required":["token","customer"]},"SendTransactionOTP_Data_Customer":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"cityId":{"type":"string"},"birthDate":{"type":"string"},"gender":{"type":"string","enum":["F","M"]},"passcode":{"type":"string"},"sequence":{"type":"number"},"number":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"id":{"type":"string"},"roleAssignments":{"type":"array","items":{"$ref":"#/components/schemas/RoleAssignmentMapSummary"}}},"required":["firstName","lastName","phone","sequence","number","id","roleAssignments"]},"RoleAssignmentMapSummary":{"type":"object","properties":{"endDate":{"type":"string"},"id":{"type":"string"}},"required":["endDate","id"]},"SendTransactionOTPApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/SendTransactionOTP_Error"}},"required":["error"]},"SendTransactionOTP_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/SendTransactionOTP_ErrorCodes_enum"}]}},"required":["code"]},"SendTransactionOTP_ErrorCodes_enum":{"type":"string","enum":["ALREADY_APPLIED","INVALID_STATUS","PHONE_NOT_DEFINED"]}}},"paths":{"/v1/gift-cards/transactions/{uid}/send-otp":{"post":{"operationId":"Transactions_sendOtp","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTransactionOTPApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTransactionOTPApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTransactionOTPApiError"}}}}},"summary":"Sends a verification SMS to customer with OTP to authorize a specific transaction. OTP is used later with applyWithOTP.","tags":["Transactions"]}}}}
```

## PATCH /v1/gift-cards/transactions/apply-with-otp

> Applies a specific voucher transaction using a token and OTP.

```json
{"openapi":"3.0.0","info":{"title":"Gormic Gift Cards API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"ApplyTransactionWithOTPApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/ApplyTransactionWithOTP_Params"}},"required":["params"]},"ApplyTransactionWithOTP_Params":{"type":"object","properties":{"token":{"type":"string"},"otp":{"type":"string"}},"required":["token","otp"]},"ApplyTransactionWithOTPApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/ApplyTransactionWithOTP_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"ApplyTransactionWithOTP_Data":{"type":"object","properties":{"succeed":{"type":"boolean"}},"required":["succeed"]},"ApplyTransactionWithOTPApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ApplyTransactionWithOTP_Error"}},"required":["error"]},"ApplyTransactionWithOTP_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ApplyTransactionWithOTP_ErrorCodes_enum"}]}},"required":["code"]},"ApplyTransactionWithOTP_ErrorCodes_enum":{"type":"string","enum":["ATTEMPTS_EXCEEDED","INVALID_OTP","INVALID_TOKEN","TOKEN_EXPIRED"]}}},"paths":{"/v1/gift-cards/transactions/apply-with-otp":{"patch":{"operationId":"Transactions_applyWithOtp","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTransactionWithOTPApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTransactionWithOTPApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyTransactionWithOTPApiError"}}}}},"summary":"Applies a specific voucher transaction using a token and OTP.","tags":["Transactions"]}}}}
```


# Business Intelligence

**Business Intelligence** provides APIs to access operational data, generate reports, and power dashboards with real-time insights.

\
With these APIs, you can track sales, analyze performance, and build custom analytics experiences tailored to your business needs.


# Dashboards

## GET /v1/bi/dashboards/{uid}

> Returns a specific dashboard

```json
{"openapi":"3.0.0","info":{"title":"Gormic BI API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetDashboardApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetDashboard_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetDashboard_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetDashboard_Data_Item"}},"required":["item"]},"GetDashboard_Data_Item":{"type":"object","properties":{"gap":{"type":"array","items":{"type":"object"}},"locales":{"type":"object"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/GetDashboard_Data_Item_ParametersItem"}},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"appId":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/BlockM"}}},"required":["locales","uid","appId","blocks"]},"GetDashboard_Data_Item_ParametersItem":{"type":"object","properties":{"key":{"type":"string"},"control":{"type":"string","enum":["quick-date-range"]},"use":{"type":"string"},"defaultValue":{"type":"object"}},"required":["key"]},"BlockM":{"type":"object","properties":{"type":{"type":"string","enum":["divider","template","text"]},"cols":{"type":"array","items":{"type":"object"}},"rows":{"type":"number"},"icon":{"type":"string"},"transparent":{"type":"boolean"},"attrs":{"$ref":"#/components/schemas/Record_5494b96e"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/BlockM_ParametersItem"}},"locales":{"type":"object"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"templateUid":{"type":"string"}},"required":["type","uid"]},"Record_5494b96e":{"type":"object","properties":{}},"BlockM_ParametersItem":{"type":"object","properties":{"key":{"type":"string"},"defaultValue":{"type":"object"}},"required":["key"]},"GetDashboardApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetDashboard_Error"}},"required":["error"]},"GetDashboard_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetDashboard_ErrorCodes_enum"}]}},"required":["code"]},"GetDashboard_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/bi/dashboards/{uid}":{"get":{"operationId":"Dashboards_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDashboardApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDashboardApiError"}}}}},"summary":"Returns a specific dashboard","tags":["Dashboards"]}}}}
```


# Data Models

## GET /v1/bi/data-models/{uid}

> Returns a specific data model

```json
{"openapi":"3.0.0","info":{"title":"Gormic BI API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetDataModelApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetDataModel_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetDataModel_Data":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/GetDataModel_Data_Item"}},"required":["item"]},"GetDataModel_Data_Item":{"type":"object","properties":{"locales":{"type":"object"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/GetDataModel_Data_Item_ColumnsItem"}},"orderBy":{"type":"number"},"type":{"type":"string","enum":["file","query","service","web"]},"query":{"type":"string"},"format":{"type":"string","enum":["json"]},"fileName":{"type":"string"},"tag":{"type":"string"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"uid":{"type":"string"},"appId":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/ParameterM"}},"templateUids":{"type":"array","items":{"type":"string"}}},"required":["locales","type","uid","appId","parameters","templateUids"]},"GetDataModel_Data_Item_ColumnsItem":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["date","jsonb","numeric","text","timestamptz"]},"attribute":{"type":"string"},"cid":{"type":"string"},"lov":{"type":"array","items":{"type":"object"}},"locales":{"type":"object"}},"required":["name"]},"ParameterM":{"type":"object","properties":{"mode":{"type":"string","enum":["config","preference"]},"type":{"type":"string","enum":["date","date-range","date-time","date-time-range","lookup","lov","number","text","yyyy-mm"]},"locales":{"type":"object"},"optional":{"type":"boolean"},"multiple":{"type":"boolean"},"hidden":{"type":"boolean"},"defaultValue":{"type":"object"},"lovDependKey":{"type":"string"},"targets":{"$ref":"#/components/schemas/Record_5494b96e"},"createdAt":{"type":"string"},"createdVia":{"type":"string"},"createdBy":{"type":"string"},"updatedAt":{"type":"string"},"updatedVia":{"type":"string"},"updatedBy":{"type":"string"},"key":{"type":"string"},"lovUid":{"type":"string"}},"required":["mode","type","locales","key"]},"Record_5494b96e":{"type":"object","properties":{}},"GetDataModelApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/GetDataModel_Error"}},"required":["error"]},"GetDataModel_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/GetDataModel_ErrorCodes_enum"}]}},"required":["code"]},"GetDataModel_ErrorCodes_enum":{"type":"string","enum":["NotFound"]}}},"paths":{"/v1/bi/data-models/{uid}":{"get":{"operationId":"DataModels_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDataModelApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDataModelApiError"}}}}},"summary":"Returns a specific data model","tags":["Data Models"]}}}}
```

## POST /v1/bi/data-models/{uid}/fetch

> Fetch data for a specific data model

```json
{"openapi":"3.0.0","info":{"title":"Gormic BI API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"FetchDataApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/FetchData_Params"}},"required":["params"]},"FetchData_Params":{"type":"object","properties":{"organizationUid":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/FetchData_Params_ParametersItem"}},"query":{"$ref":"#/components/schemas/ListQueryParams_570588af"},"lang":{"type":"string","enum":["ar","en"]}},"required":["lang"]},"FetchData_Params_ParametersItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"object"}},"required":["key","value"]},"ListQueryParams_570588af":{"type":"object","properties":{}},"FetchDataApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/FetchData_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"FetchData_Data":{"type":"object","properties":{"output":{"type":"array","items":{"type":"object"}},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/FetchData_Data_ParametersItem"}},"next":{"type":"string"}},"required":["output","parameters"]},"FetchData_Data_ParametersItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"object"}},"required":["key","value"]},"FetchDataApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/FetchData_Error"}},"required":["error"]},"FetchData_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/FetchData_ErrorCodes_enum"}]}},"required":["code"]},"FetchData_ErrorCodes_enum":{"type":"string","enum":["INVALID_DATA_MODEL_PARAMETER","INVALID_INSTANCE_IDS_PARAM","MISSIN_QUERY_PARAM","NOT_ALLOWED","NotFound","UNKNOWN_DATA_MODEL_PARAMETER"]}}},"paths":{"/v1/bi/data-models/{uid}/fetch":{"post":{"operationId":"DataModels_fetch","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchDataApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchDataApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FetchDataApiError"}}}}},"summary":"Fetch data for a specific data model","tags":["Data Models"]}}}}
```


# Jobs

## GET /v1/bi/jobs/{uid}

> Returns the status of a specific job.

```json
{"openapi":"3.0.0","info":{"title":"Gormic BI API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetJobApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetJob_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetJob_Data":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/GetJob_Data_Job"}},"required":["job"]},"GetJob_Data_Job":{"type":"object","properties":{"status":{"type":"string","enum":["canceled","completed","failed","pending","running"]},"log":{"type":"string"},"submittedAt":{"type":"string"},"startedAt":{"type":"string"},"outputMimeType":{"type":"string"},"outputFileName":{"type":"string"},"id":{"type":"string"},"downloadUrl":{"type":"string"}},"required":["status","submittedAt","id"]}}},"paths":{"/v1/bi/jobs/{uid}":{"get":{"operationId":"Jobs_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJobApiResponse"}}}}},"summary":"Returns the status of a specific job.","tags":["Jobs"]}}}}
```

## POST /v1/bi/jobs

> Submits a new request to process a specific data model.

```json
{"openapi":"3.0.0","info":{"title":"Gormic BI API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"SubmitJobApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/SubmitJob_Params"}},"required":["params"]},"SubmitJob_Params":{"type":"object","properties":{"uid":{"type":"string"},"organizationUid":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SubmitJob_Params_ParametersItem"}},"query":{"$ref":"#/components/schemas/ListQueryParams_570588af"},"lang":{"type":"string","enum":["ar","en"]},"template":{"type":"string","enum":["excel-auto"]}},"required":["uid","lang","template"]},"SubmitJob_Params_ParametersItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"object"}},"required":["key","value"]},"ListQueryParams_570588af":{"type":"object","properties":{}},"SubmitJobApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/SubmitJob_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"SubmitJob_Data":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"]},"SubmitJobApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/SubmitJob_Error"}},"required":["error"]},"SubmitJob_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/SubmitJob_ErrorCodes_enum"}]}},"required":["code"]},"SubmitJob_ErrorCodes_enum":{"type":"string","enum":["INVALID_DATA_MODEL_PARAMETER","INVALID_INSTANCE_IDS_PARAM","MISSIN_QUERY_PARAM","NOT_ALLOWED","NotFound","UNKOWN_DATA_MODEL_PARAMETER"]}}},"paths":{"/v1/bi/jobs":{"post":{"operationId":"Jobs_submit","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitJobApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitJobApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitJobApiError"}}}}},"summary":"Submits a new request to process a specific data model.","tags":["Jobs"]}}}}
```


# Advanced

Gormic provides a set of advanced APIs designed for deeper integrations and complex workflows across  the platform.

These APIs enable powerful capabilities such as:

* Manage floorplans, areas, tables, schedules, units of measurement, and recipe management.
* Manage POS stations, sessions, printers, and advanced invoicing operations.
* Customize customer experiences and manage reservation labels.
* Integrate with loyalty points and customer journeys.
* Manage campaign triggers and audience targeting.

### Interested in accessing advanced APIs?

Contact us at **<developers@gormic.com>** to request access.


# Delta Exporting

Gormic supports **delta-based data exporting** to allow clients to efficiently sync only the data that has changed since a specific point in time.

### How Delta Export Works

Delta exporting uses three key fields to control and continue syncing:

| Field          | Description                                                                                                              |
| -------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `updatedSince` | The ISO timestamp to fetch records **modified after**. Use this to start your export.                                    |
| `offset`       | A **cursor value** returned from the previous response, used to continue pagination **within the same `updatedSince`** . |

Continue until `next` is no longer included in the response, indicating that there are no more records to fetch.

> Export APIs for resources like **orders**, **products**, **reservations**, and more are documented individually in the **API Reference**.


# Event-Based Notifications & CDC

Gormic provides a unified **change tracking system** to help external systems stay in sync with your data. This system supports both:

* **CDC Logs**: Pull-based access to historical change events.
* **Event-Based Notifications**: Real-time push via webhooks.

Both mechanisms operate over a shared, abstract interface, allowing integrators to track changes across modules like Orders, Products, Customers, and more.

## How It Works

Each module that supports change tracking is identified by a **log key** (e.g., main, `transactional`). You can either:

* **Pull changes** manually from the log (`pullChanges` endpoint)
* **Subscribe** to receive webhooks in real time for selected actions

This enables flexible sync patterns for both batch systems and real-time integrations.

## Pull-Based Change Log (CDC)

Use the `pullChanges` API to **manually fetch change events** for a specific log key.

#### Parameters:

<table><thead><tr><th width="168.15753173828125">Param</th><th>Description</th></tr></thead><tbody><tr><td><code>logKey</code></td><td>The log key to track (e.g., <code>main</code>, <code>transactional</code>)</td></tr><tr><td><code>offset</code></td><td>Cursor returned from the previous pull. Start with <code>"0"</code> or latest offset.</td></tr></tbody></table>

* Use the `next` value as the offset in your next request.
* Continue pulling until `next` is not present.

## Event-Based Notifications (Webhooks)

For real-time integration, you can subscribe to webhook notifications triggered by changes in supported modules.

#### Parameters

<table><thead><tr><th width="187.294677734375">Param</th><th>Description</th></tr></thead><tbody><tr><td><code>logKey</code></td><td>The log key to track(e.g., <code>main</code>, <code>transactional</code>)</td></tr><tr><td><code>action</code></td><td>optional. Example: <code>create</code>, <code>update</code>, <code>delete</code></td></tr><tr><td><code>url</code></td><td>The public URL where events should be delivered</td></tr><tr><td><code>token</code></td><td>Bearer token used to sign the request for auth</td></tr></tbody></table>


# Becoming a Partner

We actively work with technology partners, SaaS vendors, and system integrators to build valuable solutions for our customers.

If you're interested in building an integration, publishing to our marketplace, or becoming a certified partner, here's how to get started:

### 1. Access the Sandbox

If you're not yet a subscribed customer, request sandbox access by contacting us at: [**developers@gormic.com**](mailto:developers@gormic.com)

Include:

* Your company name
* Intended integration use case
* Contact details

### 2. Build Your Integration

Use our APIs or SDKs to integrate with Gormic. Refer to our Getting Started guide to set up your developer account.

We’ll be happy to support you throughout your build.


# Publishing to the Marketplace

Once your integration is tested and complete, you can apply to list it in the Gormic Marketplace, making it discoverable to all our customers.

### Listing Requirements

* Working, tested integration with at least one sandbox or production account
* Clear documentation for users
* Support contact for customer issues

### Review Process

1. Submit your listing via email
2. Our team will review the integration, security, and docs
3. Approved listings will go live in the marketplace

### Get in Touch

Need help or want to pre-check your listing?\
Contact our developer relations team at [**developers@gormic.com**](mailto:developers@gormic.com)


# Contact

If you have questions, need support, or want to connect with our developer team, we're here to help.

**Email:** <developers@gormic.com>

We typically respond within 1–2 business days.


# Release Notes / Changelog


