viagogo Shipments API

The Shipments API from viagogo — 6 operation(s) for shipments.

OpenAPI Specification

viagogo-shipments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Viagogo Shipments API
  version: 2.249.0.0
  description: 'Operations tagged Shipments across 2 of this provider''s published API definitions: viagogo-inventory.json, viagogo-sales.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.viagogo.net/v2
  description: Production
- url: https://sandbox.api.viagogo.net/v2
  description: Sandbox
tags:
- name: Shipments
paths:
  /sellerlistings/{listingId}/shipments/{shipmentId}/label:
    get:
      tags:
      - Shipments
      summary: Get a shipping label for a seller listing
      operationId: Shipments_GetListingShippingLabel
      parameters:
      - name: listingId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: shipmentId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '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:user
        - read:sellerlistings
    servers:
    - url: https://api.viagogo.net/v2
      description: Production
    - url: https://sandbox.api.viagogo.net/v2
      description: Sandbox
  /sellerlistings/{listingId}/shipments:
    get:
      tags:
      - Shipments
      summary: List shipments for a seller listing
      operationId: Shipments_GetListingShipments
      parameters:
      - name: listingId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - 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
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Shipments'
        '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:user
        - read:sellerlistings
    put:
      tags:
      - Shipments
      summary: Print a shipping label for a seller listing
      operationId: Shipments_PutOrGetListingShipmentLabel
      parameters:
      - name: listingId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Shipment'
        '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:user
        - write:sellerlistings
    servers:
    - url: https://api.viagogo.net/v2
      description: Production
    - url: https://sandbox.api.viagogo.net/v2
      description: Sandbox
  /sellerlistings/{listingId}/shipments/{shipmentId}:
    patch:
      tags:
      - Shipments
      summary: Update a shipment for a seller listing
      operationId: Shipments_PatchListingShipment
      parameters:
      - name: listingId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: shipmentId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        x-name: body
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/PatchShipmentRequest'
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Shipment'
        '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:user
        - write:sellerlistings
    servers:
    - url: https://api.viagogo.net/v2
      description: Production
    - url: https://sandbox.api.viagogo.net/v2
      description: Sandbox
  /sales/{saleId}/shipments/{shipmentId}/label:
    get:
      tags:
      - Shipments
      summary: Get shipping label for a sale
      operationId: Shipments_GetSaleShippingLabel
      parameters:
      - name: saleId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      - name: shipmentId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '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:user
        - read:sales
    servers:
    - url: https://api.viagogo.net/v2
      description: Production
    - url: https://sandbox.api.viagogo.net/v2
      description: Sandbox
  /sales/{saleId}/shipments:
    get:
      tags:
      - Shipments
      summary: List shipments for a sale
      operationId: Shipments_GetSaleShipments
      parameters:
      - name: saleId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      - 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
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Shipments'
        '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:user
        - read:sales
    put:
      tags:
      - Shipments
      summary: Print a shipping label for a sale
      operationId: Shipments_PutOrGetSaleShipmentLabel
      parameters:
      - name: saleId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Shipment'
        '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:user
        - write:sales
    servers:
    - url: https://api.viagogo.net/v2
      description: Production
    - url: https://sandbox.api.viagogo.net/v2
      description: Sandbox
  /sales/{saleId}/shipments/{shipmentId}:
    patch:
      tags:
      - Shipments
      summary: Update a shipment for a sale
      operationId: Shipments_PatchSaleShipment
      parameters:
      - name: saleId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      - name: shipmentId
        in: path
        required: true
        schema:
          type: integer
          format: int32
      requestBody:
        x-name: body
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/PatchShipmentRequest'
      responses:
        '200':
          description: ''
          content:
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Shipment'
        '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:user
        - write:sales
    servers:
    - url: https://api.viagogo.net/v2
      description: Production
    - url: https://sandbox.api.viagogo.net/v2
      description: Sandbox
