{"info":{"title":"Gro API","version":"1.0.0","description":"Gro Platform API"},"servers":[{"url":"https://api.usegro.co","description":"Production server"},{"url":"https://api.staging.usegro.co","description":"Development server"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{}},"openapi":"3.0.0","paths":{"/api":{"get":{"summary":"Documentation UI","description":"Displays the OpenAPI documentation UI.","tags":["Open Api"],"responses":{"default":{"description":"The documentation UI","content":{"text/html":{"schema":{"type":"string"}}}}},"parameters":[],"security":[]}},"/api.json":{"get":{"summary":"JSON Documentation","description":"Returns the OpenAPI documentation in JSON format.","tags":["Open Api"],"responses":{"default":{"description":"The documentation in JSON format","content":{"application/json":{"schema":{"type":"string"}}}}},"parameters":[],"security":[]}},"/api.yaml":{"get":{"summary":"YAML Documentation","description":"Returns the OpenAPI documentation in YAML format.","tags":["Open Api"],"responses":{"default":{"description":"The documentation in YAML format","content":{"application/yaml":{"schema":{"type":"string"}}}}},"parameters":[],"security":[]}},"/mcp":{"post":{"tags":["Mcp"],"responses":{},"parameters":[],"security":[]}},"/api/profiles":{"get":{"summary":"List all profiles","tags":["Profile"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}},"required":["id","full_address","email","full_name"]}},"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"per_page":{"type":"number","description":"Items per page"},"current_page":{"type":"number","description":"Current page number"},"last_page":{"type":"number","description":"Last page number"},"first_page":{"type":"number","description":"First page number"},"first_page_url":{"type":"string","description":"URL for first page"},"last_page_url":{"type":"string","description":"URL for last page"},"next_page_url":{"type":"string","nullable":true,"description":"URL for next page"},"previous_page_url":{"type":"string","nullable":true,"description":"URL for previous page"}}}},"required":["data","meta"]}}}}},"parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"email","required":false,"schema":{"type":"string"}},{"in":"query","name":"email_status","required":false,"schema":{"type":"string","enum":["subscribed","unsubscribed","suppressed"]}},{"in":"query","name":"shopify_customer_id","required":false,"schema":{"type":"string"}}],"security":[{"bearer":[],"apiKey":[]}]},"post":{"summary":"Create a new profile","tags":["Profile"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}},"required":["id","full_address","email","full_name"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"email_status":{"type":"string","enum":["subscribed","unsubscribed","suppressed"]},"sms_status":{"type":"string","enum":["subscribed","unsubscribed","suppressed"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"title":{"type":"string"},"phone_number":{"type":"string"},"external_id":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"timezone":{"type":"string"},"ip":{"type":"string"},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}},"required":["email"]}}}},"parameters":[],"security":[{"bearer":[],"apiKey":[]}]}},"/api/profiles/{id}":{"get":{"summary":"Get a profile","tags":["Profile"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}},"required":["id","full_address","email","full_name"]}},"required":["data"]}}}}},"parameters":[{"in":"path","name":"id","description":"Profile ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"bearer":[],"apiKey":[]}]},"put":{"summary":"Update a profile","tags":["Profile"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}},"required":["id","full_address","email","full_name"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"email_status":{"type":"string","enum":["subscribed","unsubscribed","suppressed"]},"sms_status":{"type":"string","enum":["subscribed","unsubscribed","suppressed"]},"first_name":{"type":"string"},"last_name":{"type":"string"},"title":{"type":"string"},"phone_number":{"type":"string"},"external_id":{"type":"string"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"region":{"type":"string"},"postal_code":{"type":"string"},"timezone":{"type":"string"},"ip":{"type":"string"}}}}}},"parameters":[{"in":"path","name":"id","description":"Profile ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"bearer":[],"apiKey":[]}]},"delete":{"summary":"Delete a profile","tags":["Profile"],"responses":{"204":{"description":"No Content","content":{"application/json":{}}}},"parameters":[{"in":"path","name":"id","description":"Profile ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"bearer":[],"apiKey":[]}]}},"/api/profiles/bulk-upload":{"post":{"summary":"Bulk upload profiles","tags":["Profile"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"imported":{"type":"number"}}}}}}},"parameters":[],"security":[{"bearer":[],"apiKey":[]}]}},"/api/profiles/{id}/activity":{"get":{"summary":"Get profile activity timeline","tags":["Profile"],"responses":{"200":{"description":"Profile activity timeline","content":{"application/json":{}}}},"parameters":[{"in":"path","name":"id","description":"Profile ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"bearer":[],"apiKey":[]}]}},"/api/activity-logs":{"get":{"summary":"List activity log entries","description":"Returns a paginated, account-scoped activity log covering both system-generated\nevents (subscription created/paused, order placed, billing failed, etc.) and custom entries\nwritten by integrations via `POST /api/activity-logs`.\n\n### Filtering by loggable type and ID\n\nEach row is attached to a \"loggable\" — the subscription or order the event describes. To\nnarrow the feed to a single resource, pass exactly one of:\n\n- `subscription_id` — returns only rows where `loggable_type = \"subscription\"` and\n  `loggable_id` matches the given subscription UUID.\n- `order_id` — returns only rows where `loggable_type = \"order\"` and `loggable_id`\n  matches the given order UUID.\n\nThe two filters are mutually exclusive; if both are supplied, `order_id` takes precedence.\nWhen neither is supplied, the response includes both subscription and order rows.\n\nThe returned `loggable_type` and `loggable_id` fields on each row identify the source entity,\nand the convenience fields `subscription_id`/`subscription_number` and\n`order_id`/`order_number` are populated for the corresponding row type so clients can render\nlinks without a second lookup.\n\n### Filtering by integration / custom actions\n\nCustom entries written by integrations through `POST /api/activity-logs` are stored with\n`actor_type = \"api\"` and an action name prefixed `integration_` (e.g.\n`integration_shipment_dispatched`). To filter the feed to integration activity:\n\n- `actor_type=api` — every row written through the public log endpoint.\n- `action=integration_shipment_dispatched` — a single custom action.\n- `action=integration_shipment_dispatched,integration_label_printed` — comma-separated\n  list of action names; matched as `IN (...)`.\n\nThe set of distinct `integration_*` action names recorded for the account is available via\n`GET /api/activity-logs/integration-actions` and is suitable for populating a filter\ndropdown.\n\n### Other filters\n\n- `actor_type=customer|admin|api|system` — actor category. `system` also includes\n  webhook-triggered events and rows with no actor recorded.\n- `actor_name` — when `actor_type=admin`, restricts to a specific staff member by name.\n  Distinct names are available via `GET /api/activity-logs/actors`.\n- `start_date` / `end_date` (required) — `yyyy-MM-dd` date range interpreted in the\n  account's timezone.\n- `page` / `limit` — pagination (`limit` capped at 100, default 25).","tags":["Activity Log"],"responses":{"200":{"description":"Paginated list of activity log entries.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"action":{"type":"string","description":"Action name. System-generated actions use snake_case domain verbs (e.g. `subscription_paused`); integration entries are prefixed `integration_`."},"description":{"type":"string","nullable":true},"changes":{"type":"object","nullable":true,"additionalProperties":true,"description":"Optional field-level diff captured when the entry was written."},"metadata":{"type":"object","nullable":true,"additionalProperties":true,"description":"Free-form metadata stored alongside the entry."},"actor_type":{"type":"string","nullable":true,"description":"Category of the actor that triggered the entry. `api` indicates the entry was written by an integration via POST /api/activity-logs."},"actor_name":{"type":"string","nullable":true},"loggable_type":{"type":"string","enum":["subscription","order"],"description":"Type of entity the entry is attached to."},"loggable_id":{"type":"string","format":"uuid","description":"UUID of the subscription or order the entry is attached to."},"subscription_id":{"type":"string","format":"uuid","nullable":true},"subscription_number":{"type":"string","nullable":true},"order_id":{"type":"string","format":"uuid","nullable":true},"order_number":{"type":"string","nullable":true},"customer_name":{"type":"string","nullable":true},"customer_email":{"type":"string","nullable":true},"profile_id":{"type":"string","format":"uuid","nullable":true},"created_at":{"type":"string","format":"date-time"}}}},"metadata":{"type":"object","properties":{"total":{"type":"integer"},"per_page":{"type":"integer"},"current_page":{"type":"integer"},"last_page":{"type":"integer"}}}}}}}}},"parameters":[{"in":"query","name":"order_id","required":false,"description":"Narrow to a single order. Equivalent to `loggable_type=order AND loggable_id=<uuid>`. Takes precedence over `subscription_id` if both are supplied.","schema":{"type":"string"}},{"in":"query","name":"subscription_id","required":false,"description":"Narrow to a single subscription. Equivalent to `loggable_type=subscription AND loggable_id=<uuid>`. Mutually exclusive with `order_id`.","schema":{"type":"string"}},{"in":"query","name":"actor_name","required":false,"description":"When combined with `actor_type=admin`, restricts to a specific staff member by display name. Ignored for other actor types.","schema":{"type":"string"}},{"in":"query","name":"actor_type","required":false,"description":"Filter by actor category. `api` returns every entry written by an integration through POST /api/activity-logs. `system` also includes webhook-triggered events and rows with no actor recorded.","schema":{"type":"string","enum":["customer","admin","api","system"]}},{"in":"query","name":"action","required":false,"description":"Filter by action name. Accepts a single action (e.g. `subscription_paused`) or a comma-separated list. Use the `integration_*` prefix to match custom entries logged via POST /api/activity-logs.","schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"description":"Page size (1-100). Defaults to 25.","schema":{"type":"number"}},{"in":"query","name":"page","required":false,"description":"1-indexed page number. Defaults to 1.","schema":{"type":"number"}},{"in":"query","name":"end_date","required":true,"description":"Inclusive end of the date range, formatted yyyy-MM-dd. Interpreted in the account timezone.","schema":{"type":"string"}},{"in":"query","name":"start_date","required":true,"description":"Inclusive start of the date range, formatted yyyy-MM-dd. Interpreted in the account timezone.","schema":{"type":"string"}}],"security":[{"bearer":[],"apiKey":[]}]},"post":{"summary":"Log a custom action","description":"Append a custom activity log entry to a subscription or order. The `loggable_id` must reference a record (subscription or order) owned by the authenticated account. The `action` must be prefixed with `integration_` (e.g. `integration_shipment_dispatched`) so custom entries are distinguishable from system-generated actions.","tags":["Activity Log"],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"loggable_type":{"type":"string","enum":["order","subscription"]},"loggable_id":{"type":"string","format":"uuid"},"action":{"type":"string"},"description":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":true},"actor_type":{"type":"string","nullable":true},"actor_name":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"loggable_type":{"type":"string","enum":["order","subscription"]},"loggable_id":{"type":"string"},"action":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":2000},"metadata":{"type":"object","additionalProperties":true}},"required":["loggable_type","loggable_id","action"]}}}},"parameters":[],"security":[{"bearer":[],"apiKey":[]}]}},"/api/subscriptions/entities":{"get":{"summary":"List all entities","tags":["Entity"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}},"required":["id","name","is_active","account_id","profile_id","entity_type"]}},"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"per_page":{"type":"number","description":"Items per page"},"current_page":{"type":"number","description":"Current page number"},"last_page":{"type":"number","description":"Last page number"},"first_page":{"type":"number","description":"First page number"},"first_page_url":{"type":"string","description":"URL for first page"},"last_page_url":{"type":"string","description":"URL for last page"},"next_page_url":{"type":"string","nullable":true,"description":"URL for next page"},"previous_page_url":{"type":"string","nullable":true,"description":"URL for previous page"}}}},"required":["data","meta"]}}}}},"parameters":[{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"in":"query","name":"profile_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"entity_type","required":false,"schema":{"type":"string"}},{"in":"query","name":"is_active","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"sort_by","required":false,"schema":{"type":"string","enum":["created_at","name","entity_type"]}},{"in":"query","name":"sort_order","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"security":[{"apiKey":[]}]},"post":{"summary":"Create a new entity","tags":["Entity"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}},"required":["id","name","is_active","account_id","profile_id","entity_type"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_id":{"type":"string"},"entity_type":{"type":"string","maxLength":100},"name":{"type":"string","maxLength":255},"attributes":{"type":"object","additionalProperties":true},"image_url":{"type":"string"},"is_active":{"type":"boolean"}},"required":["profile_id","entity_type","name"]}}}},"parameters":[],"security":[{"apiKey":[]}]}},"/api/subscriptions/entities/{id}":{"get":{"summary":"Get an entity","tags":["Entity"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}},"required":["id","name","is_active","account_id","profile_id","entity_type"]}},"required":["data"]}}}}},"parameters":[{"in":"path","name":"id","description":"Entity ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"apiKey":[]}]},"put":{"summary":"Update an entity","tags":["Entity"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}},"required":["id","name","is_active","account_id","profile_id","entity_type"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":255},"attributes":{"type":"object","additionalProperties":true},"image_url":{"type":"string","nullable":true},"is_active":{"type":"boolean"}}}}}},"parameters":[{"in":"path","name":"id","description":"Entity ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"apiKey":[]}]},"delete":{"summary":"Delete an entity","tags":["Entity"],"responses":{"204":{"description":"No Content","content":{"application/json":{}}}},"parameters":[{"in":"path","name":"id","description":"Entity ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"apiKey":[]}]}},"/api/subscriptions/orders":{"get":{"summary":"List orders","tags":["Order"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","PAID","PARTIALLY_REFUNDED","REFUNDED","CANCELLED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"account_id":{"type":"string"},"profile_id":{"type":"string","nullable":true},"shopify_order_id":{"type":"string"},"production_date":{"type":"string","nullable":true},"currency_code":{"type":"string"},"fulfillment_status":{"type":"string","enum":["FULFILLED","UNFULFILLED","PARTIALLY_FULFILLED"]},"shopify_order_number":{"type":"string","nullable":true},"external_order_id":{"type":"string","nullable":true},"external_order_number":{"type":"string","nullable":true},"external_source":{"type":"string","nullable":true},"order_type":{"type":"string","enum":["SUBSCRIPTION","ONE_TIME","UPSELL"]},"is_checkout_order":{"type":"boolean"},"tracking_number":{"type":"string","nullable":true},"tracking_company":{"type":"string","nullable":true},"tracking_url":{"type":"string","nullable":true},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"billing_date":{"type":"string","nullable":true},"delivery_date":{"type":"string","nullable":true},"order_created_at":{"type":"string","nullable":true},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"subscriptions":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]}},"required":["id","status","account_id","shopify_order_id","currency_code","fulfillment_status","order_type","is_checkout_order","subtotal","discount_amount","total"]}},"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"per_page":{"type":"number","description":"Items per page"},"current_page":{"type":"number","description":"Current page number"},"last_page":{"type":"number","description":"Last page number"},"first_page":{"type":"number","description":"First page number"},"first_page_url":{"type":"string","description":"URL for first page"},"last_page_url":{"type":"string","description":"URL for last page"},"next_page_url":{"type":"string","nullable":true,"description":"URL for next page"},"previous_page_url":{"type":"string","nullable":true,"description":"URL for previous page"}}}},"required":["data","meta"]}}}}},"parameters":[{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["PENDING","PAID","PARTIALLY_REFUNDED","REFUNDED","CANCELLED"]}},{"in":"query","name":"fulfillment_status","required":false,"schema":{"type":"string","enum":["UNFULFILLED","PARTIALLY_FULFILLED","FULFILLED"]}},{"in":"query","name":"subscription_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"profile_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"entity_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"tracking_number","required":false,"schema":{"type":"string"}},{"in":"query","name":"has_subscription","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"delivery_date_from","required":false,"schema":{"type":"string"}},{"in":"query","name":"delivery_date_to","required":false,"schema":{"type":"string"}},{"in":"query","name":"billing_date_from","required":false,"schema":{"type":"string"}},{"in":"query","name":"billing_date_to","required":false,"schema":{"type":"string"}},{"in":"query","name":"production_date_from","required":false,"schema":{"type":"string"}},{"in":"query","name":"production_date_to","required":false,"schema":{"type":"string"}},{"in":"query","name":"is_checkout_order","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"in":"query","name":"sort_by","required":false,"schema":{"type":"string","enum":["created_at","delivery_date","billing_date","total","status"]}},{"in":"query","name":"sort_order","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"security":[{"bearer":[],"apiKey":[]}]}},"/api/subscriptions/orders/{id}":{"get":{"summary":"Get an order","tags":["Order"],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","PAID","PARTIALLY_REFUNDED","REFUNDED","CANCELLED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"account_id":{"type":"string"},"profile_id":{"type":"string","nullable":true},"shopify_order_id":{"type":"string"},"production_date":{"type":"string","nullable":true},"currency_code":{"type":"string"},"fulfillment_status":{"type":"string","enum":["FULFILLED","UNFULFILLED","PARTIALLY_FULFILLED"]},"shopify_order_number":{"type":"string","nullable":true},"external_order_id":{"type":"string","nullable":true},"external_order_number":{"type":"string","nullable":true},"external_source":{"type":"string","nullable":true},"order_type":{"type":"string","enum":["SUBSCRIPTION","ONE_TIME","UPSELL"]},"is_checkout_order":{"type":"boolean"},"tracking_number":{"type":"string","nullable":true},"tracking_company":{"type":"string","nullable":true},"tracking_url":{"type":"string","nullable":true},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"billing_date":{"type":"string","nullable":true},"delivery_date":{"type":"string","nullable":true},"order_created_at":{"type":"string","nullable":true},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"subscriptions":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]}},"required":["id","status","account_id","shopify_order_id","currency_code","fulfillment_status","order_type","is_checkout_order","subtotal","discount_amount","total"]}},"required":["data"]}}}}},"parameters":[{"in":"path","name":"id","description":"Order ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[{"bearer":[],"apiKey":[]}]}},"/api/subscriptions/skip-reasons":{"get":{"tags":["Skip Reasons"],"summary":"List skip reasons","description":"Returns all skip reasons configured for the current account, ordered by position.","responses":{"200":{"description":"List of skip reasons","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"number"},"label":{"type":"string"}},"required":["id","is_active","account_id","position","label"]}},"required":["data"]}}}}}},"parameters":[],"security":[]},"post":{"tags":["Skip Reasons"],"summary":"Create a skip reason","description":"Creates a new skip reason for the current account. When at least one skip reason is active, customers must pick one when skipping.","responses":{"200":{"description":"Created skip reason","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"number"},"label":{"type":"string"}},"required":["id","is_active","account_id","position","label"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000,"nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number","minimum":0}},"required":["label"]}}}},"parameters":[],"security":[]}},"/api/subscriptions/skip-reasons/{id}":{"get":{"tags":["Skip Reasons"],"summary":"Get a skip reason","description":"Returns a single skip reason by id.","responses":{"200":{"description":"Skip reason","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"number"},"label":{"type":"string"}},"required":["id","is_active","account_id","position","label"]}},"required":["data"]}}}}},"parameters":[{"in":"path","name":"id","description":"Skip reason ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]},"put":{"tags":["Skip Reasons"],"summary":"Update a skip reason","description":"Updates label, description, active state, or position of an existing skip reason.","responses":{"200":{"description":"Updated skip reason","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"number"},"label":{"type":"string"}},"required":["id","is_active","account_id","position","label"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":255},"description":{"type":"string","maxLength":1000,"nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number","minimum":0}}}}}},"parameters":[{"in":"path","name":"id","description":"Skip reason ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]},"delete":{"tags":["Skip Reasons"],"summary":"Delete a skip reason","description":"Soft-deletes a skip reason. Already-recorded skips keep their snapshotted label.","responses":{"204":{"description":"Skip reason deleted","content":{"application/json":{}}}},"parameters":[{"in":"path","name":"id","description":"Skip reason ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/skip-reasons/reorder":{"post":{"tags":["Skip Reasons"],"summary":"Reorder skip reasons","description":"Reorders the customer-facing list of skip reasons by passing the full ordered list of ids.","responses":{"200":{"description":"Reorder confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ordered_ids":{"type":"array","items":{"type":"string"}}},"required":["ordered_ids"]}}}},"parameters":[],"security":[]}},"/api/public/portal/skip-reasons":{"get":{"tags":["Skip Reasons"],"summary":"List active skip reasons for the portal","description":"Public, shop-authenticated endpoint used by the customer portal to render the skip-reason picker.","responses":{"200":{"description":"Active skip reasons","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"description":{"type":"string","nullable":true},"position":{"type":"number"},"label":{"type":"string"}},"required":["id","is_active","account_id","position","label"]}},"required":["data"]}}}}}},"parameters":[{"in":"query","name":"shop","description":"Shopify shop domain (myshopify.com)","required":true,"schema":{"type":"string"}}],"security":[]}},"/api/subscriptions":{"get":{"tags":["Subscriptions"],"summary":"List all subscriptions","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"last_order":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PENDING","PAID","PARTIALLY_REFUNDED","REFUNDED","CANCELLED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"account_id":{"type":"string"},"profile_id":{"type":"string","nullable":true},"shopify_order_id":{"type":"string"},"production_date":{"type":"string","nullable":true},"currency_code":{"type":"string"},"fulfillment_status":{"type":"string","enum":["FULFILLED","UNFULFILLED","PARTIALLY_FULFILLED"]},"shopify_order_number":{"type":"string","nullable":true},"external_order_id":{"type":"string","nullable":true},"external_order_number":{"type":"string","nullable":true},"external_source":{"type":"string","nullable":true},"order_type":{"type":"string","enum":["SUBSCRIPTION","ONE_TIME","UPSELL"]},"is_checkout_order":{"type":"boolean"},"tracking_number":{"type":"string","nullable":true},"tracking_company":{"type":"string","nullable":true},"tracking_url":{"type":"string","nullable":true},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"billing_date":{"type":"string","nullable":true},"delivery_date":{"type":"string","nullable":true},"order_created_at":{"type":"string","nullable":true},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"subscriptions":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]}},"nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"current_dunning_episode":{"type":"string","nullable":true},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"entity":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label"]}},"meta":{"type":"object","properties":{"total":{"type":"number","description":"Total number of items"},"per_page":{"type":"number","description":"Items per page"},"current_page":{"type":"number","description":"Current page number"},"last_page":{"type":"number","description":"Last page number"},"first_page":{"type":"number","description":"First page number"},"first_page_url":{"type":"string","description":"URL for first page"},"last_page_url":{"type":"string","description":"URL for last page"},"next_page_url":{"type":"string","nullable":true,"description":"URL for next page"},"previous_page_url":{"type":"string","nullable":true,"description":"URL for previous page"}}}},"required":["data","meta"]}}}}},"parameters":[{"in":"query","name":"status","required":false,"schema":{"type":"string"}},{"in":"query","name":"failed_payment","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"profile_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"entity_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"cancellation_reason_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"shopify_contract_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"search","required":false,"schema":{"type":"string"}},{"in":"query","name":"next_billing_before","required":false,"schema":{"type":"string"}},{"in":"query","name":"next_billing_after","required":false,"schema":{"type":"string"}},{"in":"query","name":"next_delivery_before","required":false,"schema":{"type":"string"}},{"in":"query","name":"next_delivery_after","required":false,"schema":{"type":"string"}},{"in":"query","name":"next_production_before","required":false,"schema":{"type":"string"}},{"in":"query","name":"next_production_after","required":false,"schema":{"type":"string"}},{"in":"query","name":"created_before","required":false,"schema":{"type":"string"}},{"in":"query","name":"created_after","required":false,"schema":{"type":"string"}},{"in":"query","name":"page","required":false,"schema":{"type":"number"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"in":"query","name":"sort_by","required":false,"schema":{"type":"string","enum":["created_at","next_billing_date","next_delivery_date","next_production_date","total","status"]}},{"in":"query","name":"sort_order","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"security":[]},"post":{"tags":["Subscriptions"],"summary":"Create one or more subscriptions","description":"Creates new subscriptions for a profile. Lines split across entities will produce multiple subscription records; the response returns the IDs of every subscription created.","responses":{"201":{"description":"Subscriptions created","content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"IDs of the created subscriptions"}},"required":["ids"]}}}},"400":{"description":"Invalid request — see error message for details","content":{"application/json":{"schema":{"example":{"error":"Failed to create subscription"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"profile_id":{"type":"string"},"shopify_payment_method_id":{"type":"string"},"next_delivery_date":{"type":"string"},"delivery_slot_id":{"type":"string","nullable":true},"delivery_address_id":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"lines":{"type":"array","items":{"type":"object","properties":{"shopify_product_id":{"type":"string"},"shopify_variant_id":{"type":"string"},"product_title":{"type":"string"},"variant_title":{"type":"string","nullable":true},"sku":{"type":"string","nullable":true},"price":{"type":"number","minimum":0},"quantity":{"type":"number","minimum":1},"selling_plan_id":{"type":"string"},"subscription_variant_id":{"type":"string","nullable":true},"selection_items":{"type":"array","items":{"type":"object","properties":{"slot_id":{"type":"string"},"shopify_product_id":{"type":"string"},"shopify_variant_id":{"type":"string"},"product_title":{"type":"string"},"variant_title":{"type":"string","nullable":true},"quantity":{"type":"number","minimum":1},"price":{"type":"number","minimum":0}},"required":["slot_id","shopify_product_id","shopify_variant_id","product_title","quantity","price"]},"nullable":true}},"required":["shopify_product_id","shopify_variant_id","product_title","price","quantity","selling_plan_id"]}}},"required":["profile_id","shopify_payment_method_id","next_delivery_date","lines"]}}}},"parameters":[],"security":[]}},"/api/subscriptions/{id}":{"get":{"tags":["Subscriptions"],"summary":"Get a subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/payment-method":{"get":{"tags":["Subscription Payment Method"],"summary":"Get the payment method for a subscription","description":"Returns the payment method currently attached to the subscription, plus any other payment methods on file for the customer that could be switched to.","responses":{"200":{"description":"Current payment method and available alternatives","content":{"application/json":{"schema":{"type":"object","properties":{"current":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"last_digits":{"type":"string"},"expiry_month":{"type":"number"},"expiry_year":{"type":"number"}},"required":["id","brand","last_digits","expiry_month","expiry_year"],"nullable":true,"description":"Current payment method on the subscription, or null if none is attached"},"available":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"last_digits":{"type":"string"},"expiry_month":{"type":"number"},"expiry_year":{"type":"number"}},"required":["id","brand","last_digits","expiry_month","expiry_year"]},"description":"Other payment methods on file for the customer"}},"required":["current","available"]}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]},"put":{"tags":["Subscription Payment Method"],"summary":"Update the payment method on a subscription","description":"Switches the subscription's payment method to one of the customer's existing Shopify payment methods. The new payment method must already exist on the customer in Shopify (use the `available` list returned by GET /payment-method).","responses":{"200":{"description":"Payment method updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Invalid request — missing payment_method_id, no Shopify contract, or update failed","content":{"application/json":{"schema":{"example":{"error":"Payment method ID is required"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"payment_method_id":{"type":"string","description":"ID of the customer's Shopify payment method to switch to"}},"required":["payment_method_id"]}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/payment-methods/by-profile/{profileId}":{"get":{"tags":["Subscription Payment Method"],"summary":"List payment methods on file for a profile","description":"Returns the payment methods on file in Shopify for the given profile, independent of any subscription. Used by the create-subscription flow to show payment methods for a customer who does not yet have a subscription.","responses":{"200":{"description":"Customer's available payment methods","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"brand":{"type":"string"},"last_digits":{"type":"string"},"expiry_month":{"type":"number"},"expiry_year":{"type":"number"}},"required":["id","brand","last_digits","expiry_month","expiry_year"]}},"has_shopify_customer":{"type":"boolean","description":"False when the profile has no linked Shopify customer (available will be empty)"}},"required":["available","has_shopify_customer"]}}}}},"parameters":[{"in":"path","name":"profileId","description":"Profile ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"profileId","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/payment-method/send-update-email":{"post":{"tags":["Subscription Payment Method"],"summary":"Send a payment update email to the customer","description":"Sends the customer an email with a Shopify-hosted link to update the payment method on this subscription. Uses Shopify's customerPaymentMethodSendUpdateEmail mutation.","responses":{"200":{"description":"Email dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Subscription has no Shopify contract, or Shopify rejected the request","content":{"application/json":{"schema":{"example":{"error":"Subscription has no Shopify contract"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/billing-date":{"put":{"tags":["Subscriptions"],"summary":"Update the next billing date for a subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"next_billing_date":{"type":"string"}},"required":["next_billing_date"]}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/reschedule-options":{"get":{"tags":["Subscriptions"],"summary":"Get available reschedule options for a subscription","description":"Returns the dates (and delivery slots, when delivery is enabled) that can be used to reschedule a subscription. When the account has delivery enabled, the response includes per-date delivery slots. When delivery is disabled, the response returns billing-only dates — note that billing-only mode is currently not consumed by any client.","responses":{"200":{"description":"Available reschedule options","content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["delivery","billing"],"description":"\"delivery\" when the account has delivery enabled (use date + slot_id when calling reschedule); \"billing\" when delivery is disabled (use billing_date alone)."},"dates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"Delivery date (YYYY-MM-DD)"},"day_name":{"type":"string"},"formatted_date":{"type":"string"},"billing_date":{"type":"string"},"production_date":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"is_all_day":{"type":"boolean"}},"required":["id","label","is_all_day"]}}},"required":["date"]}}},"required":["mode","dates"]}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/reschedule":{"post":{"tags":["Subscriptions"],"summary":"Reschedule a subscription","description":"Reschedules a subscription to a new billing or delivery date. If the account has delivery enabled and a slot_id and delivery_date are provided, the delivery is moved; otherwise the billing date is updated.","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delivery_date":{"type":"string"},"billing_date":{"type":"string"},"slot_id":{"type":"string"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/ship-now":{"post":{"tags":["Subscriptions"],"summary":"Ship a subscription immediately","description":"Triggers immediate billing and shipment of a subscription. The job runs asynchronously; the response confirms the billing attempt has been initiated.","responses":{"200":{"description":"Billing attempt initiated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"422":{"description":"Subscription is not billable or has no Shopify contract","content":{"application/json":{"schema":{"example":{"success":false,"error":"Subscription is not billable: PAUSED","errorCode":"NOT_BILLABLE"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delivery_date":{"type":"string"},"slot_id":{"type":"string"},"production_date":{"type":"string"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/frequency":{"put":{"tags":["Subscriptions"],"summary":"Change the billing frequency of a subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}},"422":{"description":"Frequency change is not allowed (e.g. subscription is cancelled)","content":{"application/json":{"schema":{"example":{"error":"Cannot change frequency of a cancelled subscription"}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"interval":{"type":"string","enum":["DAY","WEEK","MONTH","YEAR"]},"interval_count":{"type":"number","maximum":20}},"required":["interval","interval_count"]}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/delivery-instructions":{"put":{"tags":["Subscriptions"],"summary":"Update delivery instructions for a subscription","description":"Updates the delivery_instructions on the subscription. When `update_all_active` is true, the same instructions are applied to every active subscription on the same profile and the response is the bulk-update result instead of the single subscription.","responses":{"200":{"description":"Updated subscription. When `update_all_active=true`, returns a bulk-update result object instead.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"delivery_instructions":{"type":"string","maxLength":1000,"nullable":true},"update_all_active":{"type":"boolean"}},"required":["delivery_instructions"]}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/pause":{"post":{"tags":["Subscriptions"],"summary":"Pause a subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/resume":{"post":{"tags":["Subscriptions"],"summary":"Resume a paused subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"next_billing_date":{"type":"string"},"next_delivery_date":{"type":"string"},"slot_id":{"type":"string"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/cancel":{"post":{"tags":["Subscriptions"],"summary":"Cancel a subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500},"cancel_immediately":{"type":"boolean"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/skip":{"post":{"tags":["Subscriptions"],"summary":"Skip the next billing cycle for a subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"skip_weeks":{"type":"number"},"reason":{"type":"string","maxLength":500},"skip_reason_id":{"type":"string","nullable":true}},"required":["skip_weeks"]}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/reactivate":{"post":{"tags":["Subscriptions"],"summary":"Reactivate a cancelled subscription","responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"number":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","PAUSED","CANCELLED","EXPIRED","PAYMENT_FAILED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"can_cancel":{"type":"boolean"},"profile_id":{"type":"string"},"currency_code":{"type":"string"},"subtotal":{"type":"number"},"discount_amount":{"type":"number"},"total":{"type":"number"},"delivery_slot_id":{"type":"string","nullable":true},"shipping_amount":{"type":"number"},"tax_amount":{"type":"number"},"delivery_instructions":{"type":"string","nullable":true},"delivery_address":{"type":"object","properties":{"address1":{"type":"string"},"city":{"type":"string"},"country":{"type":"string"},"country_code":{"type":"string"},"zip":{"type":"string"},"address2":{"oneOf":[{"type":"string"},{"type":"string"}]},"phone":{"oneOf":[{"type":"string"},{"type":"string"}]},"first_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"last_name":{"oneOf":[{"type":"string"},{"type":"string"}]},"company":{"oneOf":[{"type":"string"},{"type":"string"}]},"province":{"oneOf":[{"type":"string"},{"type":"string"}]},"province_code":{"oneOf":[{"type":"string"},{"type":"string"}]}},"nullable":true},"lines":{"type":"array","items":{"type":"object"}},"shopify_contract_id":{"type":"number","nullable":true},"billing_interval":{"type":"string"},"billing_interval_count":{"type":"number"},"next_billing_date":{"type":"string","nullable":true},"next_delivery_date":{"type":"string","nullable":true},"next_production_date":{"type":"string","nullable":true},"delivery_slot_valid":{"type":"boolean"},"cancelled_at":{"type":"string","nullable":true},"cancellation_reason":{"type":"string","nullable":true},"cancellation_reason_id":{"type":"string","nullable":true},"paused_at":{"type":"string","nullable":true},"payment_method_brand":{"type":"string","nullable":true},"payment_method_last4":{"type":"string","nullable":true},"current_billing_cycle":{"type":"number"},"shopify_origin_order_id":{"type":"string","nullable":true},"delivery_interval":{"type":"string"},"delivery_interval_count":{"type":"number"},"migration_source_ref":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"custom_attributes":{"type":"object","nullable":true},"pause_reason":{"type":"string","nullable":true},"discounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["ACTIVE","EXHAUSTED","REMOVED"]},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"discount_code":{"type":"string","nullable":true},"title":{"type":"string"},"value":{"type":"number","nullable":true},"shopify_discount_id":{"type":"string"},"currency_code":{"type":"string","nullable":true},"target_type":{"type":"string","enum":["ORDER","SHIPPING_LINE","LINE_ITEM"]},"value_type":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["PERCENTAGE"]},{"type":"string","enum":["FIXED_AMOUNT"]}]},"recurring_cycle_limit":{"type":"number","nullable":true},"applied_at":{"type":"string","nullable":true},"exhausted_at":{"type":"string","nullable":true},"removed_at":{"type":"string","nullable":true},"is_shipping_discount":{"type":"boolean"},"discount_label":{"type":"string"}}}},"last_order":{"type":"string","nullable":true},"can_pause":{"type":"boolean"},"can_resume":{"type":"boolean"},"can_reactivate":{"type":"boolean"},"is_in_dunning":{"type":"boolean"},"can_retry_payment":{"type":"boolean"},"frequency_label":{"type":"string"},"entity_label":{"type":"string","nullable":true},"current_dunning_episode":{"type":"string","nullable":true},"has_shipping_discount":{"type":"boolean"},"total_revenue":{"type":"number"},"profile":{"oneOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"timezone":{"type":"string","nullable":true},"address1":{"type":"string","nullable":true},"address2":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"region":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"postal_code":{"type":"string","nullable":true},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"full_address":{"type":"string"},"email_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"email":{"type":"string"},"external_id":{"type":"string","nullable":true},"first_name":{"type":"string","nullable":true},"last_name":{"type":"string","nullable":true},"full_name":{"type":"string"},"phone_number":{"type":"string","nullable":true},"sms_status":{"oneOf":[{"type":"string","nullable":true},{"type":"string","enum":["subscribed"]},{"type":"string","enum":["unsubscribed"]},{"type":"string","enum":["suppressed"]}]},"shopify_customer_id":{"type":"string","nullable":true}}}]},"delivery_day":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"courier_lead_time_days":{"type":"number","nullable":true},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"packing_day_of_week":{"type":"number","nullable":true},"billing_day_of_week":{"type":"number","nullable":true},"delivery_configuration_id":{"type":"string"},"packing_day_name":{"type":"string","nullable":true},"billing_day_name":{"type":"string","nullable":true}}}]},"delivery_slot":{"oneOf":[{"type":"string"},{"type":"string","nullable":true},{"type":"object","properties":{"id":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"position":{"type":"number"},"label":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"is_all_day":{"type":"boolean"},"delivery_day_id":{"type":"string"}}}]},"entities":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","nullable":true},"updated_at":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"account_id":{"type":"string"},"profile_id":{"type":"string"},"image_url":{"type":"string","nullable":true},"wizard_id":{"type":"string","nullable":true},"entity_type":{"type":"string"},"attributes":{"type":"string"}}}}]}},"required":["number","id","status","is_active","account_id","can_cancel","profile_id","currency_code","subtotal","discount_amount","total","shipping_amount","tax_amount","lines","billing_interval","billing_interval_count","delivery_slot_valid","current_billing_cycle","delivery_interval","delivery_interval_count","can_pause","can_resume","can_reactivate","is_in_dunning","can_retry_payment","frequency_label","has_shipping_discount","total_revenue"]}},"required":["data"]}}}},"422":{"description":"Subscription is not eligible for reactivation","content":{"application/json":{"schema":{"example":{"error":"Subscription is not cancelled"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/retry-payment":{"post":{"tags":["Subscriptions"],"summary":"Manually retry payment for a subscription","description":"Initiates a manual payment retry for a subscription that is in dunning or has a failed payment. The retry runs asynchronously; the response confirms the job has been dispatched.","responses":{"200":{"description":"Payment retry job dispatched","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"422":{"description":"Subscription is not eligible for payment retry","content":{"application/json":{"schema":{"example":{"success":false,"error":"Subscription is not eligible for payment retry","errorCode":"NOT_ELIGIBLE"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/subscriptions/{id}/portal-link":{"post":{"tags":["Subscriptions"],"summary":"Generate a magic login portal link for a subscription","description":"Generates a one-time magic login link that authenticates the subscription owner directly into the customer portal for the given subscription. Returns a customer-facing link and an admin-impersonation link, both expiring after 7 days.","responses":{"200":{"description":"Magic portal links generated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"portal_link":{"type":"string","description":"Customer-facing magic login link to the subscription portal"},"admin_portal_link":{"type":"string","description":"Admin-impersonation magic login link (records the dashboard user as the actor in portal activity)"},"expires_at":{"type":"string","format":"date-time","description":"ISO 8601 timestamp at which the generated links expire"}},"required":["portal_link","admin_portal_link","expires_at"]}}}},"422":{"description":"Subscription has no associated profile or account has no Shopify shop domain","content":{"application/json":{"schema":{"example":{"error":"Subscription has no associated profile"}}}}}},"parameters":[{"in":"path","name":"id","description":"Subscription ID","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","schema":{"type":"string"}}],"security":[]}},"/api/public/delivery/countries":{"get":{"summary":"List delivery countries","tags":["Storefront Delivery"],"responses":{"200":{"description":"List of supported delivery countries","content":{"application/json":{"schema":{"example":{"countries":[{"code":"AU","name":"Australia","states":[{"code":"NSW","name":"New South Wales"},{"code":"VIC","name":"Victoria"},{"code":"QLD","name":"Queensland"},{"code":"WA","name":"Western Australia"},{"code":"SA","name":"South Australia"},{"code":"TAS","name":"Tasmania"},{"code":"ACT","name":"Australian Capital Territory"},{"code":"NT","name":"Northern Territory"}]},{"code":"NZ","name":"New Zealand","states":[{"code":"NTL","name":"Northland"},{"code":"AUK","name":"Auckland"},{"code":"WKO","name":"Waikato"},{"code":"BOP","name":"Bay of Plenty"},{"code":"GIS","name":"Gisborne"},{"code":"HKB","name":"Hawke's Bay"},{"code":"TKI","name":"Taranaki"},{"code":"MWT","name":"Manawatū-Whanganui"},{"code":"WGN","name":"Wellington"},{"code":"TAS","name":"Tasman"},{"code":"NSN","name":"Nelson"},{"code":"MBH","name":"Marlborough"},{"code":"WTC","name":"West Coast"},{"code":"CAN","name":"Canterbury"},{"code":"OTA","name":"Otago"},{"code":"STL","name":"Southland"}]},{"code":"US","name":"United States","states":[{"code":"AL","name":"Alabama"},{"code":"AK","name":"Alaska"},{"code":"AZ","name":"Arizona"},{"code":"AR","name":"Arkansas"},{"code":"CA","name":"California"},{"code":"CO","name":"Colorado"},{"code":"CT","name":"Connecticut"},{"code":"DE","name":"Delaware"},{"code":"FL","name":"Florida"},{"code":"GA","name":"Georgia"},{"code":"HI","name":"Hawaii"},{"code":"ID","name":"Idaho"},{"code":"IL","name":"Illinois"},{"code":"IN","name":"Indiana"},{"code":"IA","name":"Iowa"},{"code":"KS","name":"Kansas"},{"code":"KY","name":"Kentucky"},{"code":"LA","name":"Louisiana"},{"code":"ME","name":"Maine"},{"code":"MD","name":"Maryland"},{"code":"MA","name":"Massachusetts"},{"code":"MI","name":"Michigan"},{"code":"MN","name":"Minnesota"},{"code":"MS","name":"Mississippi"},{"code":"MO","name":"Missouri"},{"code":"MT","name":"Montana"},{"code":"NE","name":"Nebraska"},{"code":"NV","name":"Nevada"},{"code":"NH","name":"New Hampshire"},{"code":"NJ","name":"New Jersey"},{"code":"NM","name":"New Mexico"},{"code":"NY","name":"New York"},{"code":"NC","name":"North Carolina"},{"code":"ND","name":"North Dakota"},{"code":"OH","name":"Ohio"},{"code":"OK","name":"Oklahoma"},{"code":"OR","name":"Oregon"},{"code":"PA","name":"Pennsylvania"},{"code":"RI","name":"Rhode Island"},{"code":"SC","name":"South Carolina"},{"code":"SD","name":"South Dakota"},{"code":"TN","name":"Tennessee"},{"code":"TX","name":"Texas"},{"code":"UT","name":"Utah"},{"code":"VT","name":"Vermont"},{"code":"VA","name":"Virginia"},{"code":"WA","name":"Washington"},{"code":"WV","name":"West Virginia"},{"code":"WI","name":"Wisconsin"},{"code":"WY","name":"Wyoming"},{"code":"DC","name":"District of Columbia"}]},{"code":"CA","name":"Canada","states":[{"code":"AB","name":"Alberta"},{"code":"BC","name":"British Columbia"},{"code":"MB","name":"Manitoba"},{"code":"NB","name":"New Brunswick"},{"code":"NL","name":"Newfoundland and Labrador"},{"code":"NS","name":"Nova Scotia"},{"code":"NT","name":"Northwest Territories"},{"code":"NU","name":"Nunavut"},{"code":"ON","name":"Ontario"},{"code":"PE","name":"Prince Edward Island"},{"code":"QC","name":"Quebec"},{"code":"SK","name":"Saskatchewan"},{"code":"YT","name":"Yukon"}]}]}}}}}},"parameters":[],"security":[]}},"/api/public/delivery/options":{"get":{"summary":"Get delivery options for an account","tags":["Storefront Delivery"],"responses":{"200":{"description":"Delivery options for the account","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"delivery_enabled":{"type":"boolean"},"available":{"type":"boolean"},"countries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"states":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"}}}}}}},"uses_postcodes":{"type":"boolean"},"uses_states":{"type":"boolean"}},"required":["delivery_enabled","available","countries","uses_postcodes","uses_states"]}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"example":{"error":"Shop parameter required"}}}}},"404":{"description":"Shop not found","content":{"application/json":{"schema":{"example":{"error":"Shop not found"}}}}}},"parameters":[{"in":"query","name":"shop","required":true,"description":"Shopify shop domain","schema":{"type":"string"}}],"security":[]}},"/api/public/delivery/lookup":{"get":{"summary":"Lookup delivery options for a location","tags":["Storefront Delivery"],"responses":{"200":{"description":"Delivery lookup result","content":{"application/json":{"schema":{"type":"object","properties":{"available":{"type":"boolean"},"message":{"type":"string","description":"Message when delivery is not available"},"requires_postcode":{"type":"boolean","description":"Whether postcode is required"},"configuration_id":{"type":"string","format":"uuid"},"location_label":{"type":"string","example":"Sydney Metro"},"courier_lead_time_days":{"type":"integer","example":2},"dates":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"day_of_week":{"type":"number"},"day_name":{"type":"string"},"formatted_date":{"type":"string"},"billing_date":{"type":"string"},"production_date":{"type":"string"},"slots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"start_time":{"type":"string"},"end_time":{"type":"string"},"label":{"type":"string"},"available":{"type":"boolean"},"is_all_day":{"type":"boolean"}},"required":["id","start_time","end_time","label","available","is_all_day"]}}},"required":["date","day_of_week","day_name","formatted_date","billing_date","production_date","slots"]}}},"required":["available"]}}}}},"parameters":[{"in":"query","name":"country_code","required":true,"schema":{"type":"string"}},{"in":"query","name":"state_code","required":false,"schema":{"type":"string"}},{"in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"in":"query","name":"shop","required":true,"schema":{"type":"string"}},{"in":"query","name":"timezone","required":false,"schema":{"type":"string"}},{"in":"query","name":"shop","required":true,"description":"Shopify shop domain","schema":{"type":"string"}}],"security":[]}},"/api/public/delivery/validate":{"post":{"summary":"Validate a delivery selection","tags":["Storefront Delivery"],"responses":{"200":{"description":"Delivery validation result","content":{"application/json":{"schema":{"example":{"valid":true}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"example":{"error":"Validation failed","messages":["..."]}}}}}},"parameters":[{"in":"query","name":"delivery_date","required":true,"schema":{"type":"string"}},{"in":"query","name":"slot_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"country_code","required":true,"schema":{"type":"string"}},{"in":"query","name":"state_code","required":false,"schema":{"type":"string"}},{"in":"query","name":"postcode","required":false,"schema":{"type":"string"}},{"in":"query","name":"shop","required":true,"schema":{"type":"string"}}],"security":[]}},"/api/public/delivery/next-available":{"get":{"summary":"Find the next available delivery date for a known slot","description":"Used by the cart-refresh flow to recover abandoned carts whose stored delivery date has fallen into the past.","tags":["Storefront Delivery"],"responses":{"200":{"description":"Next available delivery date for the slot, or available=false if none exists.","content":{"application/json":{"schema":{"example":{"available":true,"delivery_date":"2026-05-16","production_date":"2026-05-13","formatted_date":"Fri 16 May","delivery_slot_id":"01900000-0000-7000-8000-000000000000","delivery_slot_time_start":"09:00:00","delivery_slot_time_end":"17:00:00","delivery_slot_label":"9am - 5pm","delivery_configuration_id":"01900000-0000-7000-8000-000000000000"}}}}}},"parameters":[{"in":"query","name":"slot_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"shop","required":true,"schema":{"type":"string"}},{"in":"query","name":"timezone","required":false,"schema":{"type":"string"}}],"security":[]}}}}