Skip to main content

updateVendorProduct

Requires permission suppliers:supplier:update.

Updates a supplier-to-variant mapping. Re-pointing it to another supplier, product or variant is checked against the organization. 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:

mutation UpdateVendorProduct($updateVendorProductInput: UpdateVendorProductInput!) {
updateVendorProduct(updateVendorProductInput: $updateVendorProductInput) {
id
vendorName
createdAt
averageCost
averageLeadTime
averageOrderValue
product {
id
name
barcode
sku
}
}
}

Variables:

{
"updateVendorProductInput": {
"id": "id"
}
}

Response:

{
"data": {
"updateVendorProduct": {
"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"
}
}
}
}
updateVendorProduct(
updateVendorProductInput: UpdateVendorProductInput!
): VendorProduct!

Arguments​

updateVendorProduct.updateVendorProductInput ● UpdateVendorProductInput! non-null input​

The ID of the mapping and the fields to change.

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.