> ## Documentation Index
> Fetch the complete documentation index at: https://docs.condotta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify

> Manage products, orders, customers, inventory, collections, and discounts.

The Shopify connector lets your workflows interact with a Shopify store through the Admin API. Manage products, fulfil orders, update inventory, and more.

> [!NOTE]
>
> For the full API reference, see the [Shopify API documentation](https://shopify.dev/docs/api).

> [!NOTE]
>
> This connector requires a **connection** with valid credentials before it can be used in a workflow. See [Managing Connections](https://docs.condotta.ai/platform/connections.md) for setup instructions.

## Connection setup

A Shopify connection signs in one of two ways. Use a **Dev Dashboard app** for anything new: since January 2026, Shopify no longer lets you create apps in the Shopify admin. A store that already has an app made in the admin before then can keep using its **Admin API access token**.

> [tab] Dev Dashboard app (recommended)
>
> **1. Create the app in the Dev Dashboard**
>
> In your Shopify admin, go to **Settings → Apps → Develop apps**, then **Build apps in Dev Dashboard**. Click **Create app** and give it a name (e.g., "Condotta Integration"). Create it in the same Shopify organization as your store.
>
> **2. Choose the access scopes**
>
> In a new version of the app, select the scopes your workflows need, then release the version. For every Shopify tool in Condotta:
>
> * `read_products`, `write_products` (products and collections)
> * `read_orders`, `write_orders`, and `read_all_orders` for orders older than 60 days
> * `read_customers`, `write_customers`
> * `read_inventory`, `write_inventory`, `read_locations`
> * `read_discounts`, `write_discounts`
>
> Leave out any you don't need: a tool fails if its scope is missing.
>
> **3. Install the app on your store**
>
> From the app's page in the Dev Dashboard, install it on your store.
>
> **4. Copy the client ID and secret**
>
> In the app's **Settings**, copy the **Client ID** and **Client secret**.
>
> **5. Add the connection in Condotta**
>
> Go to **Connections** in Condotta, click **Add Connection**, select **Shopify**, and enter:
>
> * **Store Name**: Your store name (e.g., `my-store` or `my-store.myshopify.com`)
> * **Authentication**: **Dev Dashboard app (client ID and secret)**
> * **Client ID** and **Client Secret**: The values you copied
> * **API Version** (optional): Defaults to the latest stable version
>
> Condotta exchanges the client ID and secret for an access token whenever it needs one (Shopify's client credentials grant). Each token lasts 24 hours and is renewed automatically, so nobody has to sign in again. The secret never leaves Condotta's credential store.
>
> > [!NOTE]
> >
> > The app must belong to the same Shopify organization as the store. If it doesn't, workflow runs report that the app belongs to a different organization than the store.

> [tab] Admin API access token
>
> For an app created in the Shopify admin before January 2026.
>
> **1. Copy the Admin API access token**
>
> In your Shopify admin, open **Settings → Apps → Develop apps**, select your app, and copy its **Admin API access token**. Shopify shows it only once: if you no longer have it, use a Dev Dashboard app instead.
>
> **2. Add the connection in Condotta**
>
> Go to **Connections** in Condotta, click **Add Connection**, select **Shopify**, and enter:
>
> * **Store Name**: Your store name (e.g., `my-store`)
> * **Authentication**: **Admin API access token**
> * **Admin API Access Token**: The token you copied
> * **API Version** (optional): Defaults to the latest stable version
>
> Existing connections that use an access token keep working as they are. To move one to a Dev Dashboard app, open the connection, choose **Dev Dashboard app**, and enter the client ID and secret.

## Tools

### Shop

> [accordion] get-shop: Get store information
>
> Returns store details including name, domain, currency, timezone, and plan.
>
> No parameters required.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "query": "{ shop { name primaryDomain { url host } email myshopifyDomain currencyCode plan { displayName } } }"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "shop": {
>       "name": "My Store",
>       "primaryDomain": {
>         "url": "https://my-store.myshopify.com",
>         "host": "my-store.myshopify.com"
>       },
>       "email": "owner@my-store.com",
>       "myshopifyDomain": "my-store.myshopify.com",
>       "currencyCode": "USD",
>       "plan": {
>         "displayName": "Basic Shopify"
>       }
>     }
>   }
> }
> ```

### Products

> [accordion] list-products: List or search products
>
> **query** `string`
>
> Shopify search query (e.g., `status:active`, `title:shirt`). Optional.
>
> **first** `number` (default: 20)
>
> Number of results to return (max 250).
>
> **after** `string`
>
> Pagination cursor for the next page.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "query": "status:active",
>   "first": 3
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "products": {
>       "edges": [
>         {
>           "node": {
>             "id": "gid://shopify/Product/1234567890",
>             "title": "Classic Leather Jacket",
>             "status": "ACTIVE",
>             "vendor": "Acme Apparel",
>             "productType": "Outerwear",
>             "createdAt": "2024-01-15T10:30:00Z",
>             "updatedAt": "2024-03-20T14:22:00Z",
>             "tags": ["leather", "jacket", "premium"]
>           },
>           "cursor": "eyJsYXN0X2lkIjoxMjM0NTY3ODkwfQ=="
>         },
>         {
>           "node": {
>             "id": "gid://shopify/Product/1234567891",
>             "title": "Cotton T-Shirt",
>             "status": "ACTIVE",
>             "vendor": "Acme Apparel",
>             "productType": "Tops",
>             "createdAt": "2024-02-01T08:00:00Z",
>             "updatedAt": "2024-03-18T09:15:00Z",
>             "tags": ["cotton", "t-shirt", "basics"]
>           },
>           "cursor": "eyJsYXN0X2lkIjoxMjM0NTY3ODkxfQ=="
>         }
>       ],
>       "pageInfo": {
>         "hasNextPage": true,
>         "endCursor": "eyJsYXN0X2lkIjoxMjM0NTY3ODkxfQ=="
>       }
>     }
>   }
> }
> ```

> [accordion] get-product: Get product by ID
>
> Returns full product details including variants and images.
>
> **id** `string` *required*
>
> Product ID (numeric or Shopify GID).
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Product/1234567890"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "product": {
>       "id": "gid://shopify/Product/1234567890",
>       "title": "Classic Leather Jacket",
>       "descriptionHtml": "<p>Premium full-grain leather jacket with satin lining.</p>",
>       "vendor": "Acme Apparel",
>       "productType": "Outerwear",
>       "status": "ACTIVE",
>       "tags": ["leather", "jacket", "premium"],
>       "createdAt": "2024-01-15T10:30:00Z",
>       "updatedAt": "2024-03-20T14:22:00Z",
>       "variants": {
>         "edges": [
>           {
>             "node": {
>               "id": "gid://shopify/ProductVariant/111111111",
>               "title": "Small / Black",
>               "price": "299.00",
>               "sku": "LJ-BLK-S",
>               "inventoryQuantity": 15
>             }
>           },
>           {
>             "node": {
>               "id": "gid://shopify/ProductVariant/222222222",
>               "title": "Medium / Black",
>               "price": "299.00",
>               "sku": "LJ-BLK-M",
>               "inventoryQuantity": 23
>             }
>           }
>         ]
>       },
>       "images": {
>         "edges": [
>           {
>             "node": {
>               "id": "gid://shopify/ProductImage/333333333",
>               "url": "https://cdn.shopify.com/s/files/1/0000/0001/products/leather-jacket.jpg",
>               "altText": "Classic Leather Jacket front view"
>             }
>           }
>         ]
>       }
>     }
>   }
> }
> ```

> [accordion] create-product: Create a new product
>
> **title** `string` *required*
>
> Product title.
>
> **descriptionHtml** `string`
>
> HTML description.
>
> **vendor** `string`
>
> Vendor name.
>
> **productType** `string`
>
> Product type.
>
> **tags** `string[]`
>
> Product tags.
>
> **status** `string` (default: DRAFT)
>
> Product status: `ACTIVE`, `DRAFT`, or `ARCHIVED`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "title": "Classic Leather Jacket",
>   "descriptionHtml": "<p>Premium full-grain leather jacket with satin lining.</p>",
>   "vendor": "Acme Apparel",
>   "productType": "Outerwear",
>   "tags": ["leather", "jacket", "premium"],
>   "status": "DRAFT"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "productCreate": {
>       "product": {
>         "id": "gid://shopify/Product/1234567890",
>         "title": "Classic Leather Jacket",
>         "descriptionHtml": "<p>Premium full-grain leather jacket with satin lining.</p>",
>         "vendor": "Acme Apparel",
>         "productType": "Outerwear",
>         "status": "DRAFT",
>         "tags": ["leather", "jacket", "premium"],
>         "createdAt": "2024-03-20T14:22:00Z"
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

> [accordion] update-product: Update an existing product
>
> **id** `string` *required*
>
> Product ID.
>
> **title** `string`
>
> New title.
>
> **descriptionHtml** `string`
>
> New HTML description.
>
> **vendor** `string`
>
> New vendor.
>
> **productType** `string`
>
> New product type.
>
> **tags** `string[]`
>
> New tags.
>
> **status** `string`
>
> New status: `ACTIVE`, `DRAFT`, or `ARCHIVED`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Product/1234567890",
>   "title": "Premium Leather Jacket",
>   "status": "ACTIVE"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "productUpdate": {
>       "product": {
>         "id": "gid://shopify/Product/1234567890",
>         "title": "Premium Leather Jacket",
>         "status": "ACTIVE",
>         "updatedAt": "2024-03-21T09:00:00Z"
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

> [accordion] delete-product: Permanently delete a product
>
> **id** `string` *required*
>
> Product ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Product/1234567890"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "productDelete": {
>       "deletedProductId": "gid://shopify/Product/1234567890",
>       "userErrors": []
>     }
>   }
> }
> ```

