x-explorer-enabled: false
openapi: 3.0.0
servers:
 - url: 'https://consumer.uk.eagleeye.com/2.0'
   description: UK Production
info:
  title: Consumer API
  description: Consumer API - Set of AIR API endpoints to perform consumer actions
  version: 1.0.3
paths:
  /consumer:
    post:
      summary: Create
      description: >-
        This method allows the calling application to create a Consumer within
        AIR Platform.
      operationId: createConsumer
      tags:
        - Consumer
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpConnection'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
      requestBody:
        $ref: '#/components/requestBodies/consumerMainEntity'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/consumerIdEntity'
            request:
              examples:
                response:
                  value:
                    Content-Type: application/json;charset=utf-8
                    Accept: application/json
                    X-EES-AUTH-CLIENT-ID: aaabbbccccdddeee357
                    X-EES-AUTH-HASH: ...
                    Connection: keep-alive
                    Accept-Encoding: 'gzip,deflate'
                    clientSecret: 111111
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1123
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    body:
                      title: Mr
                      firstName: John
                      secondName: Smith
                      dob: '1980-01-01'
                      gender: MALE
                      emailAddress: johnsmith@example.com
                      mobileNumber: '4407123456789'
                      address:
                        line1: 3000 Cathedral Hill
                        line2: ''
                        city: Guildford
                        county: Surrey
                        postcode: GU2 7YB
                        country: UK
                      reference: ' YH663987'
                      pushTokens:
                        ios: arfgiu47r8hfj8w93rj9823r5hn89
                        android: hf98309uir3j0393jr098
                      marketing: true
                      segment:
                        - students
                      meta:
                        key-one: value
                        key-two: value
                      status: ACTIVE
            response:
              examples:
                response:
                  value:
                    HTTP/1.1: 200
                    Content-Type: 'application/json;charset=utf-8,'
                    Content-Encoding: gzip
                    payload: |-
                      {
                          "consumerId": 61867
                      }
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
  '/consumer/{consumerId}':
    get:
      summary: Get
      description: >-
        This method allows the calling application to retrieve Consumer details
        by Consumer ID.
      operationId: getConsumer
      tags:
        - Consumer
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpConnection'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
        - $ref: '#/components/parameters/eesConsumerId'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/consumerIdEntity'
            request:
              examples:
                response:
                  value:
                    Content-Type: application/json;charset=utf-8
                    Accept: application/json
                    X-EES-AUTH-CLIENT-ID: aaabbbccccdddeee357
                    X-EES-AUTH-HASH: ...
                    Connection: keep-alive
                    Accept-Encoding: 'gzip,deflate'
                    clientSecret: 111111
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1123
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    consumerId: 62765
            response:
              examples:
                response:
                  value:
                    HTTP/1.1: 200 OK
                    Content-Type: 'application/json;charset=utf-8,'
                    Content-Encoding: gzip
                    payload: |-
                      {
                          "consumerId": 62765,
                          "title": "Mr",
                          "firstName": "John",
                          "secondName": "Smith",
                          "dob": "1980-01-01",
                          "gender": "MALE",
                          "emailAddress": "johnsmith3@example.com",
                          "mobileNumber": "+447123456780",
                          "address": {
                              "line1": "3000 Cathedral Hill",
                              "line2": "",
                              "city": "Guildford",
                              "county": "Surrey",
                              "postcode": "GU2 7YB",
                              "country": "UK"
                          },
                          "reference": " YH663987aa",
                          "pushTokens": {
                              "ios": "arfgiu47r8hfj8w93rj9823r5hn89",
                              "android": "hf98309uir3j0393jr098"
                          },
                          "marketing": true,
                          "segment": [
                              "STUDENTS"
                          ],
                          "meta": {
                              "key-one": "value",
                              "key-two": "value"
                          },
                          "status": "ACTIVE"
                      }
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
    patch:
      summary: Update
      description: >-
        This method allows the calling application to update Consumer details,
        identified by Consumer ID
      operationId: updateConsumer
      tags:
        - Consumer
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpConnection'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
        - $ref: '#/components/parameters/eesConsumerId'
      requestBody:
        $ref: '#/components/requestBodies/consumerMainEntity'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/consumerIdEntity'
                  - $ref: '#/components/schemas/consumerEntity'
            request:
              examples:
                response:
                  value:
                    Content-Type: application/json;charset=utf-8
                    Accept: application/json
                    X-EES-AUTH-CLIENT-ID: aaabbbccccdddeee357
                    X-EES-AUTH-HASH: ...
                    Connection: keep-alive
                    Accept-Encoding: 'gzip,deflate'
                    clientSecret: 111111
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1123
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    consumerId: 62765
                    body: |-
                      {
                          "title": "Mr",
                          "firstName": "John",
                          "secondName": "Smith",
                          "dob": "1980-01-01",
                          "gender": "MALE",
                          "emailAddress": "johnsmith3@example.com",
                          "mobileNumber": "+447123456780",
                          "address": {
                              "line1": "3000 Cathedral Hill",
                              "line2": "",
                              "city": "Guildford",
                              "county": "Surrey",
                              "postcode": "GU2 7YB",
                              "country": "UK"
                          },
                          "reference": " YH663987aa",
                          "pushTokens": {
                              "ios": "arfgiu47r8hfj8w93rj9823r5hn89",
                              "android": "hf98309uir3j0393jr098"
                          },
                          "marketing": true,
                          "segment": [
                              "STUDENTS"
                          ],
                          "meta": {
                              "key-one": "value",
                              "key-two": "value"
                          },
                          "status": "ACTIVE"
                      }
            response:
              examples:
                response:
                  value:
                    HTTP/1.1: 200 OK
                    Content-Type: 'application/json;charset=utf-8,'
                    Content-Encoding: gzip
                    payload: |-
                      {
                          "consumerId": 62765,
                          "title": "Mr",
                          "firstName": "John",
                          "secondName": "Smith",
                          "dob": "1980-01-01",
                          "gender": "MALE",
                          "emailAddress": "johnsmith3@example.com",
                          "mobileNumber": "+447123456780",
                          "address": {
                              "line1": "3000 Cathedral Hill",
                              "line2": "",
                              "city": "Guildford",
                              "county": "Surrey",
                              "postcode": "GU2 7YB",
                              "country": "UK"
                          },
                          "reference": " YH663987aa",
                          "pushTokens": {
                              "ios": "arfgiu47r8hfj8w93rj9823r5hn89",
                              "android": "hf98309uir3j0393jr098"
                          },
                          "marketing": true,
                          "segment": [
                              "STUDENTS"
                          ],
                          "meta": {
                              "key-one": "value",
                              "key-two": "value"
                          },
                          "status": "ACTIVE"
                      }
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
    put:
      summary: Update
      description: >-
        This method allows the calling application to update Consumer details,
        identified by Consumer ID
      operationId: updateConsumerPut
      deprecated: true
      tags:
        - Consumer
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpConnection'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
        - $ref: '#/components/parameters/eesConsumerId'
      requestBody:
        $ref: '#/components/requestBodies/consumerMainEntity'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/consumerIdEntity'
                  - $ref: '#/components/schemas/consumerEntity'
            request:
              examples:
                response:
                  value:
                    Content-Type: application/json;charset=utf-8
                    Accept: application/json
                    X-EES-AUTH-CLIENT-ID: aaabbbccccdddeee357
                    X-EES-AUTH-HASH: ...
                    Connection: keep-alive
                    Accept-Encoding: 'gzip,deflate'
                    clientSecret: 111111
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1123
                    X-CUSTOM-SUBSYSTEM-ID: CRM
                    consumerId: 62765
                    body: |-
                      {
                          "title": "Mr",
                          "firstName": "John",
                          "secondName": "Smith",
                          "dob": "1980-01-01",
                          "gender": "MALE",
                          "emailAddress": "johnsmith3@example.com",
                          "mobileNumber": "+447123456780",
                          "address": {
                              "line1": "3000 Cathedral Hill",
                              "line2": "",
                              "city": "Guildford",
                              "county": "Surrey",
                              "postcode": "GU2 7YB",
                              "country": "UK"
                          },
                          "reference": " YH663987aa",
                          "pushTokens": {
                              "ios": "arfgiu47r8hfj8w93rj9823r5hn89",
                              "android": "hf98309uir3j0393jr098"
                          },
                          "marketing": true,
                          "segment": [
                              "STUDENTS"
                          ],
                          "meta": {
                              "key-one": "value",
                              "key-two": "value"
                          },
                          "status": "ACTIVE"
                      }
            response:
              examples:
                response:
                  value:
                    HTTP/1.1: 200 OK
                    Content-Type: 'application/json;charset=utf-8,'
                    Content-Encoding: gzip
                    payload: |-
                      {
                          "consumerId": 62765,
                          "title": "Mr",
                          "firstName": "John",
                          "secondName": "Smith",
                          "dob": "1980-01-01",
                          "gender": "MALE",
                          "emailAddress": "johnsmith3@example.com",
                          "mobileNumber": "+447123456780",
                          "address": {
                              "line1": "3000 Cathedral Hill",
                              "line2": "",
                              "city": "Guildford",
                              "county": "Surrey",
                              "postcode": "GU2 7YB",
                              "country": "UK"
                          },
                          "reference": " YH663987aa",
                          "pushTokens": {
                              "ios": "arfgiu47r8hfj8w93rj9823r5hn89",
                              "android": "hf98309uir3j0393jr098"
                          },
                          "marketing": true,
                          "segment": [
                              "STUDENTS"
                          ],
                          "meta": {
                              "key-one": "value",
                              "key-two": "value"
                          },
                          "status": "ACTIVE"
                      }
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
  '/consumer/{consumerId}/purge':
    patch:
      summary: Delete
      description: >-
        Purge a consumer's details, along with all associated accounts which are
        ACTIVE, INACTIVE or BLOCKED. This operation can not be undone.
      operationId: purgeConsumer
      tags:
        - Consumer
      parameters:
        - $ref: '#/components/parameters/eesAuthenticationClientId'
        - $ref: '#/components/parameters/eesAuthenticationRequestHash'
        - $ref: '#/components/parameters/httpConnection'
        - $ref: '#/components/parameters/httpAcceptEncoding'
        - $ref: '#/components/parameters/eesMessageId'
        - $ref: '#/components/parameters/eesMessageRetry'
        - $ref: '#/components/parameters/customSubsystemId'
        - $ref: '#/components/parameters/customWildCard'
        - name: consumerId
          in: path
          description: EES AIR Consumer ID
          required: true
          schema:
            type: string
            format: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/consumerEntity'
            request:
              examples:
                response:
                  value:
                    Content-Type: application/json;charset=utf-8
                    Accept: application/json
                    X-EES-AUTH-CLIENT-ID: aaabbbccccdddeee357
                    X-EES-AUTH-HASH: ...
                    Connection: keep-alive
                    Accept-Encoding: 'gzip,deflate'
                    clientSecret: 111111
                    X-EES-TRANSACTION-ID: external-system-unique-reference-1123
                    X-CUSTOM-SUBSYSTEM-ID: CRM
            response:
              examples:
                response:
                  value:
                    HTTP/1.1: 200
                    Content-Type: 'application/json;charset=utf-8,'
                    Content-Encoding: gzip
                    payload: |-
                      {
                          "consumerId": 1285,
                          "title": null,
                          "firstName": null,
                          "secondName": null,
                          "dob": null,
                          "gender": null,
                          "emailAddress": null,
                          "mobileNumber": null,
                          "address": {
                              "line1": null,
                              "line2": null,
                              "city": null,
                              "county": null,
                              "postcode": null,
                              "country": null
                          },
                          "reference": null,
                          "pushTokens": {
                              "ios": null,
                              "android": null
                          },
                          "marketing": null,
                          "segment": null,
                          "meta": [],
                          "status": "PURGED"
                      }
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '415':
          description: Unsupported Media Type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '429':
          $ref: '#/components/responses/tooManyRequests'
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
        '504':
          description: Gateway Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/defaultErrorEntity'
