openapi: 3.2.0 info: title: Online Store Discount Actions API version: '1.0' description: Online Store API servers: - url: https://www.yoursite.com/api/v1 description: '' security: - X-AC-Auth-Token: [] tags: - name: Discount Actions paths: /discount_actions: get: summary: Discount Actions tags: - Discount Actions responses: '200': description: OK content: application/json: schema: type: object properties: total_count: type: integer discount_actions: type: - array items: $ref: '#/components/schemas/discount_actions' operationId: get-discount_actions description: Gets an array of discount actions. post: summary: Create a Discount Actions operationId: post-discount_actions responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_actions' requestBody: content: application/json: schema: description: '' type: object properties: discount_method_id: type: integer is_exclusive: type: boolean is_strict: type: boolean is_active: type: boolean modifier_operation: type: string modifier_amount: type: string modifier_type: type: string modifier_target: type: string sort_order: type: integer examples: Example: value: discount_method_id: 4 is_exclusive: true is_strict: false is_active: false modifier_operation: subtract modifier_amount: '1' modifier_type: dollars modifier_target: total sort_order: 0 tags: - Discount Actions description: Creates a discount action. /discount_actions/{id}: parameters: - schema: type: string name: id in: path required: true description: The ID of the `discount_action` put: summary: Update a Discount Action operationId: put-discount_actions-id responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/discount_actions' tags: - Discount Actions description: Updates a discount action. requestBody: content: application/json: schema: $ref: '#/components/schemas/discount_actions' delete: summary: Delete a Discount Action operationId: delete-discount_actions-id responses: '200': description: OK '404': $ref: '#/components/responses/404' tags: - Discount Actions description: Deletes a discount action. components: responses: '404': description: Resource Not Found content: application/json: schema: description: Not Found type: object x-examples: example-1: status_code: 404 message: Not Found details: No resource found properties: status_code: type: number message: type: string details: type: string examples: {} headers: {} schemas: discount_actions: type: object properties: id: type: integer discount_method_id: type: integer is_exclusive: type: boolean is_strict: type: boolean is_active: type: boolean modifier_operation: type: string modifier_amount: type: string modifier_type: type: string modifier_target: type: string sort_order: type: integer securitySchemes: X-AC-Auth-Token: name: X-AC-Auth-Token type: apiKey in: header