swagger: "2.0"
info:
  version: 3.0.0
  title: Zumba's API
  description: Documentation about Zumba's API V3. Last modified - 2026-08-03
  contact:
    name: Zumba Engineering Team
    email: engineering@zumba.com
    url: https://tech.zumba.com
host: api.zumba.com
basePath: /
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json

tags:
  - name: user
    description: User/account Info
  - name: membership
    description: ZIN Membership Info
  - name: training
    description: Trainings
  - name: dcd
    description: Digital Content Deliverable (DCD)
  - name: dcd-music
    description: DCD - Music
  - name: dcd-video
    description: DCD - Video
  - name: dcd-playlist
    description: DCD - Playlist
  - name: doc
    description: Documentation

security:
  - OAuth2:
    - basic
    - user_email
    - create_user
    - membership_status
    - license_management
    - plan_management
    - dcd
    - training

securityDefinitions:
  OAuth2:
    type: oauth2
    scopes:
      basic: Grants read access to profile info only.
      user_email: Grants access to receive user's email.
      create_user: Grant access to create new users.
      search_users: Grant access to seach user's information.
      membership_status: Grants read access to membership info only.
      license_management: Grant read/write access to manage any user's licenses. The partner may be restricted to manage only a subset list of licenses.
      plan_management: Grant read/write access to manage any user's plans. The partner may be restricted to manage only a subset list of plans.
      dcd: Grants read/write access to retrieve media content and set user preferences like favorite medias.
    flow: accessCode
    authorizationUrl: https://www.zumba.com/oauth/authorize
    tokenUrl: https://www.zumba.com/oauth/access_token


