Delete the given item (product or service).
curl --request DELETE \
--url https://api.example.com/api/items/{id} \
--header 'Authorization: <authorization>' \
--header 'organization-id: <organization-id>'import requests
url = "https://api.example.com/api/items/{id}"
headers = {
"Authorization": "<authorization>",
"organization-id": "<organization-id>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<authorization>', 'organization-id': '<organization-id>'}
};
fetch('https://api.example.com/api/items/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"organization-id: <organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/items/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("organization-id", "<organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/items/{id}")
.header("Authorization", "<authorization>")
.header("organization-id", "<organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
request["organization-id"] = '<organization-id>'
response = http.request(request)
puts response.read_body{
"errors": [
{
"statusCode": 400,
"type": "ITEM_NAME_EXISTS",
"message": "The item name is already exist.",
"payload": {}
}
]
}Items
Delete the given item (product or service).
DELETE
/
api
/
items
/
{id}
Delete the given item (product or service).
curl --request DELETE \
--url https://api.example.com/api/items/{id} \
--header 'Authorization: <authorization>' \
--header 'organization-id: <organization-id>'import requests
url = "https://api.example.com/api/items/{id}"
headers = {
"Authorization": "<authorization>",
"organization-id": "<organization-id>"
}
response = requests.delete(url, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: '<authorization>', 'organization-id': '<organization-id>'}
};
fetch('https://api.example.com/api/items/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/items/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"organization-id: <organization-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/items/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("organization-id", "<organization-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/items/{id}")
.header("Authorization", "<authorization>")
.header("organization-id", "<organization-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/items/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<authorization>'
request["organization-id"] = '<organization-id>'
response = http.request(request)
puts response.read_body{
"errors": [
{
"statusCode": 400,
"type": "ITEM_NAME_EXISTS",
"message": "The item name is already exist.",
"payload": {}
}
]
}Headers
Value must be 'Bearer ' where is an API key prefixed with 'bc_' or a JWT token.
Example:
"Bearer bc_1234567890abcdef"
Required if Authorization is a JWT token. The organization ID to operate within.
Path Parameters
The item id
Response
The item has been successfully deleted.
Edit the given item (product or service).Validates which items can be deleted and returns counts of deletable and non-deletable items.
⌘I