### Orders

> [accordion] list-orders: List or filter orders
>
> **query** `string`
>
> Shopify search query (e.g., `financial_status:paid`).
>
> **first** `number` (default: 20)
>
> Number of results (max 250).
>
> **after** `string`
>
> Pagination cursor.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "query": "financial_status:paid",
>   "first": 5
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "orders": {
>       "edges": [
>         {
>           "node": {
>             "id": "gid://shopify/Order/4567890123",
>             "name": "#1001",
>             "createdAt": "2024-03-15T12:00:00Z",
>             "displayFinancialStatus": "PAID",
>             "displayFulfillmentStatus": "UNFULFILLED",
>             "totalPriceSet": {
>               "shopMoney": {
>                 "amount": "349.00",
>                 "currencyCode": "USD"
>               }
>             },
>             "customer": {
>               "id": "gid://shopify/Customer/7890123456",
>               "displayName": "Jane Doe"
>             }
>           },
>           "cursor": "eyJsYXN0X2lkIjo0NTY3ODkwMTIzfQ=="
>         }
>       ],
>       "pageInfo": {
>         "hasNextPage": true,
>         "endCursor": "eyJsYXN0X2lkIjo0NTY3ODkwMTIzfQ=="
>       }
>     }
>   }
> }
> ```

> [accordion] get-order: Get order by ID
>
> **id** `string` *required*
>
> Order ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Order/4567890123"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "order": {
>       "id": "gid://shopify/Order/4567890123",
>       "name": "#1001",
>       "createdAt": "2024-03-15T12:00:00Z",
>       "displayFinancialStatus": "PAID",
>       "displayFulfillmentStatus": "UNFULFILLED",
>       "note": null,
>       "tags": [],
>       "totalPriceSet": {
>         "shopMoney": {
>           "amount": "349.00",
>           "currencyCode": "USD"
>         }
>       },
>       "subtotalPriceSet": {
>         "shopMoney": {
>           "amount": "299.00",
>           "currencyCode": "USD"
>         }
>       },
>       "totalShippingPriceSet": {
>         "shopMoney": {
>           "amount": "50.00",
>           "currencyCode": "USD"
>         }
>       },
>       "totalTaxSet": {
>         "shopMoney": {
>           "amount": "0.00",
>           "currencyCode": "USD"
>         }
>       },
>       "customer": {
>         "id": "gid://shopify/Customer/7890123456",
>         "displayName": "Jane Doe",
>         "email": "jane@example.com"
>       },
>       "lineItems": {
>         "edges": [
>           {
>             "node": {
>               "title": "Classic Leather Jacket",
>               "quantity": 1,
>               "variant": {
>                 "id": "gid://shopify/ProductVariant/111111111",
>                 "title": "Small / Black",
>                 "price": "299.00"
>               }
>             }
>           }
>         ]
>       },
>       "shippingAddress": {
>         "address1": "123 Main St",
>         "city": "Portland",
>         "province": "Oregon",
>         "country": "United States",
>         "zip": "97201"
>       }
>     }
>   }
> }
> ```