components:
  parameters:
    eesAuthenticationClientId:
      name: X-EES-AUTH-CLIENT-ID
      in: header
      description: >-
        Client ID, This will be provided by EES and is unique to the company
        calling the API.
      required: true
      schema:
        type: string
        format: string
    eesAuthenticationRequestHash:
      name: X-EES-AUTH-HASH
      in: header
      description: >
        Request Security Hash, calculated using SHA-256 function from
        concatenated full Request URI Path with Query String(s), Payload and
        Client Secret
      required: true
      schema:
        type: string
        format: string
    eesMessageId:
      name: X-EES-TRANSACTION-ID
      in: header
      description: Unique Reference for the API transaction within the calling company.
      required: false
      schema:
        type: string
        format: string
    eesMessageRetry:
      name: X-EES-RETRY
      in: header
      description: >-
        This flag denotes the number of attempts that have been made for this
        request.
      required: false
      schema:
        type: string
        format: string
    customSubsystemId:
      name: X-CUSTOM-SUBSYSTEM-ID
      in: header
      description: >-
        Optional header provided by the calling application for EES AIR to
        identify what was the external Subsystem Id / Name.
      required: false
      schema:
        type: string
        format: string
    customWildCard:
      name: X-CUSTOM-KEY
      in: header
      description: >
        Optional header(s) provided by the calling application to EES AIR.
        Please note this header name has to follow pattern X-CUSTOM-*
      required: false
      schema:
        type: string
        format: string
    httpConnection:
      name: Connection
      in: header
      required: false
      description: >
        This general HTTP header controls (or rather influences) whether the
        network connection stays open after the current transaction finishes. If
        the sent value is `keep-alive`, the connection should stay in a special
        state, allowing to be reused for subsequent requests to the same server.
        Please note these connections will be closed after reaching timeout
        threshold by server (usually after 5 seconds).
      schema:
        type: string
        enum:
          - close
          - keep-alive
        default: close
    httpAcceptEncoding:
      name: Accept-Encoding
      in: header
      required: false
      description: >
        This request HTTP header advertises which content encoding (usually a
        compression algorithm) the calling application is able to understand.
        The server selects one of the proposals, use it and informs the client
        of its choice with the Content-Encoding response header. Currently
        supported `gzip` and `deflate`, if request header not present no
        compression will be used.
      schema:
        type: string
        enum:
          - ''
          - gzip
          - deflate
          - 'gzip,deflate'
        default: ''
    eesConsumerId:
      name: consumerId
      in: path
      description: EES AIR Consumer ID
      required: true
      schema:
        type: string
        format: int64
  requestBodies:
    consumerMainEntity:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/consumerMainEntity'
      description: JSON payload
      required: true
  responses:
    tooManyRequests:
      description: Too Many Requests
      headers:
        Retry-after:
          description: The number of seconds after which to retry the request
          schema:
            type: integer
      content:
        application/json:
          schema:
            properties:
              errorCode:
                type: string
                description: The error code
                enum:
                  - 'CE'
              errorMessage:
                type: string
                description: The error message for this error
                enum:
                  - 'This request has been throttled. Please try again later.'
  schemas:
    consumerIdEntity:
      type: object
      required:
        - consumerId
      properties:
        consumerId:
          type: integer
          format: int64
          description: EES AIR Consumer ID
    consumerMainEntity:
      type: object
      required:
        - status
      properties:
        title:
          type: string
          format: string
          description: 'Consumer title, i.e. Mr, Mrs'
        firstName:
          type: string
          format: string
          description: Consumer first/given name
        secondName:
          type: string
          format: string
          description: Consumer last name/surname
        dob:
          type: string
          format: date
          description: Consumer date of birth
        gender:
          type: string
          enum:
            - MALE
            - FEMALE
          description: Consumer gender
        emailAddress:
          type: string
          format: email
          description: Consumer date of birth
        mobileNumber:
          type: string
          description: Consumer mobile/cell number
        address:
          type: string
          format: string
          description: Consumer address
        reference:
          type: string
          format: string
          description: Consumer reference
        pushTokens:
          type: object
          properties:
            ios:
              type: string
              format: string
            android:
              type: string
              format: string
          description: Consumer push tokens for iOS and/or Android
        marketing:
          type: string
          format: boolean
          description: Consumer opted in/out of marketing
        segment:
          type: object
          description: |
            Consumer segments
          properties:
            key1:
              type: string
              description: >-
                Data 1 property, up to 255 characters; up to 255 characters for
                Key 1 Value
            key2:
              type: string
              description: >-
                Data 2 property, up to 255 characters; up to 255 characters for
                Key 2 Value
        meta:
          type: object
          description: |
            Additional Consumer details
          properties:
            key1:
              type: string
              description: >-
                Data 1 property, up to 255 characters; up to 255 characters for
                Key 1 Value
            key2:
              type: string
              description: >-
                Data 2 property, up to 255 characters; up to 255 characters for
                Key 2 Value
        status:
          type: string
          enum:
            - ACTIVE
            - PURGED
            - SUSPENDED
          description: Consumer status
    consumerEntity:
      allOf:
        - $ref: '#/components/schemas/consumerMainEntity'
        - $ref: '#/components/schemas/consumerIdEntity'
    defaultErrorEntity:
      type: object
      properties:
        errorCode:
          type: string
          description: Internal Error Code
          enum:
            - NF
            - IR
            - U
            - AF
            - AT
            - IFU
            - CE
            - IPR
            - MNA
            - MPA
            - P
            - ALR
            - CX
            - CI
            - CP
            - CR
            - CU
            - CORQ
            - CTNR
            - DSN
            - IW
            - RW
            - VURC
            - VURI
            - FES
            - IOC
            - AA
            - ILA
            - IP
            - LIR
            - LNA
            - LPR
            - MAC
            - MTLE
            - MLV
            - MAR
            - OC
            - RWI
            - TEXP
            - TULR
            - UAS
            - UV
            - VA
            - VC
            - VXP
            - VI
            - VL
            - VNL
            - VPUF
            - VSM
            - VUA
            - ITID
            - VU
            - IH
        errorMessage:
          type: string
          description: Human Friendly Error Message
      x-enum:
        - errorCode: NF
          errorMessage: Not Found
        - errorCode: IR
          errorMessage: Invalid Request
        - errorCode: U
          errorMessage: Unknown Error
        - errorCode: AF
          errorMessage: Authorisation Failed
        - errorCode: U
          errorMessage: Unknown Error
        - errorCode: AF
          errorMessage: Authorisation Failed
        - errorCode: AT
          errorMessage: Account Type
        - errorCode: IFU
          errorMessage: Insufficient Founds
        - errorCode: CE
          errorMessage: Configuration Error
        - errorCode: IPR
          errorMessage: IP Address Rejected
        - errorCode: MNA
          errorMessage: Method Not Allowed
        - errorCode: MPA
          errorMessage: Missing Parameter
        - errorCode: P
          errorMessage: Privileges
        - errorCode: ALR
          errorMessage: Account Limit Reached
        - errorCode: CX
          errorMessage: Campaign Expired
        - errorCode: CI
          errorMessage: Campaign Inactive
        - errorCode: CP
          errorMessage: Campaign Pending
        - errorCode: CR
          errorMessage: Campaign Removed
        - errorCode: CU
          errorMessage: Campaign Unknown
        - errorCode: CORQ
          errorMessage: Consumer Required
        - errorCode: CTNR
          errorMessage: Consumer Type Not Recognized
        - errorCode: DSN
          errorMessage: Duplicated Serial Number
        - errorCode: IW
          errorMessage: Voucher Can Not Be Created
        - errorCode: RW
          errorMessage: Voucher Can Not Be Redeemed
        - errorCode: VURC
          errorMessage: No Voucher Available to Redeem for Campaign
        - errorCode: VURI
          errorMessage: No Voucher Available to Redeem for this Identity
        - errorCode: FES
          errorMessage: Scheduling Format Incorrect
        - errorCode: IOC
          errorMessage: Improper Offer Configuration
        - errorCode: AA
          errorMessage: Invalid Access to API Method
        - errorCode: ILA
          errorMessage: Invalid Load Amount
        - errorCode: IP
          errorMessage: Invalid Parameter
        - errorCode: LIR
          errorMessage: Outlet Identifier Required
        - errorCode: LNA
          errorMessage: Outlet Not Allowed
        - errorCode: LPR
          errorMessage: Outlet Prohibited by Campaign Settings
        - errorCode: MAC
          errorMessage: Maximum Number of Code Variations
        - errorCode: MTLE
          errorMessage: Max Active Tokens Limit Exceeded
        - errorCode: MLV
          errorMessage: Maximum Voucher Value Exceeded
        - errorCode: MAR
          errorMessage: Minimum Amount Required
        - errorCode: OC
          errorMessage: Campaign has no Offer
        - errorCode: RWI
          errorMessage: >-
            Token cannot be Redeemed at this time. Blocked by redemption windows.
        - errorCode: TEXP
          errorMessage: Token Expired
        - errorCode: TULR
          errorMessage: Token Usage Limit Reached
        - errorCode: UAS
          errorMessage: Transaction Not Allowed by current account status
        - errorCode: UV
          errorMessage: Voucher Unknown
        - errorCode: VA
          errorMessage: Voucher already been sent
        - errorCode: VC
          errorMessage: Voucher Cancelled
        - errorCode: VXP
          errorMessage: Voucher Expired
        - errorCode: VI
          errorMessage: Voucher Invalid
        - errorCode: VL
          errorMessage: Voucher Locked
        - errorCode: VNL
          errorMessage: Voucher Not Locked
        - errorCode: VPUF
          errorMessage: You don't have privileges to unlock this token
        - errorCode: VSM
          errorMessage: Voucher Serial Mismatch
        - errorCode: VUA
          errorMessage: No vouchers available for this campaign
        - errorCode: ITID
          errorMessage: Invalid Transaction ID
        - errorCode: VU
          errorMessage: Voucher already redeemed
        - errorCode: IH
          errorMessage: Invalid Header set
