# Availabilities

## Retrieving all availability information for a site

> 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\_vendor\` scope is required only when fetching availabilities for a specific vendor. \
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_view_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"schemas":{"AvailabilityList":{"type":"array","items":{"$ref":"#/components/schemas/Availability"}},"Availability":{"description":"Availability details.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the availability.\n\n**Note**: The value should be provided in the `site`:`productId` format."},"site":{"type":"string","description":"Site code, defined when the site is created. The value should match the `site` query/path parameter value."},"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"productId":{"type":"string","description":"Unique identifier of the product, generated when the product is created through the Product Service."},"vendorId":{"type":"string","description":"Id of a vendor to which the availability belongs."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the availability was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Date and time when the availability was last updated."}}}}},"DistributionChannel":{"type":"string","description":"Name of the product distribution channel.","enum":["ASSORTMENT","HOME_DELIVERY","PICKUP"]},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}},"parameters":{"page-size":{"in":"query","name":"pageSize","required":false,"description":"Number of items to be retrieved per page.\n","schema":{"type":"number","default":20000}},"page-number":{"in":"query","name":"pageNumber","required":false,"description":"Page number to be retrieved. The number of the first page is 1.\n\n**Note:** If the `pageNumber` parameter is passed, size of the pages must be specified in the `pageSize` parameter.\n","schema":{"type":"number","default":1}},"q":{"in":"query","name":"q","required":false,"description":"A standard query parameter is used to search for specific values.\n\nSee: [Standard Practices - Query parameter](https://developer.emporix.io/docs/content/q-param)\n","schema":{"type":"string"}},"sort":{"in":"query","name":"sort","required":false,"description":"List of properties used to sort the results, separated by colons.\nPossible values:\n* `{fieldName}`\n* `{fieldName}:asc`\n* `{fieldName}:desc`\n","schema":{"type":"string"}}}},"paths":{"/availability/{tenant}/availability/site/{site}":{"get":{"summary":"Retrieving all availability information for a site","description":"Retrieves all availability information for a specified site.\n\n**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.\n\n***\n\n### **Additional scope information**\n* The `availability.availability_view_by_vendor` scope is required only when fetching availabilities for a specific vendor. \n\n***","responses":{"200":{"description":"The request was successful. A list of availabilities is returned.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total number of availabilities matching the query criteria."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityList"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"GET-availability-retrieve-availability-site","parameters":[{"$ref":"#/components/parameters/page-size"},{"$ref":"#/components/parameters/page-number"},{"$ref":"#/components/parameters/q"},{"$ref":"#/components/parameters/sort"}],"tags":["Availabilities"]}}}}
```

## Retrieving product availabilities

