Information about current User

GET /user

Responses

  • 200 application/json

    Current user's data

    Hide response attributes Show response attributes object
    • user object
      Hide user attributes Show user attributes object
      • id integer
      • first_name string
      • last_name string
      • email string(email)
      • phone string
      • role string

        Values are customer, inactive_customer, owner, or member.

      • company_id string

        ID of company that record belongs to

      • user_fields object
        Hide user_fields attributes Show user_fields attributes object
        • id integer
        • marketing_messages boolean
        • 3rd_party boolean
        • nick string
        • show_only_nick boolean
      • billing_periods array[integer]
      • permissions array[object]
        Hide permissions attributes Show permissions attributes object
        • permission string
        • name string
        • description string
        • user_can boolean
      • companies array[object]
        Hide companies attributes Show companies attributes object
        • id integer
        • name string
        • email string
        • role string

          Values are owner, customer, inactive_customer, member, inactive, assistant, or external_member.

    • agreements array[object]

      Agreement will contain masked fields if it is not requested by eligible user. Masked fields: - company_id - order - mandatory - valid_from - type - for - apply_for Also only following types of agreements are returned: - checkout - registration - feedback

      Hide agreements attributes Show agreements attributes object
      • id integer

        Agreement version ID

      • agreement_id integer

        Agreement ID

      • company_id string

        ID of company that record belongs to

      • order integer

        Denotes order in which the agreement will appear in the form

      • name string

        Name is shown in the registration form. This is the name of the agreement and can contain |AGREEMENT_URL|. If present, this var needs to be replaced with url: https://agreements.zooza.app/{ID}. Should you want to display agreement inline within the registration form, use also Title and Description for full text of the agreement.

      • title string

        Title is shown to user when displaying agreement's detail.

      • description string

        Description is shown to user when displaying agreement's detail.

      • mandatory boolean

        All mandatory agreements need to be posted back to API (with full object containing title, description and name). Non-mandatory agreements should be sent only when given consent (e.g. Radio button is selected or checkbox is selected).

      • valid_from string(date-time)

        Date from which this agreement version is valid

      • type string

        Type of form input used to give consent with agreement. *none: No input is used. The consent is given by clicking the Register button *radio: Yes and No options are shown to user. If mandatory, any one of those two choices need to be selected *checkbox: Checkbox is shown to user. If mandatory, checkbox needs to be checked

        Values are none, radio, or checkbox.

      • for string

        Denotes to which application this agreement is targeted. *registration: When doing POST/registrations *checkout: When doing POST/orders *feedback: When doing POST/feedback_requests

        Values are registration, checkout, or feedback.

      • created string(date-time)
      • updated string(date-time)
      • apply_for string

        *everyone: The agreement is always shown *course: Agreement is required only for courses that match course_ids within courses property *feedback: Feedback form *members: Internal consents for company members

        Values are everyone, course, feedback, or members.

      • region string
      • courses array[integer]

        Used to match agreement to particular course. Use only if property apply_for is set to: course

    • app object
    • branding string
    • company object
    • widgets array[object]
      Hide widgets attributes Show widgets attributes object
      • id integer
      • application_id integer
      • url string
      • options object
    • msg object
    • discounts array[object]
      Hide discounts attributes Show discounts attributes object
      • id integer
      • type string

        Values are replacement, discount, replacement_transfer, free_event, or prepaid_credit.

      • active boolean
      • origin_user_id integer
      • origin_company_id integer
      • origin_order_id integer
      • origin_event_id integer
      • origin_attendance_id integer
      • used_on_user_id integer
      • used_on_company_id integer
      • used_on_order_id integer
      • used_on_event_id integer
      • used_on_attendance_id integer
      • value integer(float)
      • code string
      • settings string
      • expiration string(date-time)
      • used string(date-time)
      • used_by integer
      • usage string

        Values are used or not_used.

      • created string(date-time)
      • created_by string
      • updated string(date-time)
      • expired boolean
      • events array[object]
        Hide events attributes Show events attributes object
        • id integer
        • name string
        • status string

          Values are scheduled or unplanned.

        • date string(date-time)
        • happened boolean
        • live_stream integer
        • has_live_stream boolean
        • replacement boolean
        • end string(date-time)
        • duration integer
        • cancellation_limit string(date-time)
        • can_cancel boolean
        • has_video boolean
        • has_files boolean
        • places object
        • courses object
        • trainers object
        • additional_trainers array[object]
          Hide additional_trainers attributes Show additional_trainers attributes object
          • role string
          • full_name string
      • attendance array[object]
        Hide attendance attributes Show attendance attributes object
        • id integer
        • event_id integer
        • registration_id integer
        • attendance string

          Values are going, attended, canceled, canceled_late, deleted, hold, ignore, noshow, or waitlist.

        • replacement_for integer
        • resolution string
        • created string(date-time)
        • modified string(date-time)
        • cancellation_reason string
        • credit_id integer
    • free_events array[object]
      Hide free_events attributes Show free_events attributes object
      • id integer
      • type string

        Values are replacement, discount, replacement_transfer, free_event, or prepaid_credit.

      • active boolean
      • origin_user_id integer
      • origin_company_id integer
      • origin_order_id integer
      • origin_event_id integer
      • origin_attendance_id integer
      • used_on_user_id integer
      • used_on_company_id integer
      • used_on_order_id integer
      • used_on_event_id integer
      • used_on_attendance_id integer
      • value integer(float)
      • code string
      • settings string
      • expiration string(date-time)
      • used string(date-time)
      • used_by integer
      • usage string

        Values are used or not_used.

      • created string(date-time)
      • created_by string
      • updated string(date-time)
      • expired boolean
      • events array[object]
        Hide events attributes Show events attributes object
        • id integer
        • name string
        • status string

          Values are scheduled or unplanned.

        • date string(date-time)
        • happened boolean
        • live_stream integer
        • has_live_stream boolean
        • replacement boolean
        • end string(date-time)
        • duration integer
        • cancellation_limit string(date-time)
        • can_cancel boolean
        • has_video boolean
        • has_files boolean
        • places object
        • courses object
        • trainers object
        • additional_trainers array[object]
          Hide additional_trainers attributes Show additional_trainers attributes object
          • role string
          • full_name string
      • attendance array[object]
        Hide attendance attributes Show attendance attributes object
        • id integer
        • event_id integer
        • registration_id integer
        • attendance string

          Values are going, attended, canceled, canceled_late, deleted, hold, ignore, noshow, or waitlist.

        • replacement_for integer
        • resolution string
        • created string(date-time)
        • modified string(date-time)
        • cancellation_reason string
        • credit_id integer
    • credit_balance object
