Skip to main content
POST
/
api
/
public
/
product
/
delete
/
{promptBlockId}
Delete products
curl --request POST \
  --url https://api.vambe.me/api/public/product/delete/{promptBlockId} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '[
  {
    "external_id": "<string>"
  }
]'

Overview

Delete specific products from a product block using their external IDs. This endpoint removes only the products you specify, leaving all others unchanged.

Use Cases

  • Remove Discontinued Products: Delete products no longer available
  • Inventory Cleanup: Remove out-of-stock items
  • Bulk Delete: Remove multiple products at once
  • Selective Removal: Delete specific products without affecting catalog

Authentication

x-api-key: your_api_key_here

Path Parameters

ParameterTypeRequiredDescription
promptBlockIdstringYesProduct block ID

Request Body

Array of objects with external IDs (minimum 1):
FieldTypeRequiredDescription
external_idstringYesExternal ID of product to delete

Example Request

curl --request POST \
  'https://api.vambe.ai/api/public/product/delete/block-abc123' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: your_api_key_here' \
  --data-raw '[
    { "external_id": "discontinued-product-001" },
    { "external_id": "out-of-stock-002" }
  ]'

Example Response

{
  "deleted": 2,
  "external_ids": ["discontinued-product-001", "out-of-stock-002"]
}

Error Responses

Status CodeDescription
400Bad Request
401Unauthorized
403Forbidden
404Product block not found
500Internal Server Error

Headers

x-api-key
string
required

API key needed to authorize the request

Path Parameters

promptBlockId
string
required

The prompt block ID from which to delete the products

Body

application/json · object[]

The payload with external IDs of products to delete

external_id
string
required

External ID of product to delete

Minimum length: 1

Response

Products deleted successfully.