Upload ticket codes for an option

POST/v2/experiences/{experienceId}/options/{optionId}/upload-tickets

Requires your API key in the X-API-Key header.

Bulk-uploads pre-generated ticket codes (e.g. entrance QR/barcode pools) for an option. Requires authentication and is restricted to the experience's organizer; returns 400 on externally-sourced experiences.

Send one or more files as multipart/form-data; every non-empty line of every uploaded file becomes one ticket code. Codes that already exist are silently skipped (duplicate-safe re-upload). An optional participantTypeId form field restricts the uploaded codes to a specific participant type — it must belong to this experience, otherwise the request is a 400. The response body is empty.

Requestbash
curl -X POST "https://api.turneo.co/v2/experiences/8e7d6c5b-4a39-4281-90ef-1a2b3c4d5e6f/options/3d3f9c2a-1b2c-4d5e-8f90-a1b2c3d4e5f6/upload-tickets" \
  -H "X-API-Key: <your-api-key>" \
  -F "file=@file" \
  -F "participantTypeId=a7c53f01-6f9c-4d1c-9c30-1c19a1a5bd44"

Path parameters

  • experienceIdstring (uuid)required

    UUID of the parent experience.

    Example:
    8e7d6c5b-4a39-4281-90ef-1a2b3c4d5e6f
  • optionIdstring (uuid)required

    UUID of the option (must belong to the experience in the path).

    Example:
    3d3f9c2a-1b2c-4d5e-8f90-a1b2c3d4e5f6

Request bodymultipart/form-data, required

  • filestring (binary)

    Text file with one ticket code per line. Multiple file parts may be sent in one request; all of them are ingested.

  • participantTypeIdstring (uuid)

    Optional participant type the codes are valid for. When omitted the codes apply to any participant type. Must be a participant type of this experience.

    Example:
    a7c53f01-6f9c-4d1c-9c30-1c19a1a5bd44

Responses

201

Ticket codes ingested (empty body).

Errors

400

Validation failed. Inspect errors[].field and errors[].code.

401

Missing or invalid X-API-Key header.

403

The API key is valid but not allowed to perform this action on this resource.

404

The resource does not exist or belongs to another partner (existence is not leaked across partners).

Error body
  • typestring

    Error class.

    Allowed values:
    validation_errorclient_errorserver_error
    Example:
    validation_error
  • errorsobject[]
    Child fields
    • codestring

      Machine-readable error code.

      Example:
      required
    • fieldstringnullable

      Offending field, or null/'general' for non-field errors.

      Example:
      startTime
    • messagestring

      Human-readable message.

      Example:
      This field is required.
Response 400json
{
  "type": "validation_error",
  "errors": [
    {
      "code": "required",
      "field": "startTime",
      "message": "This field is required."
    }
  ]
}