paths:
  /user:
    get:
      tags:
        - user
      summary: Retrieve user info
      description: Retrieve user info from the authenticated OAuth request.
      security:
        - OAuth2:
          - basic
      responses:
        200:
          description: OK
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            properties:
              id:
                type: string
                description: ID in UUID format.
              username:
                type: string
              email_address:
                type: string
                description: This field will be empty if the OAuth authorization didn't requested the user_email scope.
              avatar_url:
                type: string
                description: URL with the user's picture/avatar.
              first_name:
                type: string
              last_name:
                type: string
              pid:
                type: string
              branch:
                type: string
              isZIN:
                type: boolean
              isZES:
                type: boolean
              isZJ:
                type: boolean
              isGym:
                type: boolean
              isSYNC:
                type: boolean
              isSYNCBase:
                type: boolean
              notifications_account_billing:
                type: boolean
              notifications_new_music:
                type: boolean
              benefits:
                type: array
                description: Return the list of benefits
                items:
                  $ref: "#/definitions/BenefitList"
              memberSince:
                type: string
                description: Optional, date when the user became a member, in "YYYY-MM-DD" format
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
    post:
      tags:
        - user
      summary: Create a new user
      description: Creates a new user.
      security:
        - OAuth2:
          - create_user
      consumes:
        - application/json
      parameters:
        - name: body
          in: body
          schema:
            type: object
            required:
              - username
              - email
              - password
              - first_name
              - last_name
            properties:
              username:
                type: string
                description: User's username
                minLength: 4
                maxLength: 36
              email:
                type: string
                description: User's email
              password:
                type: string
                description: User's password. If the password is omitted, Zumba will send an email to the user with a random password.
                format: password
                minLength: 8
              first_name:
                type: string
                description: User's first name
              last_name:
                type: string
                description: User's last name
              locale:
                type: string
                description: User's preferred locale
                enum:
                  - de-DE
                  - en-US
                  - es-ES
                  - fr-FR
                  - it-IT
                  - ko-KR
                  - pt-BR
                default: en-US
              is_public:
                type: boolean
                description: Determine if user's profile will be public or not. This value is false as default.
              street:
                type: string
                description: Main address street
              street_2:
                type: string
                description: Apartment number, Unit number, Suite number
              city:
                type: string
              state:
                type: string
              country:
                type: string
                description: Two letters ISO code representing the country
              postal_code:
                type: string
      responses:
        200:
          description: The user info has being created correctly.
          schema:
            properties:
              id:
                type: string
                description: User's id in UUID format.
        400:
          description: The user could not be created for some reason, the reason will be included in the response body.
          schema:
            $ref: '#/definitions/RequestError'
    put:
      tags:
        - user
      summary: Update user info
      description: Update the authenticated user info.
      security:
        - OAuth2:
          - create_user
      parameters:
        - name: body
          in: body
          schema:
            type: object
            properties:
              email:
                type: string
                description: User's email
              password:
                type: string
                description: User's password
                format: password
              facebook_id:
                type: string
                description: User's facebook_id
              facebook_auth_token:
                type: string
                description: User's facebook_auth_token
              first_name:
                type: string
                description: User's first name
              last_name:
                type: string
                description: User's last name
              notifications_new_music:
                type: boolean
                description: New music notification flag
              notifications_account_billing:
                type: boolean
                description: Account billing notification flag
      responses:
        200:
          description: The user info has being updated correctly

  /user/notification:
    post:
      tags:
        - user
      summary: Inserts mobile device notification token
      description: Inserts the user mobile device notification token
      security:
        - OAuth2:
          - basic
      parameters:
        - name: body
          in: body
          required: true
          schema:
            properties:
              external_id:
                type: string
                description: The notification token
      responses:
        200:
          description: The user mobile device info has being inserted successfully
        400:
          description: Error occurred while trying to insert the user mobile device info
    put:
      tags:
        - user
      summary: Update mobile device notification token
      description: Updates the user mobile device notification token
      security:
        - OAuth2:
          - basic
      parameters:
        - name: body
          in: body
          required: true
          schema:
            properties:
              external_id:
                type: string
                description: The notification token
      responses:
        200:
          description: The user mobile device info has being updated successfully
        400:
          description: Error occurred while trying to update the user mobile device info
    delete:
      tags:
        - user
      summary: Delete the mobile device notification token
      description: Delete the user mobile device notification token
      security:
        - OAuth2:
          - basic
      parameters:
        - name: external_id
          type: string
          in: path
          required: true
          description: The notification token
      responses:
        200:
          description: The user mobile device info has being deleted successfully
        400:
          description: Error occurred while trying to delete the user mobile device info

  /user/authenticate:
    post:
      tags:
        - user
      summary: Validate/Retrieve OAuth2 token
      description: Validate if the credentials are valid and return the OAuth2 token. It supports User Credentials ( username, password ), Facebook Token ( facebook_token ), or Partner login (partner_auth) grant types. When passing facebook_token or partner_auth then username and password are no longer required.
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - username
              - password
              - client_id
              - client_secret
            properties:
              username:
                type: string
                description: The username or email associated with the User's account
              password:
                type: string
                description: User's password.
                format: password
              client_id:
                type: string
                description: Partner Client ID.
              client_secret:
                description: Partner Client Secret.
                type: string
              scope:
                description: List of scopes separated by space
                type: string
              facebook_app_id:
                description: Id of the facebook app to use
                type: string
              facebook_token:
                description: A facebook auth token of a facebook account that is linked to a zumba account
                type: string
              facebook_limited_token:
                description: A facebook auth token when uses FB Limited Login of a facebook account that is linked to a zumba account. For regular login use facebook_token.
                type: string
              google_id_token:
                description: A google id token of a google account that is linked to a zumba account
                type: string
              apple_id_token:
                description: A apple id_token of an apple account that is linked to a zumba account
                type: string
              partner_auth:
                description: The partner_auth parameter allows only third-party partners to login and manage user's information
                type: boolean
                default: false
      responses:
        200:
          description: Access token information to use for OAuth requests
          schema:
            properties:
              access_token:
                type: string
                description: OAuth Access Token
              expires_in:
                type: integer
                description: Time in seconds that the OAuth access token expires
              token_type:
                type: string
                description: OAuth Token Type
              scope:
                type: string
                description: OAuth scope granted
              refresh_token:
                type: string
                description: OAuth Refresh Token
        403:
          description: Username/Email and password doesn't match, or requested with invalid or untrusted partner credentials.

  /user/feedback:
    post:
      tags:
        - user
      description: Save user feedback
      security:
        - OAuth2:
          - basic
      consumes:
        - application/json
      parameters:
        - name: body
          in: body
          schema:
            required:
              - platform
              - app_version
              - os_version
              - device_model
            properties:
              message:
                type: string
              platform:
                type: string
              app_version:
                type: string
              os_version:
                type: string
              device_model:
                type: string
              liked_app:
                type: boolean
      responses:
        200:
          description: The inserted feedback id
          schema:
            properties:
              id:
                type: integer
        401:
          description: Invalid user Id or not authenticated user.
        400:
          description: An error ocurred

  /user/feedback/{id}:
    put:
      tags:
        - user
      description: Updates user feedback
      security:
        - OAuth2:
          - basic
      consumes:
        - application/json
      parameters:
        - name: id
          type: string
          in: path
          required: true
          description: User's ID
        - name: body
          in: body
          schema:
            required:
              - message
            properties:
              message:
                type: string
      responses:
        204:
          description: The feedback was updated successfully.
        401:
          description: Invalid user Id or not authenticated user.
        400:
          description: An error ocurred

  /user/login:
    post:
      tags:
        - user
      summary: Login via Facebook
      description: Login via Facebook id and auth token.
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - facebook_id
              - facebook_access_token
            properties:
              facebook_id:
                type: string
                description: Facebook Id
              facebook_access_token:
                type: string
                description: Facebook Access Token
              Partner:
                type: object
                description: API Partner
                properties:
                  id:
                    type: string
                    description: Parter API Client Id
      responses:
        200:
          description: Access token information to use for OAuth requests
          schema:
            properties:
              access_token:
                type: string
                description: OAuth Access Token
              expires_in:
                type: integer
                description: Time in seconds that the OAuth access token expires
              token_type:
                type: string
                description: OAuth Token Type
              scope:
                type: string
                description: OAuth Scope Granted
              refresh_token:
                type: string
                description: OAuth Refresh Token
        400:
          description: Unable to login with the given Facebook credentials.

  /user/reset_password:
    post:
      tags:
        - user
      summary: Forgot password
      description: Start the process of forgot password. The user will receive in their email a link to go and reset the password. It can't be resetted by API or other applications other than zumba.com.
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: body
          in: body
          required: true
          schema:
            properties:
              username:
                type: string
                description: Needs to be defined if email is empty.
              email:
                type: string
                description: Needs to be defined if username is empty.
      responses:
        200:
          description: User located and will be notified on how to proceed to reset the password.
          schema:
            properties:
              message_sent:
                type: boolean
                description: Shows if the email to reset password was sent.
        404:
          description: Username/Email not found.

  /user/firebase_authenticate:
    post:
      tags:
        - user
      summary: Provides authentication token for Firebase.
      description: This endpoint provides a json object similar to current user's OAuth2 object.
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: body
          in: body
          schema:
            required:
              - user_id
            properties:
              user_id:
                type: string
                description: User Id to generate the new Firebase auth token. If the parameter is missing the current user id will be used as default.
              app_name:
                type: string
                description: the name of the firebase app to authenticate to
      responses:
        200:
          description: Returns the new firebase authentication token and the expiration time in Unix timestamp format.
          schema:
            properties:
              token:
                type: string
                description: Firebase access token
              expires_in:
                type: integer
                description: Token aviability in seconds. Max expiration time is 3600.
        401:
          description: Invalid user Id or not authenticated user.
        400:
          description: Some other problem retrieving the auth token

  /oauth/access_token:
    post:
      tags:
        - user
        - oauth
      summary: Retrieve OAuth2 token
      description: Retrieve a new OAuth token when the old has expired
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - client_id
              - client_secret
              - grant_type
            properties:
              client_id:
                type: string
                description: Partner Client ID.
              client_secret:
                description: Partner Client Secret.
                type: string
              grant_type:
                description: Either "refresh_token" or "authorization_code"
                type: string
              refresh_token:
                description: The refresh token provided when initially authenticated, required if grant_type is "refresh_token"
                type: string
              code:
                description: The authorization code, required if grant_type is "authorization_code"
                type: string
              redirect_uri:
                description: The redirect URI, required if grant_type is "authorization_code"
                type: string
      responses:
        200:
          description: Access token information to use for OAuth requests
          schema:
            properties:
              access_token:
                type: string
                description: OAuth Access Token
              expires_in:
                type: integer
                description: Time in seconds that the OAuth access token expires
              token_type:
                type: string
                description: OAuth Token Type
              scope:
                type: string
                description: OAuth scope granted
              refresh_token:
                type: string
                description: OAuth Refresh Token
        403:
          description: Invalid access token or refresh token or some other problem retrieving

  /user/benefits:
    get:
      tags:
        - user
      summary: Get user benefits
      description: Retrieve user benefits by user ID or PID.
      security:
        - OAuth2:
          - basic
      parameters:
        - name: user_id
          in: query
          type: string
          required: false
          description: User's ID in UUID format. Either user_id or user_pid is required.
        - name: user_pid
          in: query
          type: string
          required: false
          description: User's PID. Either user_id or user_pid is required.
      responses:
        200:
          description: User benefits retrieved successfully
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/BenefitList'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Missing required parameters or validation error.
        404:
          description: User not found.
        500:
          description: Internal server error while retrieving benefits.

  /user/by_phone:
    get:
      tags:
        - user
      summary: Search users by a phone number.
      description: Perform a user search using the phone number.
      security:
        - OAuth2:
          - search_users
          - user_email
      parameters:
        - name: q
          in: query
          type: string
          required: true
          description: Filter value to be used during the search
      produces:
        - application/json
      responses:
        200:
          description: List of users matching the applied criteria
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/CustomerServiceUser'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: An error occurred while performing the search

  /changelog:
    get:
      tags:
        - doc
      summary: Get the changelog file
      description: Gets the changelog file. It describe changes made to the api
      produces:
        - text/plain
      responses:
        200:
          description: The changelog file content in plain text
        400:
          description: Can't retrieve the changelog file
        404:
          description: Changelog file not found

  /swagger.{extension}:
    get:
      tags:
        - doc
      summary: Gets the swagger file
      description: Gets the swagger file
      parameters:
        - name: extension
          type: string
          in: path
          required: true
          description: Specifies how the swagger file will be represented. It supports 'yaml' and 'html' extensions
          enum:
            - yaml
            - html
      produces:
        - text/plain
        - text/html
      responses:
        200:
          description: The swagger file
        400:
          description: Can't retrieve the swagger file
        404:
          description: swagger file not found

  /membership/status:
    get:
      tags:
        - membership
      summary: Get ZIN membership status
      description: Return details about the ZIN membership status from the authenticated user.
      deprecated: true
      security:
        - OAuth2:
          - membership_status
      responses:
        200:
          description: Membership information
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            properties:
              member_valid_until:
                type: string
                description: Date where the membership expires if not renewed. Format "YYYY-mm-dd"
              member_cancelled_on:
                type: string
                description: Date when the user cancelled the account. Format "YYYY-mm-dd"
              user_pid:
                type: string
                description: User PID. Formatted as number
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /mobileapp/token:
    post:
      tags:
        - mobileapp
      summary: Obtain an OAuth2 token for a an app using an already granted token
      description: This endpoint allows to use an already granted OAuth2 token to obtain a token for another app.
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - client_id
              - client_secret
              - app_token
            properties:
              client_id:
                type: string
                description: Partner Client ID.
              client_secret:
                description: Partner Client Secret.
                type: string
              app_token:
                type: string
                description: An existing valid OAuth2 token
              scope:
                description: List of scopes separated by space
                type: string
      responses:
        200:
          description: Access token information to use for OAuth requests
          schema:
            properties:
              access_token:
                type: string
                description: OAuth Access Token
              expires_in:
                type: integer
                description: Time in seconds that the OAuth access token expires
              token_type:
                type: string
                description: OAuth Token Type
              scope:
                type: string
                description: OAuth scope granted
              refresh_token:
                type: string
                description: OAuth Refresh Token
        403:
          description: The provided credentials are invalid

  /mobileapp/status:
    get:
      tags:
        - mobileapp
      summary: Get mobile app status
      description: Return details about the mobile app status.
      deprecated: true
      parameters:
        - name: type
          type: string
          in: query
          required: true
          description: Mobile OS platform [iOS, Android etc.]
        - name: version
          type: string
          in: query
          required: true
          description: Mobile app version
      responses:
        200:
          description: Mobile app status information
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              required:
                - version
                - config
              properties:
                version:
                  type: array
                  items:
                    required:
                      - url
                config:
                  type: array
                  items:
                    required:
                      - gcd_state
                      - check_in_time
                      - check_in_maximum
                      - check_in_range
                      - facebook_permissions
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Missing Information - Type and Version Number needed for status check.
        404:
          description: App type not found.

  /mobileapp/minimum_version:
    get:
      tags:
        - mobileapp
      summary: Get mobile app minimum version
      description: Return details about the mobile app minimum version.
      deprecated: true
      parameters:
        - name: slug
          type: string
          in: query
          enum:
            - zinplay-ios
            - zinplay-android
            - syncgo-ios
            - syncgo-android
          required: true
          description: Mobile app version to check
      responses:
        200:
          description: Mobile app minimum version information
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            required:
              - version
              - curent_version
            properties:
              version:
                type: string
              current_version:
                type: string
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Missing Information - Type and app needed for minimum version check.
        404:
          description: App type not found.

  /mobileapp/versions:
    get:
      tags:
        - mobileapp
      summary: Get minimum and current versions for partner's Mobile App
      description: Get minimum and current versions for partner's Mobile App
      responses:
        200:
          description: Mobile App minimum and current versions
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            properties:
              minimum:
                type: string
              current:
                type: string
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: An error occurred getting the information

  /mobileapp/advertisers:
    post:
      tags:
        - mobileapp
      summary: Collect the advertiser data from applications / web visitors.
      parameters:
        - name: advertiser_id
          in: body
          type: string
          required: true
          description: Advertiser id to be saved.
      responses:
        204:
          description: Data saved successfully
        400:
          description: An error occurred getting the information

  /partner/manageable_licenses:
    get:
      tags:
        - membership
      summary: Get a list of manageable licenses by the current partner
      description: This method will provide a list of licenses supported by the system and manageable by the partner.
      security:
        - OAuth2:
          - license_management
      responses:
        200:
          description: Retrieve a list of all manageable licenses from the requester partner.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/License'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /partner/manageable_plans:
    get:
      tags:
        - membership
      summary: Get a list of manageable available plans by the current partner
      description: This method will provide a list of plans supported by the system and manageable by the partner.
      security:
        - OAuth2:
          - plan_management
      responses:
        200:
          description: Retrieve a list of all manageable plans from the requester partner.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/Plan'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /partner/users:
    get:
      tags:
        - user
      summary: Get a list of users associated to current partner
      description: This method will provide a list of users associated to the partner.
      security:
        - OAuth2:
          - membership_status
          - search_users
          - user_email
      parameters:
        - name: id
          type: string
          in: query
          required: false
          description: User's ID
        - name: pid
          type: string
          in: query
          required: false
          description: User's PID
        - name: user_ids
          type: array
          in: query
          required: false
          description: User IDs List
        - name: first_name
          type: string
          in: query
          required: false
          description: User's First Name
        - name: last_name
          type: string
          in: query
          required: false
          description: User's Last Name
        - name: full_name
          type: string
          in: query
          required: false
          description: User's Full Name
        - name: email
          type: string
          in: query
          required: false
          description: User's Email
        - name: username
          type: string
          in: query
          required: false
          description: User's Username
      responses:
        200:
          description: Retrieve a list of all users associated to the requester partner.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/PartnerUser'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /license/{membershipTypeSlug}:
    get:
      tags:
        - membership
      summary: Get a list of available licenses for provided membership type
      description: This method will provide a list of licenses within provided membership type.
      security:
        - OAuth2:
          - membership_status
      parameters:
        - name: membershipTypeSlug
          type: string
          in: path
          required: true
      responses:
        200:
          description: Retrieve a list of licenses per membership type.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/License'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /membership/{id}/license:
    get:
      tags:
        - membership
      summary: Get list of user's licenses
      description: Retrieve the list of licenses from a specific user.
      security:
        - OAuth2:
          - membership_status
      parameters:
        - name: id
          type: string
          in: path
          required: true
          description: User's ID
      responses:
        200:
          description: Retrieve a list of all licenses associated to an user.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/UserLicense'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
    post:
      tags:
        - membership
      summary: Associate an user to a license
      description: Associate an user to a license
      security:
        - OAuth2:
          - license_management
      parameters:
        - name: id
          type: string
          in: path
          required: true
          description: User's ID
        - name: data
          in: body
          required: true
          schema:
            required:
              - license_id
            properties:
              license_id:
                type: integer
              start_date:
                type: string
                format: date
                description: Send the start date or the current date will be used.
              expiration_date:
                type: string
                format: date
                description: Send the expiration date or the end of the current month will be used. The date should always be the last day of the month.
      responses:
        201:
          description: License successfully associated.
        403:
          description: Partner does not have permission to manage the requested license.

  /membership/{user_id}/license/{license_id}:
    delete:
      tags:
        - membership
      summary: Expire the user's licenses
      description: Expire the user's license immediately
      security:
        - OAuth2:
          - license_management
      parameters:
        - name: user_id
          type: string
          in: path
          required: true
          description: User's ID
        - name: license_id
          type: integer
          in: path
          required: true
          description: License's ID
      responses:
        204:
          description: License successfully expired.
        403:
          description: Partner does not have permission to manage the requested license.

  /plan:
    get:
      tags:
        - membership
      summary: Get a list of available plans
      description: This method will provide a list of plans supported by the system. The partner can optionally opt to show all or just a list restricted to the partner.
      security:
        - OAuth2:
          - membership_status
      responses:
        200:
          description: Retrieve a list of all plans.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/Plan'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /membership/{user_id}/plan:
    get:
      tags:
        - membership
      summary: Get list of user's plans
      description: Retrieve the list of plans from a specific user.
      security:
        - OAuth2:
          - membership_status
      parameters:
        - name: user_id
          type: string
          in: path
          required: true
          description: User's ID
        - name: only_active
          type: boolean
          in: query
          required: false
          default: true
          description: Retrieve only active plans. Enabled by default.
      responses:
        200:
          description: Retrieve a list of all plans associated to an user.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/UserPlan'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
    post:
      tags:
        - membership
      summary: Associate an user to a plan
      description: Associate an user to a plan
      security:
        - OAuth2:
          - plan_management
      parameters:
        - name: user_id
          type: string
          in: path
          required: true
          description: User's ID
        - name: body
          in: body
          required: true
          schema:
            required:
              - plan_id
            properties:
              plan_id:
                type: integer
              expiration_date:
                type: string
                format: date
                description: Send the expiration date in YYYY-MM-DD format or the end of the current month will be used. The date should always be the last day of the month.
      responses:
        201:
          description: Plan successfully associated to the user.
        403:
          description: Partner does not have permission to manage the requested plan.

  /membership/{user_id}/plan/{plan_id}:
    post:
      tags:
        - membership
      summary: Extend user's plan expiration
      description: Extend the user's plan expiration date.
      security:
        - OAuth2:
          - plan_management
      parameters:
        - name: user_id
          type: string
          in: path
          required: true
          description: User's ID
        - name: plan_id
          type: integer
          in: path
          required: true
          description: Plan's ID
        - name: body
          in: body
          required: true
          schema:
            required:
              - expiration_date
            properties:
              expiration_date:
                type: string
                format: date
                description: The new expiration date. The date should always be the last day of the month.
              addons:
                type: array
                description: Optional list of add-ons to extend in-place to the plan's new expiration date.
                items:
                  type: object
                  required:
                    - addon_id
                  properties:
                    addon_id:
                      type: integer
                      description: The add-on id to extend along with the plan.
      responses:
        204:
          description: Plan successfully associated/updated to the user.
        403:
          description: Partner does not have permission to manage the requested plan.
    delete:
      tags:
        - membership
      summary: Expire the user's plan
      description: Expire the user's plan immediately
      security:
        - OAuth2:
          - plan_management
      parameters:
        - name: user_id
          type: string
          in: path
          required: true
          description: User's ID
        - name: plan_id
          type: integer
          in: path
          required: true
          description: Plan's ID
      responses:
        204:
          description: Plan successfully expired.
        403:
          description: Partner does not have permission to manage the requested plan.

  /membership/{user_id}/plan/{plan_id}/addon:
    post:
      tags:
        - membership
      summary: Add an addon to the user's plan
      description: Add an addon to the user's plan on a starting date.
      security:
        - OAuth2:
          - plan_management
          - membership_status
      parameters:
        - name: user_id
          type: string
          in: path
          description: User's ID.
          required: true
        - name: plan_id
          type: integer
          in: path
          description: Plan ID.
          required: true
        - name: body
          in: body
          required: true
          schema:
            required:
              - addon_id
            properties:
              addon_id:
                type: integer
                description: The addon ID to add to the user's plan.
              start_date:
                type: string
                format: date
                description: The date in YYYY-MM-DD format or the current date will be used.
              expiration_date:
                type: string
                format: date
                description: Send the expiration date in YYYY-MM-DD format or the end of the current month will be used. The date should always be the last day of the month.
      responses:
        204:
          description: Successfully added an addon to the plan.
        400:
          description: General error response.
        401:
          description: The access token has insufficient permissions to add the addon.
        404:
          description: Partner, user, or addon not found.
        403:
          description: The Partner does not have the permission to manage the requested addon.


  /dcd/banner:
    get:
      tags:
        - dcd
      deprecated: true
      summary: Get banner content
      description: |
        Returns a list of configured banners with filters provided.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: page
          type: string
          in: query
          required: false
          description: Reference to the page where banner is supposed to be displayed.
        - name: section
          type: string
          in: query
          required: false
          description: Reference to the section of a page where banner is supposed to be displayed.
      responses:
        200:
          description: DCD Banners.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            properties:
              banners:
                type: array
                items:
                  $ref: "#/definitions/Banner"
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Error while retrieving banner content.

  /dcd/featured:
    get:
      deprecated: true
      tags:
        - dcd
      summary: Get DCD featured content
      description: |
        Return all featured content available for digital distribution. This content varies according to the requested platform.
        Deprecated: use /dcd/music/featured and /dcd/video/featured instead
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: List of featured content.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/FeaturedDcd'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        default:
          description: unexpected error
          schema:
            $ref: '#/definitions/Error'

  /dcd/home:
    get:
      tags:
        - dcd
      summary: Get DCD home screen content
      description: |
        Return all content for the home screen
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Home screen content.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            properties:
              banners:
                type: array
                items:
                  $ref: "#/definitions/FeaturedDcd"
              user_playlists:
                type: array
                items:
                  $ref: "#/definitions/Playlist"
              featured:
                description: Featured content, the most relevant categories in media platform
                type: array
                items:
                  $ref: "#/definitions/FeaturedDcd"
              featured_playlists:
                type: array
                items:
                  $ref: "#/definitions/Playlist"
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Error while retrieving home screen content.

  /dcd/playlist/default:
    get:
      tags:
        - dcd-playlist
      summary: Get default playlist
      description: Retrieve the default curated playlist by Zumba.  This is the "starting" playlist everyone should start with.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Retrieve the playlist
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/playlist/templates:
    get:
      tags:
        - dcd-playlist
      summary: Get playlist templates
      description: This will return the playlist templates with their associated elements.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Retrieve the playlist templates
          schema:
            type: array
            items:
              $ref: '#/definitions/PlaylistTemplate'

  /dcd/playlist/{id}:
    get:
      tags:
        - dcd-playlist
      summary: Get specific playlist
      description: Retrieve one curated playlist by Zumba.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Playlist ID
      responses:
        200:
          description: Retrieve the playlist
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        404:
          description: Playlist does not exists.

  /dcd/playlist/{id}/stream:
    get:
      tags:
        - dcd-playlist
      summary: Get the streaming urls for the songs in the playlist
      description: Get the streaming urls for the songs in the playlist
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Playlist ID
        - name: device_token
          type: string
          minimum: 1
          in: query
          required: true
          description: Device token
      responses:
        200:
          description: the streaming urls for the songs in the playlist
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/PlaylistStream'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        404:
          description: Playlist does not exists.

  /dcd/playlist/{id}/order:
    post:
      tags:
        - dcd-playlist
      summary: Orders the songs on the service playlist.
      description: Orders the songs in the playlist in the same order the song_ids are passed
      deprecated: true
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Playlist ID to order the songs.
        - name: song_ids
          in: body
          description: Array of song ids.
          schema:
            $ref: "#/definitions/ArrayOfInt"
      responses:
        204:
          description: Playlist songs ordered successfully.
        400:
          description: Error while ordering the playlist songs.
        404:
          description: Playlist does not exists.

  /dcd/playlist/user/import:
    post:
      tags:
        - dcd-playlist
      summary: Import a user playlist
      description: Imports a user playlist. This endpoint replaces the name with a generated unique user playlist name if the one passed already exists.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - name
              - songs
            properties:
              image:
                type: string
                description: Base 64 encode image data. This represents the album art.  Image will be stored remotely, to be referrenced by HTTPS path.
              name:
                type: string
                description: Playlist name.
              songs:
                type: array
                description: Array of playlist songs.  For each song, do not need to provide the music data, just the reference.
                items:
                  $ref: "#/definitions/PlaylistSong"
      responses:
        200:
          description: User playlist imported successfully, new user playlist is returned back.
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        400:
          description: Error ocurred during import.

  /dcd/playlist/clone:
    post:
      tags:
        - dcd-playlist
      summary: Clone's specific playlist
      description: Clone a curated playlist by Zumba.
      consumes:
        - application/x-www-form-urlencoded
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: formData
          required: true
          description: Playlist ID to clone
        - name: name
          in: formData
          type: string
          required: false
          description: Name of the the new playlist
      responses:
        200:
          description: Playlist cloned successfully, new user playlist ID returned back.
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Error ocurred during cloning.
        404:
          description: Playlist does not exists.

  /dcd/playlist/user:
    get:
      tags:
        - dcd-playlist
      summary: Get user's playlists
      description: Retrieve all of the saved user's playlists
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: limit
          type: integer
          in: query
          description: Specifies the number of results to return.
        - name: offset
          type: integer
          in: query
          description: Specifies the offset of the first result to return.
      responses:
        200:
          description: Retrieve the user's playlists
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/Playlist'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
    post:
      tags:
        - dcd-playlist
      summary: Create new user playlist
      description: Create a new user playlist
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - name
              - songs
            properties:
              image:
                type: string
                description: Base 64 encode image data. This represents the album art.  Image will be stored remotely, to be referrenced by HTTPS path.
              name:
                type: string
                description: Playlist name.
              songs:
                type: array
                description: Array of playlist songs.  For each song, do not need to provide the music data, just the reference.
                items:
                  $ref: "#/definitions/PlaylistSong"
      responses:
        200:
          description: User playlist created successfully, new user playlist ID returned back.
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        400:
          description: Error ocurred during creation.

  /dcd/playlist/user/{id}:
    get:
      tags:
        - dcd-playlist
      summary: Get specific user playlist
      description: Retrieve one specific playlist created by the user
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: User's Playlist ID
      responses:
        200:
          description: Retrieve the playlist
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        404:
          description: Playlist does not exist for the user.
    post:
      tags:
        - dcd-playlist
      summary: Update user playlist
      description: Update user playlist
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: User's Playlist ID to update
        - name: body
          in: body
          required: true
          schema:
            $ref: "#/definitions/PlaylistWithSongs"
      responses:
        200:
          description: User playlist updated successfully.
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        400:
          description: Error while saving the playlist.
        404:
          description: Playlist ID not found for user.
    delete:
      tags:
        - dcd-playlist
      summary: Remove an entire user playlist
      description: Remove an entire user playlist
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: User's Playlist ID to remove
      responses:
        204:
          description: User's playlist removed from system.
        404:
          description: Playlist ID not found for user.

  /dcd/playlist/user/{id}/stream:
    get:
      tags:
        - dcd-playlist
      summary: Get the streaming urls for the songs in the user playlist
      description: Get the streaming urls for the songs in the user playlist
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: User Playlist ID
        - name: device_token
          type: string
          minimum: 1
          in: query
          required: true
          description: Device token
      responses:
        200:
          description: the streaming urls for the songs in the user playlist
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/PlaylistStream'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        404:
          description: Playlist does not exists.

  /dcd/playlist/user/{id}/order:
    post:
      tags:
        - dcd-playlist
      summary: Orders the songs on the user playlist
      description: Orders the songs in the user playlist in the same order the song_ids are passed
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Playlist ID to order the songs.
        - name: song_ids
          in: body
          description: Array of song ids.
          schema:
            $ref: "#/definitions/ArrayOfInt"
      responses:
        204:
          description: User playlist songs ordered successfully.
        400:
          description: Error while ordering the user playlist songs.
        404:
          description: User playlist does not exists.

  /dcd/playlist/user/clone:
    post:
      tags:
        - dcd-playlist
      summary: Clone's a user's playlist
      description: Clone a user's playlist.
      consumes:
        - application/x-www-form-urlencoded
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: formData
          required: true
          description: Playlist ID to clone
        - name: name
          in: formData
          type: string
          required: false
          description: Name of the the new playlist
      responses:
        200:
          description: Playlist cloned successfully, new user playlist ID returned back.
          schema:
            $ref: '#/definitions/PlaylistWithSongs'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Error ocurred during cloning.
        404:
          description: Playlist does not exists.

  /dcd/music:
    get:
      tags:
        - dcd-music
      summary: Get all music
      description: This method will only return the list of available songs for the given user.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: limit
          type: integer
          in: query
          description: Specifies the number of results to return.
        - name: offset
          type: integer
          in: query
          description: Specifies the offset of the first result to return.
      responses:
        200:
          description: Return the list of songs
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/MusicList'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/trending:
    get:
      tags:
        - dcd-music
      summary: Get the trending music.
      description: Will return the 10 most played songs in the last 48 hours that the user can access
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Return the list of songs
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/MusicList'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/favorite:
    get:
      tags:
        - dcd-music
      summary: Get user's favorited music
      description: List all favorited music by the user.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Favorited music.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/MusicList'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
    post:
      tags:
        - dcd-music
      summary: Add a music to user's favorite
      description: Add a new music to favorites.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - id
              - source
            properties:
              id:
                type: integer
                format: int32
                minimum: 1
                description: Music ID
              source:
                type: string
                description: Music source. If source is zin-music then the `id` will be considered a Zumba Music id
      responses:
        204:
          description: Music added to favorities or was previously added.

  /dcd/music/favorite/{music_id}:
    delete:
      tags:
        - dcd-music
      summary: Remove a music from user's favorite
      description: Remove a music from favorities.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: music_id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Music ID
        - name: source
          in: query
          required: true
          type: string
          description: Music source. If source is zin-music then the `id` will be considered a Zumba Music id
      responses:
        204:
          description: Music removed from favorities or was not part of the favorities before.

  /dcd/music/external/favorite:
    post:
      tags:
        - dcd-music
      summary: Add an external music to user's favorite. This endpoint is deprecated, please use /dcd/music/favorite intead
      description: Add a new external music to favorites.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - id
            properties:
              id:
                type: string
                minimum: 1
                description: External Music ID
      responses:
        204:
          description: Music added to favorities or was previously added.

  /dcd/music/report_play:
    post:
      tags:
        - dcd-music
      summary: Report music play
      description: Report the user played music.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: body
          in: body
          required: true
          schema:
            type: array
            items:
              required:
                - music_id
                - device_token
                - country
                - play_time
              properties:
                music_id:
                  type: integer
                  format: int32
                  minimum: 1
                  description: Music ID
                device_token:
                  type: string
                  description: Device unique identifier.
                country:
                  type: string
                  minLength: 2
                  maxLength: 2
                  description: Country ISO 3166-1 code.
                play_time:
                  type: integer
                  description: Unix timestamp
                client_ip:
                  type: string
                  description: Client IP address for the play being reported, defaults to requester's IP.
      responses:
        204:
          description: Accepted and stored.
        400:
          description: Error ocurred

  /dcd/music/{id}/assets:
    get:
      tags:
        - dcd-music
      summary: Get music assets
      description: Retrieve a list of available assets for a given music.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Music ID
        - name: device_token
          in: query
          required: true
          type: string
          description: Device unique identifier.
      responses:
        200:
          description: List of available assets.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              required:
                - quality
                - asset_url
              properties:
                quality:
                  type: string
                  enum:
                    - 128kbps
                    - 160kbps
                    - 192kbps
                    - 256kbps
                    - 320kbps
                asset_url:
                  type: string
                  description: Signed URL valid to retrieve the content for a limited period of time.
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        403:
          description: User does not have permissions to retrieve music.
        404:
          description: Music not found.

  /dcd/music/{id}/choreo_steps:
    get:
      tags:
        - dcd-music
      summary: Get music choreo steps
      description: Retrieve a list of available choreo steps for a given music.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Music ID
      responses:
        200:
          description: List of available choreo steps.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/ChoreoStep'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        403:
          description: User does not have permissions to retrieve music.
        404:
          description: The music provided doesn't have choreo steps associated.

  /dcd/music/external/partial:
    get:
      tags:
        - dcd-music
      summary: Get External Music IDs that have missing fields
      description: Gets an array with all the external ids for external music that have missing fields
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: List of external ids
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            properties:
              external_ids:
                type: array
                items:
                  type: string
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/featured:
    get:
      tags:
        - dcd-music
      summary: Get DCD featured content for music home page
      description: Featured content available for digital distribution for music home page.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: List of featured music category.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/FeaturedMusic'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/{id}:
    get:
      tags:
        - dcd-music
      summary:
        Get music information by ID
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Music ID
      responses:
        200:
          description: Music information
          headers:
            Etag:
              description: Contains the music information
              type: string
          schema:
            $ref: '#/definitions/Music'
        304:
          description:  If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/category:
    get:
      tags:
        - dcd-music
      summary: Get all music categories
      description: Get a list of all music categories.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Categories list.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/MusicCategory'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/category/{id}:
    get:
      tags:
        - dcd-music
      summary: Get specific music category
      description: Get details about a specific music category.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Music category ID
      responses:
        200:
          description: Music category information.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/MusicCategoryWithMusic'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/{id}/waveform:
    get:
      tags:
        - dcd-music
      summary: Get the music's waveform url
      description: Get a url for an image with the music's waveform
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Music ID
      responses:
        200:
          description: The music's waveform url.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/MusicWaveformUrl'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Error ocurred while trying to get the waveform
        404:
          description: The music could not be found by id

  /dcd/playlist/featured:
    get:
      tags:
        - dcd-playlist
      summary: Get DCD featured content for playlist home page
      description: Featured content for playlist home page.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Banner image and featured playlist info.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/FeaturedDcd'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/video:
    get:
      tags:
        - dcd-video
      summary: Get all videos
      description: This method will only return the list of available videos for the given user.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: limit
          type: integer
          in: query
          description: Specifies the number of results to return.
        - name: offset
          type: integer
          in: query
          description: Specifies the offset of the first result to return.
      responses:
        200:
          description: Return the list of videos
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/VideoList'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/video/favorite:
    get:
      tags:
        - dcd-video
      summary: Get user's favorited videos
      description: List all favorited videos by the user.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Favorited videos.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/VideoList'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
    post:
      tags:
        - dcd-video
      summary: Add a video to user's favorite
      description: Add a new video to favorites.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: body
          in: body
          required: true
          schema:
            required:
              - id
            properties:
              id:
                type: integer
                format: int32
                minimum: 1
                description: Video ID
      responses:
        204:
          description: Video added to favorities or was previously added.
        404:
          description: Error thrown if the video was not found.

  /dcd/video/favorite/{video_id}:
    delete:
      tags:
        - dcd-video
      summary: Remove a video from user's favorite
      description: Remove a video from favorities.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: video_id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Video ID
      responses:
        204:
          description: Video removed from favorities or was not part of the favorities before.

  /dcd/video/report_play:
    post:
      tags:
        - dcd-video
      summary: Report video play
      description: Report the user played video(s).
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: body
          in: body
          required: true
          schema:
            type: array
            items:
              required:
                - video_id
                - device_token
                - country
                - play_time
              properties:
                video_id:
                  type: integer
                  format: int32
                  minimum: 1
                  description: Video ID
                asset_id:
                  type: integer
                  format: int32
                  minimum: 1
                  description: Video Asset ID
                device_token:
                  type: string
                  description: Device unique identifier.
                country:
                  type: string
                  minLength: 2
                  maxLength: 2
                  description: Country ISO 3166-1 code.
                play_time:
                  type: integer
                  description: Unix timestamp
                client_ip:
                  type: string
                  description: Client IP address for the play being reported, defaults to requester's IP.
      responses:
        204:
          description: Accepted and stored.
        400:
          description: Error ocurred

  /dcd/video/featured:
    get:
      tags:
        - dcd-video
      summary: Get DCD featured content for video home page
      description: Featured content available for digital distribution for video home page.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: List of featured video categories.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/FeaturedVideo'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/video/{id}:
    get:
      tags:
        - dcd-video
      summary:
        Get video information by ID
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Video ID
      responses:
        200:
          description: Video information with external assets
          headers:
            Etag:
              description: Contains the video information
              type: string
          schema:
            $ref: '#/definitions/Video'
        304:
          description:  If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/video/category:
    get:
      tags:
        - dcd-video
      summary: Get all video categories
      description: Get a list of all video categories.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Categories list.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/VideoCategory'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/video/category/{id}:
    get:
      tags:
        - dcd-video
      summary: Get specific video category
      description: Get details about a specific video category.
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Video category ID
      responses:
        200:
          description: Video category information.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/VideoCategoryWithVideos'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/video/asset/hls/{id}.{extension}:
    get:
      tags:
        - dcd-video
      summary: Get HLS file
      description: Gets the HLS data for a video asset
      parameters:
        - name: id
          type: integer
          format: int32
          minimum: 1
          in: path
          required: true
          description: Video Asset ID
        - name: extension
          type: string
          in: path
          required: true
          description: The extension for the metadata file
      responses:
        200:
          description: Video Asset HLS file.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            type: file
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.
        400:
          description: Can't retrieve HLS data.
        404:
          description: HLS file not found

  /dcd/zin_volume/{id_or_slug}:
    get:
      tags:
        - dcd-video
      summary: Retrieve a ZIN Volume details
      description: Will contain all the ZIN volume information, including the sections, videos, music, notes, etc.
      parameters:
        - name: id_or_slug
          type: string
          description: Category ID (ie, 123) or slug (ie, zin-volume-60).
          in: path
          required: true
        - name: type
          type: string
          description: The type of Category ID passed.
          in: query
          enum:
            - Video
            - Music
      responses:
        200:
          description: ZIN Volume information.
          headers:
            Etag:
              description: Contains a hash of the content.
              type: string
          schema:
            $ref: '#/definitions/ZinVolume'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/sound_effect:
    get:
      tags:
        - dcd
      summary: Retrieve list of sound effects
      description: Will have all the available sound effects, along with an image URL and title.
      security:
        - OAuth2:
          - dcd
      responses:
        200:
          description: Sound effect information
          headers:
            Etag:
              description: Contains a hash of the sound effect contents
              type: string
          schema:
            type: array
            items:
              $ref: '#/definitions/SoundEffect'
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /dcd/music/bpm:
    post:
      tags:
        - dcd
      summary: Get BPM for songs
      description: Get BPM for songs even if we know it or try to find it as fallback
      security:
        - OAuth2:
          - dcd
      parameters:
        - name: songs
          in: body
          required: true
          schema:
            type: array
            items:
              $ref: '#/definitions/SongBPMList'
      responses:
        200:
          description: Response with each song ID and BPM
          headers:
            Etag:
              description: Object with BPM information
              type: string
          schema:
            properties:
              songs:
                type: array
                items:
                  $ref: "#/definitions/BPMResponse"
        304:
          description: If the If-None-Match header is sent and matches with the Etag it will return the 304 (Not Modified) response without the data on the body.

  /training:
    post:
      tags:
        - training
      description: Creates a training
      security:
        - OAuth2:
          - training_management
      consumes:
        - application/json
      parameters:
        - name: body
          in: body
          schema:
            required:
              - training_type_id
              - language
              - capacity
              - location_id
              - airports
              - hotels
              - user_id
              - date
              - times
            properties:
              training_type_id:
                type: string
              language:
                type: string
              capacity:
                type: integer
              complementary_capacity:
                type: integer
              location_id:
                type: string
              airports:
                type: string
              hotels:
                type: string
              user_id:
                type: string
                description: The ES user id
              date:
                type: string
                description: Format "YYYY-MM-DD"
              times:
                type: array
                items:
                  required:
                    - type
                    - date
                    - start
                    - end
                  properties:
                    type:
                      type: string
                      description: Available values are "training_registration" to specify the times of the registration day, or "training" for training days
                    date:
                      type: string
                      description: Format "YYYY-MM-DD"
                    start:
                      type: string
                      description: Format "HH:MM" using 24 hours
                    end:
                      type: string
                      description: Format "HH:MM" using 24 hours
      responses:
        200:
          description: The inserted training id
          schema:
            properties:
              id:
                type: string
        401:
          description: Unauthorized
        400:
          description: An error ocurred trying to create the training

  /training/registration:
    post:
      tags:
        - training
      description: Register a user to a training
      security:
        - OAuth2:
          - training_management
      consumes:
        - application/json
      parameters:
        - name: body
          in: body
          schema:
            required:
              - training_id
              - user_id
            properties:
              training_id:
                type: string
              user_id:
                type: string
              complimentary:
                type: boolean
      responses:
        200:
          description: The training registration id
          schema:
            properties:
              id:
                type: string
        400:
          description: An error ocurred trying to register the user to the training

  /training/location:
    post:
      tags:
        - training
      description: Creates a training location
      security:
        - OAuth2:
          - training_management
      consumes:
        - application/json
      parameters:
        - name: body
          in: body
          schema:
            required:
              - user_id
              - name
              - capacity
              - street
              - street_2
              - country
              - state
              - city
            properties:
              user_id:
                type: string
                description: The ES user id
              name:
                type: string
              capacity:
                type: integer
              street:
                type: string
              street_2:
                type: string
              country:
                type: string
                description: The ISO two letter country code
              state:
                type: string
              city:
                type: string
              postal_code:
                type: integer
              email:
                type: string
              phone:
                type: string
              url:
                type: string
      responses:
        200:
          description: The inserted training location id
          schema:
            properties:
              id:
                type: string
        401:
          description: Unauthorized
        400:
          description: An error ocurred trying to create the training location

  /training/es/{id}/details:
    get:
      tags:
        - training
      summary: Get ES details
      description: Retrieve info about a ES
      security:
        - OAuth2:
          - training_management
      parameters:
        - name: id
          type: string
          in: path
          required: true
          description: The ES ID
      responses:
        200:
          description: The ES details
          schema:
            type: array
            items:
              $ref: '#/definitions/EsDetails'
        401:
          description: Unauthorized
        400:
          description: An error ocurred trying to retrieve ES details

