{"openapi":"3.1.0","info":{"title":"Timesact Public API","version":"1.0.0","description":"Programmatic access to Timesact preorder, back-in-stock and related features for a Shopify store.\n\nAuthenticate every request with a per-store API key created in the Timesact admin:\n`Authorization: Bearer tsk_...`. Keys are either read-only or full access.\n\n**Pagination.** Lists are cursor-paginated: read `pagination.nextCursor` and pass it back as\n`cursor`. Treat the cursor as opaque — its contents are not part of this contract.\n`pagination.total` is never returned unless you ask with `includeTotal=true`, and is never\navailable on endpoints that page by keyset, because counting costs a second scan. Branch on\n`hasMore`, which is always present.\n\n**Ids are strings.** Every id in every response is a string, Timesact's own included. They are\n64-bit and exceed the safe integer range in JavaScript, so parsing one as a number can corrupt\nit silently. Id parameters accept the same digits-only strings you were given.\n\n**Money is a number at 2 decimal places**, in the `currency` reported alongside it. Rates are\nratios at 4 decimal places.\n\n**An absent field is a signal, never an error.** Several places rely on it, and each means\nsomething specific: `pagination.total` is absent unless requested; analytics `period.period` is\n`null` when you supplied `from`/`to` instead of a preset; `period.requestedFrom` and\n`period.maxDays` appear only when the plan clamped the window; and a response carries only the\nblocks its endpoint declares; and a variant's `sync` carries `error` only when its state is\n`FAILED`. Test for presence, not for a falsy value.\n\n**Writes change assignments.** An assignment is one customer experience on one variant. The\nfour write endpoints say what to do with them: `POST /assignments/add` puts experiences on\nvariants and keeps what is there, `/assignments/remove` takes the named experiences off (or\nall of them, which takes the variant out of Timesact), `/assignments/replace` leaves each\nvariant with exactly the listed experiences, and `/assignments/resync` changes nothing and\npushes the variants to Shopify again. Each takes `targets` — whole products, a list of\nvariants, or SKUs — and add and replace fetch from Shopify whatever Timesact does not hold\nyet, so a product never has to be added first. All four are safe to repeat.\n\n**Writes are accepted, then applied.** A write commits its rows and answers `202` with one\noperation for the whole request. The Shopify-side configuration — selling plans, metafields,\ninventory policy — is written afterwards by a worker, one store at a time. Two places report\nit: `GET /operations/{id}` counts the variants of that request (done, failed, or replaced by\na later write) and lists what Shopify refused, and every variant read carries a `sync` state\n(`SYNCED`, `PENDING`, `FAILED`) for the variant as it stands now. A terminal operation status\nis final, so there is nothing to gain from polling one. Writes on the same variants do not\nconflict: the last one decides what the variant ends with, and Shopify is written once.\n\n**One exception: a product that is still being fetched.** While an add or replace is still\nbringing a product in from Shopify, another write to that product answers `409 conflict`\nwith `Retry-After` and the `operationId` it is waiting for. A remove or replace gets the\nsame answer when Timesact cannot yet tell whether it touches a product being fetched. The\nwait is normally a few seconds; retry the same request.\n\n**`dryRun` previews a write.** With `dryRun: true` nothing is written and the answer is `200`\nwith the counts the write would produce.\n\n**`Idempotency-Key` is honoured on writes.** Send one and a retry with the same body returns\nthe original operation instead of starting a new one; the same key with a different body is\nrejected with `409 conflict`.\n\n**A store has a queue, and it has a limit.** Shopify takes a few hundred variants a minute\nfor one store. When more than 10,000 variants are waiting, further writes answer `429` with\n`Retry-After` until the queue drains.\n\n**Removing every experience removes the variant from Timesact**, and the product with it when\nnone of its variants remain. Adding it again later fetches it from Shopify afresh, and an\nassignment that is removed and added back restarts its `unitsSold` at zero.\n\n**Versioning.** `/public/v1` is the contract version. Fields are only ever added within v1,\nand enums are open: treat an unrecognised enum value as \"other\" rather than failing.\n\n**Unknown parameters are rejected.** A query parameter or body field this spec does not\ndefine returns `400` with `code: \"validation\"` naming it, rather than being ignored. OpenAPI\ncannot express this on parameters, so it is stated here: send only what is documented.\n\n**Limits are per store and set by its plan.** There are two: calls per minute and calls\nper UTC day. One request is one call. The same counts cover the MCP server, where a request\ncosts one call, plus one for each tool call after its first; connecting and listing tools\nare requests too. Limits are counted per store, so creating more keys does not add calls.\n`GET /shop` reports both limits and how much of today is used.\n\n**Every response says where the store stands.** `RateLimit-Limit`, `RateLimit-Remaining`\nand `RateLimit-Reset` describe the current minute (`Reset` is in seconds).\n`X-RateLimit-Daily-Limit`, `X-RateLimit-Daily-Remaining` and `X-RateLimit-Daily-Reset`\ndescribe the UTC day.\n\n**At a plan limit the answer is `429` with `Retry-After`,** and the call is not counted: a\nclient that keeps calling while refused does not use up its day. `error.details.limit` says\nwhich limit it was: `per_minute` (wait for the minute to turn) or `per_day`\n(`details.resetsAt` is when the day starts again). On this `429` the three `RateLimit-*`\nheaders describe the limit that refused the call, with `RateLimit-Remaining: 0` and\n`RateLimit-Reset` equal to `Retry-After`. An MCP request carrying several tool calls is\nrefused whole when they do not all fit; the request itself still counts as one call.\n\n**Two other `429`s carry no `details.limit`:** a full sync queue, which is an ordinary\ncounted call with the ordinary headers, and too many failed authentication attempts from\none address. Both set `Retry-After`. Operations take seconds to minutes, so poll one every\n10 to 15 seconds rather than every second."},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"Per-store API key created in the Timesact admin (tsk_...)"}},"schemas":{"Error":{"type":"object","description":"Error envelope. `code` is stable and machine-readable; `message` is human-readable and may change; quote `requestId` when contacting support.","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation","unauthorized","plan_required","forbidden","not_found","conflict","payload_too_large","unsupported_media_type","rate_limited","internal","upstream_shopify"],"description":"Stable error code"},"message":{"type":"string","description":"Human-readable explanation"},"details":{"type":"object","additionalProperties":true,"description":"Code-specific context: `fields` for validation, `featureKey` for plan_required, `requiredAccess`/`grantedScope` for forbidden, `id` for not_found, `retryAfterSeconds` for rate_limited, `operationId` and `retryAfterSeconds` for a conflict with a write still in progress, `idempotencyKey` for a reused key, `expectedLimit` for a cursor/limit mismatch"},"requestId":{"type":"string","description":"Identifier of this request in our logs"}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"PageInfo":{"type":"object","description":"Cursor pagination. Pass `nextCursor` back as `cursor` to fetch the next page; `nextCursor` is null on the last page. Treat the cursor as opaque. `total` is never returned unless `includeTotal=true` is requested, and is never available on endpoints that page by keyset — use `hasMore`, which is always present.","properties":{"limit":{"type":"integer","minimum":1,"description":"Items requested per page"},"total":{"type":"integer","minimum":0,"description":"Total items matching the query. Present only when requested with `includeTotal=true`."},"hasMore":{"type":"boolean","description":"Whether another page exists"},"nextCursor":{"type":["null","string"],"description":"Cursor for the next page; null when `hasMore` is false"}},"required":["limit","hasMore","nextCursor"],"additionalProperties":false},"Shop":{"type":"object","description":"Overview of the connected store: identity, plan, usage and app status.","properties":{"domain":{"type":"string","description":"The myshopify.com domain of the store","example":"demo.myshopify.com"},"name":{"type":"string","description":"Store name"},"email":{"type":["null","string"],"description":"Store contact email"},"timezone":{"type":"string","description":"IANA timezone of the store","example":"Europe/Zurich"},"locale":{"type":"string","description":"Store locale","example":"en"},"plan":{"type":"object","description":"Current Timesact subscription","properties":{"tier":{"type":["null","string"],"enum":["CORE","PRO",null],"description":"Plan tier"},"priceOption":{"type":["null","string"],"enum":["FREE","FLEXIBLE","FIXED",null],"description":"How the plan is priced"}},"required":["tier","priceOption"],"additionalProperties":false},"usage":{"type":"object","description":"Preorder order usage in the current billing cycle","properties":{"unlimitedOrders":{"type":"boolean","description":"True when the plan has no order cap"},"ordersUsed":{"type":"integer","minimum":0,"description":"Orders consumed in the current cycle"},"ordersLimit":{"type":["null","integer"],"minimum":0,"description":"Order cap for the cycle; null when unlimited"},"quotaExhausted":{"type":"boolean","description":"True when the order cap has been reached and widgets are paused"}},"required":["unlimitedOrders","ordersUsed","ordersLimit","quotaExhausted"],"additionalProperties":false},"appEmbedEnabled":{"type":"boolean","description":"Whether the Timesact theme app embed is enabled. When false, no Timesact feature renders on the storefront."},"sync":{"type":"object","description":"How far this store's writes have got on their way to Shopify, counted in variants as of now. List the variants with `GET /variants?sync=PENDING` or `?sync=FAILED`.","properties":{"variantsPending":{"type":"integer","minimum":0,"description":"Variants queued for Shopify and not written there yet"},"variantsRetrying":{"type":"integer","minimum":0,"description":"How many of the pending variants had a try that did not go through and are waiting to be tried again. Above zero for long means something is wrong: read `sync.error` on the variants."},"variantsFailed":{"type":"integer","minimum":0,"description":"Variants Shopify refused. They stay counted until a later write or `POST /assignments/resync` pushes them again."}},"required":["variantsPending","variantsRetrying","variantsFailed"],"additionalProperties":false},"apiLimits":{"type":"object","description":"How much of this API and the MCP server the store may use, set by its plan. One REST request is one call; an MCP request is one call, plus one for each tool call after its first. Both share these counts, and they are per store, so more keys do not add calls.","properties":{"callsPerMinute":{"type":"integer","minimum":0,"description":"Calls allowed in one clock minute"},"callsPerDay":{"type":"integer","minimum":0,"description":"Calls allowed in one UTC day"},"callsUsedToday":{"type":"integer","minimum":0,"description":"Calls counted so far today, this one included. A call refused at a plan limit is not counted."},"resetsAt":{"type":"string","format":"date-time","description":"When the daily count starts again (00:00 UTC)"}},"required":["callsPerMinute","callsPerDay","callsUsedToday","resetsAt"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","description":"When the store installed Timesact"}},"required":["domain","name","email","timezone","locale","plan","usage","appEmbedEnabled","sync","apiLimits","createdAt"],"additionalProperties":false},"VariantFeatures":{"type":"object","description":"Assignments per feature. Each list is empty when the variant is not assigned to that feature, and can hold more than one entry: markets and inventory locations are modelled as separate customer experiences, so a variant can be driven by several at once.","properties":{"preorder":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["PREORDER","BACKORDER","MADE_TO_ORDER",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"},"reason":{"type":["null","string"],"description":"Why the variant is in this status, in plain language. Wording may change; branch on `reasonCode` instead."},"customerExperience":{"type":["null","object"],"description":"The customer experience this assignment comes from","properties":{"id":{"type":"string","pattern":"^\\d+$"},"title":{"type":["null","string"]}},"required":["id","title"],"additionalProperties":false},"appliesTo":{"type":"object","description":"Where this assignment applies. Two assignments on the same variant are distinguished by these — the same variant can be ACTIVE in one market or location and PENDING in another.","properties":{"markets":{"type":"object","description":"Markets the customer experience covers; `values` is empty for GLOBAL","properties":{"type":{"type":"string","enum":["GLOBAL","ISO_CODE","SHOPIFY_MARKET"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false},"inventoryLocations":{"type":"object","description":"Inventory locations counted towards this assignment's status; `values` is empty for ALL","properties":{"type":{"type":"string","enum":["ALL","SPECIFIC"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false}},"required":["markets","inventoryLocations"],"additionalProperties":false},"inventoryQuantity":{"type":["null","integer"],"description":"Inventory this status was computed against. Null when the customer experience is scoped to specific locations, because the figure for that subset is not part of this response — the variant's global `inventoryQuantity` would contradict the status."},"unitsLimit":{"type":["null","integer"],"description":"Maximum preorder units for this variant under this assignment; null when unlimited"},"unitsSold":{"type":"integer","minimum":0,"description":"Preorder units sold so far under this assignment"}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt","reason","customerExperience","appliesTo","inventoryQuantity","unitsLimit","unitsSold"],"additionalProperties":false}},"backInStock":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["BACK_IN_STOCK","NOTIFY_ME","WAITLIST",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"},"reason":{"type":["null","string"],"description":"Why the variant is in this status, in plain language. Wording may change; branch on `reasonCode` instead."},"customerExperience":{"type":["null","object"],"description":"The customer experience this assignment comes from","properties":{"id":{"type":"string","pattern":"^\\d+$"},"title":{"type":["null","string"]}},"required":["id","title"],"additionalProperties":false},"appliesTo":{"type":"object","description":"Where this assignment applies. Two assignments on the same variant are distinguished by these — the same variant can be ACTIVE in one market or location and PENDING in another.","properties":{"markets":{"type":"object","description":"Markets the customer experience covers; `values` is empty for GLOBAL","properties":{"type":{"type":"string","enum":["GLOBAL","ISO_CODE","SHOPIFY_MARKET"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false},"inventoryLocations":{"type":"object","description":"Inventory locations counted towards this assignment's status; `values` is empty for ALL","properties":{"type":{"type":"string","enum":["ALL","SPECIFIC"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false}},"required":["markets","inventoryLocations"],"additionalProperties":false},"inventoryQuantity":{"type":["null","integer"],"description":"Inventory this status was computed against. Null when the customer experience is scoped to specific locations, because the figure for that subset is not part of this response — the variant's global `inventoryQuantity` would contradict the status."}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt","reason","customerExperience","appliesTo","inventoryQuantity"],"additionalProperties":false}},"comingSoon":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["COMING_SOON",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"},"reason":{"type":["null","string"],"description":"Why the variant is in this status, in plain language. Wording may change; branch on `reasonCode` instead."},"customerExperience":{"type":["null","object"],"description":"The customer experience this assignment comes from","properties":{"id":{"type":"string","pattern":"^\\d+$"},"title":{"type":["null","string"]}},"required":["id","title"],"additionalProperties":false},"appliesTo":{"type":"object","description":"Where this assignment applies. Two assignments on the same variant are distinguished by these — the same variant can be ACTIVE in one market or location and PENDING in another.","properties":{"markets":{"type":"object","description":"Markets the customer experience covers; `values` is empty for GLOBAL","properties":{"type":{"type":"string","enum":["GLOBAL","ISO_CODE","SHOPIFY_MARKET"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false},"inventoryLocations":{"type":"object","description":"Inventory locations counted towards this assignment's status; `values` is empty for ALL","properties":{"type":{"type":"string","enum":["ALL","SPECIFIC"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false}},"required":["markets","inventoryLocations"],"additionalProperties":false},"inventoryQuantity":{"type":["null","integer"],"description":"Inventory this status was computed against. Null when the customer experience is scoped to specific locations, because the figure for that subset is not part of this response — the variant's global `inventoryQuantity` would contradict the status."}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt","reason","customerExperience","appliesTo","inventoryQuantity"],"additionalProperties":false}},"lowStock":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["LOW_STOCK",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"},"reason":{"type":["null","string"],"description":"Why the variant is in this status, in plain language. Wording may change; branch on `reasonCode` instead."},"customerExperience":{"type":["null","object"],"description":"The customer experience this assignment comes from","properties":{"id":{"type":"string","pattern":"^\\d+$"},"title":{"type":["null","string"]}},"required":["id","title"],"additionalProperties":false},"appliesTo":{"type":"object","description":"Where this assignment applies. Two assignments on the same variant are distinguished by these — the same variant can be ACTIVE in one market or location and PENDING in another.","properties":{"markets":{"type":"object","description":"Markets the customer experience covers; `values` is empty for GLOBAL","properties":{"type":{"type":"string","enum":["GLOBAL","ISO_CODE","SHOPIFY_MARKET"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false},"inventoryLocations":{"type":"object","description":"Inventory locations counted towards this assignment's status; `values` is empty for ALL","properties":{"type":{"type":"string","enum":["ALL","SPECIFIC"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false}},"required":["markets","inventoryLocations"],"additionalProperties":false},"inventoryQuantity":{"type":["null","integer"],"description":"Inventory this status was computed against. Null when the customer experience is scoped to specific locations, because the figure for that subset is not part of this response — the variant's global `inventoryQuantity` would contradict the status."}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt","reason","customerExperience","appliesTo","inventoryQuantity"],"additionalProperties":false}}},"required":["preorder","backInStock","comingSoon","lowStock"],"additionalProperties":false},"VariantFeaturesCompact":{"type":"object","description":"Assignments per feature. Each list is empty when the variant is not assigned to that feature, and can hold more than one entry: markets and inventory locations are modelled as separate customer experiences, so a variant can be driven by several at once.","properties":{"preorder":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant. Fetch the variant on its own for the plain-language reason and the market/location scope.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["PREORDER","BACKORDER","MADE_TO_ORDER",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"},"unitsLimit":{"type":["null","integer"],"description":"Maximum preorder units for this variant under this assignment; null when unlimited"},"unitsSold":{"type":"integer","minimum":0,"description":"Preorder units sold so far under this assignment"}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt","unitsLimit","unitsSold"],"additionalProperties":false}},"backInStock":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant. Fetch the variant on its own for the plain-language reason and the market/location scope.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["BACK_IN_STOCK","NOTIFY_ME","WAITLIST",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt"],"additionalProperties":false}},"comingSoon":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant. Fetch the variant on its own for the plain-language reason and the market/location scope.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["COMING_SOON",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt"],"additionalProperties":false}},"lowStock":{"type":"array","items":{"type":"object","description":"One customer experience driving this feature on this variant. Fetch the variant on its own for the plain-language reason and the market/location scope.","properties":{"id":{"type":"string","description":"Identifier of this assignment"},"status":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"],"description":"ACTIVE: Timesact has configured this feature for the variant and computed it as live. Whether Shopify has accepted that configuration is reported by the write's operation (`GET /operations/{operationId}`), not here — so a variant can read ACTIVE while its operation is still PROCESSING or has failed. PENDING: assigned, but the activation condition is not met yet (e.g. configured to start when inventory reaches 0 and there is still stock). PROCESSING: Timesact is applying the configuration to Shopify. PENDING_START_DATE: assigned, will activate on the configured start date. EXPIRED: the configured end date has passed. NO_STOCK: the configuration requires stock that the variant does not have, or the preorder limit was reached. DISABLED: assigned but the feature is turned off on the customer experience. See `reason` for the specific explanation and `reasonCode` for a stable one. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"reasonCode":{"type":["null","string"],"description":"Stable identifier for the reason, safe to branch on (e.g. WAITING_FOR_OUT_OF_STOCK, PREORDER_LIMIT_REACHED). Null when the status needs no explanation."},"category":{"type":["null","string"],"enum":["LOW_STOCK",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience this assignment comes from; look it up in the response's `customerExperiences` map for its title and scope"},"startsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment starts applying"},"endsAt":{"type":["null","string"],"format":"date-time","description":"When this assignment stops applying; null when open-ended"}},"required":["id","status","reasonCode","category","customerExperienceId","startsAt","endsAt"],"additionalProperties":false}}},"required":["preorder","backInStock","comingSoon","lowStock"],"additionalProperties":false},"CustomerExperienceRefMap":{"type":"object","description":"Customer experiences referenced by the assignments in this response, keyed by id.","propertyNames":{"pattern":"^[0-9]+$"},"additionalProperties":{"type":"object","properties":{"title":{"type":["null","string"]},"appliesTo":{"type":"object","description":"Where this customer experience applies. Two assignments on the same variant are distinguished by these.","properties":{"markets":{"type":"object","description":"Markets the customer experience covers; `values` is empty for GLOBAL","properties":{"type":{"type":"string","enum":["GLOBAL","ISO_CODE","SHOPIFY_MARKET"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false},"inventoryLocations":{"type":"object","description":"Inventory locations counted towards status; `values` is empty for ALL","properties":{"type":{"type":"string","enum":["ALL","SPECIFIC"]},"values":{"type":"array","items":{"type":"string"}}},"required":["type","values"],"additionalProperties":false}},"required":["markets","inventoryLocations"],"additionalProperties":false}},"required":["title","appliesTo"],"additionalProperties":false}},"ProductVariantCompact":{"type":"object","description":"A variant Timesact manages, with each feature's status, window and preorder counters. Fetch the variant on its own for the plain-language reason and the market/location scope.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify variant id"},"title":{"type":["null","string"]},"displayName":{"type":["null","string"],"description":"Product and variant title as Shopify renders it"},"sku":{"type":["null","string"]},"price":{"type":["null","number"],"description":"Variant price in the store currency, as last synced"},"inventoryQuantity":{"type":["null","integer"],"description":"Last synced Shopify inventory quantity"},"inventoryPolicy":{"type":["null","string"],"description":"Shopify inventory policy (CONTINUE or DENY)"},"inventoryItemId":{"type":["null","string"],"description":"Shopify inventory item id"},"shopifyUpdatedAt":{"type":["null","string"],"format":"date-time","description":"When Shopify last changed this variant"},"deletedInShopifyAt":{"type":["null","string"],"format":"date-time","description":"When this variant disappeared from Shopify; null while it still exists"},"sync":{"type":"object","description":"Whether Shopify has this variant's current configuration. A write commits in Timesact first and reaches Shopify afterwards; this says how far it has got. `since` and `operationId` are present only while the state is not SYNCED. A PENDING variant whose last try did not go through also carries `attempts`, `nextAttemptAt` and `error`: it is tried again on its own, up to 10 times.","properties":{"state":{"type":"string","enum":["SYNCED","PENDING","FAILED"],"description":"SYNCED: Shopify has it. PENDING: queued and on its way, or waiting to be tried again when `error` is present. FAILED: it did not reach Shopify — see `error`, then push it again with `POST /assignments/resync`."},"since":{"type":"string","format":"date-time","description":"When the variant was queued (PENDING) or refused (FAILED)"},"operationId":{"type":["null","string"],"description":"The operation that last queued this variant; null once that operation has aged out"},"attempts":{"type":"integer","minimum":1,"description":"Tries made so far. PENDING only, once a try has failed."},"nextAttemptAt":{"type":"string","format":"date-time","description":"When it is tried again. PENDING only, once a try has failed."},"error":{"type":"object","description":"FAILED: why it did not reach Shopify. PENDING: why the last try did not go through.","properties":{"code":{"type":"string","description":"SHOPIFY_REQUEST_FAILED (Shopify refused it), SHOPIFY_UNAVAILABLE (Shopify throttled or dropped the request), EXPERIENCE_NOT_SYNCED (an assigned experience is not in Shopify yet) or INTERNAL_ERROR (Timesact failed on this variant; quote the operation id to support). Open: treat an unrecognised code as a failure."},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["state"],"additionalProperties":false},"features":{"$ref":"#/components/schemas/VariantFeaturesCompact"},"unresolvedAssignments":{"type":"array","description":"Assignments whose customer experience could not be resolved, usually because it was deleted. Which feature they drove is no longer knowable, so they are listed here instead of under `features`.","items":{"type":"object","properties":{"id":{"type":"string"},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$"}},"required":["id","customerExperienceId"],"additionalProperties":false}},"product":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify product id"},"title":{"type":["null","string"]}},"required":["id","title"],"additionalProperties":false}},"required":["id","title","displayName","sku","price","inventoryQuantity","inventoryPolicy","inventoryItemId","shopifyUpdatedAt","deletedInShopifyAt","sync","features","product"],"additionalProperties":false},"ProductVariant":{"type":"object","description":"A variant of a product Timesact manages, with the status of each feature.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify variant id"},"title":{"type":["string","null"]},"displayName":{"type":["string","null"],"description":"Product and variant title as Shopify renders it"},"sku":{"type":["string","null"]},"price":{"type":["number","null"],"description":"Variant price in the store currency, as last synced"},"inventoryQuantity":{"type":["integer","null"],"description":"Last synced Shopify inventory quantity"},"inventoryPolicy":{"type":["string","null"],"description":"Shopify inventory policy (CONTINUE or DENY)"},"inventoryItemId":{"type":["string","null"],"description":"Shopify inventory item id"},"shopifyUpdatedAt":{"type":["string","null"],"format":"date-time","description":"When Shopify last changed this variant"},"deletedInShopifyAt":{"type":["string","null"],"format":"date-time","description":"When this variant disappeared from Shopify; null while it still exists"},"sync":{"type":"object","description":"Whether Shopify has this variant's current configuration. A write commits in Timesact first and reaches Shopify afterwards; this says how far it has got. `since` and `operationId` are present only while the state is not SYNCED. A PENDING variant whose last try did not go through also carries `attempts`, `nextAttemptAt` and `error`: it is tried again on its own, up to 10 times.","properties":{"state":{"type":"string","enum":["SYNCED","PENDING","FAILED"],"description":"SYNCED: Shopify has it. PENDING: queued and on its way, or waiting to be tried again when `error` is present. FAILED: it did not reach Shopify — see `error`, then push it again with `POST /assignments/resync`."},"since":{"type":"string","format":"date-time","description":"When the variant was queued (PENDING) or refused (FAILED)"},"operationId":{"type":["string","null"],"description":"The operation that last queued this variant; null once that operation has aged out"},"attempts":{"type":"integer","minimum":1,"description":"Tries made so far. PENDING only, once a try has failed."},"nextAttemptAt":{"type":"string","format":"date-time","description":"When it is tried again. PENDING only, once a try has failed."},"error":{"type":"object","description":"FAILED: why it did not reach Shopify. PENDING: why the last try did not go through.","properties":{"code":{"type":"string","description":"SHOPIFY_REQUEST_FAILED (Shopify refused it), SHOPIFY_UNAVAILABLE (Shopify throttled or dropped the request), EXPERIENCE_NOT_SYNCED (an assigned experience is not in Shopify yet) or INTERNAL_ERROR (Timesact failed on this variant; quote the operation id to support). Open: treat an unrecognised code as a failure."},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["state"],"additionalProperties":false},"features":{"$ref":"#/components/schemas/VariantFeatures"},"unresolvedAssignments":{"type":"array","description":"Assignments whose customer experience could not be resolved, usually because it was deleted. Which feature they drove is no longer knowable, so they are listed here instead of under `features`.","items":{"type":"object","properties":{"id":{"type":"string"},"customerExperienceId":{"type":["string","null"],"pattern":"^\\d+$"}},"required":["id","customerExperienceId"],"additionalProperties":false}}},"required":["id","title","displayName","sku","price","inventoryQuantity","inventoryPolicy","inventoryItemId","shopifyUpdatedAt","deletedInShopifyAt","sync","features"],"additionalProperties":false},"ProductSummary":{"type":"object","description":"List row for a product Timesact manages. Counts always describe the whole product, never only the variants that matched the query.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify product id"},"title":{"type":["null","string"]},"handle":{"type":["null","string"],"description":"Shopify product handle (the storefront URL slug)"},"imageUrl":{"type":["null","string"],"description":"Featured image as last synced"},"productType":{"type":["null","string"],"description":"Shopify product type"},"vendor":{"type":["null","string"]},"tags":{"type":"array","items":{"type":"string"}},"deletedInShopifyAt":{"type":["null","string"],"format":"date-time","description":"When this product disappeared from Shopify; null while it still exists"},"createdAt":{"type":"string","format":"date-time","description":"When Timesact first synced this product"},"updatedAt":{"type":"string","format":"date-time","description":"When Timesact last changed its copy of this product — a Shopify sync, or a Timesact configuration change."},"variantCount":{"type":"integer","minimum":0,"description":"Variants Timesact has synced for this product, whether or not they carry an assignment"},"features":{"type":"object","properties":{"preorder":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["PREORDER","BACKORDER","MADE_TO_ORDER"]},"description":"Distinct categories across the assigned variants"},"unitsLimit":{"type":["null","integer"],"description":"Total preorder cap across every assignment on this product; null when any one of them is unlimited"},"unitsSold":{"type":"integer","minimum":0,"description":"Preorder units sold so far across this product"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false},"backInStock":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["BACK_IN_STOCK","NOTIFY_ME","WAITLIST"]},"description":"Distinct categories across the assigned variants"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false},"comingSoon":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["COMING_SOON"]},"description":"Distinct categories across the assigned variants"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false},"lowStock":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["LOW_STOCK"]},"description":"Distinct categories across the assigned variants"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false}},"required":["preorder","backInStock","comingSoon","lowStock"],"additionalProperties":false}},"required":["id","title","handle","imageUrl","productType","vendor","tags","deletedInShopifyAt","createdAt","updatedAt","variantCount","features"],"additionalProperties":false},"Product":{"type":"object","description":"A product Timesact manages: the same counts as the list row, plus one page of its variants. A product can hold thousands of variants, so `variants` is paginated — page through the rest with /products/{productId}/variants.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify product id"},"title":{"type":["null","string"]},"handle":{"type":["null","string"],"description":"Shopify product handle (the storefront URL slug)"},"imageUrl":{"type":["null","string"],"description":"Featured image as last synced"},"productType":{"type":["null","string"],"description":"Shopify product type"},"vendor":{"type":["null","string"]},"tags":{"type":"array","items":{"type":"string"}},"deletedInShopifyAt":{"type":["null","string"],"format":"date-time","description":"When this product disappeared from Shopify; null while it still exists"},"createdAt":{"type":"string","format":"date-time","description":"When Timesact first synced this product"},"updatedAt":{"type":"string","format":"date-time","description":"When Timesact last changed its copy of this product — a Shopify sync, or a Timesact configuration change."},"variantCount":{"type":"integer","minimum":0,"description":"Variants Timesact has synced for this product, whether or not they carry an assignment"},"features":{"type":"object","properties":{"preorder":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["PREORDER","BACKORDER","MADE_TO_ORDER"]},"description":"Distinct categories across the assigned variants"},"unitsLimit":{"type":["null","integer"],"description":"Total preorder cap across every assignment on this product; null when any one of them is unlimited"},"unitsSold":{"type":"integer","minimum":0,"description":"Preorder units sold so far across this product"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false},"backInStock":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["BACK_IN_STOCK","NOTIFY_ME","WAITLIST"]},"description":"Distinct categories across the assigned variants"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false},"comingSoon":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["COMING_SOON"]},"description":"Distinct categories across the assigned variants"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false},"lowStock":{"type":"object","properties":{"assignedVariants":{"type":"integer","minimum":0,"description":"Distinct variants with at least one assignment for this feature"},"byStatus":{"type":"object","description":"Variants having at least one assignment in each status; only statuses with at least one variant appear. A variant assigned to several customer experiences can appear under more than one status, so these do not sum to `assignedVariants`.","propertyNames":{"enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"additionalProperties":{"type":"integer","minimum":1}},"categories":{"type":"array","items":{"type":"string","enum":["LOW_STOCK"]},"description":"Distinct categories across the assigned variants"}},"required":["assignedVariants","byStatus","categories"],"additionalProperties":false}},"required":["preorder","backInStock","comingSoon","lowStock"],"additionalProperties":false},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantCompact"}},"variantsPagination":{"$ref":"#/components/schemas/PageInfo"},"customerExperiences":{"$ref":"#/components/schemas/CustomerExperienceRefMap"}},"required":["id","title","handle","imageUrl","productType","vendor","tags","deletedInShopifyAt","createdAt","updatedAt","variantCount","features","variants","variantsPagination","customerExperiences"],"additionalProperties":false},"Variant":{"type":"object","description":"A variant Timesact manages, with the status of each feature and its product.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify variant id"},"title":{"type":["null","string"]},"displayName":{"type":["null","string"],"description":"Product and variant title as Shopify renders it"},"sku":{"type":["null","string"]},"price":{"type":["null","number"],"description":"Variant price in the store currency, as last synced"},"inventoryQuantity":{"type":["null","integer"],"description":"Last synced Shopify inventory quantity"},"inventoryPolicy":{"type":["null","string"],"description":"Shopify inventory policy (CONTINUE or DENY)"},"inventoryItemId":{"type":["null","string"],"description":"Shopify inventory item id"},"shopifyUpdatedAt":{"type":["null","string"],"format":"date-time","description":"When Shopify last changed this variant"},"deletedInShopifyAt":{"type":["null","string"],"format":"date-time","description":"When this variant disappeared from Shopify; null while it still exists"},"sync":{"type":"object","description":"Whether Shopify has this variant's current configuration. A write commits in Timesact first and reaches Shopify afterwards; this says how far it has got. `since` and `operationId` are present only while the state is not SYNCED. A PENDING variant whose last try did not go through also carries `attempts`, `nextAttemptAt` and `error`: it is tried again on its own, up to 10 times.","properties":{"state":{"type":"string","enum":["SYNCED","PENDING","FAILED"],"description":"SYNCED: Shopify has it. PENDING: queued and on its way, or waiting to be tried again when `error` is present. FAILED: it did not reach Shopify — see `error`, then push it again with `POST /assignments/resync`."},"since":{"type":"string","format":"date-time","description":"When the variant was queued (PENDING) or refused (FAILED)"},"operationId":{"type":["null","string"],"description":"The operation that last queued this variant; null once that operation has aged out"},"attempts":{"type":"integer","minimum":1,"description":"Tries made so far. PENDING only, once a try has failed."},"nextAttemptAt":{"type":"string","format":"date-time","description":"When it is tried again. PENDING only, once a try has failed."},"error":{"type":"object","description":"FAILED: why it did not reach Shopify. PENDING: why the last try did not go through.","properties":{"code":{"type":"string","description":"SHOPIFY_REQUEST_FAILED (Shopify refused it), SHOPIFY_UNAVAILABLE (Shopify throttled or dropped the request), EXPERIENCE_NOT_SYNCED (an assigned experience is not in Shopify yet) or INTERNAL_ERROR (Timesact failed on this variant; quote the operation id to support). Open: treat an unrecognised code as a failure."},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["state"],"additionalProperties":false},"features":{"$ref":"#/components/schemas/VariantFeatures"},"unresolvedAssignments":{"type":"array","description":"Assignments whose customer experience could not be resolved, usually because it was deleted. Which feature they drove is no longer knowable, so they are listed here instead of under `features`.","items":{"type":"object","properties":{"id":{"type":"string"},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$"}},"required":["id","customerExperienceId"],"additionalProperties":false}},"product":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify product id"},"title":{"type":["null","string"]}},"required":["id","title"],"additionalProperties":false}},"required":["id","title","displayName","sku","price","inventoryQuantity","inventoryPolicy","inventoryItemId","shopifyUpdatedAt","deletedInShopifyAt","sync","features","product"],"additionalProperties":false},"CustomerExperienceSummary":{"type":"object","description":"List row for a customer experience. `features` reports which features are configured and switched on, without their full settings.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Timesact customer experience id"},"title":{"type":["null","string"]},"description":{"type":["null","string"]},"icon":{"type":["null","string"],"description":"Icon shown in the Timesact admin"},"automationTag":{"type":["null","string"],"description":"Shopify product tag that automatically assigns products to this customer experience"},"planTier":{"type":["null","string"],"enum":["CORE","PRO",null],"description":"Lowest plan on which this customer experience runs"},"assignedVariants":{"type":"integer","minimum":0,"description":"Variants currently assigned to this customer experience"},"markets":{"type":"object","properties":{"type":{"type":"string","enum":["GLOBAL","ISO_CODE","SHOPIFY_MARKET"]},"values":{"type":"array","items":{"type":"string"},"description":"Country ISO codes or Shopify market ids; empty for GLOBAL"}},"required":["type","values"],"additionalProperties":false},"inventoryLocations":{"type":"object","properties":{"type":{"type":"string","enum":["ALL","SPECIFIC"]},"values":{"type":"array","items":{"type":"string"},"description":"Shopify location ids counted towards inventory; empty for ALL"}},"required":["type","values"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"features":{"type":"object","description":"Per-feature configured/enabled state. Fetch the customer experience by id for the full settings.","properties":{"preorder":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether this customer experience has settings for the feature"},"enabled":{"type":"boolean","description":"Whether the feature is switched on"},"category":{"type":["null","string"],"enum":["PREORDER","BACKORDER","MADE_TO_ORDER",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."}},"required":["configured","enabled","category"],"additionalProperties":false},"backInStock":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether this customer experience has settings for the feature"},"enabled":{"type":"boolean","description":"Whether the feature is switched on"},"category":{"type":["null","string"],"enum":["BACK_IN_STOCK","NOTIFY_ME","WAITLIST",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."}},"required":["configured","enabled","category"],"additionalProperties":false},"comingSoon":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether this customer experience has settings for the feature"},"enabled":{"type":"boolean","description":"Whether the feature is switched on"},"category":{"type":["null","string"],"enum":["COMING_SOON",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."}},"required":["configured","enabled","category"],"additionalProperties":false},"lowStock":{"type":"object","properties":{"configured":{"type":"boolean","description":"Whether this customer experience has settings for the feature"},"enabled":{"type":"boolean","description":"Whether the feature is switched on"},"category":{"type":["null","string"],"enum":["LOW_STOCK",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."}},"required":["configured","enabled","category"],"additionalProperties":false}},"required":["preorder","backInStock","comingSoon","lowStock"],"additionalProperties":false}},"required":["id","title","description","icon","automationTag","planTier","assignedVariants","markets","inventoryLocations","createdAt","updatedAt","features"],"additionalProperties":false},"CustomerExperience":{"type":"object","description":"A customer experience: the configuration aggregate a merchant assigns variants to. Each feature is a facet of it, null when not configured.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Timesact customer experience id"},"title":{"type":["null","string"]},"description":{"type":["null","string"]},"icon":{"type":["null","string"],"description":"Icon shown in the Timesact admin"},"automationTag":{"type":["null","string"],"description":"Shopify product tag that automatically assigns products to this customer experience"},"planTier":{"type":["null","string"],"enum":["CORE","PRO",null],"description":"Lowest plan on which this customer experience runs"},"assignedVariants":{"type":"integer","minimum":0,"description":"Variants currently assigned to this customer experience"},"markets":{"type":"object","properties":{"type":{"type":"string","enum":["GLOBAL","ISO_CODE","SHOPIFY_MARKET"]},"values":{"type":"array","items":{"type":"string"},"description":"Country ISO codes or Shopify market ids; empty for GLOBAL"}},"required":["type","values"],"additionalProperties":false},"inventoryLocations":{"type":"object","properties":{"type":{"type":"string","enum":["ALL","SPECIFIC"]},"values":{"type":"array","items":{"type":"string"},"description":"Shopify location ids counted towards inventory; empty for ALL"}},"required":["type","values"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"features":{"type":"object","properties":{"preorder":{"type":["null","object"],"description":"Preorder configuration; null when this customer experience has none.","properties":{"enabled":{"type":"boolean","description":"Whether the feature is switched on for this customer experience. When false, assigned variants report status DISABLED."},"category":{"type":["null","string"],"enum":["PREORDER","BACKORDER","MADE_TO_ORDER",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"activatesWhen":{"type":["null","string"],"enum":["ALWAYS_AVAILABLE","WHEN_OUT_OF_STOCK","WHEN_SHOPIFY_INVENTORY_AVAILABLE",null],"description":"Inventory condition that makes the feature go live: ALWAYS_AVAILABLE, WHEN_OUT_OF_STOCK, or WHEN_SHOPIFY_INVENTORY_AVAILABLE. Today only preorder acts on it; back in stock, coming soon and low stock currently go live whenever inventory reaches 0."},"shipping":{"type":"object","description":"What the customer is told about when the preorder ships.","properties":{"type":{"type":"string","enum":["ASAP","EXACT_DATE","PERIOD","INTERVAL"],"description":"ASAP: as soon as possible. EXACT_DATE: a named date. PERIOD: a single duration from purchase. INTERVAL: a range."},"date":{"type":["null","string"],"format":"date","description":"Shipping date, for type EXACT_DATE"},"period":{"type":["null","object"],"description":"Duration from purchase, for type PERIOD","properties":{"value":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["value","unit"],"additionalProperties":false},"intervalFrom":{"type":["null","object"],"description":"Earliest duration, for type INTERVAL","properties":{"value":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["value","unit"],"additionalProperties":false},"intervalTo":{"type":["null","object"],"description":"Latest duration, for type INTERVAL","properties":{"value":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["DAY","WEEK","MONTH"]}},"required":["value","unit"],"additionalProperties":false}},"required":["type","date","period","intervalFrom","intervalTo"],"additionalProperties":false},"payment":{"type":"object","description":"How the preorder is charged. Partial payment requires a higher plan.","properties":{"type":{"type":"string","enum":["FULL_AMOUNT","PARTIAL_PAYMENT"],"description":"FULL_AMOUNT: charged in full at checkout. PARTIAL_PAYMENT: a deposit at checkout and the balance later."},"upfrontType":{"type":["null","string"],"enum":["AMOUNT","PERCENTAGE",null],"description":"Whether the deposit is a fixed amount or a percentage, for PARTIAL_PAYMENT"},"upfrontValue":{"type":["null","number"],"description":"Deposit amount or percentage, for PARTIAL_PAYMENT"},"balanceDueType":{"type":["null","string"],"enum":["EXACT_DATE","TIME_AFTER_CHECKOUT","ON_FULFILLMENT",null],"description":"When the remaining balance is charged, for PARTIAL_PAYMENT"},"balanceDueDate":{"type":["null","string"],"format":"date","description":"Date the balance is charged, for balanceDueType EXACT_DATE"},"balanceDueAfter":{"type":["null","object"],"description":"Delay after checkout before charging the balance, for balanceDueType TIME_AFTER_CHECKOUT","properties":{"value":{"type":"integer","minimum":1},"unit":{"type":"string","enum":["DAY","MONTH","YEAR"]}},"required":["value","unit"],"additionalProperties":false}},"required":["type","upfrontType","upfrontValue","balanceDueType","balanceDueDate","balanceDueAfter"],"additionalProperties":false},"discount":{"type":"object","description":"Preorder discount. Requires a higher plan.","properties":{"type":{"type":["null","string"],"enum":["AMOUNT","PERCENTAGE","NO_DISCOUNT",null],"description":"How the discount is expressed; NO_DISCOUNT or null means none"},"value":{"type":["null","number"],"description":"Discount amount or percentage; null when there is no discount"}},"required":["type","value"],"additionalProperties":false},"inventoryReservedAt":{"type":["null","string"],"enum":["ON_SALE","ON_FULFILLMENT",null],"description":"When Shopify inventory is committed: at purchase (ON_SALE) or at fulfillment (ON_FULFILLMENT)"},"fulfillment":{"type":"object","description":"What actually happens to a preorder line item's fulfillment in Shopify. Derived, not merely stored: with a Shopify purchase option the selling plan's delivery policy decides (from `shipping`), otherwise Timesact applies the hold itself.","properties":{"status":{"type":["null","string"],"enum":["UNFULFILLED","SCHEDULED","ON_HOLD",null],"description":"UNFULFILLED: fulfillable straight away. SCHEDULED: Shopify holds a fulfill-at date (an exact shipping date). ON_HOLD: a fulfillment hold Timesact or Shopify releases later."},"holdScope":{"type":["null","string"],"enum":["PREORDER_ITEMS","ENTIRE_ORDER",null],"description":"What the hold or schedule covers; null when nothing is held. PREORDER_ITEMS covers only the preorder line items. ENTIRE_ORDER covers the whole order including non-preorder items: if any item in an order comes from a customer experience set to ENTIRE_ORDER, the whole order is held. Only reachable without a Shopify purchase option."},"governedBy":{"type":["null","string"],"enum":["SHOPIFY_PURCHASE_OPTION","TIMESACT",null],"description":"Which mechanism decides: SHOPIFY_PURCHASE_OPTION (the selling plan, derived from `shipping`) or TIMESACT (the stored hold settings)."}},"required":["status","holdScope","governedBy"],"additionalProperties":false},"usesShopifyPurchaseOption":{"type":"boolean","description":"Whether preorder is sold through a Shopify purchase option (selling plan). When false, the variant is sold normally and Timesact marks it as preorder."},"autoEnableContinueSelling":{"type":"boolean","description":"Whether Timesact turns on \"continue selling when out of stock\" on the Shopify variant while preorder is active"},"notificationChannel":{"type":["null","string"],"enum":["BUILT_IN","SHOPIFY_FLOW","KLAVIYO",null],"description":"Where preorder notifications are delivered. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."}},"required":["enabled","category","activatesWhen","shipping","payment","discount","inventoryReservedAt","fulfillment","usesShopifyPurchaseOption","autoEnableContinueSelling","notificationChannel"],"additionalProperties":false},"backInStock":{"type":["null","object"],"description":"Back-in-stock configuration; null when this customer experience has none.","properties":{"enabled":{"type":"boolean","description":"Whether the feature is switched on for this customer experience. When false, assigned variants report status DISABLED."},"category":{"type":["null","string"],"enum":["BACK_IN_STOCK","NOTIFY_ME","WAITLIST",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"activatesWhen":{"type":["null","string"],"enum":["ALWAYS_AVAILABLE","WHEN_OUT_OF_STOCK","WHEN_SHOPIFY_INVENTORY_AVAILABLE",null],"description":"Inventory condition that makes the feature go live: ALWAYS_AVAILABLE, WHEN_OUT_OF_STOCK, or WHEN_SHOPIFY_INVENTORY_AVAILABLE. Today only preorder acts on it; back in stock, coming soon and low stock currently go live whenever inventory reaches 0."},"storeLevelEnabled":{"type":"boolean","description":"Whether the feature also applies store-wide, not only to assigned variants"},"quantityThreshold":{"type":["null","integer"],"description":"Inventory level a restock must reach before subscribers are notified. Does not affect the feature status, which goes live whenever inventory is 0."},"notificationChannel":{"type":["null","string"],"enum":["BUILT_IN","SHOPIFY_FLOW","KLAVIYO",null],"description":"Where email alerts are delivered. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"smsNotificationChannel":{"type":["null","string"],"enum":["BUILT_IN","SHOPIFY_FLOW","KLAVIYO",null],"description":"Where SMS alerts are delivered; null when SMS is not configured"}},"required":["enabled","category","activatesWhen","storeLevelEnabled","quantityThreshold","notificationChannel","smsNotificationChannel"],"additionalProperties":false},"comingSoon":{"type":["null","object"],"description":"Coming-soon configuration; null when this customer experience has none.","properties":{"enabled":{"type":"boolean","description":"Whether the feature is switched on for this customer experience. When false, assigned variants report status DISABLED."},"category":{"type":["null","string"],"enum":["COMING_SOON",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"activatesWhen":{"type":["null","string"],"enum":["ALWAYS_AVAILABLE","WHEN_OUT_OF_STOCK","WHEN_SHOPIFY_INVENTORY_AVAILABLE",null],"description":"Inventory condition that makes the feature go live: ALWAYS_AVAILABLE, WHEN_OUT_OF_STOCK, or WHEN_SHOPIFY_INVENTORY_AVAILABLE. Today only preorder acts on it; back in stock, coming soon and low stock currently go live whenever inventory reaches 0."}},"required":["enabled","category","activatesWhen"],"additionalProperties":false},"lowStock":{"type":["null","object"],"description":"Low-stock configuration; null when this customer experience has none.","properties":{"enabled":{"type":"boolean","description":"Whether the feature is switched on for this customer experience. When false, assigned variants report status DISABLED."},"category":{"type":["null","string"],"enum":["LOW_STOCK",null],"description":"Flavor of the feature as configured on the customer experience. Preorder: PREORDER (not yet released), BACKORDER (temporarily out of stock, ships when restocked), MADE_TO_ORDER (produced after purchase). Back in stock: BACK_IN_STOCK (generic), NOTIFY_ME (single restock alert), WAITLIST (queued restock). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"activatesWhen":{"type":["null","string"],"enum":["ALWAYS_AVAILABLE","WHEN_OUT_OF_STOCK","WHEN_SHOPIFY_INVENTORY_AVAILABLE",null],"description":"Inventory condition that makes the feature go live: ALWAYS_AVAILABLE, WHEN_OUT_OF_STOCK, or WHEN_SHOPIFY_INVENTORY_AVAILABLE. Today only preorder acts on it; back in stock, coming soon and low stock currently go live whenever inventory reaches 0."},"storeLevelEnabled":{"type":"boolean","description":"Whether the feature also applies store-wide, not only to assigned variants"},"quantityThreshold":{"type":["null","integer"],"description":"Inventory level at or below which the low-stock message shows"},"notificationChannel":{"type":["null","string"],"enum":["BUILT_IN","SHOPIFY_FLOW","KLAVIYO",null],"description":"Where low-stock notifications are delivered. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."}},"required":["enabled","category","activatesWhen","storeLevelEnabled","quantityThreshold","notificationChannel"],"additionalProperties":false}},"required":["preorder","backInStock","comingSoon","lowStock"],"additionalProperties":false}},"required":["id","title","description","icon","automationTag","planTier","assignedVariants","markets","inventoryLocations","createdAt","updatedAt","features"],"additionalProperties":false},"ProductDiagnosis":{"type":"object","description":"Why a product's Timesact features are or are not showing on the storefront. Findings are ordered blocking → warning → info.","properties":{"product":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Shopify product id"},"title":{"type":["null","string"]}},"required":["id","title"],"additionalProperties":false},"healthy":{"type":"boolean","description":"True when no blocking finding was returned"},"counts":{"type":"object","properties":{"blocking":{"type":"integer","minimum":0},"warning":{"type":"integer","minimum":0},"info":{"type":"integer","minimum":0}},"required":["blocking","warning","info"],"additionalProperties":false},"findings":{"type":"array","items":{"type":"object","description":"One diagnostic finding. Branch on `code`; `title` and `detail` are prose and may be reworded.","properties":{"code":{"type":"string","description":"Stable finding code (e.g. APP_EMBED_DISABLED, PREORDER_BLOCKED_BY_INVENTORY_POLICY). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"severity":{"type":"string","enum":["blocking","warning","info"],"description":"blocking: the feature cannot work until this is fixed. warning: it works but not as the merchant probably intends. info: expected state, explained."},"title":{"type":"string","description":"One-line summary"},"detail":{"type":"string","description":"What was found, in plain language. Taken from the first affected variant, so it is representative rather than exhaustive when `affectedVariants.count` is greater than one."},"fix":{"type":["null","string"],"description":"What to change to resolve it; null when nothing is wrong"},"feature":{"type":["null","string"],"enum":["preorder","backInStock","comingSoon","lowStock",null],"description":"Feature the finding is about; null when it is store- or product-wide"},"customerExperienceId":{"type":["null","string"],"pattern":"^\\d+$","description":"Customer experience the finding comes from; null when it is not specific to one. A variant can be assigned to several, so the same code can appear once per experience."},"affectedVariants":{"type":"object","description":"Variants this finding applies to. One finding is reported per code, feature and customer experience rather than per variant, so a product with many variants returns a readable list instead of hundreds of identical entries.","properties":{"count":{"type":"integer","minimum":0,"description":"How many variants are affected; 0 for a store- or product-wide finding"},"sample":{"type":"array","items":{"type":"string"},"description":"Up to 20 affected Shopify variant ids. Not exhaustive when `count` is larger."},"representativeVariantId":{"type":["null","string"],"description":"The variant `detail` was computed from. Null for a store- or product-wide finding."}},"required":["count","sample","representativeVariantId"],"additionalProperties":false}},"required":["code","severity","title","detail","fix","feature","customerExperienceId","affectedVariants"],"additionalProperties":false}},"notChecked":{"type":"array","description":"Checks this diagnosis does not perform, so a clean result is not mistaken for a complete one.","items":{"type":"object","properties":{"code":{"type":"string"},"reason":{"type":"string"}},"required":["code","reason"],"additionalProperties":false}}},"required":["product","healthy","counts","findings","notChecked"],"additionalProperties":false},"Operation":{"type":"object","description":"The Shopify-side half of a write. A write commits its rows and answers 202 with one operation for the whole request; the operation reports how far Shopify has taken the change. Not terminal until `status` leaves PROCESSING.","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Operation id, as returned by the write that started it"},"status":{"type":"string","enum":["PROCESSING","SUCCESS","SUCCESS_WITH_ERRORS","FAILED"],"description":"PROCESSING: the Shopify-side configuration is still being applied. SUCCESS: every variant was configured in Shopify. SUCCESS_WITH_ERRORS: some variants were configured and some were not; `failures` says which. FAILED: nothing was configured. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"action":{"type":"string","enum":["ADD","REMOVE","REPLACE","RESYNC"],"description":"What the write asked for: ADD (put experiences on the targets), REMOVE (take them off), REPLACE (the targets end with exactly these), RESYNC (push the current state to Shopify again). This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"origin":{"type":"string","enum":["api","mcp"],"description":"Where the write came from: `api` for the REST API, `mcp` for the MCP tools. This enum is open: new values may be added without a version bump, so treat unknown values as \"other\"."},"variants":{"type":"object","description":"Progress in variants. The operation is finished when done, failed and replaced add up to total and nothing is left to import.","properties":{"total":{"type":"integer","minimum":0,"description":"Variants this operation queued for Shopify"},"done":{"type":"integer","minimum":0,"description":"Variants configured in Shopify so far"},"failed":{"type":"integer","minimum":0,"description":"Variants Shopify refused"},"replaced":{"type":"integer","minimum":0,"description":"Variants a later write changed before this one reached them; that write's operation reports on them"},"retrying":{"type":"integer","minimum":0,"description":"Variants not done yet whose last try did not go through; they are tried again on their own. Read `sync.error` on the variants (`GET /variants?sync=PENDING`) for the reason."}},"required":["total","done","failed","replaced","retrying"],"additionalProperties":false},"imports":{"type":"object","description":"Targets Timesact did not hold and is fetching from Shopify. Their variants are added to `variants.total` as each import lands.","properties":{"pending":{"type":"integer","minimum":0,"description":"Imports not finished yet"}},"required":["pending"],"additionalProperties":false},"failures":{"type":"array","description":"What failed, capped at 50 — see `failuresTruncated` for the rest. Each entry names the variant, or the product or SKU that could not be imported.","items":{"type":"object","properties":{"variantId":{"type":"string","pattern":"^\\d+$","description":"Shopify variant id"},"productId":{"type":"string","pattern":"^\\d+$","description":"Shopify product id that could not be imported"},"sku":{"type":"string","description":"SKU that could not be imported"},"code":{"type":"string","description":"Stable code: SHOPIFY_REQUEST_FAILED (Shopify refused it), SHOPIFY_UNAVAILABLE (Shopify kept throttling or dropping the request), EXPERIENCE_NOT_SYNCED (an assigned experience is not in Shopify yet), NOT_FOUND_ON_SHOPIFY (no such product, variant or SKU), INTERNAL_ERROR (Timesact failed on this variant; quote the operation id to support)."},"message":{"type":"string","description":"What went wrong"}},"required":["code","message"],"additionalProperties":false}},"failuresTruncated":{"type":"integer","minimum":0,"description":"Failures beyond the 50 listed"},"createdAt":{"type":"string","format":"date-time","description":"When the write was accepted"},"updatedAt":{"type":"string","format":"date-time","description":"When the operation last made progress"},"finishedAt":{"type":["null","string"],"format":"date-time","description":"When it reached a terminal status; null while PROCESSING"}},"required":["id","status","action","origin","variants","imports","failures","failuresTruncated","createdAt","updatedAt","finishedAt"],"additionalProperties":false},"AssignmentChangeSummary":{"type":"object","description":"What the write changed in Timesact, counted over the variants it already holds. Targets still to be imported are not counted until the import runs.","properties":{"variantsTargeted":{"type":"integer","minimum":0,"description":"Variants Timesact holds that the targets resolved to"},"variantsQueued":{"type":"integer","minimum":0,"description":"Variants queued for Shopify: those whose assignments changed, or every target on a resync"},"variantsLeaving":{"type":"integer","minimum":0,"description":"Variants left with no customer experience, which removes them from Timesact"},"assignmentsAdded":{"type":"integer","minimum":0,"description":"Assignments created"},"assignmentsUpdated":{"type":"integer","minimum":0,"description":"Assignments whose terms changed"},"assignmentsRemoved":{"type":"integer","minimum":0,"description":"Assignments deleted"},"targetsToImport":{"type":"integer","minimum":0,"description":"Products, variants or SKUs Timesact does not hold yet and will fetch from Shopify. Add and replace only."},"targetsSkipped":{"type":"integer","minimum":0,"description":"Products, variants or SKUs Timesact does not hold, so there was nothing to remove or resync"}},"required":["variantsTargeted","variantsQueued","variantsLeaving","assignmentsAdded","assignmentsUpdated","assignmentsRemoved","targetsToImport","targetsSkipped"],"additionalProperties":false},"AssignmentWriteResponse":{"type":"object","description":"The rows are committed; the Shopify-side configuration is applied afterwards by a worker. `operation` reports that work — read it again with `GET /operations/{operationId}`.","properties":{"operation":{"$ref":"#/components/schemas/Operation"},"summary":{"anyOf":[{"$ref":"#/components/schemas/AssignmentChangeSummary"},{"type":"null"}],"description":"Null when the call repeated an Idempotency-Key and returned the original operation; `variants` is empty then too."},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantCompact"},"maxItems":250,"description":"The target variants as they now stand, when the call touched 250 or fewer. Empty above that: read them through the variant endpoints."},"customerExperiences":{"$ref":"#/components/schemas/CustomerExperienceRefMap"}},"required":["operation","summary","variants","customerExperiences"],"additionalProperties":false},"AssignmentPreview":{"type":"object","description":"What the write would change. Nothing was written.","properties":{"dryRun":{"type":"boolean","enum":[true]},"action":{"type":"string","enum":["ADD","REMOVE","REPLACE","RESYNC"]},"summary":{"$ref":"#/components/schemas/AssignmentChangeSummary"}},"required":["dryRun","action","summary"],"additionalProperties":false},"PreorderSummary":{"type":"object","description":"Preorder totals for a window. Revenue is summed from preorder line items, not order totals, because an order can mix preorder and in-stock items.","properties":{"period":{"type":"object","description":"The window these numbers describe, after the plan limit was applied. Always reflects what was actually measured, not what was asked for.","properties":{"period":{"type":["null","string"],"enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE",null],"description":"The preset used, or null when `from`/`to` were given explicitly"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day included, in the shop timezone"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day included, in the shop timezone"},"granularity":{"type":"string","enum":["DAY","WEEK","MONTH"]},"timezone":{"type":"string","description":"The shop timezone every boundary was resolved in"},"clamped":{"type":"boolean","description":"True when the plan limited the range; `from` is then later than requested"},"requestedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present only when clamped: the first day originally asked for"},"maxDays":{"type":"integer","description":"Present only when clamped: the plan's maximum range in days"}},"required":["period","from","to","granularity","timezone","clamped"],"additionalProperties":false},"totals":{"type":"object","properties":{"orders":{"type":"integer","minimum":0,"description":"Orders containing at least one preorder item"},"unitsSold":{"type":"integer","minimum":0,"description":"Preorder units sold"},"revenue":{"type":"number","description":"Preorder revenue in the shop currency"},"averageOrderValue":{"type":["null","number"],"description":"Revenue divided by orders; null when there are no orders"},"currency":{"type":["null","string"],"description":"Shop currency these amounts are in"}},"required":["orders","unitsSold","revenue","averageOrderValue","currency"],"additionalProperties":false}},"required":["period","totals"],"additionalProperties":false},"PreorderRevenueReport":{"type":"object","description":"Preorder revenue and units over time, with the totals for the same window.","properties":{"period":{"type":"object","description":"The window these numbers describe, after the plan limit was applied. Always reflects what was actually measured, not what was asked for.","properties":{"period":{"type":["null","string"],"enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE",null],"description":"The preset used, or null when `from`/`to` were given explicitly"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day included, in the shop timezone"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day included, in the shop timezone"},"granularity":{"type":"string","enum":["DAY","WEEK","MONTH"]},"timezone":{"type":"string","description":"The shop timezone every boundary was resolved in"},"clamped":{"type":"boolean","description":"True when the plan limited the range; `from` is then later than requested"},"requestedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present only when clamped: the first day originally asked for"},"maxDays":{"type":"integer","description":"Present only when clamped: the plan's maximum range in days"}},"required":["period","from","to","granularity","timezone","clamped"],"additionalProperties":false},"totals":{"type":"object","properties":{"orders":{"type":"integer","minimum":0,"description":"Orders containing at least one preorder item"},"unitsSold":{"type":"integer","minimum":0,"description":"Preorder units sold"},"revenue":{"type":"number","description":"Preorder revenue in the shop currency"},"averageOrderValue":{"type":["null","number"],"description":"Revenue divided by orders; null when there are no orders"},"currency":{"type":["null","string"],"description":"Shop currency these amounts are in"}},"required":["orders","unitsSold","revenue","averageOrderValue","currency"],"additionalProperties":false},"series":{"type":"array","description":"One entry per bucket, zero-filled: a bucket with no activity is a zero, never a gap. `bucket` is ISO — 2026-10-03 (DAY), 2026-W40 (WEEK), 2026-10 (MONTH) — and is formatted in the shop timezone. With WEEK or MONTH the first and last buckets can be partial, and the first label can therefore fall before `period.from`; only rows inside the requested window are counted, so the series still sums to `totals`.","items":{"type":"object","properties":{"bucket":{"type":"string"},"orders":{"type":"integer","minimum":0,"description":"Orders in this bucket"},"unitsSold":{"type":"integer","minimum":0,"description":"Units in this bucket"},"revenue":{"type":"number","description":"Revenue in this bucket"}},"required":["bucket","orders","unitsSold","revenue"],"additionalProperties":false}}},"required":["period","totals","series"],"additionalProperties":false},"PreorderTopProducts":{"type":"object","description":"Products ranked by preorder units sold in the window.","properties":{"period":{"type":"object","description":"The window these numbers describe, after the plan limit was applied. Always reflects what was actually measured, not what was asked for.","properties":{"period":{"type":["null","string"],"enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE",null],"description":"The preset used, or null when `from`/`to` were given explicitly"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day included, in the shop timezone"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day included, in the shop timezone"},"granularity":{"type":"string","enum":["DAY","WEEK","MONTH"]},"timezone":{"type":"string","description":"The shop timezone every boundary was resolved in"},"clamped":{"type":"boolean","description":"True when the plan limited the range; `from` is then later than requested"},"requestedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present only when clamped: the first day originally asked for"},"maxDays":{"type":"integer","description":"Present only when clamped: the plan's maximum range in days"}},"required":["period","from","to","granularity","timezone","clamped"],"additionalProperties":false},"topProducts":{"type":"array","description":"Ranked best-first, at most `limit` entries (default 15, maximum 50). Grouped on the Shopify product id, so a renamed product stays one row and carries the most recent title.","items":{"type":"object","properties":{"productId":{"type":"string","pattern":"^\\d+$","description":"Shopify product id"},"title":{"type":["null","string"],"description":"Most recent title recorded for this product"},"unitsSold":{"type":"integer","minimum":0,"description":"Preorder units sold"},"revenue":{"type":"number","description":"Preorder revenue"},"orders":{"type":"integer","minimum":0,"description":"Orders containing this product"}},"required":["productId","title","unitsSold","revenue","orders"],"additionalProperties":false}}},"required":["period","topProducts"],"additionalProperties":false},"BackInStockSummary":{"type":"object","description":"Back-in-stock signups, sends, engagement and recovered revenue for a window.","properties":{"period":{"type":"object","description":"The window these numbers describe, after the plan limit was applied. Always reflects what was actually measured, not what was asked for.","properties":{"period":{"type":["null","string"],"enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE",null],"description":"The preset used, or null when `from`/`to` were given explicitly"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day included, in the shop timezone"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day included, in the shop timezone"},"granularity":{"type":"string","enum":["DAY","WEEK","MONTH"]},"timezone":{"type":"string","description":"The shop timezone every boundary was resolved in"},"clamped":{"type":"boolean","description":"True when the plan limited the range; `from` is then later than requested"},"requestedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present only when clamped: the first day originally asked for"},"maxDays":{"type":"integer","description":"Present only when clamped: the plan's maximum range in days"}},"required":["period","from","to","granularity","timezone","clamped"],"additionalProperties":false},"totals":{"type":"object","properties":{"subscribers":{"type":"integer","minimum":0,"description":"Signups created in this window"},"sent":{"type":"integer","minimum":0,"description":"Of those signups, how many have been notified. This counts the signup cohort, not notifications dispatched during the window: a signup made in-window and notified later counts here, and one made earlier but notified in-window does not."},"opened":{"type":"integer","minimum":0,"description":"Of those signups, how many opened their notification"},"clicked":{"type":"integer","minimum":0,"description":"Of those signups, how many clicked"},"sendRate":{"type":["null","number"],"minimum":0,"maximum":1,"description":"sent / subscribers; null when there are no subscribers"},"openRate":{"type":["null","number"],"minimum":0,"maximum":1,"description":"opened / sent; null when nothing was sent"},"clickRate":{"type":["null","number"],"minimum":0,"maximum":1,"description":"clicked / sent; null when nothing was sent"},"orders":{"type":"integer","minimum":0,"description":"Orders containing a back-in-stock item"},"unitsSold":{"type":"integer","minimum":0,"description":"Back-in-stock units sold"},"recoveredRevenue":{"type":"number","description":"Revenue from back-in-stock line items. Attribution is \"the order carried a line the app marked BACK_IN_STOCK\", not a time-window join from a signup to a later order."},"currency":{"type":["null","string"]}},"required":["subscribers","sent","opened","clicked","sendRate","openRate","clickRate","orders","unitsSold","recoveredRevenue","currency"],"additionalProperties":false}},"required":["period","totals"],"additionalProperties":false},"BackInStockSubscribersReport":{"type":"object","description":"Back-in-stock signups and engagement over time, with the totals for the same window.","properties":{"period":{"type":"object","description":"The window these numbers describe, after the plan limit was applied. Always reflects what was actually measured, not what was asked for.","properties":{"period":{"type":["null","string"],"enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE",null],"description":"The preset used, or null when `from`/`to` were given explicitly"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day included, in the shop timezone"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day included, in the shop timezone"},"granularity":{"type":"string","enum":["DAY","WEEK","MONTH"]},"timezone":{"type":"string","description":"The shop timezone every boundary was resolved in"},"clamped":{"type":"boolean","description":"True when the plan limited the range; `from` is then later than requested"},"requestedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present only when clamped: the first day originally asked for"},"maxDays":{"type":"integer","description":"Present only when clamped: the plan's maximum range in days"}},"required":["period","from","to","granularity","timezone","clamped"],"additionalProperties":false},"totals":{"type":"object","properties":{"subscribers":{"type":"integer","minimum":0,"description":"Signups created in this window"},"sent":{"type":"integer","minimum":0,"description":"Of those signups, how many have been notified. This counts the signup cohort, not notifications dispatched during the window: a signup made in-window and notified later counts here, and one made earlier but notified in-window does not."},"opened":{"type":"integer","minimum":0,"description":"Of those signups, how many opened their notification"},"clicked":{"type":"integer","minimum":0,"description":"Of those signups, how many clicked"},"sendRate":{"type":["null","number"],"minimum":0,"maximum":1,"description":"sent / subscribers; null when there are no subscribers"},"openRate":{"type":["null","number"],"minimum":0,"maximum":1,"description":"opened / sent; null when nothing was sent"},"clickRate":{"type":["null","number"],"minimum":0,"maximum":1,"description":"clicked / sent; null when nothing was sent"}},"required":["subscribers","sent","opened","clicked","sendRate","openRate","clickRate"],"additionalProperties":false},"series":{"type":"array","description":"One entry per bucket, zero-filled: a bucket with no activity is a zero, never a gap. `bucket` is ISO — 2026-10-03 (DAY), 2026-W40 (WEEK), 2026-10 (MONTH) — and is formatted in the shop timezone. With WEEK or MONTH the first and last buckets can be partial, and the first label can therefore fall before `period.from`; only rows inside the requested window are counted, so the series still sums to `totals`.","items":{"type":"object","properties":{"bucket":{"type":"string"},"subscribers":{"type":"integer","minimum":0,"description":"Signups in this bucket"},"sent":{"type":"integer","minimum":0,"description":"Sent in this bucket"},"opened":{"type":"integer","minimum":0,"description":"Opened in this bucket"},"clicked":{"type":"integer","minimum":0,"description":"Clicked in this bucket"}},"required":["bucket","subscribers","sent","opened","clicked"],"additionalProperties":false}}},"required":["period","totals","series"],"additionalProperties":false},"BackInStockTopProducts":{"type":"object","description":"Products ranked by how many people are waiting for them.","properties":{"period":{"type":"object","description":"The window these numbers describe, after the plan limit was applied. Always reflects what was actually measured, not what was asked for.","properties":{"period":{"type":["null","string"],"enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE",null],"description":"The preset used, or null when `from`/`to` were given explicitly"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day included, in the shop timezone"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day included, in the shop timezone"},"granularity":{"type":"string","enum":["DAY","WEEK","MONTH"]},"timezone":{"type":"string","description":"The shop timezone every boundary was resolved in"},"clamped":{"type":"boolean","description":"True when the plan limited the range; `from` is then later than requested"},"requestedFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Present only when clamped: the first day originally asked for"},"maxDays":{"type":"integer","description":"Present only when clamped: the plan's maximum range in days"}},"required":["period","from","to","granularity","timezone","clamped"],"additionalProperties":false},"topProducts":{"type":"array","description":"Ranked best-first, at most `limit` entries (default 15, maximum 50). Grouped on the Shopify product id, so a renamed product stays one row and carries the most recent title.","items":{"type":"object","properties":{"productId":{"type":"string","pattern":"^\\d+$","description":"Shopify product id"},"title":{"type":["null","string"],"description":"Most recent title recorded for this product"},"subscribers":{"type":"integer","minimum":0,"description":"People waiting"},"sent":{"type":"integer","minimum":0,"description":"Notifications sent for this product"}},"required":["productId","title","subscribers","sent"],"additionalProperties":false}}},"required":["period","topProducts"],"additionalProperties":false}}},"paths":{"/public/v1/shop":{"get":{"operationId":"getShop","summary":"Get shop overview","tags":["Shop"],"description":"Returns the connected store's identity, current Timesact plan, order usage for the billing cycle, and app status.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/Shop"}},"required":["data"],"additionalProperties":false}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/products":{"get":{"operationId":"searchProducts","summary":"Search products","tags":["Products"],"description":"Lists the products Timesact manages for this store, with per-feature variant counts by status. Filter by text, feature, feature status, category, or customer experience. Counts always describe the whole product, even when a filter narrowed which products are returned. Variants are not included — fetch the product, or page /products/{productId}/variants.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"search","required":false,"description":"Matches product title, variant title, or SKU (partial, case-insensitive)"},{"schema":{"type":"string","enum":["preorder","backInStock","comingSoon","lowStock"]},"in":"query","name":"feature","required":false,"description":"Only products with this feature assigned"},{"schema":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"in":"query","name":"status","required":false,"description":"Only products with a variant in this status for `feature`. Requires `feature`. The enum is the union across features; NO_STOCK applies to preorder only, and pairing it with another feature is a 400 naming the statuses that feature accepts."},{"schema":{"type":"string","enum":["PREORDER","BACKORDER","MADE_TO_ORDER","BACK_IN_STOCK","NOTIFY_ME","WAITLIST","COMING_SOON","LOW_STOCK"]},"in":"query","name":"category","required":false,"description":"Only products whose customer experience uses this category for `feature`. Requires `feature`. The enum is the union across features — preorder takes PREORDER, BACKORDER, MADE_TO_ORDER; back-in-stock takes BACK_IN_STOCK, NOTIFY_ME, WAITLIST; coming-soon takes COMING_SOON; low-stock takes LOW_STOCK. A mismatched pair is a 400 naming the valid values."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"customerExperienceId","required":false,"description":"Only products assigned to this customer experience"},{"schema":{"type":"boolean"},"in":"query","name":"includeTotal","required":false,"description":"Include `pagination.total`, the exact number of matching products. Off by default because it costs a second count over every match; `hasMore` is always present."},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's `nextCursor`. Omit for the first page."},{"schema":{"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Items per page (default 25, maximum 250). Cannot be changed once a cursor has been issued."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductSummary"}},"pagination":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/products/{productId}":{"get":{"operationId":"getProduct","summary":"Get a product","tags":["Products"],"description":"Returns one product with per-feature variant counts and the first page of its variants. A product can hold thousands of variants, so page the rest with /products/{productId}/variants; the same `feature` and `status` filters apply here. 404 when Timesact does not manage the product.","parameters":[{"schema":{"type":"string","enum":["preorder","backInStock","comingSoon","lowStock"]},"in":"query","name":"feature","required":false,"description":"Only variants with this feature assigned"},{"schema":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"in":"query","name":"status","required":false,"description":"Only variants in this status for `feature`. Requires `feature`. The enum is the union across features; NO_STOCK applies to preorder only, and pairing it with another feature is a 400 naming the statuses that feature accepts."},{"schema":{"type":"string","enum":["SYNCED","PENDING","FAILED"]},"in":"query","name":"sync","required":false,"description":"Only variants in this sync state. `FAILED` lists what Shopify refused; `PENDING` what is still on its way."},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's `nextCursor`. Omit for the first page."},{"schema":{"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Items per page (default 25, maximum 250). Cannot be changed once a cursor has been issued."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"productId","required":true,"description":"Shopify product id (the number in the Shopify admin URL)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/products/{productId}/diagnosis":{"get":{"operationId":"diagnoseProduct","summary":"Diagnose a product","tags":["Products"],"description":"Runs every Timesact-side check for \"why is this product's feature not showing?\" and returns ordered findings: blocking first, then warnings, then expected states. `notChecked` lists what this diagnosis cannot see, so a clean result is not mistaken for a complete one.","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"productId","required":true,"description":"Shopify product id (the number in the Shopify admin URL)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/ProductDiagnosis"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/products/{productId}/variants":{"get":{"operationId":"listProductVariants","summary":"List the variants of a product","tags":["Products"],"description":"Pages the variants of a product with the status and window of each Timesact feature. Filter by `feature` and `status` to get only the variants that matter — a filtered variant still carries every assignment it has. Fetch a variant on its own for the plain-language reason and the market/location scope. 404 when Timesact does not manage the product.","parameters":[{"schema":{"type":"string","enum":["preorder","backInStock","comingSoon","lowStock"]},"in":"query","name":"feature","required":false,"description":"Only variants with this feature assigned"},{"schema":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"in":"query","name":"status","required":false,"description":"Only variants in this status for `feature`. Requires `feature`. The enum is the union across features; NO_STOCK applies to preorder only, and pairing it with another feature is a 400 naming the statuses that feature accepts."},{"schema":{"type":"string","enum":["SYNCED","PENDING","FAILED"]},"in":"query","name":"sync","required":false,"description":"Only variants in this sync state. `FAILED` lists what Shopify refused; `PENDING` what is still on its way."},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's `nextCursor`. Omit for the first page."},{"schema":{"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Items per page (default 25, maximum 250). Cannot be changed once a cursor has been issued."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"productId","required":true,"description":"Shopify product id (the number in the Shopify admin URL)"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantCompact"}},"pagination":{"$ref":"#/components/schemas/PageInfo"},"customerExperiences":{"$ref":"#/components/schemas/CustomerExperienceRefMap"}},"required":["data","pagination","customerExperiences"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/products/{productId}/variants/{variantId}":{"get":{"operationId":"getProductVariant","summary":"Get a variant of a product","tags":["Products"],"description":"Returns one variant with the status of each Timesact feature and why. 404 when the variant is not managed or does not belong to the product.","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"productId","required":true,"description":"Shopify product id (the number in the Shopify admin URL)"},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"variantId","required":true,"description":"Shopify variant id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/Variant"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/variants/{variantId}":{"get":{"operationId":"getVariant","summary":"Get a variant","tags":["Products"],"description":"Returns one variant by Shopify variant id, with its product, the status of each Timesact feature, and why. Shopify variant ids are globally unique, so the product id is not required.","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"variantId","required":true,"description":"Shopify variant id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/Variant"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/variants":{"get":{"operationId":"listVariants","summary":"List variants across the store","tags":["Products"],"description":"Pages every variant Timesact manages, newest id last. Filter by `sku` (exact, case-sensitive), or by `feature` and `status` to answer \"which variants in my store have preorder active?\" — assignment is per variant, so this is the only place that question can be asked of the whole store. A filtered variant still carries every assignment it has. Fetch a variant on its own for the plain-language reason and the market/location scope.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"sku","required":false,"description":"Exact SKU, matched case-sensitively — SKUs are stored as Shopify supplies them. A SKU shared across products returns each variant."},{"schema":{"type":"string","enum":["preorder","backInStock","comingSoon","lowStock"]},"in":"query","name":"feature","required":false,"description":"Only variants with this feature assigned"},{"schema":{"type":"string","enum":["PROCESSING","PENDING","ACTIVE","NO_STOCK","DISABLED","PENDING_START_DATE","EXPIRED"]},"in":"query","name":"status","required":false,"description":"Only variants in this status for `feature`. Requires `feature`. The enum is the union across features; NO_STOCK applies to preorder only, and pairing it with another feature is a 400 naming the statuses that feature accepts."},{"schema":{"type":"string","enum":["SYNCED","PENDING","FAILED"]},"in":"query","name":"sync","required":false,"description":"Only variants in this sync state. `FAILED` lists what Shopify refused; `PENDING` what is still on its way."},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's `nextCursor`. Omit for the first page."},{"schema":{"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Items per page (default 25, maximum 250). Cannot be changed once a cursor has been issued."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantCompact"}},"pagination":{"$ref":"#/components/schemas/PageInfo"},"customerExperiences":{"$ref":"#/components/schemas/CustomerExperienceRefMap"}},"required":["data","pagination","customerExperiences"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/customer-experiences":{"get":{"operationId":"listCustomerExperiences","summary":"List customer experiences","tags":["Customer experiences"],"description":"Lists the customer experiences configured for this store, each reporting which features are configured and switched on. Fetch one by id for its full settings.","parameters":[{"schema":{"type":"boolean"},"in":"query","name":"includeTotal","required":false,"description":"Include `pagination.total`, the exact number of matching customer experiences. Off by default because counting costs a second scan."},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"search","required":false,"description":"Matches the title (partial, case-insensitive)"},{"schema":{"type":"string","enum":["preorder","backInStock","comingSoon","lowStock"]},"in":"query","name":"feature","required":false,"description":"Only customer experiences with this feature switched on"},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's `nextCursor`. Omit for the first page."},{"schema":{"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Items per page (default 25, maximum 250). Cannot be changed once a cursor has been issued."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerExperienceSummary"}},"pagination":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/customer-experiences/{customerExperienceId}":{"get":{"operationId":"getCustomerExperience","summary":"Get a customer experience","tags":["Customer experiences"],"description":"Returns one customer experience with the full configuration of every feature it carries — preorder shipping, payment and discount terms, back-in-stock, coming-soon and low-stock settings.","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"customerExperienceId","required":true,"description":"Timesact customer experience id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/CustomerExperience"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/customer-experiences/{customerExperienceId}/variants":{"get":{"operationId":"listCustomerExperienceVariants","summary":"List the variants assigned to a customer experience","tags":["Customer experiences"],"description":"Returns the variants assigned to this customer experience, most recently assigned first. Each variant carries every feature assignment it has, not only the one from this customer experience. Fetch a variant on its own for the plain-language reason and the market/location scope.","parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's `nextCursor`. Omit for the first page."},{"schema":{"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Items per page (default 25, maximum 250). Cannot be changed once a cursor has been issued."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"customerExperienceId","required":true,"description":"Timesact customer experience id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantCompact"}},"pagination":{"$ref":"#/components/schemas/PageInfo"},"customerExperiences":{"$ref":"#/components/schemas/CustomerExperienceRefMap"}},"required":["data","pagination","customerExperiences"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/analytics/preorder/summary":{"get":{"operationId":"getPreorderSummary","summary":"Preorder totals","tags":["Analytics"],"description":"Orders, units sold, revenue and average order value for a window. Filter to one product with `productId`, or loosely with `productTitle`, which matches the title recorded at the time — so a renamed product may appear under either name. Windows resolve in the shop timezone, so \"last 7 days\" means seven of the merchant's days. Pass `period` for a relative window or `from`/`to` for exact dates — not both. `period.clamped` tells you when the plan limited the range.","parameters":[{"schema":{"type":"string","enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE"]},"in":"query","name":"period","required":false,"description":"Relative window, resolved in the shop timezone (default LAST_30_DAYS). Cannot be combined with `from`/`to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false,"description":"First day to include (YYYY-MM-DD), in the shop timezone. Requires `to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false,"description":"Last day to include (YYYY-MM-DD), inclusive, in the shop timezone. Requires `from`."},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH"]},"in":"query","name":"granularity","required":false,"description":"Bucket width for `series`. Defaults to DAY up to 31 days, WEEK up to 120, MONTH beyond."},{"schema":{"type":"array","items":{"type":"string","enum":["trend","topProducts"]}},"in":"query","name":"include","required":false,"description":"Optional blocks to compute. Totals are always returned; each extra block is another aggregate, so ask only for what you will read."},{"schema":{"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Entries in `topProducts` (default 15). Ignored unless `include` asks for it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"productId","required":false,"description":"Only this Shopify product. Exact, and unaffected by renames."},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"productTitle","required":false,"description":"Partial, case-insensitive match on the product title as recorded at the time, and on nothing else — unlike `search` on /products, this does not match SKUs. Titles are a snapshot, so a renamed product may appear under both names; prefer `productId` when you have it."},{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"customerExperience","required":false,"description":"Only orders attributed to this customer experience, matched on the name stored at order time. The orders table records the name, not the id, so a renamed experience splits its history."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/PreorderSummary"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/analytics/preorder/revenue":{"get":{"operationId":"getPreorderRevenue","summary":"Preorder revenue over time","tags":["Analytics"],"description":"Preorder revenue and units bucketed by day, week or month, plus the totals for the same window. Buckets are zero-filled. Filter to one product with `productId`, or loosely with `productTitle`, which matches the title recorded at the time — so a renamed product may appear under either name. Windows resolve in the shop timezone, so \"last 7 days\" means seven of the merchant's days. Pass `period` for a relative window or `from`/`to` for exact dates — not both. `period.clamped` tells you when the plan limited the range.","parameters":[{"schema":{"type":"string","enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE"]},"in":"query","name":"period","required":false,"description":"Relative window, resolved in the shop timezone (default LAST_30_DAYS). Cannot be combined with `from`/`to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false,"description":"First day to include (YYYY-MM-DD), in the shop timezone. Requires `to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false,"description":"Last day to include (YYYY-MM-DD), inclusive, in the shop timezone. Requires `from`."},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH"]},"in":"query","name":"granularity","required":false,"description":"Bucket width for `series`. Defaults to DAY up to 31 days, WEEK up to 120, MONTH beyond."},{"schema":{"type":"array","items":{"type":"string","enum":["trend","topProducts"]}},"in":"query","name":"include","required":false,"description":"Optional blocks to compute. Totals are always returned; each extra block is another aggregate, so ask only for what you will read."},{"schema":{"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Entries in `topProducts` (default 15). Ignored unless `include` asks for it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"productId","required":false,"description":"Only this Shopify product. Exact, and unaffected by renames."},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"productTitle","required":false,"description":"Partial, case-insensitive match on the product title as recorded at the time, and on nothing else — unlike `search` on /products, this does not match SKUs. Titles are a snapshot, so a renamed product may appear under both names; prefer `productId` when you have it."},{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"customerExperience","required":false,"description":"Only orders attributed to this customer experience, matched on the name stored at order time. The orders table records the name, not the id, so a renamed experience splits its history."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/PreorderRevenueReport"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/analytics/preorder/top-products":{"get":{"operationId":"getPreorderTopProducts","summary":"Top products by preorder units","tags":["Analytics"],"description":"Products ranked by preorder units sold. Grouped on the Shopify product id, so a renamed product stays one row. Filter to one product with `productId`, or loosely with `productTitle`, which matches the title recorded at the time — so a renamed product may appear under either name. Windows resolve in the shop timezone, so \"last 7 days\" means seven of the merchant's days. Pass `period` for a relative window or `from`/`to` for exact dates — not both. `period.clamped` tells you when the plan limited the range.","parameters":[{"schema":{"type":"string","enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE"]},"in":"query","name":"period","required":false,"description":"Relative window, resolved in the shop timezone (default LAST_30_DAYS). Cannot be combined with `from`/`to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false,"description":"First day to include (YYYY-MM-DD), in the shop timezone. Requires `to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false,"description":"Last day to include (YYYY-MM-DD), inclusive, in the shop timezone. Requires `from`."},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH"]},"in":"query","name":"granularity","required":false,"description":"Bucket width for `series`. Defaults to DAY up to 31 days, WEEK up to 120, MONTH beyond."},{"schema":{"type":"array","items":{"type":"string","enum":["trend","topProducts"]}},"in":"query","name":"include","required":false,"description":"Optional blocks to compute. Totals are always returned; each extra block is another aggregate, so ask only for what you will read."},{"schema":{"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Entries in `topProducts` (default 15). Ignored unless `include` asks for it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"productId","required":false,"description":"Only this Shopify product. Exact, and unaffected by renames."},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"productTitle","required":false,"description":"Partial, case-insensitive match on the product title as recorded at the time, and on nothing else — unlike `search` on /products, this does not match SKUs. Titles are a snapshot, so a renamed product may appear under both names; prefer `productId` when you have it."},{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"query","name":"customerExperience","required":false,"description":"Only orders attributed to this customer experience, matched on the name stored at order time. The orders table records the name, not the id, so a renamed experience splits its history."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/PreorderTopProducts"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/analytics/back-in-stock/summary":{"get":{"operationId":"getBackInStockSummary","summary":"Back-in-stock totals","tags":["Analytics"],"description":"Signups, notifications sent, engagement rates and the revenue from orders carrying a back-in-stock item. Counts describe the signups created in the window and what later became of them. Filter to one product with `productId`, or loosely with `productTitle`, which matches the title recorded at the time — so a renamed product may appear under either name. Windows resolve in the shop timezone, so \"last 7 days\" means seven of the merchant's days. Pass `period` for a relative window or `from`/`to` for exact dates — not both. `period.clamped` tells you when the plan limited the range.","parameters":[{"schema":{"type":"string","enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE"]},"in":"query","name":"period","required":false,"description":"Relative window, resolved in the shop timezone (default LAST_30_DAYS). Cannot be combined with `from`/`to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false,"description":"First day to include (YYYY-MM-DD), in the shop timezone. Requires `to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false,"description":"Last day to include (YYYY-MM-DD), inclusive, in the shop timezone. Requires `from`."},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH"]},"in":"query","name":"granularity","required":false,"description":"Bucket width for `series`. Defaults to DAY up to 31 days, WEEK up to 120, MONTH beyond."},{"schema":{"type":"array","items":{"type":"string","enum":["trend","topProducts","revenue"]}},"in":"query","name":"include","required":false,"description":"Optional blocks to compute. Totals are always returned; each extra block is another aggregate, so ask only for what you will read."},{"schema":{"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Entries in `topProducts` (default 15). Ignored unless `include` asks for it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"productId","required":false,"description":"Only this Shopify product. Exact, and unaffected by renames."},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"productTitle","required":false,"description":"Partial, case-insensitive match on the product title as recorded at the time, and on nothing else — unlike `search` on /products, this does not match SKUs. Titles are a snapshot, so a renamed product may appear under both names; prefer `productId` when you have it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"customerExperienceId","required":false,"description":"Only signups from this customer experience. An id the store does not have is a 404."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/BackInStockSummary"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/analytics/back-in-stock/subscribers":{"get":{"operationId":"getBackInStockSubscribers","summary":"Back-in-stock signups over time","tags":["Analytics"],"description":"Signups and their engagement bucketed by day, week or month, plus the totals for the same window. Counts only, never subscriber identities. Filter to one product with `productId`, or loosely with `productTitle`, which matches the title recorded at the time — so a renamed product may appear under either name. Windows resolve in the shop timezone, so \"last 7 days\" means seven of the merchant's days. Pass `period` for a relative window or `from`/`to` for exact dates — not both. `period.clamped` tells you when the plan limited the range.","parameters":[{"schema":{"type":"string","enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE"]},"in":"query","name":"period","required":false,"description":"Relative window, resolved in the shop timezone (default LAST_30_DAYS). Cannot be combined with `from`/`to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false,"description":"First day to include (YYYY-MM-DD), in the shop timezone. Requires `to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false,"description":"Last day to include (YYYY-MM-DD), inclusive, in the shop timezone. Requires `from`."},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH"]},"in":"query","name":"granularity","required":false,"description":"Bucket width for `series`. Defaults to DAY up to 31 days, WEEK up to 120, MONTH beyond."},{"schema":{"type":"array","items":{"type":"string","enum":["trend","topProducts","revenue"]}},"in":"query","name":"include","required":false,"description":"Optional blocks to compute. Totals are always returned; each extra block is another aggregate, so ask only for what you will read."},{"schema":{"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Entries in `topProducts` (default 15). Ignored unless `include` asks for it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"productId","required":false,"description":"Only this Shopify product. Exact, and unaffected by renames."},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"productTitle","required":false,"description":"Partial, case-insensitive match on the product title as recorded at the time, and on nothing else — unlike `search` on /products, this does not match SKUs. Titles are a snapshot, so a renamed product may appear under both names; prefer `productId` when you have it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"customerExperienceId","required":false,"description":"Only signups from this customer experience. An id the store does not have is a 404."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/BackInStockSubscribersReport"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/analytics/back-in-stock/top-products":{"get":{"operationId":"getBackInStockTopProducts","summary":"Products most waited for","tags":["Analytics"],"description":"Products ranked by how many people are waiting for them. Filter to one product with `productId`, or loosely with `productTitle`, which matches the title recorded at the time — so a renamed product may appear under either name. Windows resolve in the shop timezone, so \"last 7 days\" means seven of the merchant's days. Pass `period` for a relative window or `from`/`to` for exact dates — not both. `period.clamped` tells you when the plan limited the range.","parameters":[{"schema":{"type":"string","enum":["TODAY","YESTERDAY","LAST_7_DAYS","LAST_30_DAYS","LAST_90_DAYS","MONTH_TO_DATE","QUARTER_TO_DATE","YEAR_TO_DATE"]},"in":"query","name":"period","required":false,"description":"Relative window, resolved in the shop timezone (default LAST_30_DAYS). Cannot be combined with `from`/`to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"from","required":false,"description":"First day to include (YYYY-MM-DD), in the shop timezone. Requires `to`."},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"in":"query","name":"to","required":false,"description":"Last day to include (YYYY-MM-DD), inclusive, in the shop timezone. Requires `from`."},{"schema":{"type":"string","enum":["DAY","WEEK","MONTH"]},"in":"query","name":"granularity","required":false,"description":"Bucket width for `series`. Defaults to DAY up to 31 days, WEEK up to 120, MONTH beyond."},{"schema":{"type":"array","items":{"type":"string","enum":["trend","topProducts","revenue"]}},"in":"query","name":"include","required":false,"description":"Optional blocks to compute. Totals are always returned; each extra block is another aggregate, so ask only for what you will read."},{"schema":{"type":"integer","minimum":1,"maximum":50},"in":"query","name":"limit","required":false,"description":"Entries in `topProducts` (default 15). Ignored unless `include` asks for it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"productId","required":false,"description":"Only this Shopify product. Exact, and unaffected by renames."},{"schema":{"type":"string","minLength":1,"maxLength":200},"in":"query","name":"productTitle","required":false,"description":"Partial, case-insensitive match on the product title as recorded at the time, and on nothing else — unlike `search` on /products, this does not match SKUs. Titles are a snapshot, so a renamed product may appear under both names; prefer `productId` when you have it."},{"schema":{"type":"string","pattern":"^\\d+$"},"in":"query","name":"customerExperienceId","required":false,"description":"Only signups from this customer experience. An id the store does not have is a 404."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/BackInStockTopProducts"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/assignments/add":{"post":{"operationId":"addAssignments","summary":"Put customer experiences on variants","tags":["Assignments"],"description":"Adds the listed customer experiences to every target variant and keeps whatever the variant already has. An experience the variant already carries is updated with the terms given. Name what the write applies to in `targets`: whole products, a list of variants, or SKUs. A product, variant or SKU Timesact does not hold yet is fetched from Shopify by the worker first, so it never has to be added separately; the operation reports any that Shopify does not have. Answers 202: Timesact's own rows are committed before this responds, and Shopify is updated afterwards by a worker. `operation` reports that work for the whole request; poll `GET /operations/{operationId}` until its status leaves PROCESSING. Each variant also reports its own `sync` state on the variant endpoints. Pass `dryRun: true` to see what would change without writing; that answers 200. Safe to repeat: sending the same request again changes nothing.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":"object","description":"What the write applies to. Exactly one of `productIds`, `variantIds` or `skus`. On add and replace, a product, variant or SKU Timesact does not hold yet is fetched from Shopify first; on remove and resync it is skipped.","properties":{"productIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":50,"uniqueItems":true,"description":"Shopify product ids (max 50). Every variant of each product."},"variantIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"Shopify variant ids (max 2048), from any products. Just these variants."},"skus":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"SKUs (max 2048), matched exactly and case-sensitively. Every variant that carries one of them."}},"minProperties":1,"maxProperties":1,"additionalProperties":false},"customerExperiences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Customer experience id"},"startsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}([T ].*)?$","description":"When the assignment starts applying. A calendar date (YYYY-MM-DD) is read as midnight in the shop timezone. Left out: an existing assignment keeps its start, a new one starts now."},"endsAt":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}([T ].*)?$","description":"When it stops applying. Left out: an existing assignment keeps its end, a new one is open-ended. Null clears it."},"unitsLimit":{"type":["integer","null"],"minimum":1,"description":"Maximum preorder units under this assignment. Left out: an existing assignment keeps its limit, a new one is unlimited. Null clears it."}},"required":["id"],"additionalProperties":false},"minItems":1,"maxItems":20,"description":"The customer experiences to put on every target variant. Experiences a variant already has are kept; one listed here that it already has is updated with the terms given."},"dryRun":{"type":"boolean","description":"Validate and report what would change, without writing anything. Answers 200."}},"required":["targets","customerExperiences"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"Idempotency-Key","required":false,"description":"Optional. Retry with the same key and the same body to get the original operation back instead of starting a new one; the same key with a different body is rejected with 409."}],"responses":{"200":{"description":"Dry run: what would change","content":{"application/json":{"schema":{"description":"Dry run: what would change","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentPreview"}},"required":["data"],"additionalProperties":false}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"description":"Accepted","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentWriteResponse"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"402":{"description":"Feature requires a higher plan (code `plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Feature requires a higher plan (code `plan_required`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"409":{"description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/assignments/remove":{"post":{"operationId":"removeAssignments","summary":"Take customer experiences off variants","tags":["Assignments"],"description":"Removes the customer experiences named in `customerExperienceIds` from every target variant and keeps the others. With `all: true` it removes every experience, which takes the variant out of Timesact, and the product with it when none of its variants remain. Name what the write applies to in `targets`: whole products, a list of variants, or SKUs. A target Timesact does not hold is skipped and counted in `summary.targetsSkipped`. Answers 202: Timesact's own rows are committed before this responds, and Shopify is updated afterwards by a worker. `operation` reports that work for the whole request; poll `GET /operations/{operationId}` until its status leaves PROCESSING. Each variant also reports its own `sync` state on the variant endpoints. Pass `dryRun: true` to see what would change without writing; that answers 200. Safe to repeat: sending the same request again changes nothing.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":"object","description":"What the write applies to. Exactly one of `productIds`, `variantIds` or `skus`. On add and replace, a product, variant or SKU Timesact does not hold yet is fetched from Shopify first; on remove and resync it is skipped.","properties":{"productIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":50,"uniqueItems":true,"description":"Shopify product ids (max 50). Every variant of each product."},"variantIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"Shopify variant ids (max 2048), from any products. Just these variants."},"skus":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"SKUs (max 2048), matched exactly and case-sensitively. Every variant that carries one of them."}},"minProperties":1,"maxProperties":1,"additionalProperties":false},"customerExperienceIds":{"type":"array","items":{"type":"string","pattern":"^\\d+$"},"minItems":1,"maxItems":20,"uniqueItems":true,"description":"The customer experiences to take off every target variant. Other experiences on those variants are kept. Give this or `all`."},"all":{"type":"boolean","enum":[true],"description":"Take every customer experience off the target variants, which removes them from Timesact. Give this or `customerExperienceIds`."},"dryRun":{"type":"boolean","description":"Validate and report what would change, without writing anything. Answers 200."}},"required":["targets"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"Idempotency-Key","required":false,"description":"Optional. Retry with the same key and the same body to get the original operation back instead of starting a new one; the same key with a different body is rejected with 409."}],"responses":{"200":{"description":"Dry run: what would change","content":{"application/json":{"schema":{"description":"Dry run: what would change","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentPreview"}},"required":["data"],"additionalProperties":false}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"description":"Accepted","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentWriteResponse"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"402":{"description":"Feature requires a higher plan (code `plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Feature requires a higher plan (code `plan_required`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"409":{"description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/assignments/replace":{"post":{"operationId":"replaceAssignments","summary":"Set exactly which customer experiences variants have","tags":["Assignments"],"description":"Every target variant ends with exactly the listed customer experiences: anything else it has is removed. Use `/assignments/add` to add without removing. Name what the write applies to in `targets`: whole products, a list of variants, or SKUs. A product, variant or SKU Timesact does not hold yet is fetched from Shopify by the worker first, so it never has to be added separately; the operation reports any that Shopify does not have. Answers 202: Timesact's own rows are committed before this responds, and Shopify is updated afterwards by a worker. `operation` reports that work for the whole request; poll `GET /operations/{operationId}` until its status leaves PROCESSING. Each variant also reports its own `sync` state on the variant endpoints. Pass `dryRun: true` to see what would change without writing; that answers 200. Safe to repeat: sending the same request again changes nothing.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":"object","description":"What the write applies to. Exactly one of `productIds`, `variantIds` or `skus`. On add and replace, a product, variant or SKU Timesact does not hold yet is fetched from Shopify first; on remove and resync it is skipped.","properties":{"productIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":50,"uniqueItems":true,"description":"Shopify product ids (max 50). Every variant of each product."},"variantIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"Shopify variant ids (max 2048), from any products. Just these variants."},"skus":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"SKUs (max 2048), matched exactly and case-sensitively. Every variant that carries one of them."}},"minProperties":1,"maxProperties":1,"additionalProperties":false},"customerExperiences":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d+$","description":"Customer experience id"},"startsAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}([T ].*)?$","description":"When the assignment starts applying. A calendar date (YYYY-MM-DD) is read as midnight in the shop timezone. Left out: an existing assignment keeps its start, a new one starts now."},"endsAt":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}([T ].*)?$","description":"When it stops applying. Left out: an existing assignment keeps its end, a new one is open-ended. Null clears it."},"unitsLimit":{"type":["integer","null"],"minimum":1,"description":"Maximum preorder units under this assignment. Left out: an existing assignment keeps its limit, a new one is unlimited. Null clears it."}},"required":["id"],"additionalProperties":false},"minItems":1,"maxItems":20,"description":"The complete set of customer experiences for every target variant. Anything a variant has that is not listed here is removed."},"dryRun":{"type":"boolean","description":"Validate and report what would change, without writing anything. Answers 200."}},"required":["targets","customerExperiences"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"Idempotency-Key","required":false,"description":"Optional. Retry with the same key and the same body to get the original operation back instead of starting a new one; the same key with a different body is rejected with 409."}],"responses":{"200":{"description":"Dry run: what would change","content":{"application/json":{"schema":{"description":"Dry run: what would change","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentPreview"}},"required":["data"],"additionalProperties":false}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"description":"Accepted","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentWriteResponse"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"402":{"description":"Feature requires a higher plan (code `plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Feature requires a higher plan (code `plan_required`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"409":{"description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/assignments/resync":{"post":{"operationId":"resyncAssignments","summary":"Push variants to Shopify again","tags":["Assignments"],"description":"Changes nothing in Timesact. Queues the target variants so their current configuration is written to Shopify again — for a variant whose `sync` state is FAILED, or when Shopify looks out of step. It also retries a removal Shopify never took, for a variant Timesact no longer holds. Name what the write applies to in `targets`: whole products, a list of variants, or SKUs. A target Timesact does not hold is skipped and counted in `summary.targetsSkipped`. Answers 202: Timesact's own rows are committed before this responds, and Shopify is updated afterwards by a worker. `operation` reports that work for the whole request; poll `GET /operations/{operationId}` until its status leaves PROCESSING. Each variant also reports its own `sync` state on the variant endpoints. Pass `dryRun: true` to see what would change without writing; that answers 200.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"targets":{"type":"object","description":"What the write applies to. Exactly one of `productIds`, `variantIds` or `skus`. On add and replace, a product, variant or SKU Timesact does not hold yet is fetched from Shopify first; on remove and resync it is skipped.","properties":{"productIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":50,"uniqueItems":true,"description":"Shopify product ids (max 50). Every variant of each product."},"variantIds":{"type":"array","items":{"type":"string","pattern":"^(gid://shopify/[A-Za-z]+/)?\\d+$"},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"Shopify variant ids (max 2048), from any products. Just these variants."},"skus":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"minItems":1,"maxItems":2048,"uniqueItems":true,"description":"SKUs (max 2048), matched exactly and case-sensitively. Every variant that carries one of them."}},"minProperties":1,"maxProperties":1,"additionalProperties":false},"dryRun":{"type":"boolean","description":"Validate and report what would change, without writing anything. Answers 200."}},"required":["targets"],"additionalProperties":false}}},"required":true},"parameters":[{"schema":{"type":"string","maxLength":200},"in":"header","name":"Idempotency-Key","required":false,"description":"Optional. Retry with the same key and the same body to get the original operation back instead of starting a new one; the same key with a different body is rejected with 409."}],"responses":{"200":{"description":"Dry run: what would change","content":{"application/json":{"schema":{"description":"Dry run: what would change","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentPreview"}},"required":["data"],"additionalProperties":false}}}},"202":{"description":"Accepted","content":{"application/json":{"schema":{"description":"Accepted","type":"object","properties":{"data":{"$ref":"#/components/schemas/AssignmentWriteResponse"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"402":{"description":"Feature requires a higher plan (code `plan_required`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Feature requires a higher plan (code `plan_required`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"409":{"description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Conflict (code `conflict`): a reused `Idempotency-Key`, or an earlier write to the same targets still in progress; honour `Retry-After` when present"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/operations/{operationId}":{"get":{"operationId":"getOperation","summary":"Get an operation","tags":["Operations"],"description":"Returns the Shopify-side progress of one write request: how many of its variants have been written to Shopify, how many Shopify refused and why, how many a later write took over, and whether it has finished. A terminal status is final, so there is nothing to gain from polling one. For the state of a variant as it stands now, read its `sync` field instead.","parameters":[{"schema":{"type":"string","pattern":"^\\d+$"},"in":"path","name":"operationId","required":true,"description":"Operation id"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"$ref":"#/components/schemas/Operation"}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"404":{"description":"Not found (code `not_found`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Not found (code `not_found`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}},"/public/v1/operations":{"get":{"operationId":"listOperations","summary":"List operations","tags":["Operations"],"description":"Pages this store's operations, newest first. Filter by `action`, or by `status` — `PROCESSING` for what is still in flight, `FAILED` and `SUCCESS_WITH_ERRORS` for what needs attention. Finished operations are kept for 90 days.","parameters":[{"schema":{"type":"string","enum":["PROCESSING","SUCCESS","SUCCESS_WITH_ERRORS","FAILED"]},"in":"query","name":"status","required":false,"description":"Only operations in this status"},{"schema":{"type":"string","enum":["ADD","REMOVE","REPLACE","RESYNC"]},"in":"query","name":"action","required":false,"description":"Only operations of this action"},{"schema":{"type":"string","minLength":1},"in":"query","name":"cursor","required":false,"description":"Opaque cursor from a previous response's `nextCursor`. Omit for the first page."},{"schema":{"type":"integer","minimum":1,"maximum":250},"in":"query","name":"limit","required":false,"description":"Items per page (default 25, maximum 250). Cannot be changed once a cursor has been issued."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Operation"}},"pagination":{"$ref":"#/components/schemas/PageInfo"}},"required":["data","pagination"],"additionalProperties":false}}}},"400":{"description":"Invalid request (code `validation`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Invalid request (code `validation`)"}}}},"401":{"description":"Missing, invalid, or revoked API key (code `unauthorized`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Missing, invalid, or revoked API key (code `unauthorized`)"}}}},"403":{"description":"API key lacks the required access (code `forbidden`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"API key lacks the required access (code `forbidden`)"}}}},"429":{"description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"A plan limit is reached (`details.limit` is `per_minute` or `per_day`; the call is not counted), the store's sync queue is full, or too many requests from one address failed authentication. Honour `Retry-After` (code `rate_limited`)."}}}},"500":{"description":"Unexpected error on our side (code `internal`)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error","description":"Unexpected error on our side (code `internal`)"}}}}}}}},"servers":[{"url":"https://timesact-app.uc.r.appspot.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"Shop","description":"Store identity, plan and usage"},{"name":"Products","description":"Products Timesact manages, their per-variant feature status, and diagnostics"},{"name":"Customer experiences","description":"The configuration aggregate variants are assigned to"},{"name":"Analytics","description":"Preorder and back-in-stock performance over a window"},{"name":"Assignments","description":"Which customer experiences sit on which variants: add, remove, replace, resync"},{"name":"Operations","description":"The Shopify-side progress of one write request: what has been applied, and what Shopify refused"}]}