Shopify API to access the Brand object

Shopify API to access the Brand object

user072319
Shopify Partner
128 0 17

Hi there,

 

Using Shopify API we need to access the store's Brand object

 

1. Any sample snippet or links anyone can share on how to access the Brand object using PHP code?

2. Using REST API how can I get value for a storefront variable like {{shop.brand.logo}}

 

Any help would be appreciated!

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 238 499

Hi @user072319👋

I'd recommend checking out our PHP library for Shopify APIs that can make GraphQL requests. At this time, the Brand object is only accessible via Storefront API which only supports GraphQL. The query would look something like:

{
    shop {
        brand {
            logo {
                image {
                    url
                }
            }
        }
    }
}

Hope that helps!

 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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

tezi
Shopify Partner
1 0 0

it don't work as expected , it shows in the documentation but there is no mention in query doc

Karan07_0-1704530301819.png

when i try to query i get brand don't exist

Karan07_1-1704530351737.png