You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
shop = shopify.Shop.current() # Get the current shop
91
-
product = shopify.Product.find(179761209) # Get a specific product
90
+
# Note: REST API examples will be deprecated in 2025
91
+
shop = shopify.Shop.current() # Get the current shop
92
+
product = shopify.Product.find(179761209) # Get a specific product
92
93
93
-
#execute a graphQL call
94
+
#GraphQL API example
94
95
shopify.GraphQL().execute("{ shop { name id } }")
95
96
```
96
97
@@ -150,13 +151,21 @@ _Note: Your application must be public to test the billing process. To test on a
150
151
```
151
152
152
153
### Advanced Usage
154
+
155
+
>**⚠️ Note**: As of October 1, 2024, the REST Admin APIis legacy:
156
+
>- Public apps must migrate to GraphQL by February 2025
157
+
>- Custom apps must migrate to GraphQL by April 2025
158
+
>
159
+
> For migration guidance, see [Shopify's migration guide](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model)
160
+
153
161
It is recommended to have at least a basic grasp on the principles of the [pyactiveresource](https://github.com/Shopify/pyactiveresource) library, which is a port of rails/ActiveResource to Python and upon which this package relies heavily.
154
162
155
163
Instances of `pyactiveresource` resources map to RESTful resources in the Shopify API.
156
164
157
165
`pyactiveresource` exposes life cycle methods for creating, finding, updating, and deleting resources which are equivalent to the `POST`, `GET`, `PUT`, and`DELETE`HTTP verbs.
158
166
159
167
```python
168
+
# Note: REST API examples will be deprecated in 2025
Some resources such as`Fulfillment` are prefixed by a parent resource in the Shopify API (e.g. `orders/450789469/fulfillments/255858046`). In order to interact with these resources, you must specify the identifier of the parent resource in your request.
183
192
184
193
```python
194
+
# Note: This REST API example will be deprecated in the future
@@ -196,6 +206,9 @@ This package also includes the `shopify_api.py` script to make it easy to open a
196
206
197
207
This library also supports Shopify's new [GraphQL API](https://help.shopify.com/en/api/graphql-admin-api). The authentication process is identical. Once your session is activated, simply construct a new graphql client and use `execute` to execute the query.
198
208
209
+
>**Note**: Shopify recommends using GraphQL APIfor new development asRESTAPI will be deprecated.
210
+
> See [Migration Guide](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model) for more details.
211
+
199
212
```python
200
213
result = shopify.GraphQL().execute('{ shop { name id } }')
0 commit comments