Availabilities
Retrieves all availability information for a specified site.
Note: When a product bundle is retrieved, availability is returned both for its particular products and for the bundle as a whole. The bundle availability is equal to the lowest availability found in its products.
Additional scope information
The
availability.availability_view_by_vendorscope is required only when fetching availabilities for a specific vendor.
- : Needed to view availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantSite code, defined when the site is created.
shop1Number of items to be retrieved per page.
20000Example: 100Page number to be retrieved. The number of the first page is 1.
Note: If the pageNumber parameter is passed, size of the pages must be specified in the pageSize parameter.
1Example: 5A standard query parameter is used to search for specific values.
List of properties used to sort the results, separated by colons. Possible values:
{fieldName}{fieldName}:asc{fieldName}:desc
The request was successful. A list of availabilities is returned.
The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
Some server-side error occurred. Details are provided in the response.
GET /availability/{tenant}/availability/site/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "shop1:12345",
"site": "shop1",
"stockLevel": 10,
"available": true,
"productId": "5f7c996173fc281cdd412345",
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
},
"createdAt": "2022-02-22T02:02:02.222Z",
"modifiedAt": "2022-02-22T02:02:02.222Z"
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
}
}
]Retrieves availabilities for specified products. The request body accepts one of two mutually exclusive formats:
List of product IDs — retrieves availabilities for the specified products. If the product ID refers to a product bundle, availability information for the entire bundle is returned. The
sitequery parameter is optional.Q-param object — retrieves availabilities matching the provided query criteria. The response will not include avaialbilities for product bundles. The
sitequery parameter must not be provided together with the Q-param body.
Additional scope information
The
availability.availability_view_by_vendorscope is required only when fetching availabilities for a specific vendor.
- : Needed to view availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantSite code, defined when the site is created. If it's not provided, then availabilities for all sites are returned.
shop1Number of items to be retrieved per page.
20000Example: 100Page number to be retrieved. The number of the first page is 1.
Note: If the pageNumber parameter is passed, size of the pages must be specified in the pageSize parameter.
1Example: 5List of properties used to sort the results, separated by colons. Possible values:
{fieldName}{fieldName}:asc{fieldName}:desc
IDs of products for which availabilities should be retrieved.
The request was successful. A list of availabilities is returned.
The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
Some server-side error occurred. Details are provided in the response.
POST /availability/{tenant}/availability/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 55
[
"5f7c996173fc281cdd412345",
"5f7c996173fc281cdd412346"
][
{
"id": "shop1:12345",
"site": "shop1",
"stockLevel": 10,
"available": true,
"productId": "5f7c996173fc281cdd412345",
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
},
"createdAt": "2022-02-22T02:02:02.222Z",
"modifiedAt": "2022-02-22T02:02:02.222Z"
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
},
"bundleAvailabilities": [
{
"id": "shop1:678",
"site": "shop1",
"stockLevel": 10,
"available": true,
"productId": "5f7c996173fc281cdd412345",
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"createdAt": "2022-02-22T02:02:02.222Z",
"modifiedAt": "2022-02-22T02:02:02.222Z"
}
}
]
}
]- : Needed to view availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantProduct unique identifier, generated when the product is created through the Product Service.
5f7c996173fc281cdd412345Site code, defined when the site is created.
shop1The request was successful. The product availability details are returned.
Availability details.
Unique identifier of the availability.
Note: The value should be provided in the site:productId format.
shop1:12345Site code, defined when the site is created. The value should match the site query/path parameter value.
shop1Stock level of the product, expressed as a number.
10Flag indicating whether the product is available.
trueUnique identifier of the product, generated when the product is created through the Product Service.
5f7c996173fc281cdd412345Id of a vendor to which the availability belongs.
Popularity of the product, expressed as a number.
5Name of the product distribution channel.
ASSORTMENTPossible values: The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource was not found.
Some server-side error occurred. Details are provided in the response.
GET /availability/{tenant}/availability/{productId}/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "shop1:12345",
"site": "shop1",
"stockLevel": 10,
"available": true,
"productId": "5f7c996173fc281cdd412345",
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
},
"createdAt": "2022-02-22T02:02:02.222Z",
"modifiedAt": "2022-02-22T02:02:02.222Z"
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
},
"bundleAvailabilities": [
{
"id": "shop1:678",
"site": "shop1",
"stockLevel": 10,
"available": true,
"productId": "5f7c996173fc281cdd412345",
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
},
"createdAt": "2022-02-22T02:02:02.222Z",
"modifiedAt": "2022-02-22T02:02:02.222Z"
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
}
}
]
}Creates a new availability for a specified product.
Note: We recommend not to create a new product availability for a site named main. A site named main works as an aggregator of availability data from other sites. It's not possible to later retrieve availability for a single site when it's called main.
Additional scope information
The
availability.availability_manage_by_vendorscope allows to create availabilities for products belonging to the vendor.
- : Needed to manage availabilities.
- : Needed to manage availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantProduct unique identifier, generated when the product is created through the Product Service.
5f7c996173fc281cdd412345Site code, defined when the site is created.
shop1Stock level of the product, expressed as a number.
10Flag indicating whether the product is available.
truePopularity of the product, expressed as a number.
5Name of the product distribution channel.
ASSORTMENTPossible values: The request was successful. The availability has been created.
ID of the created resource.
The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
Resource already exists.
Some server-side error occurred. Details are provided in the response.
POST /availability/{tenant}/availability/{productId}/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 293
{
"stockLevel": 10,
"available": true,
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
}
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
}
}{
"id": "5f7c996173fc281cdd412345."
}Updates a specified product availability details, or crates a new availability if it doesn't exist yet.
Note: There is no possibility to update a product bundle availability - it is always equal to the lowest availability found in the bundled products.
Additional scope information
The
availability.availability_manage_by_vendorscope is only required when updating or creating availabilities belonging to the vendor.
- : Needed to manage availabilities.
- : Needed to manage availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantProduct unique identifier, generated when the product is created through the Product Service.
5f7c996173fc281cdd412345Site code, defined when the site is created.
shop1Stock level of the product, expressed as a number.
10Flag indicating whether the product is available.
truePopularity of the product, expressed as a number.
5Name of the product distribution channel.
ASSORTMENTPossible values: The request was successful. The availability has been created.
ID of the created resource.
The request was successful. The availability has been updated.
The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource was not found.
Some server-side error occurred. Details are provided in the response.
PUT /availability/{tenant}/availability/{productId}/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 293
{
"stockLevel": 10,
"available": true,
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
}
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
}
}{
"id": "5f7c996173fc281cdd412345."
}Deletes a specified product availability.
Note: There is no possibility to delete a product bundle availability - it is always equal to the lowest availability found in the bundled products.
Additional scope information
The
availability.availability_manage_by_vendorscope is only required when deleting availabilities belonging to the vendor.
- : Needed to manage availabilities.
- : Needed to manage availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantProduct unique identifier, generated when the product is created through the Product Service.
5f7c996173fc281cdd412345Site code, defined when the site is created.
shop1The request was successful. The availability has been deleted.
No content
The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
The requested resource was not found.
Some server-side error occurred. Details are provided in the response.
DELETE /availability/{tenant}/availability/{productId}/{site} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Creates availability records for a product based on its ID and site. A product can have different availability across sites, so each record is uniquely defined by the combination of productId and site. The maximum batch size is 200.
Note: We recommend not to create new product availabilities for a site named main. A site named main works as an aggregator of availability data from other sites. It's not possible to later retrieve availability for a single site when it's called main.
Additional scope information
The
availability.availability_manage_by_vendorscope is only required when creating availabilities belonging to the vendor.
- : Needed to manage availabilities.
- : Needed to manage availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantUnique identifier of the vendor. The presence of this header will limit the operation to products assigned to the provided vendor.
68ad7d45c42fc8121a611fecUnique identifier of the product.
12345Unique identifier of the site.
shop1Stock level of the product, expressed as a number.
10Flag indicating whether the product is available.
truePopularity of the product, expressed as a number.
5Name of the product distribution channel.
ASSORTMENTPossible values: Multi-status response.
ID of the affected availability (in the format :<).
shop1:12345Index of the processed item, matching the item position in request body.
1HTTP Status Code.
204HTTP Status description.
No ContentError message. Present only when an error occurs (HTTP status code from groups 4xx or 5xx)
There is no availability for productId: 12345 and site: shop1The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
Some server-side error occurred. Details are provided in the response.
POST /availability/{tenant}/availability/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 330
[
{
"productId": "12345",
"site": "shop1",
"stockLevel": 10,
"available": true,
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
}
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
}
}
][
{
"id": "shop1:12345",
"index": 0,
"code": 201,
"status": "Created"
},
{
"id": "shop2:98765",
"index": 1,
"code": 400,
"status": "Bad Request",
"message": "Product: '98765' does not belong to vendor: '68ad7d45c42fc8121a611fec'"
}
]Creates or updates product availability records based on product ID and site. If an availability does not yet exist for a given productId and site, it is created. If it already exists, it is updated. The maximum batch size is 200.
Note: We recommend not to create new product availabilities for a site named main. A site named main works as an aggregator of availability data from other sites. It's not possible to later retrieve availability for a single site when it's called main.
Additional scope information
The
availability.availability_manage_by_vendorscope is only required when creating or updating availabilities belonging to the vendor.
- : Needed to manage availabilities.
- : Needed to manage availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantUnique identifier of the vendor. The presence of this header will limit the operation to products assigned to the provided vendor.
68ad7d45c42fc8121a611fecUnique identifier of the product.
12345Unique identifier of the site.
shop1Stock level of the product, expressed as a number.
10Flag indicating whether the product is available.
truePopularity of the product, expressed as a number.
5Name of the product distribution channel.
ASSORTMENTPossible values: Multi-status response.
ID of the affected availability (in the format :<).
shop1:12345Index of the processed item, matching the item position in request body.
1HTTP Status Code.
204HTTP Status description.
No ContentError message. Present only when an error occurs (HTTP status code from groups 4xx or 5xx)
There is no availability for productId: 12345 and site: shop1The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
Some server-side error occurred. Details are provided in the response.
PUT /availability/{tenant}/availability/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 330
[
{
"productId": "12345",
"site": "shop1",
"stockLevel": 10,
"available": true,
"popularity": 5,
"distributionChannel": "ASSORTMENT",
"metadata": {
"mixins": {
"productCustomAttributes": "https://res.cloudinary.com/saas-ag/raw/upload/emporix-docs/productCustomAttributesMixIn.v29.json"
}
},
"mixins": {
"productCustomAttributes": {
"minOrderQuantity": 2
}
}
}
][
{
"id": "shop1:12345",
"index": 0,
"code": 201,
"status": "Created"
},
{
"id": "shop2:98765",
"index": 1,
"code": 204,
"status": "No Content"
},
{
"id": "shop3:98765",
"index": 2,
"code": 400,
"status": "Bad Request",
"message": "Product: '98765' does not belong to vendor: '68ad7d45c42fc8121a611fec'"
}
]Deletes product availability records identified by the combination of productId and site. The maximum batch size is 200.
Note: There is no possibility to delete a product bundle availability - it is always equal to the lowest availability found in the bundled products.
Additional scope information
The
availability.availability_manage_by_vendorscope is only required when deleting availabilities belonging to the vendor.
- : Needed to manage availabilities.
- : Needed to manage availabilities belonging to the vendor.
Your Emporix tenant name.
Note: The tenant name should always be provided in lowercase.
testtenantUnique identifier of the vendor. The presence of this header will limit the operation to products assigned to the provided vendor.
68ad7d45c42fc8121a611fecUnique identifier of the product.
12345Unique identifier of the site.
shop1Multi-status response.
ID of the affected availability (in the format :<).
shop1:12345Index of the processed item, matching the item position in request body.
1HTTP Status Code.
204HTTP Status description.
No ContentError message. Present only when an error occurs (HTTP status code from groups 4xx or 5xx)
There is no availability for productId: 12345 and site: shop1The request was syntactically incorrect. Details are provided in the response.
The authorization token is invalid or has expired. Details are provided in the response.
Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.
Some server-side error occurred. Details are provided in the response.
DELETE /availability/{tenant}/availability/bulk HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 38
[
{
"productId": "12345",
"site": "shop1"
}
][
{
"id": "shop1:12345",
"index": 0,
"code": 204,
"status": "No Content"
},
{
"id": "shop2:98765",
"index": 1,
"code": 204,
"status": "No Content"
}
]Last updated
Was this helpful?

