> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fourvenues.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Swap reseller ticket

> Swaps a reseller's ticket with a new one and provides a new barcode and PDF.



## OpenAPI

````yaml post /resellers/swap
openapi: 3.0.0
info:
  title: Reseller API
  version: 1.0.0
  description: API for validating resellers using a barcode
servers:
  - url: https://api-alpha.fourvenues.com
    description: Alpha
  - url: https://api.fourvenues.com
    description: Production
security: []
paths:
  /resellers/swap:
    post:
      summary: Swap reseller ticket
      description: >-
        Swaps a reseller's ticket with a new one and provides a new barcode and
        PDF.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ticket:
                  type: object
                  properties:
                    barcode:
                      type: string
                      example: ABCD1234
                  required:
                    - barcode
                customer:
                  type: object
                  properties:
                    firstName:
                      type: string
                      example: Joan
                    lastName:
                      type: string
                      example: Llavor de Poma
                    email:
                      type: string
                      format: email
                      example: john.appleseed@fourvenues.com
                    language:
                      type: string
                      example: en
                  required:
                    - firstName
                    - lastName
                    - email
                    - language
      responses:
        '200':
          description: Successful swap
          headers:
            Content-Type:
              description: Response content type
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: abcdefghijk1234567890
                  barcode:
                    type: string
                    example: ABCD1235
                  pdf:
                    type: string
                    format: uri
                    example: >-
                      https://cdn.fourvenues.com/abcdefghijk1234567890-ABCD1235.pdf
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                    example: false
                  swappable:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: RESELL_NOT_ALLOWED
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                    example: false
                  swappable:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: UNAUTHORIZED
        '404':
          description: Reseller not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  valid:
                    type: boolean
                    example: false
                  swappable:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: RESELL_NOT_ALLOWED
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````