definitions:
  IntID:
    type: integer
    format: int32
    minimum: 1
  Featured:
    required:
      - id
      - image
      - tag
      - title
      - description
    properties:
      id:
        $ref: '#/definitions/IntID'
      image:
        type: string
      tag:
        type: string
      title:
        type: string
      description:
        type: string
      version:
        type: integer
        description: The version of the returned entity
  FeaturedDcd:
    allOf:
      - $ref: '#/definitions/Featured'
      - properties:
          link:
            type: string
          order:
            type: integer
  FeaturedMusic:
    allOf:
      - $ref: '#/definitions/Featured'
  FeaturedVideo:
    allOf:
      - $ref: '#/definitions/Featured'

  ArrayOfInt:
    type: array
    items:
      type: integer

  Playlist:
    description: Music Playlist
    required:
      - id
      - name
      - song_count
    properties:
      id:
        $ref: '#/definitions/IntID'
      image:
        type: string
        description: This represents the album art. Either base64 encoded string or the remote image path (HTTPS).
      name:
        type: string
        description: Playlist name.
        minLength: 1
        maxLength: 22
      modified:
        type: integer
        description: Last modified date for Playlist as Unix timestamp
      duration:
        type: integer
        description: This represents the sum of the duration of every song in the playlist
      trimmed_duration:
        type: integer
        description: This represents the total playlist duration with all the songs effects applied in the playlist
      is_spicy:
        type: boolean
        description: The playlist is spicy if at least a song is marked as spicy
      song_count:
        type: integer
        description: The count of songs in the playlist
      crossfade:
        type: integer
        description: Number of seconds for cross fade by default
      version:
        type: integer
        description: The version of the returned entity

  PlaylistStream:
    required:
      - urls
    properties:
      urls:
        type: array
        description: Song streaming url info
        items:
          $ref: '#/definitions/PlaylistSongStreamingInfo'

  PlaylistSongStreamingInfo:
    required:
      - id
      - url
    properties:
      id:
        type: integer
        description: The song ID
      url:
        type: string
        description: The url for the song

  TemplateElement:
    required:
      - id
      - name
      - slug
    properties:
      id:
        type: integer
        description: The template element ID
      name:
        type: string
      slug:
        type: string
      category:
        $ref: '#/definitions/PlaylistTemplateElementCategory'

  PlaylistTemplate:
    required:
      - id
      - name
      - elements
      - playlist_media_type
      - membership_type
    properties:
      id:
        type: integer
        description: The playlist template ID
      name:
        type: string
        description: The name of the playlist template
      elements:
        type: array
        description: Playlist template elements
        items:
          $ref: '#/definitions/PlaylistTemplateElement'
      playlist_media_type:
        type: string
      membership_type:
        type: string

  PlaylistTemplateElement:
    required:
      - id
      - name
      - slug
      - category
    properties:
      id:
        type: integer
        description: The playlist template element ID
      name:
        type: string
      slug:
        type: string
      category:
        $ref: '#/definitions/PlaylistTemplateElementCategory'

  PlaylistTemplateElementCategory:
    required:
      - id
      - type
    properties:
      id:
        type: integer
      type:
        type: string
      prefix:
        $ref: '#/definitions/CategoryPrefix'

  PlaylistWithSongs:
    allOf:
      - $ref: '#/definitions/Playlist'
      - properties:
          songs:
            type: array
            description: List of Playlist Songs
            items:
              $ref: '#/definitions/PlaylistSong'

  PlaylistSong:
    required:
      - id
      - reference
      - order
      - source
    properties:
      id:
        type: integer
        description: The song ID
      reference:
        type: string
        description: If integer, references Zumba music and music will be included, anything else reference some user specific content and will not have music data.
        minLength: 1
        maxLength: 255
      music:
        $ref: '#/definitions/Music'
      options:
        type: array
        description: Options for playlist, like sound effects, etc
        items:
          $ref: '#/definitions/PlaylistSongOption'
      order:
        type: integer
        description: Order in the playlist, set automatically when creating / updating user playlist
      source:
        type: string
        description: The source of the song, zumba songs source is zin-music
      accessible:
        type: boolean
        description: Indicates if the user can access the song
      template_elements:
        type: array
        items:
          $ref: '#/definitions/TemplateElement'
      external_name:
        type: string
        description: User specific content name
      external_artist:
        type: string
        description: User specific content artist
      external_length:
        type: integer
        description: User specific content length
      version:
        type: integer
        description: The version of the returned entity

  PlaylistSongOption:
    description: Sound effect, trim, fade, or other change to playlist song
    required:
      - option_type
      - start
    properties:
      option_type:
        type: string
        enum:
          - Trim
          - Effect
          - Break
      start:
        type: integer
        description: Start time in seconds from start of song
      value:
        type: string
        description: Depends on type of song option.  Effect will reference what sound effect, trim will reference end time.
      version:
        type: integer
        description: The version of the returned entity

  Rhythm:
    required:
      - id
      - name
    properties:
      id:
        $ref: '#/definitions/IntID'
      name:
        type: string
      version:
        type: integer
        description: The version of the returned entity

  Artist:
    required:
      - id
      - name
    properties:
      id:
        $ref: '#/definitions/IntID'
      name:
        type: string
      version:
        type: integer
        description: The version of the returned entity

  ChoreoStep:
    required:
      - name
      - type
      - thumbnail
      - mini_video
      - start_time
    properties:
      name:
        type: string
        description: The name of the choreo step.
      type:
        type: string
        description: The type of choreo step.
      thumbnail:
        type: string
        description: The URL to the thumbnail for the choreo step.
      mini_video:
        type: string
        description: The URL to the video for the choreo step.
      start_time:
        type: string
        description: The start time for the choreo step in reference to the music. Format in mm:ss.
      version:
        type: integer
        description: The version of the returned entity

  Banner:
    required:
      - id
      - page
      - section
      - title
      - order
      - link_url
      - link_active
      - translation_key
      - image_url_1
    properties:
      id:
        $ref: '#/definitions/IntID'
      page:
        type: string
        description: Reference to the page where banner is supposed to be displayed.
      section:
        type: string
        description: Reference to the section of a page where banner is supposed to be displayed.
      tag:
        type: string
      title:
        type: string
      subtitle:
        type: string
      meta:
        type: string
      order:
        type: integer
        minimum: 0
        description: Display order.
      link_url:
        type: string
      link_text:
        type: string
      link_active:
        type: boolean
        description: Indicates if the banner link is active
      is_video:
        type: boolean
      translation_key:
        type: string
      is_slide:
        type: boolean
      membership_type_id:
        type: integer
        minimum: 1
      image_url_1:
        type: string
      image_url_2:
        type: string
      image_url_3:
        type: string
      image_url_4:
        type: string
      version:
        type: integer
        description: The version of the returned entity

  Benefit:
    required:
      - id
      - name
      - slug
      - description
    properties:
      id:
        $ref: '#/definitions/IntID'
      name:
        type: string
      slug:
        type: string
      description:
        type: string
        description: General description of what feature the benefit grants access to.

  BenefitList:
    description: List of benefits.
    type: array
    items:
      $ref: '#/definitions/Benefit'

  Chapter:
    required:
      - id
      - title
      - position
    properties:
      id:
        $ref: '#/definitions/IntID'
      title:
        type: string
      position:
        type: integer

  ChapterList:
    description: List of chapters.
    type: array
    items:
      $ref: '#/definitions/Chapter'

  CategoryPrefix:
    description: Media category prefix
    required:
      - label
      - color
    properties:
      label:
        type: string
        description: Can be null
      color:
        $ref: '#/definitions/CategoryPrefixColor'

  CategoryPrefixColor:
    description: Media category prefix color
    required:
      - hex
      - r
      - g
      - b
    properties:
      hex:
        type: string
        description: Can be null
      r:
        type: integer
        minimum: 0
        description: Can be null
      g:
        type: integer
        minimum: 0
        description: Can be null
      b:
        type: integer
        minimum: 0
        description: Can be null

  Music:
    required:
      - id
      - name
      - duration
      - rhythm
      - artist
      - can_stream
      - can_download
    properties:
      id:
        $ref: '#/definitions/IntID'
      name:
        type: string
      duration:
        type: integer
        description: Time in seconds.
      keywords:
        type: array
        items:
          type: string
      bpm:
        type: integer
        description: Beats Per Minute.
        minimum: 0
      rhythm:
        $ref: '#/definitions/Rhythm'
      artist:
        $ref: '#/definitions/Artist'
      categories:
        type: array
        description: Music categories without the children categories.
        items:
          $ref: '#/definitions/MusicCategory'
      chapters:
        type: array
        description: Music chapters.
        items:
          $ref: '#/definitions/ChapterList'
      can_stream:
        type: boolean
        default: true
      can_download:
        type: boolean
        default: true
      release_date:
        type: integer
        description: Music release date as unix timestamp
      is_spicy:
        type: boolean
        default: false
      is_favorite:
        type: boolean
        default: false
      has_choreo_steps:
        type: boolean
        default: false
      external_id:
        type: string
        description: The external music id
      special_notes:
        type: string
        description: Legal or special notes for music. This field is optional and might not be present in the output
      related_videos:
        $ref: '#/definitions/VideoList'
      choreography_video:
        $ref: '#/definitions/Video'
      version:
        type: integer
        description: The version of the returned entity
  MusicList:
    description: List of songs.
    type: array
    items:
      $ref: '#/definitions/Music'
  MusicCategory:
    description: Music category.
    required:
      - id
      - name
      - slug
      - type
      - thumbnail_url
      - image
    properties:
      id:
        $ref: '#/definitions/IntID'
      thumbnail_url:
        type: string
      image:
        type: string
      name:
        type: string
      slug:
        type: string
      description:
        type: string
      legal_description:
        type: string
      type:
        type: string
        enum: ["regular", "mega-mix", "zin-volume"]
        default: regular
      display_order:
        type: integer
        minimum: 0
      prefix:
        type: array
        items:
          $ref: '#/definitions/CategoryPrefix'
      children_categories:
        type: array
        items:
          $ref: '#/definitions/MusicCategory'
      num_music:
        type: integer
        minimum: 0
      version:
        type: integer
        description: The version of the returned entity

  MusicCategoryWithMusic:
    allOf:
      - $ref: '#/definitions/MusicCategory'
      - properties:
          music:
            $ref: "#/definitions/MusicList"

  Video:
    properties:
      id:
        $ref: '#/definitions/IntID'
      name:
        type: string
      description:
        type: string
      duration:
        type: integer
        description: Time in seconds.
      thumbnail_url:
        type: string
      keywords:
        type: array
        items:
          type: string
      rhythm:
        $ref: '#/definitions/Rhythm'
      categories:
        type: array
        description: Video categories without the children categories.
        items:
          $ref: '#/definitions/VideoCategory'
      can_stream:
        type: boolean
        default: true
      can_download:
        type: boolean
        default: true
      release_date:
        type: integer
        description: Music release date as unix timestamp
      is_spicy:
        type: boolean
        default: false
      is_favorite:
        type: boolean
        default: false
      play_count:
        type: integer
        description: How many times the video has been played
      related_music:
        $ref: '#/definitions/Music'
      external_assets:
        type: array
        items:
          $ref: '#/definitions/ExternalAsset'
      choreo_notes:
        type: string
      m3u8:
        type: string
      version:
        type: integer
        description: The version of the returned entity

  ExternalAsset:
    properties:
      url:
        type: string
      width:
        type: integer
      height:
        type: integer
      file_size:
        type: string
      content_type:
        type: string
      type:
        type: string

  VideoList:
    type: array
    items:
      $ref: '#/definitions/Video'

  VideoCategory:
    required:
      - id
      - name
      - slug
      - type
      - thumbnail_url
      - image
    properties:
      id:
        $ref: '#/definitions/IntID'
      thumbnail_url:
        type: string
      image:
        type: string
      name:
        type: string
      description:
        type: string
      legal_description:
        type: string
      type:
        type: string
        enum: ["regular", "zin-volume"]
        default: regular
      display_order:
        type: integer
        minimum: 0
      generated_name:
        type: string
        description: Name generated from the slug. Used on the search functionality.
      prefix:
        type: array
        items:
          $ref: '#/definitions/CategoryPrefix'
      children_categories:
        type: array
        items:
          $ref: '#/definitions/MusicCategory'
      num_videos:
        type: integer
        minimum: 0
      version:
        type: integer
        description: The version of the returned entity
  VideoCategoryWithVideos:
    allOf:
      - $ref: '#/definitions/VideoCategory'
      - properties:
          videos:
            $ref: "#/definitions/VideoList"
  ZinVolume:
    required:
      - id
    properties:
      id:
        $ref: '#/definitions/IntID'
      name:
        type: string
      slug:
        type: string
      image:
        type: string
        description: TBD
      description:
        type: string
      legal_description:
        type: string
        description: Usually contains information about the licensing and when the user can use on their classes.
      sections:
        type: object
        description: Sections of the on volume
        properties:
          one-on-one:
            $ref: '#/definitions/VideoSection'
          live-class:
            $ref: '#/definitions/VideoSection'
          music:
            $ref: '#/definitions/MusicSection'
      notes:
        type: object
        description: Choreo notes
        properties:
          name:
            type: string
          url:
            type: string
          locale:
            type: string
      version:
        type: integer
        description: The version of the returned entity
  VideoSection:
    required:
      - name
      - videos
    properties:
      name:
        type: string
      videos:
        type: array
        items:
          $ref: '#/definitions/Video'
      version:
        type: integer
        description: The version of the returned entity
  MusicSection:
    required:
      - name
      - music
    properties:
      name:
        type: string
      music:
        type: array
        items:
          $ref: '#/definitions/Music'
      version:
        type: integer
        description: The version of the returned entity

  MusicWaveformUrl:
    required:
      - url
    properties:
      url:
        type: string
        description: URL for the music waveform image.

  SoundEffect:
    required:
      - id
      - title
      - thumbnail_url
      - url
      - order
      - modified
    properties:
      id:
        $ref: '#/definitions/IntID'
      title:
        type: string
      thumbnail_url:
        type: string
      url:
        type: string
        description: URL for the wav or mp3 sound file.
      order:
        type: integer
        minimum: 0
        description: Display order.
      modified:
        type: integer
        description: Last time the sound effect was modified as a unix timestamp.
      version:
        type: integer
        description: The version of the returned entity
  Error:
    required:
      - code
      - message
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
  RequestError:
    allOf:
      - $ref: '#/definitions/Error'
      - properties:
          title:
            type: string
          validation:
            type: object
            description: May include additional validation details if the error is related to validation, one object property for each field that failed validation. The property name will match the field name and the value will be the validation error string.
          url:
            type: string
            description: The endpoint URL

  SongBPMList:
    required:
      - id
      - meta
    properties:
      id:
        type: integer
      bpm:
        type: integer
      meta:
        $ref: '#/definitions/SongBPM'
  SongBPM:
    required:
      - title
      - album
      - duration
      - filename
    properties:
      title:
        type: string
      album:
        type: string
      duration:
        type: integer
      filename:
        type: string
  BPMResponse:
    properties:
      id:
        type: integer
      bpm:
        type: integer
  MembershipStatus:
    properties:
      id:
        type: integer
      name:
        type: string
      slug:
        type: string
  License:
    properties:
      id:
        type: integer
      name:
        type: string
      slug:
        type: string
  Plan:
    properties:
      id:
        type: integer
      name:
        type: string
      slug:
        type: string

  PartnerUser:
    properties:
      id:
        type: string
      pid:
        type: integer
      email:
        type: string
      username:
        type: string
      first_name:
        type: string
      last_name:
        type: string
      phone:
        type: string

  CustomerServiceUser:
    properties:
      id:
        type: string
      pid:
        type: integer
      email:
        type: string
      username:
        type: string
      first_name:
        type: string
      last_name:
        type: string
      home_phone:
        type: string
      shipping_phone:
        type: string
      billing_phone:
        type: string

  UserLicense:
    properties:
      id:
        type: integer
      license:
        $ref: '#/definitions/License'
      start_date:
        type: string
        format: date
      expiration_date:
        type: string
        format: date
      status:
        $ref: '#/definitions/MembershipStatus'
  UserPlan:
    properties:
      id:
        type: integer
      plan:
        $ref: '#/definitions/Plan'
      membership_type:
        type: string
      start_date:
        type: string
        format: date
      expiration_date:
        type: string
        format: date
      cancellation_requested_date:
        type: string
        format: date
      status:
        $ref: '#/definitions/MembershipStatus'

  TrainingType:
    required:
      - id
      - name
      - slug
      - version
    properties:
      id:
        type: string
      name:
        type: string
      slug:
        type: string
      version:
        type: integer

  Language:
    required:
      - name
      - slug
      - iso_639_1
      - version
    properties:
      name:
        type: string
      slug:
        type: string
      iso_639_1:
        type: string
      version:
        type: integer

  Location:
    required:
      - id
      - name
      - version
      - capacity
      - street
      - city
      - state
      - country
    properties:
      id:
        type: string
      name:
        type: string
      capacity:
        type: integer
      street:
        type: string
      street_2:
        type: string
      city:
        type: string
      state:
        type: string
      country:
        type: string
      type:
        type: string
      postal_code:
        type: integer
      usage:
        type: string
      email:
        type: string
      phone:
        type: string
      url:
        type: string
      note:
        type: string
      version:
        type: integer

  EsDetails:
    required:
      - id
      - branch_id
      - languages
      - locations
      - training_types
    properties:
      id:
        type: string
      branch_id:
        type: string
      languages:
        type: array
        items:
          $ref: "#/definitions/Language"
      location:
        type: array
        items:
          $ref: "#/definitions/Location"
      training_types:
        type: array
        items:
          $ref: "#/definitions/TrainingType"
      version:
        type: integer
