Skip to content
campaiDeveloper
campai.com

Booking · Tournaments

POST/{organizationId}/{mandateId}/booking/events/{eventId}/tournament

Create a tournament from an event

Creates a tournament from an event with a single date that teams register for. The event goes on taking the sign-up, and confirmed sign-ups become teams. The tournament takes over description, place, picture, color and tags of the event and starts as a draft, so nothing changes in public lists until it is published.

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.insert
  • event.edit

Request

Path parameters

  • organizationIdidrequired
  • mandateIdidrequired
  • eventIdidrequired

Body

Content-Type: application/json

  • namestringrequired

    1–60 characters

  • daysobject[]required

    1–14 items

    2 properties
    • datestringrequired
    • startobjectrequired
      2 properties
      • hoursintegerrequired

        0–23

      • minutesintegerrequired

        0–59

  • divisionsobject[]required

    1–24 items

    4 properties
    • rateIdstringrequirednullable

      exactly 8 characters

    • namestringrequired

      1–40 characters

    • shortNamestringrequired

      1–8 characters

    • colorstringrequired
  • fieldCountinteger

    1–32 · default 1

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/events/YOUR_EVENT_ID/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.