Skip to main content

Suppliers

Use supplier operations when a merchant integration needs to mirror the supplier master data of another system, or needs a supplier to assign products to and to raise supplier orders with.

Available operations​

There is no mutation that deletes a supplier. Delete it in Pickware.

Creating a supplier​

Only name is required. Every other field of createSupplier falls back to a default when you omit it:

  • number is drawn from the supplier number range.
  • languageId is the system default language. Pickware uses it when it communicates with the supplier, for example to render supplier order documents.
  • currencyId is the system default currency, see Currency.
  • taxationTypeOverride stays empty, and the taxation type of every supplier order is derived from the countries of the supplier and of the company when the order is raised.

name and number are each unique across all suppliers. createSupplier and updateSupplier fail with BAD_REQUEST when another supplier already has the given name or number, so the number is the natural key when you mirror suppliers from another system.

address fills the supplier's address and contact details. It takes the country as an ISO code in countryIso, such as DE, and the salutation of the contact person as a salutationId, which you find with salutations.

defaultDeliveryTime is the delivery time in days that applies to a product of the supplier whose product-supplier configuration has no delivery time of its own.

Updating a supplier​

updateSupplier changes only the fields you pass. A field you pass as null is treated like an omitted one, so the mutation cannot clear a value that is set. A given address is merged field by field into the supplier's address, which is created when the supplier has none yet. An id that names no supplier fails with NOT_FOUND.

Currency​

The currency of a supplier (currencyId on Supplier) is the currency its purchase prices are maintained in, on every product-supplier configuration of the supplier. It is also the currency in which its supplier orders are raised when createSupplierOrder names no currency.

Choose the currency when you create the supplier: updateSupplier has no currencyId. The currency is changed in Pickware, which converts or clears the supplier's purchase prices in the background. Until that has finished, purchasePrices of the supplier's product-supplier configurations is empty and no supplier order can be raised for the supplier.

Look up the ID of a currency by its ISO code with currencies.

Example: create a supplier​

mutation CreateSupplier($input: CreateSupplierInput!) {
createSupplier(input: $input) {
id
number
name
defaultDeliveryTime
currency {
isoCode
}
}
}
{
"input": {
"name": "Acme Tools GmbH",
"number": "SUP-1001",
"customerNumber": "C-88412",
"defaultDeliveryTime": 5,
"currencyId": "Q3VycmVuY3k6MDE4...",
"address": {
"company": "Acme Tools GmbH",
"email": "orders@acme-tools.example",
"street": "Industriestraße",
"houseNumber": "12",
"zipCode": "64283",
"city": "Darmstadt",
"countryIso": "DE"
}
}
}

Example: find a supplier by number​

query SupplierByNumber($number: String!) {
suppliers(first: 1, filter: { number: { equals: $number } }) {
edges {
node {
id
name
currencyId
defaultDeliveryTime
}
}
}
}
{
"number": "SUP-1001"
}

With the supplier's ID, assign products to it with Product-supplier configurations and order from it with Supplier orders.