GET /user
curl \
 --request GET 'https://api.zooza.app/v1/user'
Response examples (200)
{
  "user": {
    "id": 42,
    "first_name": "string",
    "last_name": "string",
    "email": "hello@example.com",
    "phone": "string",
    "role": "customer",
    "company_id": "string",
    "user_fields": {
      "id": 42,
      "marketing_messages": true,
      "3rd_party": true,
      "nick": "string",
      "show_only_nick": true
    },
    "billing_periods": [
      42
    ],
    "permissions": [
      {
        "permission": "string",
        "name": "string",
        "description": "string",
        "user_can": true
      }
    ],
    "companies": [
      {
        "id": 42,
        "name": "string",
        "email": "string",
        "role": "owner"
      }
    ]
  },
  "agreements": [
    {
      "id": 42,
      "agreement_id": 42,
      "company_id": "string",
      "order": 42,
      "name": "string",
      "title": "string",
      "description": "string",
      "mandatory": true,
      "valid_from": "2025-05-04T09:42:00Z",
      "type": "none",
      "for": "registration",
      "created": "2025-05-04T09:42:00Z",
      "updated": "2025-05-04T09:42:00Z",
      "apply_for": "everyone",
      "region": "string",
      "courses": [
        42
      ]
    }
  ],
  "app": {},
  "branding": "string",
  "company": {},
  "widgets": [
    {
      "id": 42,
      "application_id": 42,
      "url": "string",
      "options": {}
    }
  ],
  "msg": {},
  "discounts": [
    {
      "id": 42,
      "type": "replacement",
      "active": true,
      "origin_user_id": 42,
      "origin_company_id": 42,
      "origin_order_id": 42,
      "origin_event_id": 42,
      "origin_attendance_id": 42,
      "used_on_user_id": 42,
      "used_on_company_id": 42,
      "used_on_order_id": 42,
      "used_on_event_id": 42,
      "used_on_attendance_id": 42,
      "value": 42,
      "code": "string",
      "settings": "string",
      "expiration": "2025-05-04T09:42:00Z",
      "used": "2025-05-04T09:42:00Z",
      "used_by": 42,
      "usage": "used",
      "created": "2025-05-04T09:42:00Z",
      "created_by": "string",
      "updated": "2025-05-04T09:42:00Z",
      "expired": true,
      "events": [
        {
          "id": 42,
          "name": "string",
          "status": "scheduled",
          "date": "2025-05-04T09:42:00Z",
          "happened": true,
          "live_stream": 42,
          "has_live_stream": true,
          "replacement": true,
          "end": "2025-05-04T09:42:00Z",
          "duration": 42,
          "cancellation_limit": "2025-05-04T09:42:00Z",
          "can_cancel": true,
          "has_video": true,
          "has_files": true,
          "places": {},
          "courses": {},
          "trainers": {},
          "additional_trainers": [
            {
              "role": "string",
              "full_name": "string"
            }
          ]
        }
      ],
      "attendance": [
        {
          "id": 42,
          "event_id": 42,
          "registration_id": 42,
          "attendance": "going",
          "replacement_for": 42,
          "resolution": "string",
          "created": "2025-05-04T09:42:00Z",
          "modified": "2025-05-04T09:42:00Z",
          "cancellation_reason": "string",
          "credit_id": 42
        }
      ]
    }
  ],
  "free_events": [
    {
      "id": 42,
      "type": "replacement",
      "active": true,
      "origin_user_id": 42,
      "origin_company_id": 42,
      "origin_order_id": 42,
      "origin_event_id": 42,
      "origin_attendance_id": 42,
      "used_on_user_id": 42,
      "used_on_company_id": 42,
      "used_on_order_id": 42,
      "used_on_event_id": 42,
      "used_on_attendance_id": 42,
      "value": 42,
      "code": "string",
      "settings": "string",
      "expiration": "2025-05-04T09:42:00Z",
      "used": "2025-05-04T09:42:00Z",
      "used_by": 42,
      "usage": "used",
      "created": "2025-05-04T09:42:00Z",
      "created_by": "string",
      "updated": "2025-05-04T09:42:00Z",
      "expired": true,
      "events": [
        {
          "id": 42,
          "name": "string",
          "status": "scheduled",
          "date": "2025-05-04T09:42:00Z",
          "happened": true,
          "live_stream": 42,
          "has_live_stream": true,
          "replacement": true,
          "end": "2025-05-04T09:42:00Z",
          "duration": 42,
          "cancellation_limit": "2025-05-04T09:42:00Z",
          "can_cancel": true,
          "has_video": true,
          "has_files": true,
          "places": {},
          "courses": {},
          "trainers": {},
          "additional_trainers": [
            {
              "role": "string",
              "full_name": "string"
            }
          ]
        }
      ],
      "attendance": [
        {
          "id": 42,
          "event_id": 42,
          "registration_id": 42,
          "attendance": "going",
          "replacement_for": 42,
          "resolution": "string",
          "created": "2025-05-04T09:42:00Z",
          "modified": "2025-05-04T09:42:00Z",
          "cancellation_reason": "string",
          "credit_id": 42
        }
      ]
    }
  ],
  "credit_balance": {}
}