Mavrck Points API

The Points API from Mavrck — 1 operation(s) for points.

OpenAPI Specification

mavrck-points-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 Points API
servers:
- url: http://app.splashscore.com/v1
- url: https://app.splashscore.com/v1
security:
- apiKey: []
tags:
- name: Points
paths:
  /influencers/{membershipId}/points-history:
    get:
      tags:
      - Points
      operationId: getInfluencerPointsHistory
      x-handler: points/influencer_points_history_controller.js
      x-access:
      - administrator
      summary: Retrieve the points history for an influencer.
      parameters:
      - $ref: '#/components/parameters/orderByParam'
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      - name: membershipId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Collection of point transactions.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    $ref: '#/components/schemas/ResponseMetadata'
                  data:
                    items:
                      $ref: '#/components/schemas/PointTransaction'
                    type: array
        '400':
          description: Invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Session expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Action not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
      - Points
      operationId: grantPointToInfluencer
      x-handler: points/influencer_points_history_controller.js
      x-access:
      - administrator
      summary: Grant points for an influencer in a manual entry.
      parameters:
      - name: membershipId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: Point Grant URI
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PointGrantURI'
        '400':
          description: Point grant not completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Session expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Point grant already completed for this influencer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Point grant not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              - reason
              properties:
                amount:
                  type: integer
                reason:
                  type: string
components:
  schemas:
    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.
    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
    PointGrantURI:
      type: object
      required:
      - sourceId
      properties:
        sourceId:
          type: integer
          description: Unique identifier representing the source of the point granted.
    PointTransaction:
      type: object
      properties:
        sourceType:
          type: string
          description: The origination of the point transaction.
        actionId:
          type: integer
          description: ID of associated action.
        actionType:
          type: string
          description: Type of associated action.
        pointGrantTime:
          type: string
          format: date
          description: Datetime points were granted.
        amount:
          type: integer
          description: Amount of points in this transaction.
        activationId:
          type: integer
          description: Activation ID associated.
        conversionDatapointId:
          type: integer
          description: Conversion data point id associated.
        description:
          type: string
          description: A description provided for this points transaction e.g. action group name, incentive name, reason for manual entry.
        incentiveClaimId:
          type: integer
          description: Incentive claim ID associated.
    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
    orderByParam:
      in: query
      description: Attribute to order by.
      name: orderBy
      schema:
        type: string
    offsetParam:
      in: query
      description: Number of items to skip
      name: offset
      schema:
        type: integer
  securitySchemes:
    apiKey:
      type: apiKey
      name: api-key
      in: header