# Shopping Lists

## Retrieving a shopping list

> \
> Gets shopping list by name or defaults to all shopping lists if name is not provided.\
> When scope is provided then all shopping lists are returned. If scope is not provided, then only own shopping list is returned.\
> \
> \### Additional scope info\
> \
> \* \`shoppinglist.shoppinglist\_read\` - Required only for the employee to read shopping lists. If scope is not present, then the customerId is resolved from the token.

```json
{"openapi":"3.0.1","info":{"title":"Shopping List Service","version":"0.0.1"},"tags":[{"name":"Shopping Lists"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["shoppinglist.shoppinglist_read"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shoppinglist.shoppinglist_read":"Needed to retrieve shopping lists.","shoppinglist.shoppinglist_delete":"Needed to delete shopping lists."}}}}},"schemas":{"getShoppingLists":{"type":"array","items":{"$ref":"#/components/schemas/getShoppingList"}},"getShoppingList":{"type":"object","properties":{"customerId":{"description":"Unique identifier of customer","type":"string"},"metadata":{"deprecated":true,"type":"object","properties":{"createdAt":{"$ref":"#/components/schemas/TimeProperties"},"modifiedAt":{"$ref":"#/components/schemas/TimeProperties"},"version":{"type":"number"}}}},"additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/shoppinglistItem"}},"mixins":{"type":"object","additionalProperties":true,"description":"Map of custom shopping lists attributes.\n"},"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":true,"description":"Mixins schemas"},"createdAt":{"$ref":"#/components/schemas/TimeProperties"},"modifiedAt":{"$ref":"#/components/schemas/TimeProperties"},"version":{"type":"number"}}}}}},"TimeProperties":{"type":"object","properties":{"epochSecond":{"type":"number"},"nano":{"type":"number"}}},"shoppinglistItem":{"title":"ShoppinglistItem","type":"object","properties":{"id":{"type":"integer"},"productId":{"type":"string"},"quantity":{"type":"number"},"cuttingOption":{"type":"string"},"servicePackagingOption":{"type":"string"},"comment":{"type":"string"},"mixins":{"type":"object","additionalProperties":true}},"required":["productId","quantity"]}},"responses":{"trait_shopping_400":{"description":"Request syntactically incorrect. Any details will be provided within the response payload.","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}}}},"paths":{"/shoppinglist/{tenant}/shopping-lists":{"get":{"tags":["Shopping Lists"],"summary":"Retrieving a shopping list","description":"\nGets shopping list by name or defaults to all shopping lists if name is not provided.\nWhen scope is provided then all shopping lists are returned. If scope is not provided, then only own shopping list is returned.\n\n### Additional scope info\n\n* `shoppinglist.shoppinglist_read` - Required only for the employee to read shopping lists. If scope is not present, then the customerId is resolved from the token.","operationId":"GET-shopping-list-retrieve-shopping-list","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant name.\n\n**Note**: The tenant name should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"name","in":"query","description":"Name of the shopping list. If missing all shopping lists are provided. This query param has no effect when it's used by employee.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Resource successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getShoppingLists"}}}},"400":{"$ref":"#/components/responses/trait_shopping_400"},"401":{"$ref":"#/components/responses/trait_yaasAware_401"},"500":{"$ref":"#/components/responses/trait_yaasAware_500"}}}}}}
```

## Creating a shopping list

> Creates a shopping list.\
> \*\*\*\
> \
> \### Additional scope info\
> \
> &#x20; \* \`shoppinglist.shoppinglist\_manage\` - Required only for the employee to create a shopping list for a provided customer. If the scope is not present, then the customerId is resolved from the token.

```json
{"openapi":"3.0.1","info":{"title":"Shopping List Service","version":"0.0.1"},"tags":[{"name":"Shopping Lists"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"CustomerAccessToken":[]},{"OAuth2":[]}],"components":{"securitySchemes":{"CustomerAccessToken":{"type":"http","scheme":"bearer","description":"To generate a customer access token, go to the [Logging in a customer](https://developer.emporix.io/api-references-1/readme/api-reference-11/authentication-and-authorization#post-customer-tenant-login) endpoint."},"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shoppinglist.shoppinglist_read":"Needed to retrieve shopping lists.","shoppinglist.shoppinglist_delete":"Needed to delete shopping lists."}}}}},"schemas":{"ownShoppingListCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/shoppinglistItem"}},"mixins":{"type":"object","additionalProperties":true,"description":"Map of custom shopping lists attributes.\n"},"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":true,"description":"Mixins schemas"}}}},"required":["name"]},"shoppinglistItem":{"title":"ShoppinglistItem","type":"object","properties":{"id":{"type":"integer"},"productId":{"type":"string"},"quantity":{"type":"number"},"cuttingOption":{"type":"string"},"servicePackagingOption":{"type":"string"},"comment":{"type":"string"},"mixins":{"type":"object","additionalProperties":true}},"required":["productId","quantity"]},"employeeShoppingListCreateRequest":{"allOf":[{"$ref":"#/components/schemas/ownShoppingListCreateRequest"}],"properties":{"customerId":{"type":"string","description":"Unique identifier of customer"},"mixins":{"type":"object","additionalProperties":true,"description":"Map of custom shopping lists attributes.\n"},"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":true,"description":"Mixins schemas"}}}}}},"responses":{"trait_shopping_400":{"description":"Request syntactically incorrect. Any details will be provided within the response payload.","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_409":{"description":"Creation failed because there was a conflict with another resource. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}}}},"paths":{"/shoppinglist/{tenant}/shopping-lists":{"post":{"tags":["Shopping Lists"],"summary":"Creating a shopping list","description":"Creates a shopping list.\n***\n\n### Additional scope info\n\n  * `shoppinglist.shoppinglist_manage` - Required only for the employee to create a shopping list for a provided customer. If the scope is not present, then the customerId is resolved from the token.","operationId":"POST-shopping-list-create-shopping-list","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant name.\n\n**Note**: The tenant name should always be written in lowercase.\n","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ownShoppingListCreateRequest"},{"$ref":"#/components/schemas/employeeShoppingListCreateRequest"}]}}},"required":false},"responses":{"201":{"description":"The shopping list resource has been successfully created.\n","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/trait_shopping_400"},"401":{"$ref":"#/components/responses/trait_yaasAware_401"},"409":{"$ref":"#/components/responses/trait_yaasAware_409"},"500":{"$ref":"#/components/responses/trait_yaasAware_500"}}}}}}
```

## Retrieving a customer shopping list

> Retrieves a shopping list based on the customer number. This endpoint is valid only for the employee.\
> \*\*\*<br>

```json
{"openapi":"3.0.1","info":{"title":"Shopping List Service","version":"0.0.1"},"tags":[{"name":"Shopping Lists"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"CustomerAccessToken":[]},{"OAuth2":["shoppinglist.shoppinglist_read"]}],"components":{"securitySchemes":{"CustomerAccessToken":{"type":"http","scheme":"bearer","description":"To generate a customer access token, go to the [Logging in a customer](https://developer.emporix.io/api-references-1/readme/api-reference-11/authentication-and-authorization#post-customer-tenant-login) endpoint."},"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shoppinglist.shoppinglist_read":"Needed to retrieve shopping lists.","shoppinglist.shoppinglist_delete":"Needed to delete shopping lists."}}}}},"schemas":{"getShoppingList":{"type":"object","properties":{"customerId":{"description":"Unique identifier of customer","type":"string"},"metadata":{"deprecated":true,"type":"object","properties":{"createdAt":{"$ref":"#/components/schemas/TimeProperties"},"modifiedAt":{"$ref":"#/components/schemas/TimeProperties"},"version":{"type":"number"}}}},"additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/shoppinglistItem"}},"mixins":{"type":"object","additionalProperties":true,"description":"Map of custom shopping lists attributes.\n"},"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":true,"description":"Mixins schemas"},"createdAt":{"$ref":"#/components/schemas/TimeProperties"},"modifiedAt":{"$ref":"#/components/schemas/TimeProperties"},"version":{"type":"number"}}}}}},"TimeProperties":{"type":"object","properties":{"epochSecond":{"type":"number"},"nano":{"type":"number"}}},"shoppinglistItem":{"title":"ShoppinglistItem","type":"object","properties":{"id":{"type":"integer"},"productId":{"type":"string"},"quantity":{"type":"number"},"cuttingOption":{"type":"string"},"servicePackagingOption":{"type":"string"},"comment":{"type":"string"},"mixins":{"type":"object","additionalProperties":true}},"required":["productId","quantity"]}},"responses":{"trait_yaasAware_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}}}},"paths":{"/shoppinglist/{tenant}/shopping-lists/{customerId}":{"get":{"tags":["Shopping Lists"],"summary":"Retrieving a customer shopping list","description":"Retrieves a shopping list based on the customer number. This endpoint is valid only for the employee.\n***\n","operationId":"GET-shopping-list-retrieve-customer-shopping-list","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant name.\n\n**Note**: The tenant name should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"customerId","in":"path","required":true,"description":"Unique identifier of the customer.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Name of the shopping list\n","schema":{"type":"string"}}],"responses":{"200":{"description":"shopping list successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/getShoppingList"}}}},"401":{"$ref":"#/components/responses/trait_yaasAware_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"404":{"$ref":"#/components/responses/trait_yaasAware_404"},"500":{"$ref":"#/components/responses/trait_yaasAware_500"}}}}}}
```

## Updating a customer shopping list

> Updates a shopping list.\
> \*\*\*\
> \
> \### Additional scope info\
> \
> &#x20; \* \`shoppinglist.shoppinglist\_manage\` - Required only for the employee to update a shopping list. If the scope is not present, then the operation is allowed for customer to update his own shopping list.<br>

```json
{"openapi":"3.0.1","info":{"title":"Shopping List Service","version":"0.0.1"},"tags":[{"name":"Shopping Lists"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"CustomerAccessToken":[]},{"OAuth2":[]}],"components":{"securitySchemes":{"CustomerAccessToken":{"type":"http","scheme":"bearer","description":"To generate a customer access token, go to the [Logging in a customer](https://developer.emporix.io/api-references-1/readme/api-reference-11/authentication-and-authorization#post-customer-tenant-login) endpoint."},"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shoppinglist.shoppinglist_read":"Needed to retrieve shopping lists.","shoppinglist.shoppinglist_delete":"Needed to delete shopping lists."}}}}},"schemas":{"ownShoppingListUpdateRequest":{"allOf":[{"$ref":"#/components/schemas/ownShoppingListCreateRequest"}],"properties":{"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":true,"description":"Mixins schemas"},"version":{"type":"integer"}}}}},"ownShoppingListCreateRequest":{"type":"object","properties":{"name":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/shoppinglistItem"}},"mixins":{"type":"object","additionalProperties":true,"description":"Map of custom shopping lists attributes.\n"},"metadata":{"properties":{"mixins":{"type":"object","additionalProperties":true,"description":"Mixins schemas"}}}},"required":["name"]},"shoppinglistItem":{"title":"ShoppinglistItem","type":"object","properties":{"id":{"type":"integer"},"productId":{"type":"string"},"quantity":{"type":"number"},"cuttingOption":{"type":"string"},"servicePackagingOption":{"type":"string"},"comment":{"type":"string"},"mixins":{"type":"object","additionalProperties":true}},"required":["productId","quantity"]}},"responses":{"trait_shopping_400":{"description":"Request syntactically incorrect. Any details will be provided within the response payload.","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_409":{"description":"Creation failed because there was a conflict with another resource. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}}}},"paths":{"/shoppinglist/{tenant}/shopping-lists/{customerId}":{"put":{"tags":["Shopping Lists"],"summary":"Updating a customer shopping list","description":"Updates a shopping list.\n***\n\n### Additional scope info\n\n  * `shoppinglist.shoppinglist_manage` - Required only for the employee to update a shopping list. If the scope is not present, then the operation is allowed for customer to update his own shopping list.\n","operationId":"PUT-shopping-list-update-customer-shopping-list","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant name.\n\n**Note**: The tenant name should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"customerId","in":"path","required":true,"description":"Unique identifier of the customer.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ownShoppingListUpdateRequest"}}},"required":false},"responses":{"204":{"description":"The resource has been successfully updated.\n"},"400":{"$ref":"#/components/responses/trait_shopping_400"},"401":{"$ref":"#/components/responses/trait_yaasAware_401"},"404":{"$ref":"#/components/responses/trait_yaasAware_404"},"409":{"$ref":"#/components/responses/trait_yaasAware_409"},"500":{"$ref":"#/components/responses/trait_yaasAware_500"}}}}}}
```

## Removing a customer shopping list

> Deletes a shopping list.\
> \*\*\*\
> \
> \### Additional scope info\
> \
> &#x20; \* \`shoppinglist.shoppinglist\_manage\` - Required only for the employee to delete a shopping list. If the scope is not present, then the operation is allowed for customer to delete his own shopping list.<br>

```json
{"openapi":"3.0.1","info":{"title":"Shopping List Service","version":"0.0.1"},"tags":[{"name":"Shopping Lists"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["shoppinglist.shoppinglist_delete"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shoppinglist.shoppinglist_read":"Needed to retrieve shopping lists.","shoppinglist.shoppinglist_delete":"Needed to delete shopping lists."}}}}},"responses":{"trait_shopping_400":{"description":"Request syntactically incorrect. Any details will be provided within the response payload.","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_401":{"description":"Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"trait_yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}},"trait_yaasAware_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"title":"error","required":["status","type"],"type":"object","properties":{"status":{"maximum":599,"minimum":100,"type":"integer","description":"original HTTP error code, should be consistent with the response HTTP code"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error type, lower case with underscore eg validation_failure"},"message":{"type":"string","description":"descriptive error message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support","format":"uri"},"details":{"type":"array","description":"list of problems causing this error","items":{"title":"errorDetail","required":["type"],"type":"object","properties":{"field":{"type":"string","description":"a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","type":"string","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type."},"message":{"type":"string","description":"descriptive error detail message for debugging"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail","format":"uri"}},"description":"schema for specific error cause"}}},"description":"Schema for API specified errors."}}}}}},"paths":{"/shoppinglist/{tenant}/shopping-lists/{customerId}":{"delete":{"tags":["Shopping Lists"],"summary":"Removing a customer shopping list","description":"Deletes a shopping list.\n***\n\n### Additional scope info\n\n  * `shoppinglist.shoppinglist_manage` - Required only for the employee to delete a shopping list. If the scope is not present, then the operation is allowed for customer to delete his own shopping list.\n","operationId":"DELETE-shopping-list-remove-customer-shopping-list","parameters":[{"name":"tenant","in":"path","description":"Your Emporix tenant name.\n\n**Note**: The tenant name should always be written in lowercase.\n","required":true,"schema":{"type":"string"}},{"name":"customerId","in":"path","required":true,"description":"Unique identifier of the customer.","schema":{"type":"string"}},{"name":"name","in":"query","description":"Name of the shopping list. If no `name` is provided, then all shopping lists of given customer are removed.\n","schema":{"type":"string"}}],"responses":{"204":{"description":"The resource has been successfully deleted.\n"},"400":{"$ref":"#/components/responses/trait_shopping_400"},"401":{"$ref":"#/components/responses/trait_yaasAware_401"},"403":{"$ref":"#/components/responses/trait_yaasAware_403"},"404":{"$ref":"#/components/responses/trait_yaasAware_404"},"500":{"$ref":"#/components/responses/trait_yaasAware_500"}}}}}}
```
