Graphql Create B2B Catalog Error

API Version 2025-10

Read and Write market permissions are set. I don’t see anything about catalog permissions except that “The user must have permission to create and edit catalogs.”. GraphQL doesn’t deal with “users”. It deals with scopes and permissions.

I’m trying to create a catalog using the example from https://shopify.dev/docs/api/admin-graphql/latest/mutations/catalogCreate:

mutation catalogCreate($input: CatalogCreateInput!) {
  catalogCreate(input: $input) {
    catalog {
      id
      status
      title
      publication {
        id
        autoPublish
      }
      priceList {
        id
        currency
      }
    }
    userErrors {
      field
      message
    }
  }
}
{
  "input": {
    "title": "50% Off Wholesale",
    "status": "ACTIVE",
    "context": {
      "marketIds": [
        "gid://shopify/Market/99999999"
      ]
    }
  }
}

I’m getting the market id from:

{
  markets(first: 50) {
    nodes {
      name
      handle
      id
    }
  }
}

However, I keep getting this error when attempting to create the catalog:

"userErrors": [
        {
          "field": [
            "input",
            "context"
          ],
          "message": "Cannot create a catalog for a market."
        }
      ]

What am I missing?

I’d share which API version you’re using too just FYI. Just checking you have all the correct permissions too?

Ok. This is really confusing but here it is.

In the Shopify Admin panel, you can create a catalog out of whole cloth. You just need to give it a name and choose the products.

You can’t do that in GraphQL. Using GraphQL, you first have to create a company:

mutation companyCreate($input: CompanyCreateInput!) {
  companyCreate(input: $input) {
    company {
      id
      name
      locations(first: 5) {
        edges {
          node {
            id
            name
          }
        }
      }
    }
    userErrors {
      field
      message
    }
  }
}

{
  "input": {
    "company": {
      "name": "Nordstrom"
    },
    "companyLocation": {
      "name": "Main",
      "shippingAddress": {
        "address1": "1600 7th Avenue",
        "city": "Seattle",
        "zoneCode": "WA",
        "postalCode": "98101",
        "countryCode": "US"
      }
    }
  }
}

Then, create the catalog using the location ids you got from the company create:

mutation catalogCreate($input: CatalogCreateInput!) {
  catalogCreate(input: $input) {
    catalog {
      id
      status
      title
      publication {
        id
        autoPublish
      }
      priceList {
        id
        currency
      }
    }
    userErrors {
      field
      message
    }
  }
}
{
  "input": {
    "title": "12% Off Wholesale",
    "status": "ACTIVE",
    "context": {
      "companyLocationIds": [
        "gid://shopify/CompanyLocation/123456789"
      ]
    }
  }
}

Then, create the price list, using the catalog id you got from the catalog create mutation:

mutation priceListCreate($input: PriceListCreateInput!) {
  priceListCreate(input: $input) {
    priceList {
      id
      name
      currency
      catalog {
        id
        title
      }
    }
    userErrors {
      field
      message
    }
  }
}
{
  "input": {
    "name": "12% Off Wholesale",
    "currency": "USD",
    "catalogId": "gid://shopify/Catalog/YOUR_CATALOG_ID",
    "parent": {
      "adjustment": {
        "type": "PERCENTAGE_DECREASE",
        "value": 12
      }
    }
  }
}

If you already have an existing catalog you want to use instead of creating a new one (Please note: I’m not sure if this adds or replaces locations so test that out):

mutation catalogUpdate($id: ID!, $input: CatalogUpdateInput!) {
  catalogUpdate(id: $id, input: $input) {
    catalog {
      id
      title
    }
    userErrors {
      field
      message
    }
  }
}
{
  "id": "gid://shopify/Catalog/YOUR_CATALOG_ID",
  "input": {
    "context": {
      "companyLocationIds": [
        "gid://shopify/CompanyLocation/123456789",
        "gid://shopify/CompanyLocation/987654321"
      ]
    }
  }
}

I’ll post more updates here as I discover more.