> [accordion] update-order: Update order tags or notes
>
> **id** `string` *required*
>
> Order ID.
>
> **tags** `string[]`
>
> New tags.
>
> **note** `string`
>
> New note.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Order/4567890123",
>   "tags": ["vip", "priority"],
>   "note": "Customer requested gift wrapping"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "orderUpdate": {
>       "order": {
>         "id": "gid://shopify/Order/4567890123",
>         "name": "#1001",
>         "tags": ["vip", "priority"],
>         "note": "Customer requested gift wrapping"
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

> [accordion] cancel-order: Cancel an order
>
> **id** `string` *required*
>
> Order ID.
>
> **reason** `string` (default: OTHER)
>
> Cancel reason: `CUSTOMER`, `FRAUD`, `INVENTORY`, `DECLINED`, or `OTHER`.
>
> **refund** `boolean` (default: false)
>
> Issue a refund.
>
> **restock** `boolean` (default: false)
>
> Restock inventory.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Order/4567890123",
>   "reason": "CUSTOMER",
>   "refund": true,
>   "restock": true
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "orderCancel": {
>       "order": {
>         "id": "gid://shopify/Order/4567890123",
>         "name": "#1001",
>         "cancelledAt": "2024-03-21T10:30:00Z",
>         "cancelReason": "CUSTOMER",
>         "displayFinancialStatus": "REFUNDED",
>         "displayFulfillmentStatus": "UNFULFILLED"
>       },
>       "orderCancelUserErrors": []
>     }
>   }
> }
> ```

> [accordion] close-order: Close/complete an order
>
> **id** `string` *required*
>
> Order ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Order/4567890123"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "orderClose": {
>       "order": {
>         "id": "gid://shopify/Order/4567890123",
>         "name": "#1001",
>         "closed": true,
>         "closedAt": "2024-03-21T11:00:00Z"
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

### Customers

> [accordion] list-customers: List or search customers
>
> **query** `string`
>
> Shopify search query.
>
> **first** `number` (default: 20)
>
> Number of results (max 250).
>
> **after** `string`
>
> Pagination cursor.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "first": 5
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "customers": {
>       "edges": [
>         {
>           "node": {
>             "id": "gid://shopify/Customer/7890123456",
>             "firstName": "Jane",
>             "lastName": "Doe",
>             "email": "jane@example.com",
>             "phone": "+15551234567",
>             "state": "ENABLED",
>             "tags": ["vip"],
>             "note": null,
>             "numberOfOrders": "3",
>             "createdAt": "2024-01-10T08:00:00Z",
>             "updatedAt": "2024-03-20T14:00:00Z"
>           },
>           "cursor": "eyJsYXN0X2lkIjo3ODkwMTIzNDU2fQ=="
>         }
>       ],
>       "pageInfo": {
>         "hasNextPage": true,
>         "endCursor": "eyJsYXN0X2lkIjo3ODkwMTIzNDU2fQ=="
>       }
>     }
>   }
> }
> ```

