Products
DELETE /products/{productId}/variants/{variantId}/media-assets/{mediaAssetId}
Remove a media asset from a variant (does not delete the media asset)
DELETE
/
products
/
{productId}
/
variants
/
{variantId}
/
media-assets
/
{mediaAssetId}
cURL
curl --request DELETE \
--url https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}⌘I
cURL
curl --request DELETE \
--url https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://admin.fanfare.io/api/products/{productId}/variants/{variantId}/media-assets/{mediaAssetId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true
}{
"error": "validation_error",
"issues": [
{
"expected": "<string>",
"kind": "<string>",
"message": "<string>",
"path": [
{
"input": "<unknown>",
"key": "<string>",
"origin": "<string>",
"type": "<string>"
}
],
"received": "<string>",
"type": "<string>"
}
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}