> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/human-connections/shopify/shopify.md).

# Shopify

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<figure><img src="/files/kRqAkPZcWdCmVlClidxp" alt="" width="375"><figcaption></figcaption></figure>

<h3 align="center">Put Shopify to Work with @Human Automations and @Human Agents</h3>

<p align="center">The Shopify Connection documents all Triggers, Actions and Query Operations available for creating automations via the Shopify API.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### What can you do with the Shopify Connection?

* Connect to the Shopify API in a few clicks
* Use the related Shopify Operations (see below) in @Human Automations or @Human Agents

### Related Operations

#### Trigger Operations

**Product Created**

Triggers on: products/products\_create

Triggered when a new product is created in Shopify.

**Product Updated**

Triggers on: products/products\_update

Triggered when an existing product is updated in Shopify.

**Product Deleted**

Triggers on: products/products\_delete

Triggered when a product is deleted from Shopify.

**Order Created**

Triggers on: orders/orders\_create

Triggered when a new order is placed in Shopify.

**Order Updated**

Triggers on: orders/orders\_updated

Triggered when an existing order is updated in Shopify.

**Customer Created**

Triggers on: customers/customers\_create

Triggered when a new customer account is created in Shopify.

**Customer Updated**

Triggers on: customers/customers\_update

Triggered when an existing customer's information is updated in Shopify.

#### Action Operations

[Action: Add Line Item to Order](/human-connections/shopify/shopify/action-add-line-item-to-order.md)

[Action: Create Blog Entry](/human-connections/shopify/shopify/action-create-blog-entry.md)

[Action: Create Company Location](/human-connections/shopify/shopify/action-create-company-location.md)

[Action: Create Customer](/human-connections/shopify/shopify/action-create-customer.md)

#### Query Operations

Example link

### Related Automations

Example link

### Obtaining Access Credentials <a href="#obtaining-access-credentials" id="obtaining-access-credentials"></a>

Here’s the step-by-step process to generate a **Shopify Personal Access Token (PAT)** for system-to-system access:

#### **Prerequisites**

* A **Shopify Admin account** (owner or collaborator with **Apps and channels** + **Settings** permissions).
* Access to the **Shopify Admin Dashboard** of the target store.

#### **Steps to Generate the PAT**

1. **Log in** to the Shopify Admin Dashboard:
   * Go to `https://{{STORE_URL}}.myshopify.com/admin` (replace `{{STORE_URL}}` with your store’s subdomain).
   * Enter admin credentials (email + password).
2. **Navigate to Apps & Developers Section**:
   * In the left sidebar, click **Apps** → **Develop apps** (or **Manage private apps** for older stores).
3. **Create a New Private App** (if none exists):
   * Click **Create an app** (or **Allow custom app development** if prompted).
   * Enter an **App name** (e.g., "System Integration").
   * Click **Create app**.
4. **Configure API Access**:
   * Under **Admin API access**, select the required permissions (e.g., `read_write` for products, orders, etc.).
   * Scroll to **API credentials** and click **Install app**.
5. **Generate the Access Token**:
   * After installation, Shopify displays the **Admin API access token** (this is your PAT).
   * **Copy the token immediately** (it won’t be shown again).
6. **Store Securely**:
   * Save the token in a secure vault (e.g., 1Password, AWS Secrets Manager).
   * Treat it like a password—**do not hardcode** in scripts.

#### **Required Permissions**

Ensure the token has the correct scopes for your use case (e.g., `read_products`, `write_orders`). Adjust in the app’s **API access** settings if needed.

### Configuring Webhooks

1. **Log in** to your Shopify Admin Dashboard.
2. Click **Settings** (gear icon) in the bottom-left corner of the sidebar.
3. Select **Notifications** from the left-hand menu.
4. Scroll to the bottom of the page to find the **Webhooks** section.
5. Click the **Create webhook** button.
6. Select the **Event** you want to subscribe to from the dropdown menu (e.g., `Order creation`).
7. Set the **Format** to **JSON**.
8. Enter the destination **URL** where the webhook payloads should be sent.
9. Select the latest **Webhook API version** from the dropdown menu.
10. Click **Save** to activate the webhook.

### Code (Apache v2.0): Service Connectivity and Metadata

