---
# System prepended metadata

title: Appointments Micro

---

# Appointments Micro

## Appointment API
* Single appointment:
```
{
  "data": {
    "type": "appointment",
    "id": "appointment_123456789012345678901",
    "attributes": {
      "start": "2022-12-24 14:32:33Z",
      "end": "2022-12-24 14:52:33Z",
      "duration": "20minutes",
      "reason": "dog got choco"
    },
    "relationships": {
      "contact": {
        "links": {
          "related": "contact/contact_uyebfJ78TR3Rivt5HDZS8"
        }
      },
      "animal": {
        "links": {
          "related": "animal/animal_uyebfJ78TR3Rivt5HDZS8"
        }
      },
      "resource": {
        "links": {
          "related": "resource/resource_uyebfJ78TR3Rivt5HDZS8"
        }
      }
    }
  }
}
```

* Recurring appointment settings:
```
{
  "data": {
    "type": "recurringAppointment",
    "id": "recurringAppointment_123456789012345678901",
    "attributes": {
      "start": "2022-12-24 14:32:33Z",
      "end": "2042-12-24 14:32:33Z",
      "duration": "20minutes",
      "reason": "dog got to get checked every time",
      "occurance": "Each Tuesday",
      "allowOverlap" false
    },
    "relationships": {
      "contact": {
        "links": {
          "related": "contact/contact_uyebfJ78TR3Rivt5HDZS8"
        }
      },
      "animal": {
        "links": {
          "related": "animal/animal_uyebfJ78TR3Rivt5HDZS8"
        }
      },
      "resource": {
        "links": {
          "related": "resource/resource_uyebfJ78TR3Rivt5HDZS8"
        }
      }
    }
	}
}
```

* An instance of a recurring appointment:
```
{
  "data": {
    "type": "appointmentInstance",
    "id": "appointmentInstance_123456789012345678901",
    "attributes": {
      "start": "2023-01-24 14:32:33Z",
      "end": "2023-01-24 14:52:33Z",
      "duration": "20minutes",
      "reason": "dog got to get checked every time"
    },
    "relationships": {
      "contact": {
        "links": {
          "related": "contact/contact_uyebfJ78TR3Rivt5HDZS8"
        }
      },
      "animal": {
        "links": {
          "related": "animal/animal_uyebfJ78TR3Rivt5HDZS8"
        }
      },
      "resource": {
        "links": {
          "related": "resource/resource_uyebfJ78TR3Rivt5HDZS8"
        }
      }
      "parent": {
        "links": {
          "related": "recurringAppointment/recurringAppointment_123456789012345678901"
        }
      }
    }
  }
}
```

* Planning guides
I believe planning guides may need to be removed entirely to make way for a simpler more global concept

## Availability API
* Get request with:
  * Resource selected
  * Start date = `2022-12-24 00:00:00Z`
  * End date = `2022-12-25 00:00:00Z`
```
{
  "data": [
    {
      "type": "availability",
      "attributes": {
        "start": "2022-12-24 08:30:00Z",
        "end": "2022-12-24 14:00:00Z"
      }
      "relationships": {
        "resource": {
          "links": {
            "related": "resource/resource_uyebfJ78TR3Rivt5HDZS8"
          }
        }
      }
    },
    {
      "type": "availability",
      "attributes": {
        "start": "2022-12-24 17:45:00Z",
        "end": "2022-12-24 19:00:00Z"
      }
      "relationships": {
        "resource": {
          "links": {
            "related": "resource/resource_uyebfJ78TR3Rivt5HDZS8"
          }
        }
      }
    }
  ]
}
```
