add_products_to_collection
ChatGPTAdd products (by id) to one collection by id or handle, keeping the products already in it. Returns the collection after the change.
bulk_update_product_status
ChatGPTSet the same status (active, draft or archived) on several products at once, by id. Each product is updated on its own: the result lists { id, ok, error? } per id plus updated and failed counts, so one bad id never blocks the rest.
cancel_order
ChatGPTCancel an order that has nothing shipped yet (id = the order id); an order with shipped items cannot be canceled. restock puts its reserved stock back. No money moves: the payment stays captured, and a refund is made by the merchant in the store admin. request_id is a uuid per cancel: a retry with the same request_id cancels once.
create_collection
ChatGPTCreate one collection, optionally with its first products (product_ids). Returns the created collection.
create_discount
ChatGPTCreate one discount: a code or automatic discount on lines, the order or shipping, with a percent (in hundredths of a percent), fixed (minor units) or free value, optional rules, usage limits and dates. It starts as a draft unless status says otherwise. Returns the created discount.
create_objects
ChatGPTCreate one or more objects of a type in one call. Each item is validated on its own: the result lists { ok, id, handle? } or { ok: false, error } per item in order, so a bad entry never blocks the rest, plus created and failed counts.
create_product
ChatGPTCreate one product with its options and variants. It starts as a draft unless status says otherwise. Returns the created product.
delete_object
ChatGPTDelete one object permanently.
describe_objects
ChatGPTSchema discovery for one object type of the store: its description, the JSON schemas of its list filters, create fields and update fields (null when the type cannot be created or updated), whether it can be deleted, and every action with its input schema and effect.
fulfill_order
ChatGPTMark items of an order as shipped, optionally with tracking, and email the customer when notify_customer is set (id = the order id). Without items it ships everything left. request_id is a uuid per fulfillment: a retry with the same request_id ships once.
get_collection
ChatGPTRead one collection by id or handle with every field, its product count and the first page of its products.
get_customer
ChatGPTRead one customer by id with contact details, addresses, marketing consent, tags and note.
get_inventory
ChatGPTRead one variant's inventory row by variant id: price, SKU and stock overall and per location.
get_object
ChatGPTRead one object by id or handle with every field.
get_order
ChatGPTRead one order by id with every field. Amounts are integers in minor units of the order's currency.
get_product
ChatGPTRead one product by id or handle with every field, its options and its variants.
get_store_info
ChatGPTRead the store this connection belongs to: name, currency (every money amount of this store is in its minor units), language, logo, fulfillment mode, weight unit and the backup shipping rate.
get_storefront
ChatGPTRead one site by id. agent { status running | idle, chat_id, last_reply, updated_at } is the site's builder agent for this key's user (null before its first message); unpublished_changes { total, paths, versions } is what changed since the live deployment; live { deployment_id, built_at, preview_url } is what serves the site now (null before the first publish); latest_deployment { id, status, live, error } is the newest build, queued, building, live or failed.
list_customers
ChatGPTList customers filtered by text (email, name, company, phone) or marketing consent. Returns { rows, total, next }; pass next back as after for the following page.
list_discounts
ChatGPTList discounts filtered by title or code, status or method (code or automatic). Returns { rows, total, next }; pass next back as after for the following page.
list_inventory
ChatGPTList variants as inventory rows: product title, SKU, price and stock (on hand, committed, available, and per location), filtered by product title, handle or SKU. Returns { rows, total, next }; pass next back as after for the following page.
list_objects
ChatGPTList objects of a type with optional filters. Returns { rows, total, next }. total: Rows matching the filters from this page on (after the cursor), this page included. next: Pass it as after to read the next page; null on the last page. A list is paged by a cursor on its own order, so editing rows you already read never skips the rest; to follow every change to a type, read the events list instead; after is a key of filters. The Objects section of your instructions documents every type, its filters and fields.
list_orders
ChatGPTList orders filtered by order number or customer email, status, payment status, fulfillment status, customer or location. Returns { rows, total, next }; pass next back as after for the following page.
list_reports
ChatGPTList the store's saved analytics reports with their ids. Returns { rows, total, next }; pass next back as after for the following page.
list_storefront_files
ChatGPTList the files of a site's code (id = the site id): { files: [{ path, size, updated_at, writable }] }, the same files its builder agent sees. writable is false for the platform's own files, which are read but never written.
list_storefronts
ChatGPTList the store's sites with their live address, whether a publish is running and their latest deployment. Returns { rows, total, next }; pass next back as after for the following page.
message_storefront_agent
ChatGPTSend a message to a site's builder agent (id = the site id; message = what to build or change). The agent edits the site's files in the background and never publishes. Returns { chat_id, started: true } as soon as the turn starts; answers 409 while the agent is still working on an earlier message.
publish_storefront
ChatGPTPut a site live, exactly like the Publish button (id = the site id): it builds the site's current files in the background and returns { deployment_id, status: "queued", live: false }. Answers 409 while the builder agent works or another publish runs. With deployment_id, an earlier ready build of the site, it rolls back to that build instead and returns it live at once. A live site is public on the internet.
query_catalog
ChatGPTThe NationQL catalog of this store: every dataset with its metrics (name, format, level, description), its dimensions and grains, every row dataset with its fields, and the named ranges, compares and chart types the language accepts. Read it before writing a query.
read_storefront_files
ChatGPTRead files of a site's code (id = the site id; paths = paths of the site's files). Returns { files: [{ path, content } for text, { path, content_base64 } for an image or font], missing, remaining }: remaining are the paths that did not fit this call, read them in the next one.
run_object_action
ChatGPTRun a named action on one object, for the changes a field patch cannot express. The Objects section lists each type's actions and their input. Returns the object after the action.
run_query
ChatGPTRun a NationQL query over the store's numbers and answer its result: columns, rows (each with its dimensions, values, previous and change), totals, comparison and meta (currency, time zone, row_count, truncated, sources). A query is FROM <dataset> SHOW <metrics> [WHERE <filter>] [GROUP BY <dimensions> | TIMESERIES <grain>] [HAVING <filter>] [DURING <range> | SINCE <date> UNTIL <date>] [COMPARE TO <compare>] [ORDER BY <field> ASC|DESC] [LIMIT n] [OFFSET n] [VISUALIZE <metrics> TYPE <chart> MAX n]; a row dataset (orders, customers, posts) lists records instead: FROM orders SHOW id, total WHERE status = 'open' ORDER BY total DESC LIMIT 20. Read query_catalog first for the datasets, metrics, dimensions, fields, ranges, compares and charts. An invalid query answers { error, code: query_invalid, issues } with each issue's span and alternatives.
run_report
ChatGPTRun one saved report by id and return its numbers: the current period rows and totals, and the previous period when the report compares. Money is in minor units, percents are ratios. time_zone (IANA) sets where days are cut; default UTC.
search_collections
ChatGPTSearch the store's collections by text or status. Returns { rows, total, next }; pass next back as after for the following page.
search_products
ChatGPTSearch the store's products by text (title, handle or variant SKU), status or collection. Returns { rows, total, next }; pass next back as after for the following page.
set_inventory
ChatGPTSet a variant's stock at one or more locations to an absolute quantity (id = the variant id). With compare_quantity, the value previously read, the call answers 409 when stock moved in between and writes nothing at that location.
update_collection
ChatGPTChange fields of one collection by id or handle. Pass only what changes; products move in and out through add_product_ids / remove_product_ids. Returns the collection after the change.
update_object
ChatGPTUpdate fields of one object. Pass only what changes; array fields (tags, images) are replaced whole; memberships move through add_collection_ids / remove_collection_ids on a product and add_product_ids / remove_product_ids on a collection.
update_product
ChatGPTChange fields of one product by id or handle. Only the fields passed change; arrays (tags, images, variants) are replaced whole, so an array sent without some of its entries drops them, and collection membership moves through add_collection_ids / remove_collection_ids. Returns the product after the change.
write_storefront_files
ChatGPTWrite and delete files of a site's code without its builder agent (id = the site id; files = [{ path, content_base64 }]; delete = paths to remove). One entry in the site's history, like a save in the Code tab; nothing goes live until the site is published. Answers 409 while a builder chat of the site is mid-run. Returns { written, deleted, version_id }.