```
{
  "handle": "shopify-v2026-03",
  "status": "active",
  "meta": {
    "short": "Shopify",
    "description": "Connect to Shopify's API to manage products, orders, customers, and more.",
    "icon": "shopify",
    "tags": ["ecommerce", "retail", "api"]
  },
  "service": {
    "baseURL": {
      "value": "https://{{shopName}}.myshopify.com/admin/api/2026-03"
    },
    "protocol": "https",
    "contentType": "application/json",
    "headers": {
      "X-Shopify-Access-Token": {
        "value": "{{accessToken}}"
      }
    },
    "auth": {
      "method": "api_token",
      "params": {
        "apiToken": {
          "token": {
            "value": "{{accessToken}}"
          },
          "headerName": {
            "value": "X-Shopify-Access-Token"
          }
        }
      }
    }
  }
}

```

### Code (Apache v2.0): List of External Resources and Internal Mapping

```
[
  {
    "handle": "products",
    "meta": {
      "short": "Products",
      "description": "Manage Shopify products, including listing, creating, updating, and deleting products."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/products.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "title",
        "type": "String",
        "selector": [
          "title"
        ],
        "meta": {}
      },
      {
        "name": "body_html",
        "type": "String",
        "selector": [
          "body_html"
        ],
        "meta": {}
      },
      {
        "name": "vendor",
        "type": "String",
        "selector": [
          "vendor"
        ],
        "meta": {}
      },
      {
        "name": "product_type",
        "type": "String",
        "selector": [
          "product_type"
        ],
        "meta": {}
      },
      {
        "name": "created_at",
        "type": "String",
        "selector": [
          "created_at"
        ],
        "meta": {}
      },
      {
        "name": "handle",
        "type": "String",
        "selector": [
          "handle"
        ],
        "meta": {}
      },
      {
        "name": "updated_at",
        "type": "String",
        "selector": [
          "updated_at"
        ],
        "meta": {}
      },
      {
        "name": "published_at",
        "type": "String",
        "selector": [
          "published_at"
        ],
        "meta": {}
      },
      {
        "name": "status",
        "type": "String",
        "selector": [
          "status"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the product",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"product\": {\"title\": \"{{title}}\", \"body_html\": \"{{body_html}}\", \"vendor\": \"{{vendor}}\", \"product_type\": \"{{product_type}}\"}}",
          "placeholders": [
            {
              "name": "title",
              "type": "String",
              "description": "The title of the product",
              "required": true
            },
            {
              "name": "body_html",
              "type": "String",
              "description": "The description of the product in HTML format",
              "required": false
            },
            {
              "name": "vendor",
              "type": "String",
              "description": "The vendor of the product",
              "required": false
            },
            {
              "name": "product_type",
              "type": "String",
              "description": "The type of the product",
              "required": false
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the product",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"product\": {\"id\": {{id}}, \"title\": \"{{title}}\", \"body_html\": \"{{body_html}}\"}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the product",
              "required": true
            },
            {
              "name": "title",
              "type": "String",
              "description": "The title of the product",
              "required": false
            },
            {
              "name": "body_html",
              "type": "String",
              "description": "The description of the product in HTML format",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the product",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      }
    },
    "webhooks": [
      {
        "event": "products_create",
        "path": "/webhooks/shopify/products/create",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "id"
            ],
            "meta": {}
          },
          {
            "name": "title",
            "type": "String",
            "selector": [
              "title"
            ],
            "meta": {}
          }
        ]
      },
      {
        "event": "products_update",
        "path": "/webhooks/shopify/products/update",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "id"
            ],
            "meta": {}
          },
          {
            "name": "title",
            "type": "String",
            "selector": [
              "title"
            ],
            "meta": {}
          }
        ]
      },
      {
        "event": "products_delete",
        "path": "/webhooks/shopify/products/delete",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "id"
            ],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "orders",
    "meta": {
      "short": "Orders",
      "description": "Manage Shopify orders, including listing, creating, updating, and deleting orders."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/orders.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "email",
        "type": "String",
        "selector": [
          "email"
        ],
        "meta": {}
      },
      {
        "name": "created_at",
        "type": "String",
        "selector": [
          "created_at"
        ],
        "meta": {}
      },
      {
        "name": "updated_at",
        "type": "String",
        "selector": [
          "updated_at"
        ],
        "meta": {}
      },
      {
        "name": "order_number",
        "type": "Integer",
        "selector": [
          "order_number"
        ],
        "meta": {}
      },
      {
        "name": "total_price",
        "type": "String",
        "selector": [
          "total_price"
        ],
        "meta": {}
      },
      {
        "name": "financial_status",
        "type": "String",
        "selector": [
          "financial_status"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the order",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"order\": {\"email\": \"{{email}}\", \"line_items\": [{\"variant_id\": {{variant_id}}, \"quantity\": {{quantity}}}]}}",
          "placeholders": [
            {
              "name": "email",
              "type": "String",
              "description": "The email of the customer",
              "required": true
            },
            {
              "name": "variant_id",
              "type": "Integer",
              "description": "The variant ID of the product",
              "required": true
            },
            {
              "name": "quantity",
              "type": "Integer",
              "description": "The quantity of the product",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the order",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"order\": {\"id\": {{id}}, \"email\": \"{{email}}\"}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the order",
              "required": true
            },
            {
              "name": "email",
              "type": "String",
              "description": "The email of the customer",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the order",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      }
    },
    "webhooks": [
      {
        "event": "orders_create",
        "path": "/webhooks/shopify/orders/create",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "id"
            ],
            "meta": {}
          },
          {
            "name": "email",
            "type": "String",
            "selector": [
              "email"
            ],
            "meta": {}
          }
        ]
      },
      {
        "event": "orders_updated",
        "path": "/webhooks/shopify/orders/update",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "id"
            ],
            "meta": {}
          },
          {
            "name": "email",
            "type": "String",
            "selector": [
              "email"
            ],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "customers",
    "meta": {
      "short": "Customers",
      "description": "Manage Shopify customers, including listing, creating, updating, and deleting customers."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/customers.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "email",
        "type": "String",
        "selector": [
          "email"
        ],
        "meta": {}
      },
      {
        "name": "first_name",
        "type": "String",
        "selector": [
          "first_name"
        ],
        "meta": {}
      },
      {
        "name": "last_name",
        "type": "String",
        "selector": [
          "last_name"
        ],
        "meta": {}
      },
      {
        "name": "created_at",
        "type": "String",
        "selector": [
          "created_at"
        ],
        "meta": {}
      },
      {
        "name": "updated_at",
        "type": "String",
        "selector": [
          "updated_at"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the customer",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"customer\": {\"email\": \"{{email}}\", \"first_name\": \"{{first_name}}\", \"last_name\": \"{{last_name}}\"}}",
          "placeholders": [
            {
              "name": "email",
              "type": "String",
              "description": "The email of the customer",
              "required": true
            },
            {
              "name": "first_name",
              "type": "String",
              "description": "The first name of the customer",
              "required": false
            },
            {
              "name": "last_name",
              "type": "String",
              "description": "The last name of the customer",
              "required": false
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the customer",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"customer\": {\"id\": {{id}}, \"email\": \"{{email}}\", \"first_name\": \"{{first_name}}\", \"last_name\": \"{{last_name}}\"}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the customer",
              "required": true
            },
            {
              "name": "email",
              "type": "String",
              "description": "The email of the customer",
              "required": false
            },
            {
              "name": "first_name",
              "type": "String",
              "description": "The first name of the customer",
              "required": false
            },
            {
              "name": "last_name",
              "type": "String",
              "description": "The last name of the customer",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the customer",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      }
    },
    "webhooks": [
      {
        "event": "customers_create",
        "path": "/webhooks/shopify/customers/create",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "id"
            ],
            "meta": {}
          },
          {
            "name": "email",
            "type": "String",
            "selector": [
              "email"
            ],
            "meta": {}
          }
        ]
      },
      {
        "event": "customers_update",
        "path": "/webhooks/shopify/customers/update",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "id"
            ],
            "meta": {}
          },
          {
            "name": "email",
            "type": "String",
            "selector": [
              "email"
            ],
            "meta": {}
          }
        ]
      }
    ]
  },
  {
    "handle": "draft_orders",
    "meta": {
      "short": "Draft Orders",
      "description": "Manage Shopify draft orders, including listing, creating, updating, and deleting draft orders."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/draft_orders.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "order_id",
        "type": "Integer",
        "selector": [
          "order_id"
        ],
        "meta": {}
      },
      {
        "name": "name",
        "type": "String",
        "selector": [
          "name"
        ],
        "meta": {}
      },
      {
        "name": "email",
        "type": "String",
        "selector": [
          "email"
        ],
        "meta": {}
      },
      {
        "name": "created_at",
        "type": "String",
        "selector": [
          "created_at"
        ],
        "meta": {}
      },
      {
        "name": "completed_at",
        "type": "String",
        "selector": [
          "completed_at"
        ],
        "meta": {}
      },
      {
        "name": "status",
        "type": "String",
        "selector": [
          "status"
        ],
        "meta": {}
      },
      {
        "name": "total_price",
        "type": "String",
        "selector": [
          "total_price"
        ],
        "meta": {}
      },
      {
        "name": "currency",
        "type": "String",
        "selector": [
          "currency"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the draft order",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"draft_order\": {\"line_items\": [{\"title\": \"{{title}}\", \"price\": \"{{price}}\", \"quantity\": {{quantity}}]}}",
          "placeholders": [
            {
              "name": "title",
              "type": "String",
              "description": "The title of the custom line item",
              "required": true
            },
            {
              "name": "price",
              "type": "String",
              "description": "The price of the custom line item",
              "required": true
            },
            {
              "name": "quantity",
              "type": "Integer",
              "description": "The quantity of the custom line item",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the draft order",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"draft_order\": {\"id\": {{id}}, \"note\": \"{{note}}\"}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the draft order",
              "required": true
            },
            {
              "name": "note",
              "type": "String",
              "description": "A note for the draft order",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the draft order",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      }
    },
    "webhooks": []
  },
  {
    "handle": "custom_collections",
    "meta": {
      "short": "Custom Collections",
      "description": "Manage Shopify custom collections, including listing, creating, updating, and deleting custom collections."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/custom_collections.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "title",
        "type": "String",
        "selector": [
          "title"
        ],
        "meta": {}
      },
      {
        "name": "body_html",
        "type": "String",
        "selector": [
          "body_html"
        ],
        "meta": {}
      },
      {
        "name": "handle",
        "type": "String",
        "selector": [
          "handle"
        ],
        "meta": {}
      },
      {
        "name": "sort_order",
        "type": "String",
        "selector": [
          "sort_order"
        ],
        "meta": {}
      },
      {
        "name": "published_at",
        "type": "String",
        "selector": [
          "published_at"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the custom collection",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"custom_collection\": {\"title\": \"{{title}}\"}}",
          "placeholders": [
            {
              "name": "title",
              "type": "String",
              "description": "The title of the custom collection",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the custom collection",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"custom_collection\": {\"id\": {{id}}, \"title\": \"{{title}}\"}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the custom collection",
              "required": true
            },
            {
              "name": "title",
              "type": "String",
              "description": "The title of the custom collection",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the custom collection",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      }
    },
    "webhooks": []
  },
  {
    "handle": "smart_collections",
    "meta": {
      "short": "Smart Collections",
      "description": "Manage Shopify smart collections, including listing, creating, updating, and deleting smart collections."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/smart_collections.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "title",
        "type": "String",
        "selector": [
          "title"
        ],
        "meta": {}
      },
      {
        "name": "body_html",
        "type": "String",
        "selector": [
          "body_html"
        ],
        "meta": {}
      },
      {
        "name": "handle",
        "type": "String",
        "selector": [
          "handle"
        ],
        "meta": {}
      },
      {
        "name": "published_at",
        "type": "String",
        "selector": [
          "published_at"
        ],
        "meta": {}
      },
      {
        "name": "sort_order",
        "type": "String",
        "selector": [
          "sort_order"
        ],
        "meta": {}
      },
      {
        "name": "disjunctive",
        "type": "Boolean",
        "selector": [
          "disjunctive"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the smart collection",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"smart_collection\": {\"title\": \"{{title}}\", \"rules\": [{\"column\": \"{{rule_column}}\", \"relation\": \"{{rule_relation}}\", \"condition\": \"{{rule_condition}}\"}]}}",
          "placeholders": [
            {
              "name": "title",
              "type": "String",
              "description": "The title of the smart collection",
              "required": true
            },
            {
              "name": "rule_column",
              "type": "String",
              "description": "The rule column for the collection",
              "required": true
            },
            {
              "name": "rule_relation",
              "type": "String",
              "description": "The relation for the rule",
              "required": true
            },
            {
              "name": "rule_condition",
              "type": "String",
              "description": "The condition for the rule",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the smart collection",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"smart_collection\": {\"id\": {{id}}, \"title\": \"{{title}}\"}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the smart collection",
              "required": true
            },
            {
              "name": "title",
              "type": "String",
              "description": "The title of the smart collection",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the smart collection",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      }
    },
    "webhooks": []
  },
  {
    "handle": "inventory_items",
    "meta": {
      "short": "Inventory Items",
      "description": "Manage Shopify inventory items, including listing and updating inventory items."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/inventory_items.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "cost",
        "type": "String",
        "selector": [
          "cost"
        ],
        "meta": {}
      },
      {
        "name": "country_code_of_origin",
        "type": "String",
        "selector": [
          "country_code_of_origin"
        ],
        "meta": {}
      },
      {
        "name": "requires_shipping",
        "type": "Boolean",
        "selector": [
          "requires_shipping"
        ],
        "meta": {}
      },
      {
        "name": "sku",
        "type": "String",
        "selector": [
          "sku"
        ],
        "meta": {}
      },
      {
        "name": "tracked",
        "type": "Boolean",
        "selector": [
          "tracked"
        ],
        "meta": {}
      },
      {
        "name": "created_at",
        "type": "String",
        "selector": [
          "created_at"
        ],
        "meta": {}
      },
      {
        "name": "updated_at",
        "type": "String",
        "selector": [
          "updated_at"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {
          "ids": "{{ids}}"
        },
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the inventory item",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the inventory item",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"inventory_item\": {\"id\": {{id}}, \"cost\": \"{{cost}}\", \"tracked\": {{tracked}}}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the inventory item",
              "required": true
            },
            {
              "name": "cost",
              "type": "String",
              "description": "The cost of the unit",
              "required": false
            },
            {
              "name": "tracked",
              "type": "Boolean",
              "description": "Whether inventory is tracked",
              "required": false
            }
          ]
        }
      }
    },
    "webhooks": []
  },
  {
    "handle": "price_rules",
    "meta": {
      "short": "Price Rules",
      "description": "Manage Shopify price rules for discounts."
    },
    "endpoint": {
      "value": "/admin/api/2023-10/price_rules.json",
      "placeholders": []
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {}
      },
      {
        "name": "title",
        "type": "String",
        "selector": [
          "title"
        ],
        "meta": {}
      },
      {
        "name": "value_type",
        "type": "String",
        "selector": [
          "value_type"
        ],
        "meta": {}
      },
      {
        "name": "value",
        "type": "String",
        "selector": [
          "value"
        ],
        "meta": {}
      },
      {
        "name": "customer_selection",
        "type": "String",
        "selector": [
          "customer_selection"
        ],
        "meta": {}
      },
      {
        "name": "target_type",
        "type": "String",
        "selector": [
          "target_type"
        ],
        "meta": {}
      },
      {
        "name": "target_selection",
        "type": "String",
        "selector": [
          "target_selection"
        ],
        "meta": {}
      },
      {
        "name": "allocation_method",
        "type": "String",
        "selector": [
          "allocation_method"
        ],
        "meta": {}
      },
      {
        "name": "starts_at",
        "type": "String",
        "selector": [
          "starts_at"
        ],
        "meta": {}
      },
      {
        "name": "ends_at",
        "type": "String",
        "selector": [
          "ends_at"
        ],
        "meta": {}
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the price rule",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      },
      "create": {
        "method": "POST",
        "path": {
          "value": "",
          "placeholders": []
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"price_rule\": {\"title\": \"{{title}}\", \"target_type\": \"line_item\", \"target_selection\": \"all\", \"allocation_method\": \"across\", \"value_type\": \"percentage\", \"value\": \"{{value}}\", \"customer_selection\": \"all\", \"starts_at\": \"{{starts_at}}\"}}",
          "placeholders": [
            {
              "name": "title",
              "type": "String",
              "description": "The title of the price rule",
              "required": true
            },
            {
              "name": "value",
              "type": "String",
              "description": "The value of the discount",
              "required": true
            },
            {
              "name": "starts_at",
              "type": "String",
              "description": "When the price rule starts",
              "required": true
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the price rule",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "{\"price_rule\": {\"id\": {{id}}, \"title\": \"{{title}}\"}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the price rule",
              "required": true
            },
            {
              "name": "title",
              "type": "String",
              "description": "The title of the price rule",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}.json",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "The ID of the price rule",
              "required": true
            }
          ]
        },
        "headers": {},
        "queryParams": {},
        "bodyTemplate": {
          "value": "",
          "placeholders": []
        }
      }
    },
    "webhooks": []
  }
]
```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.planetcrust.com/human-connections/shopify/shopify.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