> 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 \`site\` query parameter is optional.\
> \* \*\*Q-param object\*\* — retrieves availabilities matching the provided query criteria. The response will \*\*not\*\* include avaialbilities for product bundles. The \`site\` query parameter must \*\*not\*\* be provided together with the Q-param body.\
> \
> \*\*\*\
> \
> \### \*\*Additional scope information\*\*\
> \* The \`availability.availability\_view\_by\_vendor\` scope is required only when fetching availabilities for a specific vendor. \
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_view_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"parameters":{"tenant-path":{"in":"path","name":"tenant","required":true,"description":"Your Emporix tenant name.\n\n**Note**: The tenant name should always be provided in lowercase.\n","schema":{"type":"string"}},"site":{"in":"query","name":"site","description":"Site code, defined when the site is created. If it's not provided, then availabilities for all sites are returned.","schema":{"type":"string"}},"page-size":{"in":"query","name":"pageSize","required":false,"description":"Number of items to be retrieved per page.\n","schema":{"type":"number","default":20000}},"page-number":{"in":"query","name":"pageNumber","required":false,"description":"Page number to be retrieved. The number of the first page is 1.\n\n**Note:** If the `pageNumber` parameter is passed, size of the pages must be specified in the `pageSize` parameter.\n","schema":{"type":"number","default":1}},"sort":{"in":"query","name":"sort","required":false,"description":"List of properties used to sort the results, separated by colons.\nPossible values:\n* `{fieldName}`\n* `{fieldName}:asc`\n* `{fieldName}:desc`\n","schema":{"type":"string"}}},"schemas":{"AvailabilityWithBundleList":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityWithBundle"}},"AvailabilityWithBundle":{"description":"Availability details.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the availability.\n\n**Note**: The value should be provided in the `site`:`productId` format."},"site":{"type":"string","description":"Site code, defined when the site is created. The value should match the `site` query/path parameter value."},"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"productId":{"type":"string","description":"Unique identifier of the product, generated when the product is created through the Product Service."},"vendorId":{"type":"string","description":"Id of a vendor to which the availability belongs."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"bundleAvailabilities":{"$ref":"#/components/schemas/AvailabilityList"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the availability was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Date and time when the availability was last updated."}}}}},"DistributionChannel":{"type":"string","description":"Name of the product distribution channel.","enum":["ASSORTMENT","HOME_DELIVERY","PICKUP"]},"AvailabilityList":{"type":"array","items":{"$ref":"#/components/schemas/Availability"}},"Availability":{"description":"Availability details.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the availability.\n\n**Note**: The value should be provided in the `site`:`productId` format."},"site":{"type":"string","description":"Site code, defined when the site is created. The value should match the `site` query/path parameter value."},"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"productId":{"type":"string","description":"Unique identifier of the product, generated when the product is created through the Product Service."},"vendorId":{"type":"string","description":"Id of a vendor to which the availability belongs."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the availability was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Date and time when the availability was last updated."}}}}},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}}},"paths":{"/availability/{tenant}/availability/search":{"post":{"tags":["Availabilities"],"summary":"Retrieving product availabilities","description":"Retrieves availabilities for specified products. The request body accepts one of two mutually exclusive formats:\n\n* **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 `site` query parameter is optional.\n* **Q-param object** — retrieves availabilities matching the provided query criteria. The response will **not** include avaialbilities for product bundles. The `site` query parameter must **not** be provided together with the Q-param body.\n\n***\n\n### **Additional scope information**\n* The `availability.availability_view_by_vendor` scope is required only when fetching availabilities for a specific vendor. \n\n***","parameters":[{"$ref":"#/components/parameters/tenant-path"},{"$ref":"#/components/parameters/site"},{"$ref":"#/components/parameters/page-size"},{"$ref":"#/components/parameters/page-number"},{"$ref":"#/components/parameters/sort"}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"array","description":"IDs of products for which availabilities should be retrieved.","items":{"type":"string"}},{"type":"object","description":"Query criteria for filtering availabilities.","properties":{"q":{"type":"string","description":"A standard query parameter used to search for specific values.\n\nSee: [Standard Practices - Query parameter](https://developer.emporix.io/docs/content/q-param)\n"}},"required":["q"]}]}}}},"responses":{"200":{"description":"The request was successful. A list of availabilities is returned.","headers":{"X-Total-Count":{"schema":{"type":"integer"},"description":"Total number of availabilities matching the query criteria. Does not include availabilities for product bundles."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityWithBundleList"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"POST-availability-search-products-site"}}}}
```

## Retrieving a product availability