> [accordion] get-customer: Get customer by ID
>
> **id** `string` *required*
>
> Customer ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Customer/7890123456"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "customer": {
>       "id": "gid://shopify/Customer/7890123456",
>       "firstName": "Jane",
>       "lastName": "Doe",
>       "email": "jane@example.com",
>       "phone": "+15551234567",
>       "state": "ENABLED",
>       "tags": ["vip"],
>       "note": "Preferred customer",
>       "numberOfOrders": "3",
>       "amountSpent": {
>         "amount": "947.00",
>         "currencyCode": "USD"
>       },
>       "createdAt": "2024-01-10T08:00:00Z",
>       "updatedAt": "2024-03-20T14:00:00Z",
>       "defaultAddress": {
>         "address1": "123 Main St",
>         "city": "Portland",
>         "province": "Oregon",
>         "country": "United States",
>         "zip": "97201"
>       }
>     }
>   }
> }
> ```

> [accordion] create-customer: Create a new customer
>
> **firstName** `string`
>
> First name.
>
> **lastName** `string`
>
> Last name.
>
> **email** `string`
>
> Email address.
>
> **phone** `string`
>
> Phone number.
>
> **tags** `string[]`
>
> Customer tags.
>
> **note** `string`
>
> Internal note.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "firstName": "Jane",
>   "lastName": "Doe",
>   "email": "jane@example.com",
>   "phone": "+15551234567",
>   "tags": ["newsletter"],
>   "note": "Signed up at trade show"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "customerCreate": {
>       "customer": {
>         "id": "gid://shopify/Customer/7890123456",
>         "firstName": "Jane",
>         "lastName": "Doe",
>         "email": "jane@example.com",
>         "phone": "+15551234567",
>         "tags": ["newsletter"],
>         "note": "Signed up at trade show",
>         "createdAt": "2024-03-21T09:00:00Z"
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

> [accordion] update-customer: Update a customer
>
> **id** `string` *required*
>
> Customer ID.
>
> **firstName** `string`
>
> First name.
>
> **lastName** `string`
>
> Last name.
>
> **email** `string`
>
> Email address.
>
> **phone** `string`
>
> Phone number.
>
> **tags** `string[]`
>
> Customer tags.
>
> **note** `string`
>
> Internal note.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Customer/7890123456",
>   "tags": ["vip", "newsletter"],
>   "note": "Upgraded to VIP after 3rd purchase"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "customerUpdate": {
>       "customer": {
>         "id": "gid://shopify/Customer/7890123456",
>         "firstName": "Jane",
>         "lastName": "Doe",
>         "tags": ["vip", "newsletter"],
>         "note": "Upgraded to VIP after 3rd purchase",
>         "updatedAt": "2024-03-21T09:30:00Z"
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

### Collections

> [accordion] list-collections: List collections
>
> **query** `string`
>
> Shopify search query.
>
> **first** `number` (default: 20)
>
> Number of results.
>
> **after** `string`
>
> Pagination cursor.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "first": 5
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "collections": {
>       "edges": [
>         {
>           "node": {
>             "id": "gid://shopify/Collection/9876543210",
>             "title": "Summer Collection",
>             "descriptionHtml": "<p>Lightweight essentials for warm weather.</p>",
>             "handle": "summer-collection",
>             "sortOrder": "BEST_SELLING",
>             "productsCount": {
>               "count": 12
>             },
>             "updatedAt": "2024-03-15T10:00:00Z"
>           },
>           "cursor": "eyJsYXN0X2lkIjo5ODc2NTQzMjEwfQ=="
>         }
>       ],
>       "pageInfo": {
>         "hasNextPage": true,
>         "endCursor": "eyJsYXN0X2lkIjo5ODc2NTQzMjEwfQ=="
>       }
>     }
>   }
> }
> ```

