# 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"]}}}}
```
