For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
  • GraphQL
    • Overview
      • Playground
          • QUERYcompanyRoles
          • QUERYcompanyRole
          • QUERYcompanyPermissions
          • QUERYaccountSettings
          • QUERYcustomerAccountSettings
          • QUERYinvoices
          • QUERYinvoice
          • QUERYinvoiceStats
          • QUERYinvoiceCustomerInformation
          • QUERYinvoicePaymentModules
          • QUERYinvoiceBcOrderAllowMethods
          • QUERYinvoicePaymentBcCart
          • QUERYinvoicePaymentFees
          • QUERYreceipts
          • QUERYreceipt
          • QUERYallReceiptLines
          • QUERYreceiptLine
          • QUERYreceiptLines
          • QUERYorder
          • QUERYallOrders
          • QUERYorderProducts
          • QUERYorderedProducts
          • QUERYcustomerOrders
          • QUERYcustomerOrder
          • QUERYcreatedByUser
          • QUERYshoppingLists
          • QUERYshoppingList
          • QUERYshoppingListsIdName
          • QUERYcustomerShoppingLists
          • QUERYcustomerShoppingList
          • QUERYcustomerShoppingListsIdName
          • QUERYcompanyExtraFields
          • QUERYuserCompany
          • QUERYcompanyValidateEmail
          • QUERYcompanyUserInfo
          • QUERYaccountFormFields
          • QUERYcompanyCreditConfig
          • QUERYcompanyPaymentTerms
          • QUERYcompanySubsidiaries
          • QUERYsuperAdminCompanies
          • QUERYsuperAdminMasquerading
          • QUERYquotes
          • QUERYcustomerQuotes
          • QUERYquote
          • QUERYquoteUserStoreInfo
          • QUERYquoteConfig
          • QUERYquoteExtraFieldsConfig
          • QUERYusers
          • QUERYuser
          • QUERYuserEmailCheck
          • QUERYcustomerEmailCheck
          • QUERYuserExtraFields
          • QUERYcurrentUser
          • QUERYcustomerInfo
          • QUERYuserLoginState
          • QUERYuserMasqueradingCompany
          • QUERYorderStatuses
          • QUERYbcOrderStatuses
          • QUERYcurrencies
          • QUERYautoLoader
          • QUERYstoreLimitations
          • QUERYstoreBasicInfo
          • QUERYstorefrontScript
          • QUERYstorefrontDefaultLanguage
          • QUERYstorefrontProductSettings
          • QUERYstorefrontSettings
          • QUERYstoreConfigSwitchStatus
          • QUERYstoreCheckoutConfig
          • QUERYstorefrontConfig
          • QUERYstorefrontConfigs
          • QUERYproductVariantsInfo
          • QUERYvariantSku
          • QUERYproductsInventory
          • QUERYproductsLoad
          • QUERYproductsSearch
          • QUERYtaxZoneRates
          • QUERYproductPurchasable
          • QUERYvalidateProduct
          • QUERYvalidateProducts
          • QUERYpriceProducts
          • QUERYaddresses
          • QUERYaddress
          • QUERYcountries
          • QUERYdefaultShippingAddress
          • QUERYdefaultBillingAddress
          • QUERYcustomerAddresses
          • QUERYcustomerAddress
          • QUERYaddressConfig
          • QUERYaddressExtraFields
  • MCP
    • Overview
Dev Portal
LogoLogo
GraphQLB2BQueries

validateProducts

Example Query
1query ExampleQuery($products: [ValidateProductInputType], $channelId: Int, $storeHash: String, $target: String) {
2 validateProducts(products: $products, channelId: $channelId, storeHash: $storeHash, target: $target) {
3 isValid
4 products {
5 responseType
6 message
7 errorCode
8 product
9 }
10 }
11}
Variables
1{
2 "products": [
3 {
4 "productId": 0,
5 "variantId": 0,
6 "quantity": 0,
7 "productOptions": [
8 "GenericScalar"
9 ]
10 }
11 ],
12 "channelId": 0,
13 "storeHash": "example",
14 "target": "QUOTE"
15}
Example response
1{
2 "data": {
3 "validateProducts": {
4 "isValid": true,
5 "products": [
6 {
7 "responseType": "example",
8 "message": "example",
9 "errorCode": "example",
10 "product": {
11 "productId": null,
12 "variantId": null,
13 "sku": null,
14 "availableToSell": null,
15 "unlimitedBackorder": null
16 }
17 }
18 ]
19 }
20 }
21}
Was this page helpful?
Previous

validateProduct

Next

priceProducts

Built with

Arguments

productslist of optional ValidateProductInputTypeRequired
Products list to validate
channelIdIntegerOptional
Channel ID
storeHashStringOptional
Store hash
targetStringOptional

Validation target: ‘CART’ or ‘QUOTE’ (default). Controls whether OOS/Non-Purchasable products return errors or warnings.

Returns

an optional ValidateProductsType
isValidBoolean
Whether the general validation was successful.
productslist of optional ValidateProductType
Validation details of each product.