> [accordion] get-collection: Get collection by ID
>
> **id** `string` *required*
>
> Collection ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/Collection/9876543210"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "collection": {
>       "id": "gid://shopify/Collection/9876543210",
>       "title": "Summer Collection",
>       "descriptionHtml": "<p>Lightweight essentials for warm weather.</p>",
>       "handle": "summer-collection",
>       "sortOrder": "BEST_SELLING",
>       "productsCount": {
>         "count": 12
>       },
>       "updatedAt": "2024-03-15T10:00:00Z",
>       "products": {
>         "edges": [
>           {
>             "node": {
>               "id": "gid://shopify/Product/1234567891",
>               "title": "Cotton T-Shirt",
>               "status": "ACTIVE"
>             }
>           }
>         ]
>       }
>     }
>   }
> }
> ```

> [accordion] create-collection: Create a new collection
>
> **title** `string` *required*
>
> Collection title.
>
> **descriptionHtml** `string`
>
> HTML description.
>
> **sortOrder** `string`
>
> Sort order for products in the collection.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "title": "Summer Collection",
>   "descriptionHtml": "<p>Lightweight essentials for warm weather.</p>",
>   "sortOrder": "BEST_SELLING"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "collectionCreate": {
>       "collection": {
>         "id": "gid://shopify/Collection/9876543210",
>         "title": "Summer Collection",
>         "descriptionHtml": "<p>Lightweight essentials for warm weather.</p>",
>         "handle": "summer-collection",
>         "sortOrder": "BEST_SELLING",
>         "updatedAt": "2024-03-21T09:00:00Z"
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

### Inventory

> [accordion] get-inventory-levels: Get inventory quantities
>
> Returns inventory quantities across all locations.
>
> **inventoryItemId** `string` *required*
>
> Inventory Item ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "inventoryItemId": "gid://shopify/InventoryItem/5555555555"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "inventoryItem": {
>       "id": "gid://shopify/InventoryItem/5555555555",
>       "tracked": true,
>       "sku": "LJ-BLK-S",
>       "inventoryLevels": {
>         "edges": [
>           {
>             "node": {
>               "id": "gid://shopify/InventoryLevel/88888888?inventory_item_id=5555555555",
>               "quantities": [
>                 {
>                   "name": "available",
>                   "quantity": 15
>                 },
>                 {
>                   "name": "committed",
>                   "quantity": 3
>                 },
>                 {
>                   "name": "on_hand",
>                   "quantity": 18
>                 }
>               ],
>               "location": {
>                 "id": "gid://shopify/Location/6666666666",
>                 "name": "Main Warehouse"
>               }
>             }
>           }
>         ]
>       }
>     }
>   }
> }
> ```

