Delete Stock for Product
DELETEhttps://euwest.api.elasticpath.com/v2/inventories/:product_uuid
Deletes the inventory for the specified product. The product inventory is null and is no longer managed by Commerce. If you want to keep managing inventory but have none of the product in stock, set the inventory to 0
instead of deleting the inventory.
Request
Path Parameters
product_uuid UUIDrequired
The unique identifier of the product.
Responses
- 204
- 400
- 404
- 500
Success. Removes the stock information about the product
Bad request. The request failed validation.
- application/json
- Schema
- Example (auto)
- missing-name
Schema
errors object[]required
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Validation Error",
"status": "400",
"detail": "Your request was invalid"
}
]
}
Not found. The requested entity does not exist.
- application/json
- Schema
- Example (auto)
- not-found
Schema
errors object[]required
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "No stock found"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (auto)
- internal-server-error
Schema
errors object[]required
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Internal Server Error",
"status": "500"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://euwest.api.elasticpath.com/v2/inventories/:product_uuid");
request.Headers.Add("Authorization", "Bearer <token>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear