removeVendorProduct
Requires permission suppliers:supplier:update.
Deletes a supplier-to-variant mapping. Needs the suppliers update permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RemoveVendorProduct($id: ID!) {
removeVendorProduct(id: $id) {
id
vendorName
createdAt
averageCost
averageLeadTime
averageOrderValue
product {
id
name
barcode
sku
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RemoveVendorProduct($id: ID!) {\n removeVendorProduct(id: $id) {\n id\n vendorName\n createdAt\n averageCost\n averageLeadTime\n averageOrderValue\n product {\n id\n name\n barcode\n sku\n }\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"removeVendorProduct": {
"id": "id",
"vendorName": "string",
"createdAt": "2025-01-15T00:00:00Z",
"averageCost": 0,
"averageLeadTime": 0,
"averageOrderValue": 0,
"product": {
"id": "id",
"name": "string",
"barcode": "string",
"sku": "string"
}
}
}
}
removeVendorProduct(
id: ID!
): VendorProduct!
Arguments
removeVendorProduct.id ● ID! non-null scalar
The ID of the vendor product mapping.
Type
VendorProduct object
A product variant a vendor supplies, with the vendor's own code, terms, costs and delivery record. Costs and lead times are updated from goods receipts.