Skip to content
campaiDeveloper
campai.com

Booking · Views

POST/{organizationId}/{mandateId}/booking/views/tournament

Create tournament view

Creates a new tournament view for a given mandate. The style tiles lists tournaments, every other style shows one tournament: the given one, or without one the tournament that is running or comes next.

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
  • bookingView.insert

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired

Body

Content-Type: application/json

  • namestringrequired

    1–60 characters

  • stylestringrequired
    tiles matches tables bracket live full
  • customCssByStyleobject

    default {}

    6 properties
    • tilesstring

      at most 50000 characters

    • matchesstring

      at most 50000 characters

    • tablesstring

      at most 50000 characters

    • bracketstring

      at most 50000 characters

    • livestring

      at most 50000 characters

    • fullstring

      at most 50000 characters

  • descriptionstring

    at most 160 characters · default ""

  • tournamentSettingsobject
    13 properties
    • tournamentidrequirednullable
    • divisionstringrequirednullable

      exactly 10 characters

    • groupstringrequirednullable

      exactly 10 characters

    • teamidrequirednullable
    • fieldstringrequirednullable

      exactly 10 characters

    • groupBystringrequired
      time field group
    • allowFiltersbooleanrequired
    • showImagesbooleanrequired
    • showFieldbooleanrequired
    • showRefereesbooleanrequired
    • showPlacementsbooleanrequired
    • matchCountintegerrequired

      1–20

    • tabsstring[]required

      at least 1 items

      info matches tables bracket teams
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/views/tournament' \
  --header 'X-API-Key: YOUR_API_KEY'

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

Response

200 Successful response

Content-Type: application/json

  • _idid
Response200
{
  "_id": "000000000000000000000001"
}

Errors

No errors of its own are known for this endpoint.

Errors nearly every request can meet are listed under Errors.