Shopping Lists
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.
Your Emporix tenant's name.
Note: The tenant name should always be written in lowercase.
saasdev2
Name of the shopping list. If missing all shopping lists are provided. This query param has no effect when it's used by employee.
Resource successfully retrieved.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Some server side error occurred.
GET /shoppinglist/{tenant}/shopping-lists HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"customerId": "C120046",
"default": {
"name": "default",
"items": [
{
"id": 1,
"productId": "55cdcd91a88ed11babd7ca7e",
"quantity": 7.1,
"cuttingOption": "small",
"servicePackagingOption": "paper",
"comment": "fragile"
},
{
"id": 2,
"productId": "75cdcd91a88ed11babd7ca9i",
"quantity": 1.5,
"cuttingOption": "small",
"servicePackagingOption": "paper",
"comment": "fragile"
}
]
}
}
]
Your Emporix tenant's name.
Note: The tenant name should always be written in lowercase.
saasdev2
The shopping list resource has been successfully created.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Some server side error occurred.
POST /shoppinglist/{tenant}/shopping-lists HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 191
{
"customerId": "C120043",
"name": "default",
"items": [
{
"id": 1,
"productId": "55cdcd91a88ed11babd7ca7e",
"quantity": 7.1,
"cuttingOption": "small",
"servicePackagingOption": "paper",
"comment": "fragile"
}
]
}
{
"id": "C120043"
}
Your Emporix tenant's name.
Note: The tenant name should always be written in lowercase.
saasdev2
Unique identifier of the customer.
C120053
Name of the shopping list
shopping list successfully retrieved.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
The requested resource does not exist.
Some server side error occurred.
GET /shoppinglist/{tenant}/shopping-lists/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"customerId": "C120048",
"default": {
"name": "default",
"items": [
{
"id": 1,
"productId": "55cdcd91a88ed11babd7ca7e",
"quantity": 7.1,
"cuttingOption": "small",
"servicePackagingOption": "paper",
"comment": "fragile"
},
{
"id": 2,
"productId": "75cdcd91a88ed11babd7ca9i",
"quantity": 1.5,
"cuttingOption": "small",
"servicePackagingOption": "paper",
"comment": "fragile"
}
]
}
}
Your Emporix tenant's name.
Note: The tenant name should always be written in lowercase.
saasdev2
Unique identifier of the customer.
C120053
The resource has been successfully updated.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
The requested resource does not exist.
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Some server side error occurred.
PUT /shoppinglist/{tenant}/shopping-lists/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 168
{
"name": "default",
"items": [
{
"id": 3,
"productId": "23cdcd91a88ed11babd7ca7y",
"quantity": 2.4,
"cuttingOption": "small",
"servicePackagingOption": "paper",
"comment": "fragile"
}
]
}
No content
Your Emporix tenant's name.
Note: The tenant name should always be written in lowercase.
saasdev2
Unique identifier of the customer.
C120053
Name of the shopping list. If no name
is provided, then all shopping lists of given customer are removed.
The resource has been successfully deleted.
Request syntactically incorrect. Any details will be provided within the response payload.
Given request is unauthorized - the authorization token is invalid or has expired. Details will be provided in the response payload.
Given authorization scopes are not sufficient and do not match required scopes.
The requested resource does not exist.
Some server side error occurred.
DELETE /shoppinglist/{tenant}/shopping-lists/{customerId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Was this helpful?