How to get shop locations that are available for sale online

liosha
New Member
2 0 0

Hi everybody
my question is about getting shop locations that are available for sale online.
when you create new location (or edit old one) there is a checkbox with title : "Fulfill online orders from this location"

so my question is if i have 3 locations in my shop and i checked this box for 2 of them, how to get these 2 locations through API?
i want to find shop online sale locations by API and do something more with them.

Any help will be appreciated.

Reply 1 (1)
csam
Shopify Staff
Shopify Staff
267 40 43

Hi @liosha 

You can use the fulfillsOnlineOrders field in the GraphQL API via the Location object.

{
  locations(first: 10) {
    edges {
      node {
        id
        fulfillsOnlineOrders
      }
    }
  }
}

 

Here's some documentation regarding the Location object: https://shopify.dev/api/admin/graphql/reference/store-properties/location

CS | API Support @ 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