> [accordion] adjust-inventory: Adjust inventory quantity
>
> **inventoryItemId** `string` *required*
>
> Inventory Item ID.
>
> **locationId** `string` *required*
>
> Location ID.
>
> **delta** `number` *required*
>
> Quantity change (positive to add, negative to subtract).
>
> **reason** `string` (default: correction)
>
> Adjustment reason code. Valid values: `correction`, `cycle_count_available`, `damaged`, `movement_created`, `movement_received`, `movement_updated`, `other`, `promotion`, `quality_control`, `received`, `reservation_created`, `reservation_deleted`, `reservation_updated`, `restock`, `safety_stock`, `shrinkage`.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "inventoryItemId": "gid://shopify/InventoryItem/5555555555",
>   "locationId": "gid://shopify/Location/6666666666",
>   "delta": 10,
>   "reason": "correction"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "inventoryAdjustQuantities": {
>       "changes": [
>         {
>           "name": "available",
>           "delta": 10,
>           "quantityAfterChange": 25,
>           "item": {
>             "id": "gid://shopify/InventoryItem/5555555555",
>             "sku": "LJ-BLK-S"
>           },
>           "location": {
>             "id": "gid://shopify/Location/6666666666",
>             "name": "Main Warehouse"
>           }
>         }
>       ],
>       "userErrors": []
>     }
>   }
> }
> ```

### Discounts

> [accordion] list-discounts: List discount codes
>
> **first** `number` (default: 20)
>
> Number of results (max 250).
>
> **after** `string`
>
> Pagination cursor.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "first": 5
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "codeDiscountNodes": {
>       "edges": [
>         {
>           "node": {
>             "id": "gid://shopify/DiscountCodeNode/1111111111",
>             "codeDiscount": {
>               "title": "SUMMER20",
>               "status": "ACTIVE",
>               "startsAt": "2024-06-01T00:00:00Z",
>               "endsAt": "2024-08-31T23:59:59Z",
>               "usageLimit": 1000,
>               "asyncUsageCount": 142,
>               "appliesOncePerCustomer": true,
>               "codes": {
>                 "edges": [
>                   {
>                     "node": {
>                       "code": "SUMMER20"
>                     }
>                   }
>                 ]
>               }
>             }
>           },
>           "cursor": "eyJsYXN0X2lkIjoxMTExMTExMTExfQ=="
>         }
>       ],
>       "pageInfo": {
>         "hasNextPage": false,
>         "endCursor": "eyJsYXN0X2lkIjoxMTExMTExMTExfQ=="
>       }
>     }
>   }
> }
> ```

