Skip to content
campaiDeveloper
campai.com

Booking · Tournaments

POST/{organizationId}/{mandateId}/booking/tournaments/listReads only

List tournaments

Returns the tournaments of a mandate with their days, place, categories and counts. A view narrows them to those that are upcoming or running, over, not published yet, canceled or archived; every view but the last leaves archived ones out.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Permission checks in detail
Required permissions
  • mandate.read
  • tournament.read

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Body

Content-Type: application/json

  • sortobject of string

    The keys to sort by, each with its direction. Sorting lists every key.

    asc desc
  • limitinteger

    0–500 · default 50

  • offsetinteger

    at least 0 · default 0

  • returnCountboolean

    default false

  • viewstring

    default "all"

    upcoming past draft canceled archived all
  • searchTermstring
  • tagsstring[]

    each at least 1 characters

  • fromDatestring · date-time
  • toDatestring · date-time
  • hasEventboolean
  • selectionobject
    2 properties
    • excludeIdsid[]

      1–1000 items

    • idsid[]

      1–1000 items

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/YOUR_MANDATE_ID/booking/tournaments/list' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Sorting

sort takes the keys to sort by, each with asc or desc.

50 sort keys
Key
_id
mandate
shortId
name
description
image.resource
image.fileName
image.contentType
image.fileSizeBytes
color
tags
place.type
place.resource.site
place.resource.siteName
place.resource.siteAddress.country
place.resource.siteAddress.state
place.resource.siteAddress.zip
place.resource.siteAddress.city
place.resource.siteAddress.addressLine
place.resource.siteAddress.details1
place.resource.siteAddress.details2
place.resource.resource
place.resource.resourceName
place.resource.quantity
place.address.country
place.address.state
place.address.zip
place.address.city
place.address.addressLine
place.address.details1
place.address.details2
place.location.latitude
place.location.longitude
place.online.url
place.online.instructions
timezone
days
period.from
period.to
participantType
event
statistics.teams
statistics.matches
statistics.scheduled
statistics.finished
publishedAt
archivedAt
divisions
cancelation.canceledAt
cancelation.reason

Response

200 Successful response

Content-Type: application/json

  • countinteger

    at least 0

  • tournamentsobject[]
    19 properties
    • _idid
    • mandateid
    • shortIdstring

      exactly 6 characters

    • namestring

      1–60 characters

    • descriptionstring

      at most 140 characters

    • imageobjectnullable
      4 properties
      • resourcestring

        at least 1 characters

      • fileNamestring

        at most 128 characters

      • contentTypestring

        at most 75 characters

      • fileSizeBytesinteger

        at least 0

    • colorstring
    • tagsstring[]

      at most 10 items · each 1–40 characters

    • placeobjectnullable
      5 properties
      • typestring
        resource address online
      • resourceobject
        6 properties
        • siteid
        • siteNamestring

          at least 1 characters

        • siteAddressobject
          7 properties
          • countrystring
          • statestring
          • zipstring

            at most 10 characters

          • citystring

            at most 45 characters

          • addressLinestring

            at most 45 characters

          • details1string

            at most 45 characters

          • details2string

            at most 45 characters

        • resourceid
        • resourceNamestring
        • quantityinteger
      • addressobject
        7 properties
        • countrystring
        • statestring
        • zipstring

          at most 10 characters

        • citystring

          at most 45 characters

        • addressLinestring

          at most 45 characters

        • details1string

          at most 45 characters

        • details2string

          at most 45 characters

      • locationobjectnullable
        2 properties
        • latitudenumber

          -90–90

        • longitudenumber

          -180–180

      • onlineobject
        2 properties
        • urlstring · uri

          at most 300 characters

        • instructionsstring

          at most 400 characters

    • timezonestring

      at least 1 characters

    • daysobject[]

      1–14 items

      2 properties
      • datestring
      • startobject
        2 properties
        • hoursinteger

          0–23

        • minutesinteger

          0–59

    • periodobject
      2 properties
      • fromstring · date-time
      • tostring · date-time
    • participantTypestring
      team person
    • eventidnullable
    • statisticsobject
      4 properties
      • teamsinteger

        at least 0

      • matchesinteger

        at least 0

      • scheduledinteger

        at least 0

      • finishedinteger

        at least 0

    • publishedAtstring · date-timenullable
    • archivedAtstring · date-timenullable
    • divisionsobject[]
      4 properties
      • idstring

        exactly 10 characters

      • namestring

        1–40 characters

      • shortNamestring

        1–8 characters

      • colorstring
    • cancelationobjectnullable
      2 properties
      • canceledAtstring · date-time
      • reasonstring

        at most 240 characters

Response200
{
  "count": 0,
  "tournaments": [
    {
      "_id": "000000000000000000000001",
      "mandate": "000000000000000000000001",
      "shortId": "string",
      "name": "string",
      "description": "string",
      "image": {
        "resource": "string"
      },
      "color": "",
      "tags": [
        "string"
      ],
      "place": {
        "type": "resource"
      },
      "timezone": "string",
      "days": [
        {
          "date": "string",
          "start": {
            "hours": 0,
            "minutes": 0
          }
        }
      ],
      "period": {
        "from": "2026-06-15T22:30:00Z",
        "to": "2026-06-15T22:30:00Z"
      },
      "participantType": "team",
      "event": "000000000000000000000001",
      "statistics": {
        "teams": 0,
        "matches": 0,
        "scheduled": 0,
        "finished": 0
      },
      "publishedAt": "2026-06-15T22:30:00Z",
      "archivedAt": "2026-06-15T22:30:00Z",
      "divisions": [
        {
          "id": "string",
          "name": "string",
          "shortName": "string",
          "color": ""
        }
      ],
      "cancelation": {
        "canceledAt": "2026-06-15T22:30:00Z",
        "reason": "string"
      }
    }
  ]
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.