viagogo Webhooks API

The Webhooks API from viagogo — 3 operation(s) for webhooks.

OpenAPI Specification

viagogo-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: viagogo Webhooks API
  version: 2.249.0.0
  x-logo:
    url: https://img.vggcdn.net/img/assets/logo/viagogo_logo_apidocs.png
    backgroundColor: '#222222'
servers:
- url: https://api.viagogo.net/v2
  description: Production
- url: https://sandbox.api.viagogo.net/v2
  description: Sandbox
security:
- OAuth2:
  - read:webhooks
  - write:webhooks
tags:
- name: Webhooks
paths:
  /webhooks:
    get:
      tags:
      - Webhooks
      summary: List webhooks
      description: List webhooks for the authenticated user.
      operationId: Webhooks_Get
      parameters:
      - name: page
        in: query
        description: Specifies which page of data to retrieve.
        schema:
          type: integer
          format: int32
      - name: page_size
        in: query
        description: Set custom page sizes on response.
        schema:
          type: integer
          format: int32
      - name: sort
        in: query
        description: Determines the ordering of items. A comma-separated string containing `created_at`.
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Webhooks'
        '404':
          $ref: '#/components/responses/not_found'
          description: null
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - read:webhooks
    post:
      tags:
      - Webhooks
      summary: Create a webhook
      operationId: Webhooks_Post
      requestBody:
        x-name: body
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/PostWebhookRequest'
      responses:
        '201':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '400':
          $ref: '#/components/responses/validation_failed'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - write:webhooks
  /webhooks/{webhookId}:
    get:
      tags:
      - Webhooks
      summary: Get a webhook
      operationId: Webhooks_Get2
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '404':
          $ref: '#/components/responses/not_found'
          description: null
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - read:webhooks
    patch:
      tags:
      - Webhooks
      summary: Update a webhook
      operationId: Webhooks_Patch
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        x-name: body
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/PatchWebhookRequest'
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '400':
          $ref: '#/components/responses/validation_failed'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - write:webhooks
    delete:
      tags:
      - Webhooks
      summary: Delete a webhook
      operationId: Webhooks_Delete
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '204':
          description: null
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - write:webhooks
  /webhooks/{webhookId}/ping:
    post:
      tags:
      - Webhooks
      summary: Ping a webhook
      description: Triggers a request to be sent to your webhook. Call this endpoint to test your webhook.
      operationId: Webhooks_PingWebhook
      parameters:
      - name: webhookId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '202':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '403':
          $ref: '#/components/responses/forbidden'
          description: null
        '400':
          $ref: '#/components/responses/validation_failed'
          description: null
        '401':
          $ref: '#/components/responses/requires_authentication'
          description: null
        '500':
          $ref: '#/components/responses/internal_server_error'
          description: null
      security:
      - OAuth2:
        - write:webhooks
components:
  schemas:
    Webhooks:
      type: object
      additionalProperties: false
      properties:
        total_items:
          type:
          - integer
          - 'null'
          format: int32
        page:
          type:
          - integer
          - 'null'
          format: int32
        page_size:
          type:
          - integer
          - 'null'
          format: int32
        _links:
          oneOf:
          - $ref: '#/components/schemas/WebhooksLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/WebhooksEmbeddedResources'
    PatchWebhookRequest:
      type: object
      additionalProperties: false
      properties:
        name:
          type:
          - string
          - 'null'
          description: The name of the webhook.
        url:
          type:
          - string
          - 'null'
          description: The server endpoint that will receive the webhook payload.
        authorization_header:
          type:
          - string
          - 'null'
          description: The Authorization header value that should be included in requests to the webhook.
        topics:
          type:
          - array
          - 'null'
          description: An array of the topics the webhook is trigger for.
          items:
            type: string
    Link:
      type: object
      additionalProperties: false
      properties:
        href:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        templated:
          type: boolean
    WebhooksLinks:
      title: WebhooksLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        first:
          oneOf:
          - $ref: '#/components/schemas/Link'
        last:
          oneOf:
          - $ref: '#/components/schemas/Link'
        next:
          oneOf:
          - $ref: '#/components/schemas/Link'
        prev:
          oneOf:
          - $ref: '#/components/schemas/Link'
    WebhookLinks:
      title: WebhookLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        webhook:delete:
          description: Delete a webhook.
          oneOf:
          - $ref: '#/components/schemas/Link'
        webhook:ping:
          description: Ping a webhook.
          oneOf:
          - $ref: '#/components/schemas/Link'
        webhook:update:
          description: Update the details of a webhook.
          oneOf:
          - $ref: '#/components/schemas/Link'
    WebhooksEmbeddedResources:
      title: WebhooksEmbeddedResources
      type: object
      properties:
        items:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Webhook'
    PostWebhookRequest:
      type: object
      additionalProperties: false
      properties:
        name:
          type:
          - string
          - 'null'
          description: The name of the webhook.
        url:
          type:
          - string
          - 'null'
          description: The server endpoint that will receive the webhook payload.
        authorization_header:
          type:
          - string
          - 'null'
          description: The Authorization header value that should be included in requests to the webhook.
        topics:
          type:
          - array
          - 'null'
          description: An array of the topics the webhook is trigger for.
          items:
            type: string
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type:
          - string
          - 'null'
        message:
          type:
          - string
          - 'null'
        errors:
          type:
          - object
          - 'null'
          additionalProperties:
            type: array
            items:
              type: string
    Webhook:
      type: object
      description: 'A webhook is a subscription from a server application to certain topics

        on the viagogo platform. When an occurrence of a topic is triggered,

        we’ll POST a payload to the webhook’s configured url.'
      additionalProperties: false
      properties:
        id:
          type:
          - integer
          - 'null'
          description: The webhook identifier.
          format: int32
        name:
          type:
          - string
          - 'null'
          description: The name of the webhook.
        created_at:
          type: string
          description: The date when the webhook was created.
          format: date-time
        topics:
          type:
          - array
          - 'null'
          description: An array of the topics the webhook is trigger for.
          items:
            type: string
        url:
          type:
          - string
          - 'null'
          description: The server endpoint that will receive the webhook payload.
        authorization_header:
          type:
          - string
          - 'null'
          description: The Authorization header value that should be included in requests to the webhook.
        _links:
          oneOf:
          - $ref: '#/components/schemas/WebhookLinks'
  responses:
    internal_server_error:
      description: Internal server error
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
    validation_failed:
      description: The request data is not valid. errors will contain an object with a localized message that describes the validation error for each property of the data.
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
    requires_authentication:
      description: Authentication credentials were missing or incorrect.
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
    not_found:
      description: The URI requested is invalid or the resource requested, such as an event, does not exist.
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
    forbidden:
      description: The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why.
      content:
        application/hal+json:
          schema:
            oneOf:
            - $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      bearerFormat: JWT
      flows:
        implicit:
          authorizationUrl: https://account.viagogo.com/authorize
          tokenUrl: https://account.viagogo.com/oauth2/token
          refreshUrl: https://account.viagogo.com/oauth2/token
        clientCredentials:
          tokenUrl: https://account.viagogo.com/oauth2/token
        authorizationCode:
          authorizationUrl: https://account.viagogo.com/authorize
          tokenUrl: https://account.viagogo.com/oauth2/token
          refreshUrl: https://account.viagogo.com/oauth2/token
x-tagGroups:
- name: Endpoints
  tags:
  - Topics
  - Webhooks
- name: Basic Types
  tags:
  - BasicType_Money
- name: Resources
  tags:
  - Resource_Webhook
  - Resource_Webhooks