> Retrieves a specified product availability details.\
> \
> \*\*\*\
> \
> \### \*\*Additional scope information\*\*\
> \* The \`availability.availability\_view\_by\_vendor\` scope is required only when fetching availabilities for a specific vendor. \
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_view_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"schemas":{"AvailabilityWithBundle":{"description":"Availability details.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the availability.\n\n**Note**: The value should be provided in the `site`:`productId` format."},"site":{"type":"string","description":"Site code, defined when the site is created. The value should match the `site` query/path parameter value."},"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"productId":{"type":"string","description":"Unique identifier of the product, generated when the product is created through the Product Service."},"vendorId":{"type":"string","description":"Id of a vendor to which the availability belongs."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"bundleAvailabilities":{"$ref":"#/components/schemas/AvailabilityList"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the availability was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Date and time when the availability was last updated."}}}}},"DistributionChannel":{"type":"string","description":"Name of the product distribution channel.","enum":["ASSORTMENT","HOME_DELIVERY","PICKUP"]},"AvailabilityList":{"type":"array","items":{"$ref":"#/components/schemas/Availability"}},"Availability":{"description":"Availability details.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the availability.\n\n**Note**: The value should be provided in the `site`:`productId` format."},"site":{"type":"string","description":"Site code, defined when the site is created. The value should match the `site` query/path parameter value."},"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"productId":{"type":"string","description":"Unique identifier of the product, generated when the product is created through the Product Service."},"vendorId":{"type":"string","description":"Id of a vendor to which the availability belongs."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the availability was created."},"modifiedAt":{"type":"string","format":"date-time","description":"Date and time when the availability was last updated."}}}}},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"NotFound404":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"message":{"type":"string","description":"Detailed error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"NotFoundResponse404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound404"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}}},"paths":{"/availability/{tenant}/availability/{productId}/{site}":{"get":{"tags":["Availabilities"],"summary":"Retrieving a product availability","description":"Retrieves a specified product availability details.\n\n***\n\n### **Additional scope information**\n* The `availability.availability_view_by_vendor` scope is required only when fetching availabilities for a specific vendor. \n\n***","responses":{"200":{"description":"The request was successful. The product availability details are returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityWithBundle"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"404":{"$ref":"#/components/responses/NotFoundResponse404"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"GET-availability-retrieve-product"}}}}
```

## Creating a new availability for a product

> 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\_vendor\` scope allows to create availabilities for products belonging to the vendor.\
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_manage","availability.availability_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"schemas":{"AvailabilityDto":{"type":"object","properties":{"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"DistributionChannel":{"type":"string","description":"Name of the product distribution channel.","enum":["ASSORTMENT","HOME_DELIVERY","PICKUP"]},"IdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created resource."}}},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"Conflict409":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"message":{"type":"string","description":"Detailed error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"ConflictResponse409":{"description":"Resource already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conflict409"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}}},"paths":{"/availability/{tenant}/availability/{productId}/{site}":{"post":{"tags":["Availabilities"],"summary":"Creating a new availability for a product","description":"Creates a new availability for a specified product.\n\n**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`.\n\n***\n\n**Additional scope information**\n* The `availability.availability_manage_by_vendor` scope allows to create availabilities for products belonging to the vendor.\n\n***","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityDto"}}}},"responses":{"201":{"description":"The request was successful. The availability has been created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"409":{"$ref":"#/components/responses/ConflictResponse409"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"POST-availability-add-product"}}}}
```

## Upserting availability information of a product

> 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\_vendor\` scope is only required when updating or creating availabilities belonging to the vendor.\
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_manage","availability.availability_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"schemas":{"AvailabilityDto":{"type":"object","properties":{"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"DistributionChannel":{"type":"string","description":"Name of the product distribution channel.","enum":["ASSORTMENT","HOME_DELIVERY","PICKUP"]},"IdResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the created resource."}}},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"NotFound404":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"message":{"type":"string","description":"Detailed error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"NotFoundResponse404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound404"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}}},"paths":{"/availability/{tenant}/availability/{productId}/{site}":{"put":{"tags":["Availabilities"],"summary":"Upserting availability information of a product","description":"Updates a specified product availability details, or crates a new availability if it doesn't exist yet. \n\n**Note**: There is no possibility to update a product bundle availability - it is always equal to the lowest availability found in the bundled products.\n\n***\n\n**Additional scope information**\n* The `availability.availability_manage_by_vendor` scope is only required when updating or creating availabilities belonging to the vendor.\n\n***","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AvailabilityDto"}}}},"responses":{"201":{"description":"The request was successful. The availability has been created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdResponse"}}}},"204":{"description":"The request was successful. The availability has been updated."},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"404":{"$ref":"#/components/responses/NotFoundResponse404"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"PUT-availability-update-product"}}}}
```

