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.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: There is no poisition=1 product in Products/create webhook and Admin REST API

There is no poisition=1 product in Products/create webhook and Admin REST API

channel
Shopify Partner
19 0 1

Hi, this is hoo.

 

We currently use products/create webhook, and GET products REST API.

While we using products/create webhook and GET products REST API,  we found that there were so many cases which position == null, also there were no position == 1 variants.

 

https://shopify.dev/docs/api/admin-rest/2023-07/resources/product-variant

In REST API documents,  there is a sentence like this. 'The first position in the list is 1'. And I could find position = 0 in products/create webhook docs. 

 

I want to know about these problems:

- Why there is 'position = null' case, Can it be?

- Which one is correct, 'position = 0  is the first variant or position = 1 is the first variant?'

 

Thanks.

Replies 4 (4)

lizk
Shopify Staff
246 58 79

Hi could you share the X-request-id of a request that returns position = null that has occurred in the last 24 hours?

To learn more visit the Shopify Help Center or the Community Blog.

channel
Shopify Partner
19 0 1

Thanks for your reply.

 

X-Request-Id: 039e1907-b87a-4426-b170-b79dc9478418

 

Also, Can I ask the following questions?

I got some results which doesn't include position = 1 but include position = 47, 48 something.

 

I thought that position means 'the smallest price product variant', is it true?

 

Thanks.

lizk
Shopify Staff
246 58 79

Hi

The team is currently aware of the issue with some products having incorrect positions (e.g position = null). They are looking to update these variants to fall within the specified bounds, (i.e. the first variant will have a position of 1).

To learn more visit the Shopify Help Center or the Community Blog.

channel
Shopify Partner
19 0 1

Hi

 

I am also curious about the situation that there is no position = 1.

Is it also kind of 'incorrect position'?