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": "c2c14f6b93ee203ed98c2415",
"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"
}
],
"reportingLinks": [
{
"reportingRef": "b2769f194f1c285405bdad07",
"showPrices": true,
"showOrders": true,
"allowExports": true
}
]
}
}

Response​

{
"inventorySupplierUpdate": {
"_id": "e98e5c5952f5793c87d93977",
"id": "example",
"createdAt": 1758011322967,
"modifiedAt": 1789136396371,
"name": "example",
"createdBy": {
"type": "example",
"name": "example",
"email": "email@example.com",
"ref": "c7c2de6775ceab10036f840c"
},
"addresses": [
{
"_id": "16a6296eddd9a64a6c7c479f",
"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!