Mavrck Global User Audience API

The GlobalUserAudience API from Mavrck — 2 operation(s) for globaluseraudience.

OpenAPI Specification

mavrck-globaluseraudience-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  description: Identify your most influential customers and activate them to drive more conversions on social.
  title: MAVRCK.IO Global User Audience API
servers:
- url: http://app.splashscore.com/v1
- url: https://app.splashscore.com/v1
security:
- apiKey: []
tags:
- name: GlobalUserAudience
paths:
  /audience-city-options:
    get:
      summary: Retrieve possible cities to search for
      tags:
      - GlobalUserAudience
      operationId: getAudienceCityOptions
      x-access:
      - administrator
      x-handler: instagram/instagram_audience_insights_options/instagram_audience_city_options_controller.js
      parameters:
      - $ref: '#/components/parameters/limitParam'
      - in: query
        name: city
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Collection of cities
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: string
        '400':
          description: Invalid or missing parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Session expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: City not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /global-users/{globalUserId}/audience-cities:
    get:
      summary: Retrieve cities of the user's audience.
      tags:
      - GlobalUserAudience
      operationId: getGlobalUserAudienceCities
      x-access:
      - administrator
      - shared-cipher
      x-handler: users/global_user_audience_city_controller.js
      parameters:
      - name: globalUserId
        in: path
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      - name: orderProperty
        in: query
        schema:
          type: string
          enum:
          - city
          - percentage
      - $ref: '#/components/parameters/orderDirection'
      responses:
        '200':
          description: Collection of cities
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/ResponseMetadata'
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        city:
                          type: string
                        percentage:
                          type: number
        '400':
          description: Invalid or missing parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Session expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Access forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Global user not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ResponseMetadata:
      properties:
        limit:
          type: number
          format: double
        offset:
          type: number
          format: double
        status:
          type: string
          enum:
          - failure
          - success
        totalCount:
          type: number
          format: double
      type: object
      additionalProperties: false
    Error:
      type: object
      properties:
        type:
          type: string
          description: A key representing the type of error that has occurred.
        error:
          type: string
          description: A static description of the type of error.
        params:
          type: array
          description: For errors invovling parameters, this is an array containing the invalid parameters.
          items:
            type: string
        keys:
          type: array
          items:
            type:
            - string
            - object
        artifactLinks:
          $ref: '#/components/schemas/LinksDeprecated'
        parent:
          type: object
          properties:
            type:
              type: string
              description: A key representing the type of error generated by a request to an external API.
            error:
              type: string
              description: A static description of the parent error.
    LinksDeprecated:
      type: object
      x-access:
      - anonymous
      - influencer
      properties:
        normal:
          type: string
          description: A normal link to an entity.
        deep:
          type: string
          description: A deep link to the entity.
  parameters:
    limitParam:
      in: query
      description: Maximum number of items to return
      name: limit
      schema:
        type: integer
    offsetParam:
      in: query
      description: Number of items to skip
      name: offset
      schema:
        type: integer
    orderDirection:
      in: query
      description: Select the direction by which the data will be ordered, ascending or descending.
      name: orderDirection
      schema:
        type: string
        enum:
        - ASC
        - DESC
  securitySchemes:
    apiKey:
      type: apiKey
      name: api-key
      in: header