openapi: 3.1.0 info: title: Smile.io REST Activities API description: A RESTful interface for interacting with Smile.io loyalty programs - customers and customer identities, points transactions and settings, points products and purchases, earning rules, rewards and reward fulfillments, VIP tiers, and activities. Resource-oriented URLs return JSON and use standard HTTP status codes. Authenticated with an HTTP Bearer token (a merchant API key, or an app OAuth access token). REST API access is available on the Plus and Enterprise plans. version: 1.0.0 contact: name: Smile.io Developer Support url: https://dev.smile.io license: name: Proprietary url: https://smile.io/terms-of-service servers: - url: https://api.smile.io/v1 description: Smile.io REST API security: - bearerAuth: [] tags: - name: Activities description: Record custom customer activities that can earn points. paths: /activities: post: summary: Create an activity operationId: post__activities tags: - Activities responses: '201': description: The activity was successfully created. content: application/json: schema: type: object properties: activity: $ref: '#/components/schemas/Activity' description: Creates a record of a customer having performed a given action. requestBody: content: application/json: schema: type: object properties: activity: type: object properties: token: type: string description: A token identifying the activity that was performed. example: activity_f57a9b5a8d0ac5 distinct_id: type: string description: A unique identifier for the activity in the external system (e.g. the order number). example: '212993' created_on_origin_at: type: string description: The date and time the activity was performed by the customer in the external system (e.g. when the action actually occurred, which is often earlier than when the activity is created in Smile). format: date-time example: '2024-04-04T15:10:42.030Z' required: - token oneOf: - title: With customer ID properties: customer_id: type: integer example: 304169228 description: The ID of the customer who performed the activity. Required if `customer_email` is not provided. required: - customer_id - title: With customer email properties: customer_email: type: string example: jane@doe.com description: The email of the customer who performed the activity. Required if `customer_id` is not provided. format: email required: - customer_email required: - activity components: schemas: Activity: type: object properties: id: type: integer example: 503256787 description: Unique identifier for the activity. customer_id: type: integer example: 304169228 description: The ID of the customer who performed the activity. token: type: string example: activity_f57a9b5a8d0ac5 description: A token identifying the activity that was performed. distinct_id: type: - string - 'null' example: '212993' description: A unique identifier for the activity in the external system (e.g. the order number). created_on_origin_at: type: - string - 'null' format: date-time example: '2024-04-04T15:10:42.030Z' description: The date and time the activity was performed by the customer in the external system (e.g. when the action actually occurred, which is often earlier than when the activity is created in Smile). created_at: type: string format: date-time example: '2024-05-15T08:35:08.920Z' description: The date and time when the activity was created. updated_at: type: string format: date-time example: '2024-05-15T08:35:08.920Z' description: The date and time when the activity was last updated. securitySchemes: bearerAuth: type: http scheme: bearer