# Register Event for Member

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/members/{member_id}/events:
    post:
      summary: Register Event for Member
      deprecated: false
      description: Registers single event for member specified by ID
      tags:
        - API Reference/Data API/Events/Members Events
      parameters:
        - name: member_id
          in: path
          description: ''
          required: true
          schema:
            type: integer
        - name: Content-Type
          in: header
          description: '[Details](doc-341635)'
          required: true
          example: application/json
          schema:
            type: string
            default: application/json
            const: application/json
        - name: X-User-Agent
          in: header
          description: Arbitrary identifier of your client. [Details](doc-341635)
          required: true
          example: '{{X_USER_AGENT}}'
          schema:
            type: string
            default: '{{X_USER_AGENT}}'
        - name: X-Product-Name
          in: header
          description: API Product for API context. [Details](doc-341635)
          required: true
          example: '{{PRODUCT_NAME}}'
          schema:
            type: string
            default: '{{PRODUCT_NAME}}'
        - name: X-Loyalty-Club-Slug
          in: header
          description: LoyaltyClub for API context. [Details](doc-342138)
          required: false
          example: '{{LOYALTY_CLUB_SLUG}}'
          schema:
            type: string
            default: '{{LOYALTY_CLUB_SLUG}}'
        - name: Authorization
          in: header
          description: '[Member](doc-342129) or [User](doc-342130) Authorization.'
          required: false
          example: Bearer {{_OAUTH_TOKEN}}
          schema:
            type: string
            default: Bearer {{_OAUTH_TOKEN}}
        - name: X-Client-Authorization
          in: header
          description: '[Token](doc-342128) Authorization.'
          example: '{{API_TOKEN}}'
          schema:
            type: string
            default: '{{API_TOKEN}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                event:
                  $ref: '#/components/schemas/MemberEvent'
              x-apidog-orders:
                - event
              required:
                - event
              x-apidog-ignore-properties: []
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  event:
                    description: Created Event
                    $ref: '#/components/schemas/MemberEventResponse'
                x-apidog-orders:
                  - event
                required:
                  - event
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Success
        '422':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    examples:
                      - Invalid parameters
                    const: Invalid parameters
                  details:
                    type: object
                    properties: {}
                    x-apidog-orders: []
                    description: 'See: [Params Validation](doc-341637)'
                    additionalProperties: true
                    x-apidog-ignore-properties: []
                required:
                  - error
                  - details
                x-apidog-orders:
                  - error
                  - details
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Invalid Parameters
      security: []
      x-apidog-folder: API Reference/Data API/Events/Members Events
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/346351/apis/api-3550899-run
components:
  schemas:
    MemberEvent:
      allOf:
        - &ref_5
          $ref: '#/components/schemas/_common'
        - anyOf:
            - $ref: '#/components/schemas/children%3Akids_area_entered'
            - $ref: '#/components/schemas/children%3Akids_area_left'
            - $ref: '#/components/schemas/gift_cards%3Apurchased'
            - $ref: '#/components/schemas/ui_activity'
            - $ref: '#/components/schemas/app%3Aopen'
            - $ref: '#/components/schemas/parking_activity'
      x-apidog-folder: ''
    parking_activity:
      type: object
      properties:
        type:
          type: string
          const: parking_activity
        action:
          type: string
          description: Type of activity
          enum:
            - entry
            - exit
            - ticketing_machine_interaction
          x-apidog-enum:
            - value: entry
              name: ''
              description: ''
            - value: exit
              name: ''
              description: ''
            - value: ticketing_machine_interaction
              name: ''
              description: ''
          default: entry
          examples:
            - entry
        zone_id:
          type: string
          description: ID of the parking zone
        lpn:
          type: string
          description: License plate number
      x-apidog-orders:
        - type
        - action
        - zone_id
        - lpn
      required:
        - type
        - action
        - zone_id
        - lpn
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    app:open:
      type: object
      properties:
        type:
          type: string
          const: app:open
        app_type:
          type: string
          description: Which type of application is it
          enum:
            - mobile
            - web
            - kiosk
          x-apidog-enum:
            - value: mobile
              name: ''
              description: ''
            - value: web
              name: ''
              description: ''
            - value: kiosk
              name: ''
              description: ''
          examples:
            - mobile
        app_name:
          type: string
          description: Name of the application
        app_version:
          type: string
          description: Version of the application
        app_installation_id: &ref_1
          $ref: '#/components/schemas/uuid'
        os_name:
          type: string
          description: Name of OS
        os_version:
          type: string
          description: Version of OS
        settings:
          type: object
          properties: {}
          x-apidog-orders: []
          additionalProperties:
            type: string
          x-apidog-ignore-properties: []
      x-apidog-orders:
        - type
        - app_type
        - app_name
        - app_version
        - app_installation_id
        - os_name
        - os_version
        - settings
      required:
        - type
        - app_type
        - app_name
        - app_version
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    uuid:
      type: string
      format: uuid
      readOnly: true
      examples:
        - '550e8400-e29b-41d4-a716-446655440000 '
      x-apidog-folder: ''
    ui_activity:
      type: object
      properties:
        type:
          type: string
          const: ui_activity
        action:
          type: string
          description: Type of action made by member
          enum:
            - click
            - open
            - confirm
            - cancel
          x-apidog-enum:
            - value: click
              name: ''
              description: ''
            - value: open
              name: ''
              description: ''
            - value: confirm
              name: ''
              description: ''
            - value: cancel
              name: ''
              description: ''
          default: click
          examples:
            - click
        activity_id:
          type: string
          description: Identifier of activity
          examples:
            - profile:consents
        resource_type:
          type: string
          description: >-
            When activity is connected with resource, resource type must be set
            here.
          examples:
            - Event
        resource_id:
          anyOf:
            - type: string
              examples:
                - ea61bf16-8ec5-41b0-9fbc-d78afa1865e4
            - type: integer
              examples:
                - 42
          description: >-
            When activity is connected with resource, resource id must be set
            here.
      x-apidog-orders:
        - type
        - action
        - activity_id
        - resource_type
        - resource_id
      required:
        - type
        - activity_id
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    gift_cards:purchased:
      type: object
      properties:
        type:
          type: string
          const: gift_card:purchased
        amount:
          type: integer
          description: Value of the card
          minimum: 0
          examples:
            - 20
          nullable: true
        card_number:
          type: string
          examples:
            - KC2FQ3OPMRV4R2FE
          description: Exrternal identifier of the card
          nullable: true
        expires_at:
          anyOf:
            - &ref_2
              $ref: '#/components/schemas/date_time'
            - type: 'null'
          description: When the gift card expires
        purchased_in:
          type: string
          description: Place where the card was purchased in
          examples:
            - Kiosk
          nullable: true
      x-apidog-orders:
        - type
        - amount
        - card_number
        - expires_at
        - purchased_in
      required:
        - type
        - amount
        - card_number
        - expires_at
        - purchased_in
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    date_time:
      type: string
      format: date-time
      examples:
        - '2022-11-09T16:25:58.099512Z'
      x-apidog-folder: ''
    children:kids_area_left:
      type: object
      properties:
        type:
          type: string
          const: children:kids_area_left
        child_id: &ref_0
          description: ID of Member's [Child](doc-343073)
          $ref: '#/components/schemas/id'
      x-apidog-orders:
        - type
        - child_id
      required:
        - type
        - child_id
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    id:
      type: integer
      title: ''
      description: Identifier
      examples:
        - 1
      minimum: 1
      x-apidog-folder: ''
    children:kids_area_entered:
      type: object
      properties:
        type:
          type: string
          const: children:kids_area_entered
        child_id: *ref_0
      x-apidog-orders:
        - type
        - child_id
      required:
        - type
        - child_id
      x-apidog-refs: {}
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    _common:
      type: object
      properties:
        type: &ref_3
          type: string
          examples:
            - parking_activity
        id: *ref_1
        occurred_at:
          description: Date of event. When null, current time will be implied
          anyOf:
            - *ref_2
            - &ref_4
              type: 'null'
      x-apidog-orders:
        - type
        - id
        - occurred_at
      required:
        - type
        - id
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    MemberEventResponse:
      type: object
      properties:
        type: *ref_3
        id: *ref_1
        occurred_at:
          description: Date of event. When null, current time will be implied
          anyOf:
            - *ref_2
            - *ref_4
      x-apidog-orders:
        - 01KMJAJ4D21440MB135ZR068XW
      required:
        - type
        - id
      x-apidog-refs:
        01KMJAJ4D21440MB135ZR068XW: *ref_5
      x-apidog-ignore-properties:
        - type
        - id
        - occurred_at
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.mpc.dev.placewise.com
    description: Staging
security: []

```