Skip to main content

inventorySupplierUpdate Mutation

Description

Updates an existing supplier's information, including tax information, addresses, and contacts.

mutation inventorySupplierUpdate(
$supplierRef: ID!
$supplierUpdateInput: SupplierUpdateInput!
) {
inventorySupplierUpdate(
supplierRef: $supplierRef
supplierUpdateInput: $supplierUpdateInput
) {
_id
id
createdAt
modifiedAt
name
createdBy {
type
name
email
ref
}
addresses {
_id
description
firstName
lastName
addressLine1
addressLine2
streetNumber
city
state
stateCode
postCode
alpha2
country
type
}
contacts {
firstName
lastName
email
telephone
organisation
}
taxInformation
}
}

Variables

{
"supplierRef": "8a42da0fbd9cd3d3f0850b21",
"supplierUpdateInput": {
"name": "A name",
"taxInformation": "taxInformation",
"addresses": [
{
"description": "A description",
"addressLine1": "addressLine1",
"addressLine2": "addressLine2",
"streetNumber": 42,
"city": "Montreal",
"state": "Quebec",
"postCode": "postCode",
"alpha2": "alpha2",
"country": "Canada",
"stateCode": "stateCode",
"type": "type",
"geoLoc": {
"type": "type",
"coordinates": [
30.7
]
}
}
],
"contacts": [
{
"firstName": "John",
"lastName": "Doe",
"email": "email@example.com",
"telephone": "telephone",
"organisation": "organisation",
"notes": "notes"
}
]
}
}

Response

{
"inventorySupplierUpdate": {
"_id": "129d6dd2584b47d88e28e9ef",
"id": "example",
"createdAt": 1727668526888,
"modifiedAt": 1756057811314,
"name": "example",
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "750ef9cc1e5f499e615d12ed"
},
"addresses": [
{
"_id": "5b714e10e7f6e749a26a3869",
"description": "example",
"firstName": "example",
"lastName": "example",
"addressLine1": "example",
"addressLine2": "example",
"streetNumber": 42,
"city": "example",
"state": "example",
"stateCode": "example",
"postCode": "example",
"alpha2": "example",
"country": "example",
"type": "example"
}
],
"contacts": [
{
"firstName": "example",
"lastName": "example",
"email": "email@example.com",
"telephone": "example",
"organisation": "example"
}
],
"taxInformation": "example"
}
}

Arguments

NameTypeDescription
supplierRefID!Reference ID of the supplier to update.
supplierUpdateInputSupplierUpdateInput!Updated supplier information including tax information, addresses, and contacts.

Returns

Supplier!