Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

The product_type field can't be used together with custom_product_type or standard_product_type

The product_type field can't be used together with custom_product_type or standard_product_type

Ray14
Shopify Partner
24 0 1

Hi,

 

I am getting an error message that say 'The product_type field can't be used together with custom_product_type or standard_product_type.' when I run a productCreate mutation in 2024-07, but I have no ideas why this is happening. Would appreciate any insights on the cause.

GraphQL scripts are followed.

mutation productCreate($input: ProductInput!) {
result: productCreate(input: $input) {
item: product {
id
}
userErrors {
field
message
}
}
}
variables": {
"input": {
"descriptionHtml": "<div style=\"font-size:200%;\">HTML description</div>",
"handle": "html-test-description-08-26",
"productOptions": [{"name":"Default Title", "position":1, "values": [{"name": "Default Title"}]}],
"productType": "SHIRT",
"status": "DRAFT",
"title": "Html Description",
"vendor": "Nike"
}
}

 

Thanks

Replies 2 (2)

Liam
Community Manager
3108 344 894

Hi Ray,

 

Are you only seeing this issue with that specific API version?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Ray14
Shopify Partner
24 0 1

Hi Liam,

 

This is a new implementation on GraphQL API. We currently use REST API (2024-01) for product creation.