> [accordion] create-discount: Create a discount code
>
> **title** `string` *required*
>
> Discount title.
>
> **code** `string` *required*
>
> Discount code customers will enter.
>
> **type** `string` *required*
>
> Discount type: `percentage` or `fixed`.
>
> **value** `number` *required*
>
> Discount value. For `percentage` type, use a decimal (e.g., `0.2` for 20%). For `fixed` type, use the currency amount (e.g., `10` for \$10 off).
>
> **startsAt** `string`
>
> Start date (ISO 8601).
>
> **endsAt** `string`
>
> End date (ISO 8601).
>
> **usageLimit** `number`
>
> Maximum number of uses.
>
> **appliesOncePerCustomer** `boolean` (default: false)
>
> Limit to one use per customer.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "title": "SUMMER20",
>   "code": "SUMMER20",
>   "type": "percentage",
>   "value": 0.2,
>   "startsAt": "2024-06-01T00:00:00Z",
>   "endsAt": "2024-08-31T23:59:59Z",
>   "usageLimit": 1000,
>   "appliesOncePerCustomer": true
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "discountCodeBasicCreate": {
>       "codeDiscountNode": {
>         "id": "gid://shopify/DiscountCodeNode/1111111111",
>         "codeDiscount": {
>           "title": "SUMMER20",
>           "status": "ACTIVE",
>           "startsAt": "2024-06-01T00:00:00Z",
>           "endsAt": "2024-08-31T23:59:59Z",
>           "usageLimit": 1000,
>           "appliesOncePerCustomer": true,
>           "codes": {
>             "edges": [
>               {
>                 "node": {
>                   "code": "SUMMER20"
>                 }
>               }
>             ]
>           }
>         }
>       },
>       "userErrors": []
>     }
>   }
> }
> ```

> [accordion] delete-discount: Delete a discount code
>
> **id** `string` *required*
>
> Discount node ID.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "id": "gid://shopify/DiscountCodeNode/1111111111"
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "discountCodeDelete": {
>       "deletedCodeDiscountId": "gid://shopify/DiscountCodeNode/1111111111",
>       "userErrors": []
>     }
>   }
> }
> ```

### Advanced

> [accordion] raw-graphql: Execute arbitrary GraphQL
>
> Run any GraphQL query or mutation against the Shopify Admin API.
>
> **query** `string` *required*
>
> GraphQL query or mutation string.
>
> **variables** `object`
>
> GraphQL variables.
>
> **Example request:**
>
> ```json theme={null}
> {
>   "query": "query ($first: Int!) { products(first: $first) { edges { node { id title status } } } }",
>   "variables": {
>     "first": 5
>   }
> }
> ```
>
> **Example response:**
>
> ```json theme={null}
> {
>   "data": {
>     "products": {
>       "edges": [
>         {
>           "node": {
>             "id": "gid://shopify/Product/1234567890",
>             "title": "Classic Leather Jacket",
>             "status": "ACTIVE"
>           }
>         },
>         {
>           "node": {
>             "id": "gid://shopify/Product/1234567891",
>             "title": "Cotton T-Shirt",
>             "status": "ACTIVE"
>           }
>         }
>       ]
>     }
>   }
> }
> ```

> [card] [Try this free for 14 days](https://preview.condotta.ai/signup)
>
> Start a 14-day trial on Band 1. At day 14, choose your band, or stop.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.