components:
  schemas:
    PatchShipmentRequest:
      type: object
      additionalProperties: false
      properties:
        tracking_number:
          type:
          - string
          - 'null'
          description: The identifier used to track the shipment of the ticket(s).
    EmbeddedDeliveryMethodLinks:
      title: EmbeddedDeliveryMethodLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        deliverymethod:logo:
          description: An image file containing the logo for the delivery method.
          oneOf:
          - $ref: '#/components/schemas/Link'
    DeliveryMethodType:
      type: integer
      description: ''
      x-enumNames:
      - Other
      - Post
      - Pickup
      - ETicket
      enum:
      - 0
      - 1
      - 2
      - 3
    PickupWindow:
      type: object
      description: Represents a window of time when a courier pickup can be arranged.
      additionalProperties: false
      properties:
        start_date:
          type: string
          description: The date when the window starts.
          format: date-time
        end_date:
          type: string
          description: The date when the window ends.
          format: date-time
    ShipmentLinks:
      title: ShipmentLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        shipment:entertrackingnumber:
          oneOf:
          - $ref: '#/components/schemas/Link'
        shipment:label:
          description: A courier shipping label.
          oneOf:
          - $ref: '#/components/schemas/Link'
    ShipmentsLinks:
      title: ShipmentsLinks
      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'
        shipment:create:
          description: Creates a new shipment for the ticket(s).
          oneOf:
          - $ref: '#/components/schemas/Link'
    Address2:
      type: object
      description: An address is a delivery, pickup or billing address associated with the current user.
      additionalProperties: false
      properties:
        id:
          type:
          - integer
          - 'null'
          description: The address identifier.
          format: int32
        full_name:
          type:
          - string
          - 'null'
          description: The full name of the recipient.
        default:
          type:
          - boolean
          - 'null'
          description: True if the address is the user’s default address; Otherwise, false.
        address_1:
          type:
          - string
          - 'null'
          description: The first line of the address.
        address_2:
          type:
          - string
          - 'null'
          description: The second line of the address.
        address_3:
          type:
          - string
          - 'null'
          description: The third line of the address.
        city:
          type:
          - string
          - 'null'
          description: The name of the city where the address is located.
        state_province:
          type:
          - string
          - 'null'
          description: The name of the State or Province where the address is located.
        postal_code:
          type:
          - string
          - 'null'
          description: The postal code for the address.
        _links:
          oneOf:
          - $ref: '#/components/schemas/AddressLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/AddressEmbeddedResources'
    Shipment:
      type: object
      description: A shipment of one or more tickets by a seller.
      additionalProperties: false
      properties:
        id:
          type: integer
          description: The shipment identifier.
          format: int32
        tracking_number:
          type:
          - string
          - 'null'
          description: The identifier used to track the shipment of the ticket(s).
        delivery_address:
          description: The address that the seller must ship the tickets to.
          oneOf:
          - $ref: '#/components/schemas/Address'
        _links:
          oneOf:
          - $ref: '#/components/schemas/ShipmentLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/ShipmentEmbeddedResources'
    Pickup:
      type: object
      description: A scheduled courier pickup for a package.
      additionalProperties: false
      properties:
        id:
          type: integer
          description: The pickup identifier.
          format: int32
        start_date:
          type: string
          description: The earliest date that the courier will pickup the package.
          format: date-time
        end_date:
          type: string
          description: The latest date that the courier will pickup the package.
          format: date-time
        address:
          description: The address where the courier will pickup the package.
          oneOf:
          - $ref: '#/components/schemas/Address'
        _links:
          oneOf:
          - $ref: '#/components/schemas/PickupLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/PickupEmbeddedResources'
    Country:
      type: object
      additionalProperties: false
      properties:
        code:
          type:
          - string
          - 'null'
          description: The two-letter ISO 3166 code for the country.
        name:
          type:
          - string
          - 'null'
          description: The name of the country.
        _links:
          oneOf:
          - $ref: '#/components/schemas/CountryLinks'
    AddressEmbeddedResources:
      title: AddressEmbeddedResources
      type: object
      properties:
        country:
          description: The Country where the address is located.
          oneOf:
          - $ref: '#/components/schemas/Country'
    PickupLinks:
      title: PickupLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        pickup:delete:
          description: Delete/Cancel a courier pickup
          oneOf:
          - $ref: '#/components/schemas/Link'
    PickupEmbeddedResources:
      title: PickupEmbeddedResources
      type: object
      properties:
        carrier:
          description: A carrier (e.g. UPS) that will collect tickets that are to be delivered.
          oneOf:
          - $ref: '#/components/schemas/Carrier'
    ShipmentEmbeddedResources:
      title: ShipmentEmbeddedResources
      type: object
      properties:
        delivery_method:
          description: The delivery method for the ticket(s).
          oneOf:
          - $ref: '#/components/schemas/EmbeddedDeliveryMethod'
        pickup_addresses:
          type:
          - array
          - 'null'
          description: The addresses where courier pickups could be arranged.
          items:
            $ref: '#/components/schemas/Address2'
        pickups:
          type:
          - array
          - 'null'
          description: The courier pickups that have been scheduled.
          items:
            $ref: '#/components/schemas/Pickup'
        shipment_state:
          description: The shipment state
          oneOf:
          - $ref: '#/components/schemas/StateInformation'
    Address:
      type: object
      additionalProperties: false
      properties:
        full_name:
          type:
          - string
          - 'null'
        address_1:
          type:
          - string
          - 'null'
        address_2:
          type:
          - string
          - 'null'
        address_3:
          type:
          - string
          - 'null'
        city:
          type:
          - string
          - 'null'
        state_province:
          type:
          - string
          - 'null'
        postal_code:
          type:
          - string
          - 'null'
        country_code:
          type:
          - string
          - 'null'
        country:
          type:
          - string
          - 'null'
    Link:
      type: object
      additionalProperties: false
      properties:
        href:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        templated:
          type: boolean
    Shipments:
      type: object
      description: 'The Shipments resource is a collection resource that contains zero or

        more references to a set of shipments, and links that guide you on ways

        to interact with the shipments. The collection offers a paginated view

        of shipments.'
      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/ShipmentsLinks'
        _embedded:
          oneOf:
          - $ref: '#/components/schemas/ShipmentsEmbeddedResources'
    CountryLinks:
      title: CountryLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        country:events:
          description: The events taking place in a country.
          oneOf:
          - $ref: '#/components/schemas/Link'
        country:localwebpage:
          oneOf:
          - $ref: '#/components/schemas/Link'
    CarrierLinks:
      title: CarrierLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        carrier:createpickup:
          description: Creates a new pickup for the ticket(s).
          oneOf:
          - $ref: '#/components/schemas/Link'
    ShipmentsEmbeddedResources:
      title: ShipmentsEmbeddedResources
      type: object
      properties:
        items:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/Shipment'
    EmbeddedDeliveryMethod:
      type: object
      additionalProperties: false
      properties:
        id:
          type: integer
          description: The delivery method identifier.
          format: int32
        type:
          description: The type of delivery method. Can be ETicket, Post or Pickup.
          oneOf:
          - $ref: '#/components/schemas/DeliveryMethodType'
        name:
          type:
          - string
          - 'null'
          description: The localised name of the delivery method.
        description:
          type:
          - string
          - 'null'
          description: The localised description of the delivery method.
        _links:
          oneOf:
          - $ref: '#/components/schemas/EmbeddedDeliveryMethodLinks'
    AddressLinks:
      title: AddressLinks
      type: object
      properties:
        self:
          oneOf:
          - $ref: '#/components/schemas/Link'
        address:carrier:
          description: The pickup windows available for Carrier collection.
          oneOf:
          - $ref: '#/components/schemas/Link'
        address:delete:
          description: Delete the current user’s address.
          oneOf:
          - $ref: '#/components/schemas/Link'
        address:update:
          description: Update the details of the current user’s address.
          oneOf:
          - $ref: '#/components/schemas/Link'
    StateInformation:
      type: object
      additionalProperties: false
      properties:
        id:
          type: integer
          format: int32
        name:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
    Error:
      type: object
      additionalProperties: false
      properties:
        code:
          type:
          - string
          - 'null'
        message:
          type:
          - string
          - 'null'
        errors:
          type:
          - object
          - 'null'
          additionalProperties:
            type: array
            items:
              type: string
    Carrier:
      type: object
      description: A carrier (e.g. UPS) that will collect tickets that are to be delivered.
      additionalProperties: false
      properties:
        id:
          type: integer
          description: The carrier identifier.
          format: int32
        name:
          type:
          - string
          - 'null'
          description: The name of the carrier.
        pickup_windows:
          type:
          - array
          - 'null'
          description: The windows available for ticket collection.
          items:
            $ref: '#/components/schemas/PickupWindow'
        _links:
          oneOf:
          - $ref: '#/components/schemas/CarrierLinks'
  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'
    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'
    requires_authentication:
      description: Authentication credentials were missing or incorrect.
      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-refined-from:
- viagogo-inventory.json
- viagogo-sales.json
x-tagGroups:
- name: Endpoints
  tags:
  - Addresses
  - PaymentMethods
  - User
- name: Resources
  tags:
  - Resource_Address
  - Resource_Addresss
  - Resource_PaymentMethods
  - Resource_User