{"openapi":"3.1.0","info":{"title":"RebateCardX Shopify API","version":"1.0.0","description":"Contract for the RebateCardX Public Embedded Shopify app. Admin and Customer Account requests use short-lived Shopify session tokens; Shopify Flow actions use a raw-body HMAC signature."},"servers":[{"url":"https://shopify.rebatecardx.com/api/shopify/v1","description":"Production"},{"url":"https://staging-shopify.rebatecardx.com/api/shopify/v1","description":"Staging"}],"paths":{"/setup":{"get":{"operationId":"shopifygetSetup0","summary":"Read installation and merchant linkage state","tags":["Setup"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/setup/link":{"post":{"operationId":"shopifypostSetupLink1","summary":"Link the shop to a merchant workspace","tags":["Setup"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/sync/start":{"post":{"operationId":"shopifypostSyncStart2","summary":"Start an order synchronization","tags":["Orders"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/dashboard":{"get":{"operationId":"shopifygetDashboard3","summary":"Read the embedded dashboard","tags":["Dashboard"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/campaigns":{"get":{"operationId":"shopifygetCampaigns4","summary":"List linked campaigns","tags":["Campaigns"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/orders":{"get":{"operationId":"shopifygetOrders5","summary":"List synchronized orders","tags":["Orders"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/extension/order":{"get":{"operationId":"shopifygetExtensionOrder6","summary":"Read an order for an Admin extension","tags":["Extensions"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[{"$ref":"#/components/parameters/OrderGid"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/extension/customer-order":{"get":{"operationId":"shopifygetExtensionCustomerOrder7","summary":"Read an owned order for a Customer Account extension","tags":["Extensions"],"security":[{"ShopifyCustomerSessionToken":[]}],"x-authentication":"shopify-customer-session-token","parameters":[{"$ref":"#/components/parameters/OrderGid"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/extension/order/sync":{"post":{"operationId":"shopifypostExtensionOrderSync8","summary":"Synchronize one Shopify order","tags":["Extensions"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/awards":{"get":{"operationId":"shopifygetAwards9","summary":"List awards","tags":["Awards"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/funding":{"get":{"operationId":"shopifygetFunding10","summary":"Read funding state","tags":["Funding"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/reports":{"get":{"operationId":"shopifygetReports11","summary":"Read Shopify integration reports","tags":["Reports"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/team":{"get":{"operationId":"shopifygetTeam12","summary":"Read linked merchant team access","tags":["Team"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/automation":{"get":{"operationId":"shopifygetAutomation13","summary":"Read automation and scope state","tags":["Automation"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/diagnostics":{"get":{"operationId":"shopifygetDiagnostics14","summary":"Read integration diagnostics","tags":["Diagnostics"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/billing":{"get":{"operationId":"shopifygetBilling15","summary":"Read Shopify billing state","tags":["Billing"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/billing/verify":{"post":{"operationId":"shopifypostBillingVerify16","summary":"Verify the active Shopify subscription","tags":["Billing"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/settings":{"get":{"operationId":"shopifygetSettings17","summary":"Read Shopify integration settings","tags":["Settings"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}},"post":{"operationId":"shopifypostSettings18","summary":"Update Shopify integration settings","tags":["Settings"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[{"$ref":"#/components/parameters/IfMatch"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/support":{"post":{"operationId":"shopifypostSupport19","summary":"Create a Shopify integration support request","tags":["Support"],"security":[{"ShopifyAdminSessionToken":[]}],"x-authentication":"shopify-admin-session-token","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"201":{"description":"Resource created","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/flow/actions/create-award":{"post":{"operationId":"shopifypostFlowActionsCreateAward20","summary":"Receive the signed Shopify Flow create-award action","tags":["Flow"],"security":[{"ShopifyHmac":[]}],"x-authentication":"shopify-hmac","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"202":{"description":"Request accepted","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"404":{"$ref":"#/components/responses/ApiError"},"409":{"$ref":"#/components/responses/ApiError"},"415":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"428":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}},"/webhooks/shopify":{"servers":[{"url":"https://shopify.rebatecardx.com","description":"Production webhook ingress"},{"url":"https://staging-shopify.rebatecardx.com","description":"Staging webhook ingress"}],"post":{"operationId":"receiveShopifyWebhook","summary":"Receive a signed Shopify webhook","tags":["Webhooks"],"security":[{"ShopifyHmac":[]}],"x-authentication":"shopify-webhook-hmac","parameters":[{"name":"X-Shopify-Webhook-Id","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Shopify-Topic","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Shopify-Shop-Domain","in":"header","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]*\\.myshopify\\.com$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Duplicate delivery already accepted"},"202":{"description":"Webhook accepted for asynchronous processing"},"400":{"$ref":"#/components/responses/ApiError"},"401":{"$ref":"#/components/responses/ApiError"},"403":{"$ref":"#/components/responses/ApiError"},"422":{"$ref":"#/components/responses/ApiError"},"429":{"$ref":"#/components/responses/ApiError"}}}}},"components":{"securitySchemes":{"ShopifyAdminSessionToken":{"type":"http","scheme":"bearer","bearerFormat":"Shopify Admin session token","description":"A short-lived App Bridge session token issued for a Shopify Admin user."},"ShopifyCustomerSessionToken":{"type":"http","scheme":"bearer","bearerFormat":"Shopify Customer Account session token","description":"A short-lived Customer Account session token whose subject owns the requested order."},"ShopifyHmac":{"type":"apiKey","in":"header","name":"X-Shopify-Hmac-Sha256","description":"Base64 HMAC-SHA-256 over the exact raw request body."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":16,"maxLength":200}},"IfMatch":{"name":"If-Match","in":"header","required":true,"description":"The current version returned by GET settings in ETag.","schema":{"type":"string","pattern":"^\"?[1-9][0-9]*\"?$"}},"OrderGid":{"name":"order_gid","in":"query","required":true,"schema":{"type":"string","pattern":"^gid://shopify/Order/[0-9]+$"}}},"schemas":{"ApiError":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["code","message","requestId"],"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}},"responses":{"ApiError":{"description":"Request error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"externalDocs":{"description":"RebateCardX developer documentation","url":"https://www.rebatecardx.com/developers"}}