Shopping List Service

Download OpenAPI specification:Download

Manage shopping lists

Shopping lists

GET_shopping-list

Gets shopping list by name or defaults to all shopping lists if name is not provided

SecurityCustomerAccessToken or OAuth2
Request
query Parameters
name
string

Name of the shopping list. If missing all shopping lists are provided

Responses
200

Resource successfully retrieved.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

500

Some server side error occurred.

get/shoppinglists
Request samples
Response samples
application/json
{
  • "id": "123456",
  • "default": {
    }
}

POST_shopping-list

Creates a new shopping list.


SecurityCustomerAccessToken or OAuth2
Request
Request Body schema: application/json
name
required
string
Array of objects (ShoppinglistItem)
object

Map of custom shopping lists attributes.

object
Responses
201

The shopping list resource has been successfully created.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

409

Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

500

Some server side error occurred.

post/shoppinglists
Request samples
application/json
{
  • "name": "default",
  • "items": [
    ]
}
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

PUT_shopping-list

Updates a shopping list.


SecurityCustomerAccessToken or OAuth2
Request
Request Body schema: application/json
name
required
string
Array of objects (ShoppinglistItem)
object

Map of custom shopping lists attributes.

object
Responses
200

The resource has been successfully updated.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

404

The requested resource does not exist.

409

Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

500

Some server side error occurred.

put/shoppinglists
Request samples
application/json
{
  • "name": "default",
  • "items": [
    ]
}
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

DELETE_shopping-list

Deletes a shopping list.


Required scopes

  • shoppinglist.shoppinglist_delete
SecurityOAuth2
Request
query Parameters
name
string

Name of the shopping list

Responses
204

The resource has been successfully deleted.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

403

Given authorization scopes are not sufficient and do not match required scopes.

404

The requested resource does not exist.

500

Some server side error occurred.

delete/shoppinglists
Request samples
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

GET_shopping-lists

Retrieves a shopping list based on the customer number


Required scopes

  • shoppinglist.shoppinglist_read
SecurityCustomerAccessToken
Request
path Parameters
customerNumber
required
string

the customer number

query Parameters
name
string

Name of the shopping list

Responses
200

shopping list successfully retrieved.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

403

Given authorization scopes are not sufficient and do not match required scopes.

404

The requested resource does not exist.

500

Some server side error occurred.

get/shoppinglists/{customerNumber}
Request samples
Response samples
application/json
{
  • "default": {
    }
}

New Shopping Lists

POST_tenant-shopping-list

Creates a new shopping list.


Required scopes

  • shoppinglist.shoppinglist_manage - required for the employee to create a shopping list for a provided customer. If scope is not present, then the customerId is resolved from the token.
SecurityCustomerAccessToken or OAuth2
Request
path Parameters
tenant
required
string

Your Emporix tenant's name.

Note: The tenant name should always be written in lowercase.

Example: saasdev2
Request Body schema: application/json
One of:
name
required
string
Array of objects (ShoppinglistItem)
object

Map of custom shopping lists attributes.

object
Responses
201

The shopping list resource has been successfully created.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

409

Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

500

Some server side error occurred.

post/{tenant}/shopping-lists
Request samples
application/json
{
  • "customerId": "C120043",
  • "name": "default",
  • "items": [
    ]
}
Response samples
application/json
{
  • "id": "C120043"
}

GET_tenant-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.

Required scopes

  • shoppinglist.shoppinglist_read - required for the employee to read shopping lists. If scope is not present, then the customerId is resolved from the token.
SecurityCustomerAccessToken or OAuth2
Request
path Parameters
tenant
required
string

Your Emporix tenant's name.

Note: The tenant name should always be written in lowercase.

Example: saasdev2
query Parameters
name
string

Name of the shopping list. If missing all shopping lists are provided. This query param has no effect when it's used by employee.

Responses
200

Resource successfully retrieved.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

500

Some server side error occurred.

get/{tenant}/shopping-lists
Request samples
Response samples
application/json
[
  • {
    }
]

PUT_tenant-shopping-list-customerId

Updates a shopping list.


Required scopes

  • shoppinglist.shoppinglist_manage - required for the employee to update a shopping list. If scope is not present, then the operation is allowed for customer to update his own shopping list.
SecurityCustomerAccessToken or OAuth2
Request
path Parameters
tenant
required
string

Your Emporix tenant's name.

Note: The tenant name should always be written in lowercase.

Example: saasdev2
customerId
required
string

Unique identifier of the customer.

Example: C120053
Request Body schema: application/json
name
required
string
Array of objects (ShoppinglistItem)
object

Map of custom shopping lists attributes.

object
Responses
204

The resource has been successfully updated.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

404

The requested resource does not exist.

409

Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.

500

Some server side error occurred.

put/{tenant}/shopping-lists/{customerId}
Request samples
application/json
{
  • "name": "default",
  • "items": [
    ]
}
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}

GET_tenant-shopping-lists-customerId

Retrieves a shopping list based on the customer number. This endpoint is valid only for the employee.


Required scopes

  • shoppinglist.shoppinglist_read
SecurityCustomerAccessToken
Request
path Parameters
tenant
required
string

Your Emporix tenant's name.

Note: The tenant name should always be written in lowercase.

Example: saasdev2
customerId
required
string

Unique identifier of the customer.

Example: C120053
query Parameters
name
string

Name of the shopping list

Responses
200

shopping list successfully retrieved.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

403

Given authorization scopes are not sufficient and do not match required scopes.

404

The requested resource does not exist.

500

Some server side error occurred.

get/{tenant}/shopping-lists/{customerId}
Request samples
Response samples
application/json
{
  • "customerId": "C120048",
  • "default": {
    }
}

DELETE_tenant-shopping-list-customerId

Deletes a shopping list.


Required scopes

  • shoppinglist.shoppinglist_manage - required for the employee to delete a shopping list. If scope is not present, then the operation is allowed for customer to delete his own shopping list.
SecurityOAuth2
Request
path Parameters
tenant
required
string

Your Emporix tenant's name.

Note: The tenant name should always be written in lowercase.

Example: saasdev2
customerId
required
string

Unique identifier of the customer.

Example: C120053
query Parameters
name
string

Name of the shopping list. If no name is provided, then all shopping lists of given customer are removed.

Responses
204

The resource has been successfully deleted.

400

Request syntactically incorrect. Any details will be provided within the response payload.

401

Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.

403

Given authorization scopes are not sufficient and do not match required scopes.

404

The requested resource does not exist.

500

Some server side error occurred.

delete/{tenant}/shopping-lists/{customerId}
Request samples
Response samples
application/json
{
  • "status": 400,
  • "message": "There are validation problems, see details section for more information",
  • "type": "validation_violation",
  • "details": [
    ]
}