## Deleting availability information of a product

> 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\_vendor\` scope is only required when deleting availabilities belonging to the vendor.\
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_manage","availability.availability_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"NotFoundResponse404":{"description":"The requested resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound404"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}},"schemas":{"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"NotFound404":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"message":{"type":"string","description":"Detailed error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}}},"paths":{"/availability/{tenant}/availability/{productId}/{site}":{"delete":{"tags":["Availabilities"],"summary":"Deleting availability information of a product","description":"Deletes a specified product availability.\n\n**Note**: There is no possibility to delete a product bundle availability - it is always equal to the lowest availability found in the bundled products.\n\n***\n\n**Additional scope information**\n* The `availability.availability_manage_by_vendor` scope is only required when deleting availabilities belonging to the vendor.\n\n***","responses":{"204":{"description":"The request was successful. The availability has been deleted."},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"404":{"$ref":"#/components/responses/NotFoundResponse404"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"DELETE-availability-remove-product"}}}}
```

## Creating multiple product availabilities

> 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\_vendor\` scope is only required when creating availabilities belonging to the vendor.\
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_manage","availability.availability_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"schemas":{"AvailabilityBulkDto":{"type":"object","properties":{"productId":{"type":"string","description":"Unique identifier of the product."},"site":{"type":"string","description":"Unique identifier of the site."},"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"DistributionChannel":{"type":"string","description":"Name of the product distribution channel.","enum":["ASSORTMENT","HOME_DELIVERY","PICKUP"]},"BulkResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the affected availability (in the format <site>:&lt;<productId>)."},"index":{"type":"integer","description":"Index of the processed item, matching the item position in request body."},"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status description."},"message":{"type":"string","description":"Error message. Present only when an error occurs (HTTP status code from groups `4xx` or `5xx`)"}}},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}}},"paths":{"/availability/{tenant}/availability/bulk":{"post":{"tags":["Availabilities"],"summary":"Creating multiple product availabilities","description":"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.\n\n**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`.\n\n***\n\n### **Additional scope information**\n* The `availability.availability_manage_by_vendor` scope is only required when creating availabilities belonging to the vendor.\n\n***","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityBulkDto"}}}}},"responses":{"207":{"description":"Multi-status response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BulkResponse"}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"POST-availability-tenant-availability-bulk"}}}}
```

## Upserting multiple availabilities information of a product

> 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\_vendor\` scope is only required when creating or updating availabilities belonging to the vendor.\
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_manage","availability.availability_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"schemas":{"AvailabilityBulkDto":{"type":"object","properties":{"productId":{"type":"string","description":"Unique identifier of the product."},"site":{"type":"string","description":"Unique identifier of the site."},"stockLevel":{"type":"number","description":"Stock level of the product, expressed as a number."},"available":{"type":"boolean","description":"Flag indicating whether the product is available."},"popularity":{"type":"integer","description":"Popularity of the product, expressed as a number."},"distributionChannel":{"$ref":"#/components/schemas/DistributionChannel"},"mixins":{"type":"object","description":"The field contains mixins values.","additionalProperties":true},"metadata":{"type":"object","properties":{"mixins":{"type":"object","description":"Links to the mixin schemas.","additionalProperties":{"type":"string"}}}}}},"DistributionChannel":{"type":"string","description":"Name of the product distribution channel.","enum":["ASSORTMENT","HOME_DELIVERY","PICKUP"]},"BulkResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the affected availability (in the format <site>:&lt;<productId>)."},"index":{"type":"integer","description":"Index of the processed item, matching the item position in request body."},"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status description."},"message":{"type":"string","description":"Error message. Present only when an error occurs (HTTP status code from groups `4xx` or `5xx`)"}}},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}}},"paths":{"/availability/{tenant}/availability/bulk":{"put":{"tags":["Availabilities"],"summary":"Upserting multiple availabilities information of a product","description":"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.\n\n**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`.\n\n***\n\n**Additional scope information**\n* The `availability.availability_manage_by_vendor` scope is only required when creating or updating availabilities belonging to the vendor.\n\n***","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityBulkDto"}}}}},"responses":{"207":{"description":"Multi-status response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BulkResponse"}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"PUT-availability-tenant-availability-bulk"}}}}
```

## Deleting multiple availabilities information of a product

> 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\_vendor\` scope is only required when deleting availabilities belonging to the vendor.\
> \
> \*\*\*

```json
{"openapi":"3.0.0","info":{"title":"Availability Service","version":"0.0.1"},"tags":[{"name":"Availabilities"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"OAuth2":["availability.availability_manage","availability.availability_manage_by_vendor"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"availability.availability_view":"Needed to view availabilities.","availability.availability_manage":"Needed to manage availabilities.","availability.availability_view_by_vendor":"Needed to view availabilities belonging to the vendor.","availability.availability_manage_by_vendor":"Needed to manage availabilities belonging to the vendor."}}}}},"schemas":{"AvailabilityDeleteBulkDto":{"type":"object","properties":{"productId":{"type":"string","description":"Unique identifier of the product."},"site":{"type":"string","description":"Unique identifier of the site."}}},"BulkResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID of the affected availability (in the format <site>:&lt;<productId>)."},"index":{"type":"integer","description":"Index of the processed item, matching the item position in request body."},"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status description."},"message":{"type":"string","description":"Error message. Present only when an error occurs (HTTP status code from groups `4xx` or `5xx`)"}}},"BadRequest400":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."},"_embedded":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"description":"Detailed message of the exception.","type":"string"}}}}}}}},"Unauthorized401":{"properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}},"Forbidden403":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status Description."},"message":{"type":"string","description":"Error message."}}},"UnexpectedError":{"properties":{"code":{"type":"integer","description":"HTTP Status Code."},"status":{"type":"string","description":"HTTP Status."},"message":{"type":"string","description":"Detailed error message"}}}},"responses":{"BadRequestResponse400":{"description":"The request was syntactically incorrect. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest400"}}}},"UnauthorizedResponse401":{"description":"The authorization token is invalid or has expired. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized401"}}}},"ForbiddenResponse403":{"description":"Provided authorization scopes are not sufficient and do not match scopes required by the endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden403"}}}},"ServerErrorResponse500":{"description":"Some server-side error occurred. Details are provided in the response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnexpectedError"}}}}}},"paths":{"/availability/{tenant}/availability/bulk":{"delete":{"tags":["Availabilities"],"summary":"Deleting multiple availabilities information of a product","description":"Deletes product availability records identified by the combination of `productId` and `site`. The maximum batch size is 200.\n\n**Note**: There is no possibility to delete a product bundle availability - it is always equal to the lowest availability found in the bundled products.\n\n***\n\n**Additional scope information**\n* The `availability.availability_manage_by_vendor` scope is only required when deleting availabilities belonging to the vendor.\n\n***","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityDeleteBulkDto"}}}}},"responses":{"207":{"description":"Multi-status response.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BulkResponse"}}}}},"400":{"$ref":"#/components/responses/BadRequestResponse400"},"401":{"$ref":"#/components/responses/UnauthorizedResponse401"},"403":{"$ref":"#/components/responses/ForbiddenResponse403"},"500":{"$ref":"#/components/responses/ServerErrorResponse500"}},"operationId":"DELETE-availability-tenant-availability-bulk"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references/api-guides/orders/availability/api-reference/availabilities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
