# FacilityUses and IndividualFacilityUses

What, where, and when a particular facility can be used can be represented in two ways in the Facilities API:

1. FacilityUse + Slots
2. FacilityUse + IndividualFacilityUses + Slots

Which format is used to describe facilities is determined by the underlying data structure provided to us by the data provider.

### FacilityUse + Slots

This structure is simpler and easier to consume but does not provide the granularity of the other structure. A FacilityUse will have an `event` property that contains an array of `Slots`.&#x20;

An example of this structure can be seen below:

```
{
    "type": "FacilityUse",
    "name": "Alexandra Palace Badminton Courts",
    "location": {
        "type": "Place",
        ...
    }
    ...
    "event": [
        {
            "type": "Slot",
            "startDate": "2022-09-10T12:30:00Z"
            ...
            "remainingUses": 4
            "imin:checkoutUrlTemplate": "{Checkout URL}"
        },
        {
            "type": "Slot",
            "startDate": "2022-09-10T13:30:00Z"
            ...
            "remainingUses": 3,
            "imin:checkoutUrlTemplate": "{Checkout URL}"
        },
    ]
}
```

### FacilityUse + IndividualFacilityUses + Slots

This structure has more granularity but is slightly more complicated to consume. It has an additional layer between the FacilityUse and the Slot called an IndividualFacilityUse. This layer represents specific court/pitch facilities that sit within the more general facility. Within these IndividualFacilityUses will be the Slots that corresponds to that specific court/pitch.&#x20;

An example of this data structure is:

```
{
    "type": "FacilityUse",
    "name": "Alexandra Palace Badminton Courts",
    "location": {
        "type": "Place",
        ...
    }
    ...
   "event": [
       {
        "type": "IndividualFacilityUse",
        "name": "Court 1",
        "event": [
            {
                "type": "Slot",
                "startDate": "2022-09-10T12:30:00Z"
                ...
                "remainingUses": 1,
                "imin:checkoutUrlTemplate": "{Checkout URL}"
            },
        ]
       },
       {
        "type": "IndividualFacilityUse",
        "name": "Court 2",
        "event": [
            {
                "type": "Slot",
                "startDate": "2022-09-10T12:30:00Z"
                ...
                "remainingUses": 1,
                "imin:checkoutUrlTemplate": "{Checkout URL}"
            },
            {
                "type": "Slot",
                "startDate": "2022-09-10T1:30:00Z"
                ...
                "remainingUses": 1,
                "imin:checkoutUrlTemplate": "{Checkout URL}"
            },
        ]
       }
   ] 
}
```

More information about Slots can be found here [slots](https://docs.imin.co/platform-products/search/imin-facilities-api/slots "mention") and more information about `imin:checkoutUrlTemplate` and Slot booking can be found here [facilities-booking](https://docs.imin.co/platform-products/search/imin-facilities-api/facilities-booking "mention")
