openapi: 3.0.3 info: title: Talon.One Account Campaigns API description: 'Talon.One is an enterprise promotion, loyalty, and incentives engine. This OpenAPI description models the two primary REST surfaces Talon.One exposes. The Integration API (paths under /v1 and /v2 for customer_sessions, customer_profiles, events, coupon_reservations, referrals, loyalty_programs, audiences) pushes real-time customer data into the rules engine and returns the effects to apply. The Management API (paths under /v1 for applications, campaigns, coupons, loyalty_programs, audiences, attributes, collections, accounts, users, exports) administers the resources that back the Campaign Manager. Talon.One runs as a managed, per-customer deployment: replace the server base URL with your own deployment domain. Authenticate with the Authorization header - Integration keys use the ApiKey-v1 prefix and Management keys use the ManagementKey-v1 prefix. Endpoints and paths here are grounded in Talon.One''s public documentation and SDKs; request and response schemas are honestly simplified.' version: '1.0' contact: name: Talon.One url: https://docs.talon.one servers: - url: https://yourbaseurl.talon.one description: Per-customer Talon.One deployment (replace yourbaseurl with your deployment domain) security: - integrationKey: [] - managementKey: [] tags: - name: Campaigns description: Management API - campaigns and rulesets. paths: /v1/applications/{applicationId}/campaigns: get: operationId: listCampaigns tags: - Campaigns summary: List campaigns description: List the campaigns in an Application. security: - managementKey: [] parameters: - $ref: '#/components/parameters/applicationId' responses: '200': description: A list of campaigns. content: application/json: schema: type: object properties: totalResultSize: type: integer data: type: array items: $ref: '#/components/schemas/Campaign' post: operationId: createCampaign tags: - Campaigns summary: Create campaign description: Create a new campaign in an Application. security: - managementKey: [] parameters: - $ref: '#/components/parameters/applicationId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Campaign' responses: '200': description: The created campaign. content: application/json: schema: $ref: '#/components/schemas/Campaign' /v1/applications/{applicationId}/campaigns/{campaignId}: get: operationId: getCampaign tags: - Campaigns summary: Get campaign description: Get a single campaign by ID. security: - managementKey: [] parameters: - $ref: '#/components/parameters/applicationId' - $ref: '#/components/parameters/campaignId' responses: '200': description: The campaign. content: application/json: schema: $ref: '#/components/schemas/Campaign' put: operationId: updateCampaign tags: - Campaigns summary: Update campaign description: Update an existing campaign. security: - managementKey: [] parameters: - $ref: '#/components/parameters/applicationId' - $ref: '#/components/parameters/campaignId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Campaign' responses: '200': description: The updated campaign. content: application/json: schema: $ref: '#/components/schemas/Campaign' delete: operationId: deleteCampaign tags: - Campaigns summary: Delete campaign description: Delete a campaign. security: - managementKey: [] parameters: - $ref: '#/components/parameters/applicationId' - $ref: '#/components/parameters/campaignId' responses: '204': description: The campaign was deleted. /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets: get: operationId: listCampaignRulesets tags: - Campaigns summary: List campaign rulesets description: List the rulesets of a campaign. security: - managementKey: [] parameters: - $ref: '#/components/parameters/applicationId' - $ref: '#/components/parameters/campaignId' responses: '200': description: A list of rulesets. content: application/json: schema: type: object components: parameters: campaignId: name: campaignId in: path required: true description: The ID of the campaign. schema: type: integer applicationId: name: applicationId in: path required: true description: The ID of the Application. schema: type: integer schemas: Campaign: type: object properties: id: type: integer name: type: string description: type: string state: type: string enum: - enabled - disabled - scheduled - running - expired - draft tags: type: array items: type: string features: type: array items: type: string securitySchemes: integrationKey: type: apiKey in: header name: Authorization description: 'Integration API key with the ApiKey-v1 prefix, e.g. header "Authorization: ApiKey-v1 ".' managementKey: type: apiKey in: header name: Authorization description: 'Management API key with the ManagementKey-v1 prefix, e.g. header "Authorization: ManagementKey-v1 ".'