openapi: 3.0.3
info:
  title: metapic-api
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://api.metapic.com'
paths:
  '/clicks/by-date/{user_id}':
    get:
      summary: 'Get Clicks By Date'
      operationId: getClicksByDate
      description: 'Return the number of clicks. If is given user_id - connected to that user. Between the from and to dates if not given - for today.'
      parameters:
        -
          in: query
          name: from
          description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
          example: '2014-11-08 10:24'
          required: false
          schema:
            type: string
            description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
            example: '2014-11-08 10:24'
        -
          in: query
          name: to
          description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
          example: '2014-11-08 10:24'
          required: false
          schema:
            type: string
            description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
            example: '2014-11-08 10:24'
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  '{userEmail}':
                    day:
                      -
                        date: '2020-02-17'
                        link_clicks: 262
                        tag_clicks: 0
                        user_id: 838
                        email: '{userEmail}'
                      - ...
                    total: 58687
                properties:
                  '{userEmail}':
                    type: object
                    properties:
                      day:
                        type: array
                        example:
                          -
                            date: '2020-02-17'
                            link_clicks: 262
                            tag_clicks: 0
                            user_id: 838
                            email: '{userEmail}'
                          - ...
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                              example: '2020-02-17'
                            link_clicks:
                              type: integer
                              example: 262
                            tag_clicks:
                              type: integer
                              example: 0
                            user_id:
                              type: integer
                              example: 838
                            email:
                              type: string
                              example: '{userEmail}'
                      total:
                        type: integer
                        example: 58687
      tags:
        - Clicks
    parameters:
      -
        in: path
        name: user_id
        description: 'Optional parameter. The id of the user to fetch clicks for.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 1
  /clicks:
    get:
      summary: 'Get Clicks'
      operationId: getClicks
      description: 'Return the number of clicks. Between the from and to dates if not given for today.'
      parameters:
        -
          in: query
          name: from
          description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
          example: '2014-11-08 10:24'
          required: false
          schema:
            type: string
            description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
            example: '2014-11-08 10:24'
        -
          in: query
          name: to
          description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
          example: '2014-11-08 10:24'
          required: false
          schema:
            type: string
            description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
            example: '2014-11-08 10:24'
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    email: '{userEmail}'
                    tag_clicks: 0
                    link_clicks: 16259
                    total_clicks: 16259
                    user_revenue: 853070
                    client_revenue: 0
                    affiliate: 0
                    user_id: '{userId}'
                    sum_sek: '15290'
                    ut_user_id: 838
                  - ...
      tags:
        - Clicks
  '/clicks/{id}':
    get:
      summary: 'Get User Clicks'
      operationId: getUserClicks
      description: 'Return the number of clicks. If is given user_id - connected to that user. Between the from and to dates if not given - for today.'
      parameters:
        -
          in: query
          name: from
          description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
          example: '2014-11-08 10:24'
          required: false
          schema:
            type: string
            description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
            example: '2014-11-08 10:24'
        -
          in: query
          name: to
          description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
          example: '2014-11-08 10:24'
          required: false
          schema:
            type: string
            description: "Valid date|datetime format 2014-11-08 10:24 as string.\n\nMust be a valid date."
            example: '2014-11-08 10:24'
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  email: '{userEmail}'
                  tag_clicks: 0
                  link_clicks: 16259
                  total_clicks: 16259
                  user_revenue: 853070
                  client_revenue: 0
                  affiliate: 0
                  user_id: '{userId}'
                  sum_sek: '15290'
                  ut_user_id: 838
                properties:
                  email:
                    type: string
                    example: '{userEmail}'
                  tag_clicks:
                    type: integer
                    example: 0
                  link_clicks:
                    type: integer
                    example: 16259
                  total_clicks:
                    type: integer
                    example: 16259
                  user_revenue:
                    type: integer
                    example: 853070
                  client_revenue:
                    type: integer
                    example: 0
                  affiliate:
                    type: integer
                    example: 0
                  user_id:
                    type: string
                    example: '{userId}'
                  sum_sek:
                    type: string
                    example: '15290'
                  ut_user_id:
                    type: integer
                    example: 838
      tags:
        - Clicks
    parameters:
      -
        in: path
        name: user_id
        description: 'The id of the user to fetch clicks for.'
        example: 1
        required: true
        schema:
          type: integer
  '/deepLinkBlogPost/{id}':
    post:
      summary: 'DeepLink BlogPost'
      operationId: deepLinkBlogPost
      description: 'Transform a html blocks links to metapic links. Will only transform links that you can earn money on'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  newHtml: '<div> <a href="https://c.mtpc.se/tags/link/2082970"> link</a></div>'
                  linkTranslation:
                    -
                      before: 'https://na-kd.com'
                      status: success
                      store: NA-KD
                      storeId: '{storeId}'
                      type: tradedoubler_SE
                      after: 'https://c.mtpc.se/tags/link/2082970'
                      currency: SEK
                      tag_id: '{tagId}'
                      user_revenue_cpc: 250
                      user_instagram_cpc: 100
                      user_revenue_cpa: 0
                      user_instagram_cpa: 0
                      user_revenue_cpc_formated: '2.50 kr'
                      user_instagram_cpc_formated: '1.00 kr'
                      traffic_sources_costs:
                        -
                          id: 301
                          store_id: '{storeId}'
                          source: 0
                          cpc: 250
                          invoice_cpc: 250
                          cpa: 0
                          invoice_cpa: null
                          created_at: '2023-05-03 12:01:08'
                          updated_at: '2023-05-03 12:01:08'
                          user_revenue: 1
                          client_revenue: null
                          cpc_formatted: '2.50 kr'
                          title: General
                        -
                          id: 302
                          store_id: '{storeId}'
                          source: 1
                          cpc: 100
                          invoice_cpc: 100
                          cpa: null
                          invoice_cpa: null
                          created_at: '2023-05-03 12:01:09'
                          updated_at: '2023-05-03 12:01:09'
                          user_revenue: 1
                          client_revenue: null
                          cpc_formatted: '1.00 kr'
                          title: Instagram
                  isUpdated: true
                properties:
                  newHtml:
                    type: string
                    example: '<div> <a href="https://c.mtpc.se/tags/link/2082970"> link</a></div>'
                  linkTranslation:
                    type: array
                    example:
                      -
                        before: 'https://na-kd.com'
                        status: success
                        store: NA-KD
                        storeId: '{storeId}'
                        type: tradedoubler_SE
                        after: 'https://c.mtpc.se/tags/link/2082970'
                        currency: SEK
                        tag_id: '{tagId}'
                        user_revenue_cpc: 250
                        user_instagram_cpc: 100
                        user_revenue_cpa: 0
                        user_instagram_cpa: 0
                        user_revenue_cpc_formated: '2.50 kr'
                        user_instagram_cpc_formated: '1.00 kr'
                        traffic_sources_costs:
                          -
                            id: 301
                            store_id: '{storeId}'
                            source: 0
                            cpc: 250
                            invoice_cpc: 250
                            cpa: 0
                            invoice_cpa: null
                            created_at: '2023-05-03 12:01:08'
                            updated_at: '2023-05-03 12:01:08'
                            user_revenue: 1
                            client_revenue: null
                            cpc_formatted: '2.50 kr'
                            title: General
                          -
                            id: 302
                            store_id: '{storeId}'
                            source: 1
                            cpc: 100
                            invoice_cpc: 100
                            cpa: null
                            invoice_cpa: null
                            created_at: '2023-05-03 12:01:09'
                            updated_at: '2023-05-03 12:01:09'
                            user_revenue: 1
                            client_revenue: null
                            cpc_formatted: '1.00 kr'
                            title: Instagram
                    items:
                      type: object
                      properties:
                        before:
                          type: string
                          example: 'https://na-kd.com'
                        status:
                          type: string
                          example: success
                        store:
                          type: string
                          example: NA-KD
                        storeId:
                          type: string
                          example: '{storeId}'
                        type:
                          type: string
                          example: tradedoubler_SE
                        after:
                          type: string
                          example: 'https://c.mtpc.se/tags/link/2082970'
                        currency:
                          type: string
                          example: SEK
                        tag_id:
                          type: string
                          example: '{tagId}'
                        user_revenue_cpc:
                          type: integer
                          example: 250
                        user_instagram_cpc:
                          type: integer
                          example: 100
                        user_revenue_cpa:
                          type: integer
                          example: 0
                        user_instagram_cpa:
                          type: integer
                          example: 0
                        user_revenue_cpc_formated:
                          type: string
                          example: '2.50 kr'
                        user_instagram_cpc_formated:
                          type: string
                          example: '1.00 kr'
                        traffic_sources_costs:
                          type: array
                          example:
                            -
                              id: 301
                              store_id: '{storeId}'
                              source: 0
                              cpc: 250
                              invoice_cpc: 250
                              cpa: 0
                              invoice_cpa: null
                              created_at: '2023-05-03 12:01:08'
                              updated_at: '2023-05-03 12:01:08'
                              user_revenue: 1
                              client_revenue: null
                              cpc_formatted: '2.50 kr'
                              title: General
                            -
                              id: 302
                              store_id: '{storeId}'
                              source: 1
                              cpc: 100
                              invoice_cpc: 100
                              cpa: null
                              invoice_cpa: null
                              created_at: '2023-05-03 12:01:09'
                              updated_at: '2023-05-03 12:01:09'
                              user_revenue: 1
                              client_revenue: null
                              cpc_formatted: '1.00 kr'
                              title: Instagram
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 301
                              store_id:
                                type: string
                                example: '{storeId}'
                              source:
                                type: integer
                                example: 0
                              cpc:
                                type: integer
                                example: 250
                              invoice_cpc:
                                type: integer
                                example: 250
                              cpa:
                                type: integer
                                example: 0
                              invoice_cpa:
                                type: string
                                example: null
                              created_at:
                                type: string
                                example: '2023-05-03 12:01:08'
                              updated_at:
                                type: string
                                example: '2023-05-03 12:01:08'
                              user_revenue:
                                type: integer
                                example: 1
                              client_revenue:
                                type: string
                                example: null
                              cpc_formatted:
                                type: string
                                example: '2.50 kr'
                              title:
                                type: string
                                example: General
                  isUpdated:
                    type: boolean
                    example: true
      tags:
        - 'Deep linking'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                blogPost:
                  type: string
                  description: Link.
                  example: "<div> <a href='https://na-kd.com'> link</a></div>"
                dry:
                  type: boolean
                  description: 'When dry is set - link will not be created.'
                  example: 1
              required:
                - blogPost
    parameters:
      -
        in: path
        name: user_id
        description: 'Optional parameter. The id of the user.'
        required: true
        schema:
          type: integer
        examples:
          omitted:
            summary: 'When the value is omitted'
            value: ''
          present:
            summary: 'When the value is present'
            value: 1
  /deep-links:
    post:
      summary: 'Create Deep Links'
      operationId: createDeepLinks
      description: 'Create deeplinks from an array of links'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    before: 'https://na-kd.com'
                    status: success
                    store: NA-KD
                    storeId: '{storeId}'
                    type: tradedoubler_SE
                    after: 'https://c.mtpc.se/tags/link/2082974'
                    currency: SEK
                    tag_id: '{tagId}'
                    user_revenue_cpc: 250
                    user_instagram_cpc: 100
                    user_revenue_cpa: 0
                    user_instagram_cpa: 0
                    user_revenue_cpc_formated: '2.50 kr'
                    user_instagram_cpc_formated: '1.00 kr'
                    traffic_sources_costs:
                      -
                        id: 301
                        store_id: '{storeId}'
                        source: 0
                        cpc: 250
                        invoice_cpc: 250
                        cpa: 0
                        invoice_cpa: null
                        created_at: '2023-05-03 12:01:08'
                        updated_at: '2023-05-03 12:01:08'
                        user_revenue: 1
                        client_revenue: null
                        cpc_formatted: '2.50 kr'
                        title: General
                      -
                        id: 302
                        store_id: '{storeId}'
                        source: 1
                        cpc: 100
                        invoice_cpc: 100
                        cpa: null
                        invoice_cpa: null
                        created_at: '2023-05-03 12:01:09'
                        updated_at: '2023-05-03 12:01:09'
                        user_revenue: 1
                        client_revenue: null
                        cpc_formatted: '1.00 kr'
                        title: Instagram
                  - ...
      tags:
        - 'Deep linking'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                links:
                  type: string
                  description: 'Json array of links.'
                  example: '["https://ellos.com"]'
                userId:
                  type: string
                  description: 'The user ID.'
                  example: 1
                dry:
                  type: boolean
                  description: 'When dry is set - link will not be created.'
                  example: 1
              required:
                - links
                - userId
  '/v2/stores/{store_id}/offers':
    get:
      summary: 'Display a listing of the resource.'
      operationId: displayAListingOfTheResource
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Get the validation rules that apply to the request.'
      operationId: getTheValidationRulesThatApplyToTheRequest
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                active:
                  type: boolean
                  description: ''
                  example: false
                campaign_title:
                  type: string
                  description: 'Must not be greater than 64 characters.'
                  example: uikqywm
                campaign_text:
                  type: string
                  description: 'Must not be greater than 1056 characters.'
                  example: hcyxmtddsuufg
                has_product_seeding:
                  type: boolean
                  description: ''
                  example: true
                todo:
                  type: array
                  description: ''
                  example:
                    - sunt
                  items:
                    type: string
                has_onetime_payment:
                  type: boolean
                  description: ''
                  example: false
                one_time_payment:
                  type: integer
                  description: 'This field is required when <code>has_onetime_payment</code> is <code>true</code>. Must not be greater than 1000000.'
                  example: 8
                valid_from:
                  type: string
                  description: 'Must be a valid date.'
                  example: '2024-07-02T10:18:47'
                valid_until:
                  type: string
                  description: 'Must be a valid date. Must be a date after <code>from</code>.'
                  example: '2089-02-08'
                max_clicks:
                  type: integer
                  description: 'Must not be greater than 1000000.'
                  example: 13
                per_user_limit:
                  type: boolean
                  description: ''
                  example: true
                max_money:
                  type: integer
                  description: 'Must not be greater than 1000000.'
                  example: 5
                type:
                  type: string
                  description: ''
                  example: user_accept
                  enum:
                    - standard
                    - user_accept
                    - store_accept
                    - suggestion
                traffic_sources_costs:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      source:
                        type: integer
                        description: ''
                        example: 20
                      cpc:
                        type: integer
                        description: 'Must not be greater than 1000.'
                        example: 14
                      cpa:
                        type: number
                        description: 'Must be between 0 and 1.'
                        example: 0
                    required:
                      - source
                      - cpc
                      - cpa
                targets:
                  type: object
                  description: ''
                  example: []
                  properties:
                    user_ids:
                      type: array
                      description: ''
                      example:
                        - 10
                      items:
                        type: integer
                    user_tag_ids:
                      type: array
                      description: ''
                      example:
                        - 11
                      items:
                        type: integer
                    store_group_ids:
                      type: array
                      description: ''
                      example:
                        - 9
                      items:
                        type: integer
                    emails:
                      type: array
                      description: 'The value format is invalid.'
                      example:
                        - klocko.schuyler@example.net
                      items:
                        type: string
                    social_media_identifiers:
                      type: array
                      description: 'Must not be greater than 30 characters.'
                      example:
                        - t
                      items:
                        type: string
              required:
                - active
                - campaign_title
                - type
                - traffic_sources_costs
                - targets
      security: []
  '/v2/offers/{id}':
    put:
      summary: 'Get the validation rules that apply to the request.'
      operationId: getTheValidationRulesThatApplyToTheRequest
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                active:
                  type: boolean
                  description: ''
                  example: false
                campaign_title:
                  type: string
                  description: 'Must not be greater than 64 characters.'
                  example: eqcifnljmbt
                campaign_text:
                  type: string
                  description: 'Must not be greater than 1056 characters.'
                  example: mguttaawfgdiivzcmtot
                has_product_seeding:
                  type: boolean
                  description: ''
                  example: true
                todo:
                  type: array
                  description: ''
                  example:
                    - ab
                  items:
                    type: string
                has_onetime_payment:
                  type: boolean
                  description: ''
                  example: true
                one_time_payment:
                  type: integer
                  description: 'This field is required when <code>has_onetime_payment</code> is <code>true</code>. Must not be greater than 1000000.'
                  example: 5
                valid_from:
                  type: string
                  description: 'Must be a valid date.'
                  example: '2024-07-02T10:18:47'
                valid_until:
                  type: string
                  description: 'Must be a valid date. Must be a date after <code>from</code>.'
                  example: '2121-02-28'
                max_clicks:
                  type: integer
                  description: 'Must not be greater than 1000000.'
                  example: 20
                per_user_limit:
                  type: boolean
                  description: ''
                  example: true
                max_money:
                  type: integer
                  description: 'Must not be greater than 1000000.'
                  example: 7
                type:
                  type: string
                  description: ''
                  example: suggestion
                  enum:
                    - standard
                    - user_accept
                    - store_accept
                    - suggestion
                traffic_sources_costs:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      source:
                        type: integer
                        description: ''
                        example: 11
                      cpc:
                        type: integer
                        description: 'Must not be greater than 1000.'
                        example: 12
                      cpa:
                        type: number
                        description: 'Must be between 0 and 1.'
                        example: 1
                    required:
                      - source
                      - cpc
                      - cpa
                targets:
                  type: object
                  description: ''
                  example: []
                  properties:
                    user_ids:
                      type: array
                      description: ''
                      example:
                        - 19
                      items:
                        type: integer
                    user_tag_ids:
                      type: array
                      description: ''
                      example:
                        - 19
                      items:
                        type: integer
                    store_group_ids:
                      type: array
                      description: ''
                      example:
                        - 13
                      items:
                        type: integer
                    emails:
                      type: array
                      description: 'The value format is invalid.'
                      example:
                        - dickinson.ryder@example.com
                      items:
                        type: string
                    social_media_identifiers:
                      type: array
                      description: 'Must not be greater than 30 characters.'
                      example:
                        - ujjqlibrbyy
                      items:
                        type: string
              required:
                - active
                - campaign_title
                - type
                - traffic_sources_costs
                - targets
      security: []
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  '/v2/offers/{offer_id}/targets':
    get:
      summary: 'Display a listing of the resource.'
      operationId: displayAListingOfTheResource
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Get the validation rules that apply to the request.'
      operationId: getTheValidationRulesThatApplyToTheRequest
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                user_ids:
                  type: array
                  description: ''
                  example:
                    - 2
                  items:
                    type: integer
                user_tag_ids:
                  type: array
                  description: ''
                  example:
                    - 7
                  items:
                    type: integer
                store_group_ids:
                  type: array
                  description: ''
                  example:
                    - 10
                  items:
                    type: integer
                emails:
                  type: array
                  description: 'The value format is invalid.'
                  example:
                    - lonie86@example.net
                  items:
                    type: string
                social_media_identifiers:
                  type: array
                  description: 'Must not be greater than 30 characters.'
                  example:
                    - ymtfjkptna
                  items:
                    type: string
      security: []
  '/v2/offers/{offer_id}/targets/{id}':
    get:
      summary: 'Display the specified resource.'
      operationId: displayTheSpecifiedResource
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /v2/clients:
    get:
      summary: 'Get the validation rules that apply to the request.'
      operationId: getTheValidationRulesThatApplyToTheRequest
      description: ''
      parameters:
        -
          in: query
          name: name
          description: 'Must not be greater than 255 characters.'
          example: mhozdkmcavmucvb
          required: false
          schema:
            type: string
            description: 'Must not be greater than 255 characters.'
            example: mhozdkmcavmucvb
        -
          in: query
          name: store_group_id
          description: ''
          example: 19
          required: false
          schema:
            type: integer
            description: ''
            example: 19
        -
          in: query
          name: size
          description: 'Must not be greater than 100.'
          example: 6
          required: false
          schema:
            type: integer
            description: 'Must not be greater than 100.'
            example: 6
        -
          in: query
          name: sort_by
          description: ''
          example: et
          required: false
          schema:
            type: string
            description: ''
            example: et
      responses: {  }
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  '/v2/clients/{id}':
    get:
      summary: 'Display the specified resource.'
      operationId: displayTheSpecifiedResource
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /v2/users:
    get:
      summary: 'Get the validation rules that apply to the request.'
      operationId: getTheValidationRulesThatApplyToTheRequest
      description: ''
      parameters:
        -
          in: query
          name: query
          description: 'Must not be greater than 64 characters.'
          example: kpiawouwboxjz
          required: false
          schema:
            type: string
            description: 'Must not be greater than 64 characters.'
            example: kpiawouwboxjz
        -
          in: query
          name: client_id
          description: ''
          example: 10
          required: false
          schema:
            type: integer
            description: ''
            example: 10
        -
          in: query
          name: store_group_id
          description: ''
          example: 7
          required: false
          schema:
            type: integer
            description: ''
            example: 7
        -
          in: query
          name: size
          description: 'Must not be greater than 100.'
          example: 6
          required: false
          schema:
            type: integer
            description: 'Must not be greater than 100.'
            example: 6
        -
          in: query
          name: sort_by
          description: ''
          example: quos
          required: false
          schema:
            type: string
            description: ''
            example: quos
      responses: {  }
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  '/v2/users/{id}':
    get:
      summary: 'Display the specified resource.'
      operationId: displayTheSpecifiedResource
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /v2/stores:
    get:
      summary: 'Get the validation rules that apply to the request.'
      operationId: getTheValidationRulesThatApplyToTheRequest
      description: ''
      parameters:
        -
          in: query
          name: query
          description: 'Must not be greater than 255 characters.'
          example: vkqtpbbscqcbvflj
          required: false
          schema:
            type: string
            description: 'Must not be greater than 255 characters.'
            example: vkqtpbbscqcbvflj
        -
          in: query
          name: store_group_id
          description: ''
          example: 18
          required: false
          schema:
            type: integer
            description: ''
            example: 18
        -
          in: query
          name: size
          description: 'Must not be greater than 100.'
          example: 11
          required: false
          schema:
            type: integer
            description: 'Must not be greater than 100.'
            example: 11
        -
          in: query
          name: sort_by
          description: ''
          example: excepturi
          required: false
          schema:
            type: string
            description: ''
            example: excepturi
      responses: {  }
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Create Store'
      operationId: createStore
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: ''
                  example: accusamus
                domains:
                  type: array
                  description: "Store domains.\n\nMust match the regex /^(https?:\\/\\/)?([\\dA-Za-z\\.-]+)\\.([A-Za-z\\.]{2,6})([\\/\\w \\.-]*)*\\/?$/."
                  example:
                    - 'https://lrB.LP-/  /'
                  items:
                    type: string
                categories:
                  type: array
                  description: 'Store categories IDs.'
                  example:
                    - 1
                  items:
                    type: string
                logo_url:
                  type: string
                  description: 'the logo url'
                  example: 'http://www.grady.com/'
                country:
                  type: string
                  description: 'Store locale.'
                  example: SE
                currency:
                  type: string
                  description: 'Store ISO currency code.'
                  example: EUR
                language:
                  type: string
                  description: ''
                  example: saepe
                billing:
                  type: object
                  description: ''
                  example: []
                  properties:
                    company_name:
                      type: string
                      description: ''
                      example: ullam
                    street:
                      type: string
                      description: ''
                      example: omnis
                    postal_code:
                      type: string
                      description: ''
                      example: possimus
                    city:
                      type: string
                      description: ''
                      example: sed
                    vat_number:
                      type: string
                      description: ''
                      example: non
              required:
                - name
                - logo_url
                - country
                - currency
      security: []
  '/v2/stores/{id}':
    get:
      summary: 'Display the specified resource.'
      operationId: displayTheSpecifiedResource
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /v2/user-tags:
    get:
      summary: 'Get the validation rules that apply to the request.'
      operationId: getTheValidationRulesThatApplyToTheRequest
      description: ''
      parameters:
        -
          in: query
          name: name
          description: 'Must not be greater than 255 characters.'
          example: rjnlnsvqerqlqtfqzt
          required: false
          schema:
            type: string
            description: 'Must not be greater than 255 characters.'
            example: rjnlnsvqerqlqtfqzt
        -
          in: query
          name: store_id
          description: ''
          example: 14
          required: false
          schema:
            type: integer
            description: ''
            example: 14
        -
          in: query
          name: access_levels
          description: ''
          example: null
          required: false
          schema:
            type: object
            description: ''
            example: null
            properties: {  }
        -
          in: query
          name: size
          description: 'Must not be greater than 100.'
          example: 11
          required: false
          schema:
            type: integer
            description: 'Must not be greater than 100.'
            example: 11
        -
          in: query
          name: sort_by
          description: ''
          example: cupiditate
          required: false
          schema:
            type: string
            description: ''
            example: cupiditate
      responses: {  }
      tags:
        - Endpoints
      security: []
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  '/v2/user-tags/{id}':
    get:
      summary: 'Display the specified resource.'
      operationId: displayTheSpecifiedResource
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /hello:
    get:
      summary: 'Say Hello to World'
      operationId: sayHelloToWorld
      description: 'Returns a hello message with the arguments that you send in'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'hello world'
                  input:
                    access_token: OYqOixgvEbxc9nnKiZCywzDkZHNpKRP8
                    client_id: '591571223752267'
                properties:
                  message:
                    type: string
                    example: 'hello world'
                  input:
                    type: object
                    properties:
                      access_token:
                        type: string
                        example: OYqOixgvEbxc9nnKiZCywzDkZHNpKRP8
                      client_id:
                        type: string
                        example: '591571223752267'
      tags:
        - Endpoints
  '/clients/{clientId}/invoices/{invoiceId}/pdf':
    get:
      summary: 'Get Client organization invoice payment Pdf'
      operationId: getClientOrganizationInvoicePaymentPdf
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  '/clients/{clientId}/invoices/{invoiceId}/excel':
    get:
      summary: 'Get Client organization invoice payment excel'
      operationId: getClientOrganizationInvoicePaymentExcel
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /clients/check:
    post:
      summary: 'Check Agency'
      operationId: checkAgency
      description: 'Returns agency name'
      parameters: []
      responses: {  }
      tags:
        - Endpoints
  /users/access-token/from-email:
    post:
      summary: 'Get user access token by email (only for default zezam client)'
      operationId: getUserAccessTokenByEmailonlyForDefaultZezamClient
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: ''
                  example: aut
              required:
                - email
      security: []
  /users/access-token/from-id:
    post:
      summary: 'Get user access token by userId (only for default zezam client)'
      operationId: getUserAccessTokenByUserIdonlyForDefaultZezamClient
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userId:
                  type: integer
                  description: ''
                  example: 9
              required:
                - userId
      security: []
  '/v2/stores/{store_id}/payment':
    put:
      summary: ''
      operationId: putV2StoresStore_idPayment
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Endpoints
      security: []
  /v2/entrypoint:
    get:
      summary: "App's entrypoint"
      operationId: appsEntrypoint
      description: ''
      parameters:
        -
          in: query
          name: app
          description: ''
          example: agency
          required: true
          schema:
            type: string
            description: ''
            example: agency
            enum:
              - advertiser
              - admin
              - agency
              - creator
        -
          in: query
          name: store_id
          description: 'This field is required when <code>app</code> is <code>advertiser</code>.'
          example: 7
          required: false
          schema:
            type: integer
            description: 'This field is required when <code>app</code> is <code>advertiser</code>.'
            example: 7
      responses: {  }
      tags:
        - Entrypoint
  '/v2/offer-users/{offer_user_id}/comments':
    post:
      summary: 'Add OfferUser comment'
      operationId: addOfferUserComment
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 12
                  user_id: 40185
                  user_full_name: 'Mark mark'
                  comment_text: 'Test new 234'
                  created_at: '2024-04-24T13:03:41'
                  updated_at: '2024-04-24T13:03:41'
                properties:
                  id:
                    type: integer
                    example: 12
                  user_id:
                    type: integer
                    example: 40185
                  user_full_name:
                    type: string
                    example: 'Mark mark'
                  comment_text:
                    type: string
                    example: 'Test new 234'
                  created_at:
                    type: string
                    example: '2024-04-24T13:03:41'
                  updated_at:
                    type: string
                    example: '2024-04-24T13:03:41'
      tags:
        - 'Offer Comments V2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                  description: 'Must not be greater than 15000 characters.'
                  example: lrgc
              required:
                - comment
    parameters:
      -
        in: path
        name: offer_user_id
        description: 'The ID of the offerUser.'
        example: '1'
        required: true
        schema:
          type: string
  '/v2/offer-users/{offer_user_id}/comments/{id}':
    put:
      summary: 'Update OfferUser comment'
      operationId: updateOfferUserComment
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 12
                  user_id: 40185
                  user_full_name: 'Mark mark'
                  comment_text: 'Test new 234'
                  created_at: '2024-04-24T13:03:41'
                  updated_at: '2024-04-24T13:03:41'
                properties:
                  id:
                    type: integer
                    example: 12
                  user_id:
                    type: integer
                    example: 40185
                  user_full_name:
                    type: string
                    example: 'Mark mark'
                  comment_text:
                    type: string
                    example: 'Test new 234'
                  created_at:
                    type: string
                    example: '2024-04-24T13:03:41'
                  updated_at:
                    type: string
                    example: '2024-04-24T13:03:41'
      tags:
        - 'Offer Comments V2'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                comment:
                  type: string
                  description: 'Must not be greater than 15000 characters.'
                  example: wjxuoprqkohtjjtsosjjlkx
              required:
                - comment
    delete:
      summary: 'Delete OfferUser comment'
      operationId: deleteOfferUserComment
      description: ''
      parameters: []
      responses: {  }
      tags:
        - 'Offer Comments V2'
    parameters:
      -
        in: path
        name: offer_user_id
        description: 'The ID of the offerUser.'
        example: '1'
        required: true
        schema:
          type: string
      -
        in: path
        name: offer_comment_id
        description: 'The ID of the comment.'
        example: '1'
        required: true
        schema:
          type: string
  '/v2/offer-users/{offerUser_id}/activities':
    get:
      summary: 'Get the list of activities on OfferUser card'
      operationId: getTheListOfActivitiesOnOfferUserCard
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      type: COMMENT
                      actor_id: 34985
                      actor_display_name: '@username'
                      comment_id: 1
                      comment_text: 'Qui delectus provident labore iusto aut ad aperiam. Vitae recusandae quis laborum culpa placeat animi quibusdam. Cum omnis quas velit rerum blanditiis voluptas modi provident.'
                      created_at: '2024-04-16T22:39:26'
                    -
                      type: COMMENT
                      actor_id: 40185
                      actor_display_name: Mark
                      comment_id: 1
                      comment_text: 'Cum a maxime sit rem tenetur. Ad in quibusdam suscipit est eos aut. Ex eligendi necessitatibus tempora distinctio.'
                      created_at: '2024-04-16T22:39:26'
                      updated_at: '2024-04-16T22:39:26'
                    -
                      type: DELETED_COMMENT
                      created_at: '2024-04-16CEST22:15:41'
                    -
                      type: STATUS_CHANGE
                      actor_id: 40185
                      actor_display_name: Admin
                      old_status: suggestion
                      new_status: denied
                      created_at: '2024-04-16T22:39:26'
                    -
                      type: STATUS_CHANGE
                      old_status: applied
                      new_status: have_posted
                      created_at: '2024-04-16T22:42:35'
                    -
                      type: STATUS_CHANGE
                      actor_id: 34985
                      actor_display_name: '@username'
                      old_status: applied
                      new_status: accepted
                      created_at: '2024-04-16T22:44:59'
                  links:
                    first: '/v2/offer-users/48798908/activities?page=1'
                    last: '/v2/offer-users/48798908/activities?page=10'
                    prev: null
                    next: '/v2/offer-users/48798908/activities?page=2'
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 10
                    links: []
                    path: /v2/offer-users/48798908/activities
                    per_page: 20
                    to: 20
                    total: 200
                properties:
                  data:
                    type: array
                    example:
                      -
                        type: COMMENT
                        actor_id: 34985
                        actor_display_name: '@username'
                        comment_id: 1
                        comment_text: 'Qui delectus provident labore iusto aut ad aperiam. Vitae recusandae quis laborum culpa placeat animi quibusdam. Cum omnis quas velit rerum blanditiis voluptas modi provident.'
                        created_at: '2024-04-16T22:39:26'
                      -
                        type: COMMENT
                        actor_id: 40185
                        actor_display_name: Mark
                        comment_id: 1
                        comment_text: 'Cum a maxime sit rem tenetur. Ad in quibusdam suscipit est eos aut. Ex eligendi necessitatibus tempora distinctio.'
                        created_at: '2024-04-16T22:39:26'
                        updated_at: '2024-04-16T22:39:26'
                      -
                        type: DELETED_COMMENT
                        created_at: '2024-04-16CEST22:15:41'
                      -
                        type: STATUS_CHANGE
                        actor_id: 40185
                        actor_display_name: Admin
                        old_status: suggestion
                        new_status: denied
                        created_at: '2024-04-16T22:39:26'
                      -
                        type: STATUS_CHANGE
                        old_status: applied
                        new_status: have_posted
                        created_at: '2024-04-16T22:42:35'
                      -
                        type: STATUS_CHANGE
                        actor_id: 34985
                        actor_display_name: '@username'
                        old_status: applied
                        new_status: accepted
                        created_at: '2024-04-16T22:44:59'
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          example: COMMENT
                        actor_id:
                          type: integer
                          example: 34985
                        actor_display_name:
                          type: string
                          example: '@username'
                        comment_id:
                          type: integer
                          example: 1
                        comment_text:
                          type: string
                          example: 'Qui delectus provident labore iusto aut ad aperiam. Vitae recusandae quis laborum culpa placeat animi quibusdam. Cum omnis quas velit rerum blanditiis voluptas modi provident.'
                        created_at:
                          type: string
                          example: '2024-04-16T22:39:26'
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: '/v2/offer-users/48798908/activities?page=1'
                      last:
                        type: string
                        example: '/v2/offer-users/48798908/activities?page=10'
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: '/v2/offer-users/48798908/activities?page=2'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 10
                      links:
                        type: array
                        example: []
                      path:
                        type: string
                        example: /v2/offer-users/48798908/activities
                      per_page:
                        type: integer
                        example: 20
                      to:
                        type: integer
                        example: 20
                      total:
                        type: integer
                        example: 200
      tags:
        - 'Offer User Activity'
  '/v2/offers/{offer_id}':
    get:
      summary: 'Get offer'
      operationId: getOffer
      description: 'Return offer details.'
      parameters: []
      responses: {  }
      tags:
        - Offers
  '/v2/offers/{offer_id}/uploads':
    post:
      summary: 'Upload Offer Image (v2)'
      operationId: uploadOfferImagev2
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Offers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                default:
                  type: string
                  description: "Offer image.\n\nMust not be greater than 10240 characters."
                  example: image.png
              required:
                - default
      security: []
  '/v2/offers/{offer_id}/users/{id}':
    get:
      summary: 'Checks if user has been added to the offer.'
      operationId: checksIfUserHasBeenAddedToTheOffer
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Offers
      security: []
  '/v2/offers/{offer_id}/participants':
    get:
      summary: 'List participants in a campaign'
      operationId: listParticipantsInACampaign
      description: ''
      parameters:
        -
          in: query
          name: query
          description: "Filters the results that contain a text match for this term.\n A match may happen on either:\n * social media identifier\n * email\n * user id\n * user's username\n * user tag\n\nPartial matches are supported. For example, 'el' will match 'hello'.\n\nMust not be greater than 128 characters."
          example: accusamus
          required: false
          schema:
            type: string
            description: "Filters the results that contain a text match for this term.\n A match may happen on either:\n * social media identifier\n * email\n * user id\n * user's username\n * user tag\n\nPartial matches are supported. For example, 'el' will match 'hello'.\n\nMust not be greater than 128 characters."
            example: accusamus
        -
          in: query
          name: status
          description: ''
          example: suggestion
          required: false
          schema:
            type: string
            description: ''
            example: suggestion
            enum:
              - open
              - applied
              - denied
              - accepted
              - store_denied
              - done
              - suggestion
              - second_prio
              - have_posted
              - have_received
              - product_sent
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  data:
                    -
                      id: null
                      offer_id: null
                      user_id: null
                      display_name: null
                      clicks: null
                      status: null
                      todo: null
                      payment_amount: null
                    -
                      id: null
                      offer_id: null
                      user_id: null
                      display_name: null
                      clicks: null
                      status: null
                      todo: null
                      payment_amount: null
                  links:
                    first: '/?page=1'
                    last: '/?page=1'
                    prev: null
                    next: null
                  meta:
                    current_page: 1
                    from: 1
                    last_page: 1
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        active: false
                      -
                        url: '/?page=1'
                        label: '1'
                        active: true
                      -
                        url: null
                        label: 'Next &raquo;'
                        active: false
                    path: /
                    per_page: 10
                    to: 2
                    total: 2
                properties:
                  data:
                    type: array
                    example:
                      -
                        id: null
                        offer_id: null
                        user_id: null
                        display_name: null
                        clicks: null
                        status: null
                        todo: null
                        payment_amount: null
                      -
                        id: null
                        offer_id: null
                        user_id: null
                        display_name: null
                        clicks: null
                        status: null
                        todo: null
                        payment_amount: null
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: null
                        offer_id:
                          type: string
                          example: null
                        user_id:
                          type: string
                          example: null
                        display_name:
                          type: string
                          example: null
                        clicks:
                          type: string
                          example: null
                        status:
                          type: string
                          example: null
                        todo:
                          type: string
                          example: null
                        payment_amount:
                          type: string
                          example: null
                  links:
                    type: object
                    properties:
                      first:
                        type: string
                        example: '/?page=1'
                      last:
                        type: string
                        example: '/?page=1'
                      prev:
                        type: string
                        example: null
                      next:
                        type: string
                        example: null
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      from:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 1
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            active: false
                          -
                            url: '/?page=1'
                            label: '1'
                            active: true
                          -
                            url: null
                            label: 'Next &raquo;'
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                            label:
                              type: string
                              example: '&laquo; Previous'
                            active:
                              type: boolean
                              example: false
                      path:
                        type: string
                        example: /
                      per_page:
                        type: integer
                        example: 10
                      to:
                        type: integer
                        example: 2
                      total:
                        type: integer
                        example: 2
      tags:
        - Offers
    post:
      summary: 'Store a newly created resource in storage.'
      operationId: storeANewlyCreatedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Offers
      security: []
  '/v2/offers/{offer_id}/participants/{id}':
    get:
      summary: 'Get participant details'
      operationId: getParticipantDetails
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: null
                  offer_id: null
                  user_id: null
                  display_name: null
                  clicks: null
                  status: null
                  todo: null
                  payment_amount: null
                properties:
                  id:
                    type: string
                    example: null
                    description: 'The unique id of this participant'
                  offer_id:
                    type: string
                    example: null
                    description: 'The id of the offer for this participant'
                  user_id:
                    type: string
                    example: null
                    description: 'The id of the user, if Metapic user is linked to the participant'
                  display_name:
                    type: string
                    example: null
                    description: 'The name of the participant'
                  clicks:
                    type: string
                    example: null
                    description: 'The number of clicks left for this participant'
                  status:
                    type: string
                    example: null
                    description: 'The status of this campaign participant'
                  todo:
                    type: string
                    example: null
                    description: 'List of todo items'
                  payment_amount:
                    type: string
                    example: null
      tags:
        - Offers
    put:
      summary: 'Update the specified resource in storage.'
      operationId: updateTheSpecifiedResourceInStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Offers
      security: []
    delete:
      summary: 'Remove the specified resource from storage.'
      operationId: removeTheSpecifiedResourceFromStorage
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Offers
      security: []
  '/v2/offers/{offer_id}/participants/{participant_id}/update-status':
    patch:
      summary: 'Update participant status'
      operationId: updateParticipantStatus
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: '{id}'
                  offer_id: '{offerId}'
                  user_id: '{userId}'
                  clicks: 0
                  status: accepted
                  created_at: '2021-05-25 13:02:06'
                  updated_at: '2021-05-27 11:21:23'
                properties:
                  id:
                    type: string
                    example: '{id}'
                    description: 'The unique id of this participant'
                  offer_id:
                    type: string
                    example: '{offerId}'
                    description: 'The id of the offer for this participant'
                  user_id:
                    type: string
                    example: '{userId}'
                    description: 'The id of the user, if Metapic user is linked to the participant'
                  clicks:
                    type: integer
                    example: 0
                    description: 'The number of clicks left for this participant'
                  status:
                    type: string
                    example: accepted
                    description: 'The status of this campaign participant'
                  created_at:
                    type: string
                    example: '2021-05-25 13:02:06'
                  updated_at:
                    type: string
                    example: '2021-05-27 11:21:23'
      tags:
        - Offers
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: ''
                  example: second_prio
                  enum:
                    - open
                    - applied
                    - denied
                    - accepted
                    - store_denied
                    - done
                    - suggestion
                    - second_prio
                    - have_posted
                    - have_received
                    - product_sent
              required:
                - status
  '/v2/offer-by-token/{offer_token}':
    get:
      summary: 'Get offer'
      operationId: getOffer
      description: 'Return offer details.'
      parameters: []
      responses: {  }
      tags:
        - Offers
  '/v2/offer-by-token/{offer_token}/users/{userId}':
    get:
      summary: 'Checks if user has been added to the offer.'
      operationId: checksIfUserHasBeenAddedToTheOffer
      description: ''
      parameters: []
      responses: {  }
      tags:
        - Offers
      security: []
  '/v2/offer-by-token/{offer_token}/users/{user_id}/join':
    post:
      summary: 'Mark user as having joined the campaign'
      operationId: markUserAsHavingJoinedTheCampaign
      description: 'This can only be performed by the user themselves.'
      parameters: []
      responses: {  }
      tags:
        - Offers
  '/client/{clientId}/paymentsInvoice':
    get:
      summary: 'Get list of all invoices.'
      operationId: getListOfAllInvoices
      description: "Here you get a list of all invoices to this client.\nSee Get Payment for invoice for getting more info about a invoice."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    id: 123
                    payment_date: '2020-07-01 00:00:00'
                    sent_to_partner_at: '2020-07-05 00:00:00'
                    updated_at: '2019-11-12 10:13:50'
                    created_at: '2019-11-12 10:13:50'
                  - ...
      tags:
        - Payment
  '/client/{clientId}/paymentsInvoice/lastMonth':
    get:
      summary: 'Get payments for last month'
      operationId: getPaymentsForLastMonth
      description: 'Will give you all payments for last month. this is not final before 3 working days after last day of month before.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    id: 132424
                    user_id: 123
                    email: email@gmail.com
                    user_earnings: 12345
                    accepted_at: '2020-09-03 14:50:03'
                    client_earnings: 1235
                    currency: SEK
                    user_earnings_formatted: '123.45 kr'
                    client_earnings_formatted: '12.35 kr'
                  - ...
      tags:
        - Payment
  '/client/{clientId}/paymentsInvoice/thisMonth':
    get:
      summary: 'Get payments for this month'
      operationId: getPaymentsForThisMonth
      description: 'Will give you all payments for current month. this is not final before 3 working days after last day of month.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    id: 132424
                    user_id: 123
                    email: email@gmail.com
                    user_earnings: 12345
                    accepted_at: '2020-09-03 14:50:03'
                    client_earnings: 1235
                    currency: SEK
                    user_earnings_formatted: '123.45 kr'
                    client_earnings_formatted: '12.35 kr'
                  - ...
      tags:
        - Payment
  '/users/{userId}/socialMedia':
    get:
      summary: 'Get Social Media'
      operationId: getSocialMedia
      description: "Returns all user's social media connected to your client account, sorted id in asc order."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    id: 3046
                    user_id: '{userId}'
                    type: youtube
                    identifier: sffsdfsdf123
                    is_valid: 1
                    created_at: '2019-06-24 10:39:39'
                    updated_at: '2020-03-27 09:15:45'
                  - ...
      tags:
        - 'Social Media'
    post:
      summary: 'Create Social Media'
      operationId: createSocialMedia
      description: 'Create a new social media for user. Return social media as a json object.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3046
                  user_id: '{userId}'
                  type: youtube
                  identifier: sffsdfsdf123
                  is_valid: 1
                  created_at: '2019-06-24 10:39:39'
                  updated_at: '2020-03-27 09:15:45'
                properties:
                  id:
                    type: integer
                    example: 3046
                  user_id:
                    type: string
                    example: '{userId}'
                  type:
                    type: string
                    example: youtube
                  identifier:
                    type: string
                    example: sffsdfsdf123
                  is_valid:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2019-06-24 10:39:39'
                  updated_at:
                    type: string
                    example: '2020-03-27 09:15:45'
      tags:
        - 'Social Media'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: "Social Media type. Valid values are 'instagram', 'blog', 'website', 'youtube', 'tiktok', 'pintrest', 'snapchat', 'onbaz', 'zezam'."
                  example: youtube
                  enum:
                    - instagram
                    - blog
                    - website
                    - youtube
                    - tiktok
                    - pinterest
                    - zezam
                    - onbaz
                    - snapchat
                    - facebook
                    - discord
                    - linkedin
                    - patreon
                    - telegram
                    - twitter
                    - vimeo
                    - whatsapp
                    - tumblr
                identifier:
                  type: string
                  description: 'Social Media identifier.'
                  example: my_instagram
              required:
                - type
                - identifier
    parameters:
      -
        in: path
        name: user_id
        description: 'The ID of the user.'
        example: 1
        required: true
        schema:
          type: integer
  '/users/{userId}/socialMedia/{id}':
    get:
      summary: 'Get Social Media by ID'
      operationId: getSocialMediaByID
      description: 'Fetches social media based on social media id and user id.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3046
                  user_id: '{userId}'
                  type: youtube
                  identifier: sffsdfsdf123
                  is_valid: 1
                  created_at: '2019-06-24 10:39:39'
                  updated_at: '2020-03-27 09:15:45'
                properties:
                  id:
                    type: integer
                    example: 3046
                  user_id:
                    type: string
                    example: '{userId}'
                  type:
                    type: string
                    example: youtube
                  identifier:
                    type: string
                    example: sffsdfsdf123
                  is_valid:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2019-06-24 10:39:39'
                  updated_at:
                    type: string
                    example: '2020-03-27 09:15:45'
      tags:
        - 'Social Media'
    put:
      summary: 'Update Social Media'
      operationId: updateSocialMedia
      description: "Update user's social media. Return the modified social media as a json object."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: 3046
                  user_id: '{userId}'
                  type: youtube
                  identifier: sffsdfsdf123
                  is_valid: 1
                  created_at: '2019-06-24 10:39:39'
                  updated_at: '2020-03-27 09:15:45'
                properties:
                  id:
                    type: integer
                    example: 3046
                  user_id:
                    type: string
                    example: '{userId}'
                  type:
                    type: string
                    example: youtube
                  identifier:
                    type: string
                    example: sffsdfsdf123
                  is_valid:
                    type: integer
                    example: 1
                  created_at:
                    type: string
                    example: '2019-06-24 10:39:39'
                  updated_at:
                    type: string
                    example: '2020-03-27 09:15:45'
      tags:
        - 'Social Media'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  description: "Social Media type. Valid values are 'instagram', 'blog', 'website', 'youtube'."
                  example: youtube
                  enum:
                    - instagram
                    - blog
                    - website
                    - youtube
                    - tiktok
                    - pinterest
                    - zezam
                    - onbaz
                    - snapchat
                    - facebook
                    - discord
                    - linkedin
                    - patreon
                    - telegram
                    - twitter
                    - vimeo
                    - whatsapp
                    - tumblr
                identifier:
                  type: string
                  description: 'Social Media identifier.'
                  example: my_instagram
              required:
                - type
                - identifier
    delete:
      summary: 'Delete Social Media'
      operationId: deleteSocialMedia
      description: "Delete user's social media."
      parameters: []
      responses: {  }
      tags:
        - 'Social Media'
    parameters:
      -
        in: path
        name: user_id
        description: 'The ID of the user.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: social_media_id
        description: 'The ID of user social media.'
        example: 1
        required: true
        schema:
          type: integer
  '/users/{id}/access-token':
    get:
      summary: 'Access Token'
      operationId: accessToken
      description: 'Get User Access Token'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  random_token: $2y$10$GqXBc.ciJ0qSZQrBJ5X8h.yxsnHs3R8cU6F1MlhhvtfEQAL6Do6yc
                  token: $2y$10$GqXBc.ciJ0qSZQrBJ5X8h.yxsnHs3R8cU6F1MlhhvtfEQAL6Do6yc
                properties:
                  random_token:
                    type: string
                    example: $2y$10$GqXBc.ciJ0qSZQrBJ5X8h.yxsnHs3R8cU6F1MlhhvtfEQAL6Do6yc
                  token:
                    type: string
                    example: $2y$10$GqXBc.ciJ0qSZQrBJ5X8h.yxsnHs3R8cU6F1MlhhvtfEQAL6Do6yc
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the user.'
        example: 1
        required: true
        schema:
          type: integer
  '/users/{id}/user-config':
    get:
      summary: 'User Config'
      operationId: userConfig
      description: 'Get User Config'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  showedPopups:
                    - firstCollageItem
                    - linkTransform
                properties:
                  showedPopups:
                    type: array
                    example:
                      - firstCollageItem
                      - linkTransform
                    items:
                      type: string
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the user.'
        example: 1
        required: true
        schema:
          type: integer
  '/users/{id}/gdpr-delete':
    delete:
      summary: 'GDPR Delete User'
      operationId: gDPRDeleteUser
      description: 'Delete user according to GDPR standards'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: '{userId}'
                  username: ''
                  email: ''
                  phone: ''
                  created_at: '2021-11-10 12:04:16'
                  updated_at: '2022-08-25 10:34:45'
                  admin: 0
                  last_active: '0000-00-00 00:00:00'
                  first_name: ''
                  surname: ''
                  vat_no: ''
                  country: ''
                  city: ''
                  address: ''
                  postcode: ''
                  tier_pricing_type: ''
                  config: null
                  sign_user_agreement: null
                  revenue_tier_id: '{revenue_tier_id}'
                  recruitment_utm: null
                  is_suspended: false
                  is_verified: true
                properties:
                  id:
                    type: string
                    example: '{userId}'
                  username:
                    type: string
                    example: ''
                  email:
                    type: string
                    example: ''
                  phone:
                    type: string
                    example: ''
                  created_at:
                    type: string
                    example: '2021-11-10 12:04:16'
                  updated_at:
                    type: string
                    example: '2022-08-25 10:34:45'
                  admin:
                    type: integer
                    example: 0
                  last_active:
                    type: string
                    example: '0000-00-00 00:00:00'
                  first_name:
                    type: string
                    example: ''
                  surname:
                    type: string
                    example: ''
                  vat_no:
                    type: string
                    example: ''
                  country:
                    type: string
                    example: ''
                  city:
                    type: string
                    example: ''
                  address:
                    type: string
                    example: ''
                  postcode:
                    type: string
                    example: ''
                  tier_pricing_type:
                    type: string
                    example: ''
                  config:
                    type: string
                    example: null
                  sign_user_agreement:
                    type: string
                    example: null
                  revenue_tier_id:
                    type: string
                    example: '{revenue_tier_id}'
                  recruitment_utm:
                    type: string
                    example: null
                  is_suspended:
                    type: boolean
                    example: false
                  is_verified:
                    type: boolean
                    example: true
      tags:
        - Users
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the user.'
        example: 1
        required: true
        schema:
          type: integer
  /users:
    get:
      summary: 'Get Users'
      operationId: getUsers
      description: 'Returns all users connected to your client account, sorted on created date in descending order.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                example:
                  -
                    id: 1
                    created_at: '2018-11-17 22:24:28'
                    updated_at: '2018-11-19 14:42:38'
                    client_id: 2
                    revenue_share: '0.00'
                    instagram_revenue_share: '0.00'
                    name: '{username}'
                  - ...
      tags:
        - Users
    post:
      summary: 'Create User'
      operationId: createUser
      description: 'Create a new Metapic user. The user will automatically be linked to your account.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: '{userId}'
                  username: '{username}'
                  email: '{email}'
                  created_at: '2019-06-17 11:53:17'
                  updated_at: '2019-08-20 07:07:50'
                  admin: 1
                  last_active: '0000-00-00 00:00:00'
                  first_name: '{userName}'
                  surname: '{userSurname}'
                  country: '{country}'
                  city: '{city}'
                  address: '{address}'
                  postcode: '{postcode}'
                  tier_pricing_type: ''
                  config: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement: '2019-08-14 08:34:12'
                  revenue_tier_id: 105
                  recruitment_utm: null
                  is_suspended: false
                  is_verified: false
                  client:
                    id: 2
                    client_id: '{clientId}'
                    name: '{clientName}'
                    created_at: '2014-04-24 16:12:29'
                    updated_at: '2018-11-21 13:57:23'
                    own_paymentsystem: 0
                    config: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                    feed: live_se
                    locale: SE
                    revenue_model: blog_percentage
                    revenue_share: '0.00'
                    store_group_id: 1
                    default_revenue_tier: 81
                    default_verified_users: 0
                    store_group:
                      id: 1
                      name: 'Standard SE'
                      shopello: 1
                      key: se
                      locale: SE
                      lang: sv
                      currency: SEK
                      es: 0
                      payment_limit: 100000
                  revenue_tier:
                    id: 76
                    created_at: '2018-09-14 16:39:34'
                    updated_at: '2019-04-29 10:47:34'
                    client_id: 2
                    revenue_share: '0.50'
                    instagram_revenue_share: '0.10'
                    name: Silver
                properties:
                  id:
                    type: string
                    example: '{userId}'
                  username:
                    type: string
                    example: '{username}'
                  email:
                    type: string
                    example: '{email}'
                  created_at:
                    type: string
                    example: '2019-06-17 11:53:17'
                  updated_at:
                    type: string
                    example: '2019-08-20 07:07:50'
                  admin:
                    type: integer
                    example: 1
                  last_active:
                    type: string
                    example: '0000-00-00 00:00:00'
                  first_name:
                    type: string
                    example: '{userName}'
                  surname:
                    type: string
                    example: '{userSurname}'
                  country:
                    type: string
                    example: '{country}'
                  city:
                    type: string
                    example: '{city}'
                  address:
                    type: string
                    example: '{address}'
                  postcode:
                    type: string
                    example: '{postcode}'
                  tier_pricing_type:
                    type: string
                    example: ''
                  config:
                    type: string
                    example: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement:
                    type: string
                    example: '2019-08-14 08:34:12'
                  revenue_tier_id:
                    type: integer
                    example: 105
                  recruitment_utm:
                    type: string
                    example: null
                  is_suspended:
                    type: boolean
                    example: false
                  is_verified:
                    type: boolean
                    example: false
                  client:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                      client_id:
                        type: string
                        example: '{clientId}'
                      name:
                        type: string
                        example: '{clientName}'
                      created_at:
                        type: string
                        example: '2014-04-24 16:12:29'
                      updated_at:
                        type: string
                        example: '2018-11-21 13:57:23'
                      own_paymentsystem:
                        type: integer
                        example: 0
                      config:
                        type: string
                        example: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                      feed:
                        type: string
                        example: live_se
                      locale:
                        type: string
                        example: SE
                      revenue_model:
                        type: string
                        example: blog_percentage
                      revenue_share:
                        type: string
                        example: '0.00'
                      store_group_id:
                        type: integer
                        example: 1
                      default_revenue_tier:
                        type: integer
                        example: 81
                      default_verified_users:
                        type: integer
                        example: 0
                      store_group:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: 'Standard SE'
                          shopello:
                            type: integer
                            example: 1
                          key:
                            type: string
                            example: se
                          locale:
                            type: string
                            example: SE
                          lang:
                            type: string
                            example: sv
                          currency:
                            type: string
                            example: SEK
                          es:
                            type: integer
                            example: 0
                          payment_limit:
                            type: integer
                            example: 100000
                  revenue_tier:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 76
                      created_at:
                        type: string
                        example: '2018-09-14 16:39:34'
                      updated_at:
                        type: string
                        example: '2019-04-29 10:47:34'
                      client_id:
                        type: integer
                        example: 2
                      revenue_share:
                        type: string
                        example: '0.50'
                      instagram_revenue_share:
                        type: string
                        example: '0.10'
                      name:
                        type: string
                        example: Silver
      tags:
        - Users
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: "Valid email address. Unique.\n\nThe value format is invalid."
                  example: test@test.com
                username:
                  type: string
                  description: 'The name of the user. Max 24 alphanumeric characters.'
                  example: testUser
                password:
                  type: string
                  description: 'At least 6 characters.'
                  example: '123456'
              required:
                - email
  '/users/{id}':
    get:
      summary: 'Get User'
      operationId: getUser
      description: 'Fetches a user based on user id.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: '{userId}'
                  username: '{username}'
                  email: '{email}'
                  created_at: '2019-06-17 11:53:17'
                  updated_at: '2019-08-20 07:07:50'
                  admin: 1
                  last_active: '0000-00-00 00:00:00'
                  first_name: '{userName}'
                  surname: '{userSurname}'
                  country: '{country}'
                  city: '{city}'
                  address: '{address}'
                  postcode: '{postcode}'
                  tier_pricing_type: ''
                  config: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement: '2019-08-14 08:34:12'
                  revenue_tier_id: 105
                  recruitment_utm: null
                  is_suspended: false
                  is_verified: false
                  client:
                    id: 2
                    client_id: '{clientId}'
                    name: '{clientName}'
                    created_at: '2014-04-24 16:12:29'
                    updated_at: '2018-11-21 13:57:23'
                    own_paymentsystem: 0
                    config: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                    feed: live_se
                    locale: SE
                    revenue_model: blog_percentage
                    revenue_share: '0.00'
                    store_group_id: 1
                    default_revenue_tier: 81
                    default_verified_users: 0
                    store_group:
                      id: 1
                      name: 'Standard SE'
                      shopello: 1
                      key: se
                      locale: SE
                      lang: sv
                      currency: SEK
                      es: 0
                      payment_limit: 100000
                  revenue_tier:
                    id: 76
                    created_at: '2018-09-14 16:39:34'
                    updated_at: '2019-04-29 10:47:34'
                    client_id: 2
                    revenue_share: '0.50'
                    instagram_revenue_share: '0.10'
                    name: Silver
                properties:
                  id:
                    type: string
                    example: '{userId}'
                  username:
                    type: string
                    example: '{username}'
                  email:
                    type: string
                    example: '{email}'
                  created_at:
                    type: string
                    example: '2019-06-17 11:53:17'
                  updated_at:
                    type: string
                    example: '2019-08-20 07:07:50'
                  admin:
                    type: integer
                    example: 1
                  last_active:
                    type: string
                    example: '0000-00-00 00:00:00'
                  first_name:
                    type: string
                    example: '{userName}'
                  surname:
                    type: string
                    example: '{userSurname}'
                  country:
                    type: string
                    example: '{country}'
                  city:
                    type: string
                    example: '{city}'
                  address:
                    type: string
                    example: '{address}'
                  postcode:
                    type: string
                    example: '{postcode}'
                  tier_pricing_type:
                    type: string
                    example: ''
                  config:
                    type: string
                    example: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement:
                    type: string
                    example: '2019-08-14 08:34:12'
                  revenue_tier_id:
                    type: integer
                    example: 105
                  recruitment_utm:
                    type: string
                    example: null
                  is_suspended:
                    type: boolean
                    example: false
                  is_verified:
                    type: boolean
                    example: false
                  client:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                      client_id:
                        type: string
                        example: '{clientId}'
                      name:
                        type: string
                        example: '{clientName}'
                      created_at:
                        type: string
                        example: '2014-04-24 16:12:29'
                      updated_at:
                        type: string
                        example: '2018-11-21 13:57:23'
                      own_paymentsystem:
                        type: integer
                        example: 0
                      config:
                        type: string
                        example: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                      feed:
                        type: string
                        example: live_se
                      locale:
                        type: string
                        example: SE
                      revenue_model:
                        type: string
                        example: blog_percentage
                      revenue_share:
                        type: string
                        example: '0.00'
                      store_group_id:
                        type: integer
                        example: 1
                      default_revenue_tier:
                        type: integer
                        example: 81
                      default_verified_users:
                        type: integer
                        example: 0
                      store_group:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: 'Standard SE'
                          shopello:
                            type: integer
                            example: 1
                          key:
                            type: string
                            example: se
                          locale:
                            type: string
                            example: SE
                          lang:
                            type: string
                            example: sv
                          currency:
                            type: string
                            example: SEK
                          es:
                            type: integer
                            example: 0
                          payment_limit:
                            type: integer
                            example: 100000
                  revenue_tier:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 76
                      created_at:
                        type: string
                        example: '2018-09-14 16:39:34'
                      updated_at:
                        type: string
                        example: '2019-04-29 10:47:34'
                      client_id:
                        type: integer
                        example: 2
                      revenue_share:
                        type: string
                        example: '0.50'
                      instagram_revenue_share:
                        type: string
                        example: '0.10'
                      name:
                        type: string
                        example: Silver
      tags:
        - Users
    put:
      summary: 'Update User'
      operationId: updateUser
      description: 'Updates a Metapic user. Returns the modified user as a json object.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: '{userId}'
                  username: '{username}'
                  email: '{email}'
                  created_at: '2019-06-17 11:53:17'
                  updated_at: '2019-08-20 07:07:50'
                  admin: 1
                  last_active: '0000-00-00 00:00:00'
                  first_name: '{userName}'
                  surname: '{userSurname}'
                  country: '{country}'
                  city: '{city}'
                  address: '{address}'
                  postcode: '{postcode}'
                  tier_pricing_type: ''
                  config: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement: '2019-08-14 08:34:12'
                  revenue_tier_id: 105
                  recruitment_utm: null
                  is_suspended: false
                  is_verified: false
                  client:
                    id: 2
                    client_id: '{clientId}'
                    name: '{clientName}'
                    created_at: '2014-04-24 16:12:29'
                    updated_at: '2018-11-21 13:57:23'
                    own_paymentsystem: 0
                    config: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                    feed: live_se
                    locale: SE
                    revenue_model: blog_percentage
                    revenue_share: '0.00'
                    store_group_id: 1
                    default_revenue_tier: 81
                    default_verified_users: 0
                    store_group:
                      id: 1
                      name: 'Standard SE'
                      shopello: 1
                      key: se
                      locale: SE
                      lang: sv
                      currency: SEK
                      es: 0
                      payment_limit: 100000
                  revenue_tier:
                    id: 76
                    created_at: '2018-09-14 16:39:34'
                    updated_at: '2019-04-29 10:47:34'
                    client_id: 2
                    revenue_share: '0.50'
                    instagram_revenue_share: '0.10'
                    name: Silver
                properties:
                  id:
                    type: string
                    example: '{userId}'
                  username:
                    type: string
                    example: '{username}'
                  email:
                    type: string
                    example: '{email}'
                  created_at:
                    type: string
                    example: '2019-06-17 11:53:17'
                  updated_at:
                    type: string
                    example: '2019-08-20 07:07:50'
                  admin:
                    type: integer
                    example: 1
                  last_active:
                    type: string
                    example: '0000-00-00 00:00:00'
                  first_name:
                    type: string
                    example: '{userName}'
                  surname:
                    type: string
                    example: '{userSurname}'
                  country:
                    type: string
                    example: '{country}'
                  city:
                    type: string
                    example: '{city}'
                  address:
                    type: string
                    example: '{address}'
                  postcode:
                    type: string
                    example: '{postcode}'
                  tier_pricing_type:
                    type: string
                    example: ''
                  config:
                    type: string
                    example: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement:
                    type: string
                    example: '2019-08-14 08:34:12'
                  revenue_tier_id:
                    type: integer
                    example: 105
                  recruitment_utm:
                    type: string
                    example: null
                  is_suspended:
                    type: boolean
                    example: false
                  is_verified:
                    type: boolean
                    example: false
                  client:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                      client_id:
                        type: string
                        example: '{clientId}'
                      name:
                        type: string
                        example: '{clientName}'
                      created_at:
                        type: string
                        example: '2014-04-24 16:12:29'
                      updated_at:
                        type: string
                        example: '2018-11-21 13:57:23'
                      own_paymentsystem:
                        type: integer
                        example: 0
                      config:
                        type: string
                        example: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                      feed:
                        type: string
                        example: live_se
                      locale:
                        type: string
                        example: SE
                      revenue_model:
                        type: string
                        example: blog_percentage
                      revenue_share:
                        type: string
                        example: '0.00'
                      store_group_id:
                        type: integer
                        example: 1
                      default_revenue_tier:
                        type: integer
                        example: 81
                      default_verified_users:
                        type: integer
                        example: 0
                      store_group:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: 'Standard SE'
                          shopello:
                            type: integer
                            example: 1
                          key:
                            type: string
                            example: se
                          locale:
                            type: string
                            example: SE
                          lang:
                            type: string
                            example: sv
                          currency:
                            type: string
                            example: SEK
                          es:
                            type: integer
                            example: 0
                          payment_limit:
                            type: integer
                            example: 100000
                  revenue_tier:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 76
                      created_at:
                        type: string
                        example: '2018-09-14 16:39:34'
                      updated_at:
                        type: string
                        example: '2019-04-29 10:47:34'
                      client_id:
                        type: integer
                        example: 2
                      revenue_share:
                        type: string
                        example: '0.50'
                      instagram_revenue_share:
                        type: string
                        example: '0.10'
                      name:
                        type: string
                        example: Silver
      tags:
        - Users
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  description: "Valid email address. Unique.\n\nThe value format is invalid."
                  example: test@test.com
                username:
                  type: string
                  description: 'The name of the user. Max 24 alphanumeric characters.'
                  example: testUser
                password:
                  type: string
                  description: 'At least 6 characters.'
                  example: '123456'
    delete:
      summary: 'Delete User'
      operationId: deleteUser
      description: 'Deletes a Metapic user. Returns the deleted user as json object.'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: '{userId}'
                  username: '{username}'
                  email: '{email}'
                  created_at: '2019-06-17 11:53:17'
                  updated_at: '2019-08-20 07:07:50'
                  admin: 1
                  last_active: '0000-00-00 00:00:00'
                  first_name: '{userName}'
                  surname: '{userSurname}'
                  country: '{country}'
                  city: '{city}'
                  address: '{address}'
                  postcode: '{postcode}'
                  tier_pricing_type: ''
                  config: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement: '2019-08-14 08:34:12'
                  revenue_tier_id: 105
                  recruitment_utm: null
                  is_suspended: false
                  is_verified: false
                  client:
                    id: 2
                    client_id: '{clientId}'
                    name: '{clientName}'
                    created_at: '2014-04-24 16:12:29'
                    updated_at: '2018-11-21 13:57:23'
                    own_paymentsystem: 0
                    config: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                    feed: live_se
                    locale: SE
                    revenue_model: blog_percentage
                    revenue_share: '0.00'
                    store_group_id: 1
                    default_revenue_tier: 81
                    default_verified_users: 0
                    store_group:
                      id: 1
                      name: 'Standard SE'
                      shopello: 1
                      key: se
                      locale: SE
                      lang: sv
                      currency: SEK
                      es: 0
                      payment_limit: 100000
                  revenue_tier:
                    id: 76
                    created_at: '2018-09-14 16:39:34'
                    updated_at: '2019-04-29 10:47:34'
                    client_id: 2
                    revenue_share: '0.50'
                    instagram_revenue_share: '0.10'
                    name: Silver
                properties:
                  id:
                    type: string
                    example: '{userId}'
                  username:
                    type: string
                    example: '{username}'
                  email:
                    type: string
                    example: '{email}'
                  created_at:
                    type: string
                    example: '2019-06-17 11:53:17'
                  updated_at:
                    type: string
                    example: '2019-08-20 07:07:50'
                  admin:
                    type: integer
                    example: 1
                  last_active:
                    type: string
                    example: '0000-00-00 00:00:00'
                  first_name:
                    type: string
                    example: '{userName}'
                  surname:
                    type: string
                    example: '{userSurname}'
                  country:
                    type: string
                    example: '{country}'
                  city:
                    type: string
                    example: '{city}'
                  address:
                    type: string
                    example: '{address}'
                  postcode:
                    type: string
                    example: '{postcode}'
                  tier_pricing_type:
                    type: string
                    example: ''
                  config:
                    type: string
                    example: '{"showedPopups":["firstCollageItem"]}'
                  sign_user_agreement:
                    type: string
                    example: '2019-08-14 08:34:12'
                  revenue_tier_id:
                    type: integer
                    example: 105
                  recruitment_utm:
                    type: string
                    example: null
                  is_suspended:
                    type: boolean
                    example: false
                  is_verified:
                    type: boolean
                    example: false
                  client:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 2
                      client_id:
                        type: string
                        example: '{clientId}'
                      name:
                        type: string
                        example: '{clientName}'
                      created_at:
                        type: string
                        example: '2014-04-24 16:12:29'
                      updated_at:
                        type: string
                        example: '2018-11-21 13:57:23'
                      own_paymentsystem:
                        type: integer
                        example: 0
                      config:
                        type: string
                        example: "{    \"tabs\": {        \"home\":{\"showMenu\":true},        \"find\":{\"showMenu\":true},\t\"collage\":{\"showMenu\":true},\t\"tagEditor\":{\"showMenu\":true},        \"stats\":{\"showMenu\":true},\t\"listLinks\":{\"showMenu\":true}    },    \"canLogin\": true}"
                      feed:
                        type: string
                        example: live_se
                      locale:
                        type: string
                        example: SE
                      revenue_model:
                        type: string
                        example: blog_percentage
                      revenue_share:
                        type: string
                        example: '0.00'
                      store_group_id:
                        type: integer
                        example: 1
                      default_revenue_tier:
                        type: integer
                        example: 81
                      default_verified_users:
                        type: integer
                        example: 0
                      store_group:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: 'Standard SE'
                          shopello:
                            type: integer
                            example: 1
                          key:
                            type: string
                            example: se
                          locale:
                            type: string
                            example: SE
                          lang:
                            type: string
                            example: sv
                          currency:
                            type: string
                            example: SEK
                          es:
                            type: integer
                            example: 0
                          payment_limit:
                            type: integer
                            example: 100000
                  revenue_tier:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 76
                      created_at:
                        type: string
                        example: '2018-09-14 16:39:34'
                      updated_at:
                        type: string
                        example: '2019-04-29 10:47:34'
                      client_id:
                        type: integer
                        example: 2
                      revenue_share:
                        type: string
                        example: '0.50'
                      instagram_revenue_share:
                        type: string
                        example: '0.10'
                      name:
                        type: string
                        example: Silver
      tags:
        - Users
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                force:
                  type: integer
                  description: ''
                  example: 9
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the user.'
        example: 1
        required: true
        schema:
          type: integer
tags:
  -
    name: Clicks
    description: ''
  -
    name: 'Deep linking'
    description: ''
  -
    name: Endpoints
    description: ''
  -
    name: Entrypoint
    description: ''
  -
    name: 'Offer Comments V2'
    description: ''
  -
    name: 'Offer User Activity'
    description: ''
  -
    name: Offers
    description: ''
  -
    name: Payment
    description: ''
  -
    name: 'Social Media'
    description: ''
  -
    name: Store
    description: ''
  -
    name: Users
    description: ''
