Skip to main content

Overview

The Club content type manages core organizational information for the mountain biking club, including branding assets, contact information, and club mission.
This is a collection type with draft and publish enabled. Multiple clubs can be managed, and entries can be saved as drafts before publishing.

Schema Information

  • Collection Name: clubs
  • Singular: club
  • Plural: clubs
  • Draft & Publish: Enabled

Attributes

nombreClub

nombreClub
string
The official name of the club.
  • Optional field
  • Used for display throughout the application
Club logo image used for branding.
  • Single file upload
  • Allowed types: images, files, videos, audios
  • Recommended: Square PNG or SVG format
  • Optional field

imagenPortada

imagenPortada
media
Cover image for the club’s main page or profile.
  • Single file upload
  • Allowed types: images, files, videos, audios
  • Recommended: Wide landscape format (16:9)
  • Optional field

historia

historia
blocks
Rich text content describing the club’s history and background.
  • Supports rich text formatting
  • Can include headings, lists, links, and formatting
  • Optional field

mision

mision
blocks
Rich text content describing the club’s mission and values.
  • Supports rich text formatting
  • Can include headings, lists, links, and formatting
  • Optional field

emailConacto

emailConacto
email
Primary contact email address for the club.
  • Email format validation
  • Optional field
  • Note: Field name has typo in schema (“Conacto” instead of “Contacto”)

telefonoContacto

telefonoContacto
string
Contact phone number for the club.
  • Free text format
  • Optional field

direccion

direccion
string
Physical address of the club.
  • Free text format
  • Optional field

API Endpoints

List All Clubs

curl -X GET 'https://api.example.com/api/clubs' \
  -H 'Authorization: Bearer YOUR_TOKEN'
data
array
Array of club entries

Get Single Club

curl -X GET 'https://api.example.com/api/clubs/1' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Create Club

curl -X POST 'https://api.example.com/api/clubs' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {
      "nombreClub": "Club MTB Valle Grande",
      "emailConacto": "[email protected]",
      "telefonoContacto": "+56912345678",
      "direccion": "Av. Principal 123, Santiago"
    }
  }'

Update Club

curl -X PUT 'https://api.example.com/api/clubs/1' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {
      "telefonoContacto": "+56987654321"
    }
  }'

Delete Club

curl -X DELETE 'https://api.example.com/api/clubs/1' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Query Parameters

Populate Relations

To include media fields (logo, imagenPortada) in the response:
curl -X GET 'https://api.example.com/api/clubs?populate=*' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Filter Published Only

curl -X GET 'https://api.example.com/api/clubs?publicationState=live' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Include Drafts

curl -X GET 'https://api.example.com/api/clubs?publicationState=preview' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Media Upload

To upload logo or cover images, use the upload endpoint:
# First, upload the file
curl -X POST 'https://api.example.com/api/upload' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -F 'files=@/path/to/logo.png'

# Then, link it to the club
curl -X PUT 'https://api.example.com/api/clubs/1' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {
      "logo": 1
    }
  }'
The upload endpoint returns an array with the uploaded file’s ID. Use this ID to link the media to the club entry.

Example Response

{
  "data": {
    "id": 1,
    "attributes": {
      "nombreClub": "Club MTB Valle Grande",
      "emailConacto": "[email protected]",
      "telefonoContacto": "+56912345678",
      "direccion": "Av. Principal 123, Santiago",
      "historia": [
        {
          "type": "paragraph",
          "children": [
            {
              "type": "text",
              "text": "Fundado en 2015, nuestro club ha crecido..."
            }
          ]
        }
      ],
      "mision": [
        {
          "type": "paragraph",
          "children": [
            {
              "type": "text",
              "text": "Promover el ciclismo de montaña..."
            }
          ]
        }
      ],
      "logo": {
        "data": {
          "id": 1,
          "attributes": {
            "name": "logo.png",
            "url": "/uploads/logo_123.png",
            "formats": {
              "thumbnail": {
                "url": "/uploads/thumbnail_logo_123.png"
              }
            }
          }
        }
      },
      "imagenPortada": {
        "data": null
      },
      "createdAt": "2026-03-01T10:00:00.000Z",
      "updatedAt": "2026-03-04T15:30:00.000Z",
      "publishedAt": "2026-03-01T10:05:00.000Z"
    }
  },
  "meta": {}
}

Best Practices

Image Optimization

Optimize logo and cover images before upload. Recommended formats:
  • Logo: PNG or SVG, max 500KB
  • Cover: JPEG, max 2MB, 1920x1080px

Rich Text Content

Use the blocks editor for historia and mision to create well-structured, formatted content with headings and lists.

Contact Validation

Validate email and phone formats on the client side before submission to ensure data quality.

Draft Workflow

Use draft mode to prepare club information before making it public. Publish when content is ready.

Build docs developers (and LLMs) love