Skip to main content

Reference data

Several mutation inputs and filters reference shop-wide records such as a currency or a sales channel by ID. Look these IDs up with the queries below before you write.

Available queries​

RecordsQueriesUsed for
Currenciescurrencies, currencycurrencyId of createSupplier and createSupplierOrder, and the currency filters of supplier orders, goods receipts, orders, and quotes
Countriescountrys, countrycountryId of a customer address in createCustomer
Customer groupscustomerGroups, customerGroupcustomerGroupId of createCustomer
Payment methodspaymentMethods, paymentMethoddefaultPaymentMethodId of createCustomer, and the payment method filter of quotes
Salutationssalutations, salutationsalutationId of createCustomer and of a supplier address
Sales channelssalesChannels, salesChannelsalesChannelId of createCustomer and createQuote
Document typesdocumentTypes, documentTypeTelling documents apart by documentType
Tagstags, tagReading the products, orders, and customers that carry a tag

The list query for countries is named countrys, not countries, in this API version.

Matching records​

name and displayName are localized display names. Match on the stable keys where a type has one:

  • A currency by its ISO 4217 code in isoCode, such as EUR. isDefaultCurrency marks the system default currency, which createSupplier falls back to.
  • A salutation by salutationKey, such as mr, mrs or not_specified.
  • A document type by technicalName, such as invoice or credit_note.
  • A tag by name, which is unique across the shop.

Countries, customer groups, payment methods, and sales channels can be filtered by id only. Their lists are short, so read them completely, page by page as described in Working with lists, and pick the record by name. The addresses of suppliers and warehouses take a country as an ISO code in countryIso and need no lookup.

There is no query for languages. Omit languageId in createSupplier to use the system default language.

Example: load the IDs to create a customer​

query CustomerReferenceData {
salesChannels(first: 100) {
edges {
node {
id
name
}
}
}
customerGroups(first: 100) {
edges {
node {
id
name
}
}
}
salutations(first: 100) {
edges {
node {
id
salutationKey
}
}
}
countrys(first: 500) {
edges {
node {
id
name
}
}
pageInfo {
hasNextPage
endCursor
}
}
}

Each of these queries needs the read scope of its records, see Token scopes.