Skip to content

Resources

Service

A unit's service history: visits, repairs, fault reports and notes, from the app and from your own systems.

The service entry model

Properties

  • id string (uuid)
  • unit_id string (uuid)
  • component_id string (uuid), nullable
  • type string

    One of service, repair, replacement, addition, inspection, other

  • performed_at string (date-time)
  • text string, nullable
  • company string, nullable

    The company that did the work.

  • created_at string (date-time)

GET/units/{unit}/service-entries

List service entries

Service history.

Scope: service:read

Path parameters

  • unit string (uuid) required

    The ID of the unit.

Query parameters

  • limit integer

    Records per page. At most 100, default 50.

  • cursor string

    The value of next_cursor from the page before.

Response

200 A page of service notes. The fields are those of the service entry model.

Request
GET/units/{unit}/service-entries
curl https://api.maci.energy/v1/units/0b6f4c1e-5a1d-4a57-9f0e-2f6f3f0c9a11/service-entries \
  -H "Authorization: Bearer $MACI_API_KEY"
Response 200
{
  "data": [
    {
      "id": "bd58f66a-5f7e-494b-a81b-d5429bd71ba2",
      "unit_id": "0b6f4c1e-5a1d-4a57-9f0e-2f6f3f0c9a11",
      "component_id": null,
      "type": "service",
      "performed_at": "2026-10-30T09:15:00Z",
      "text": "Cleaned the condenser and checked the fans.",
      "company": "Example Cooling ApS",
      "created_at": "2026-10-30T09:15:00Z"
    }
  ],
  "next_cursor": null
}

POST/units/{unit}/service-entries

Create service entry

New service note.

Scope: service:write

Path parameters

  • unit string (uuid) required

    The ID of the unit.

Headers

  • Idempotency-Key string

    A value of your own choosing, so that a repeated call does not create two records.

Body

  • type string required

    Replacements and additions are written by the system when a component changes.

    One of service, repair, inspection, other

  • text string required
  • performed_at string (date-time), nullable

    When the work was done. The default is now.

Response

201 The service note that was created. The fields are those of the service entry model.

Request
POST/units/{unit}/service-entries
curl -X POST https://api.maci.energy/v1/units/0b6f4c1e-5a1d-4a57-9f0e-2f6f3f0c9a11/service-entries \
  -H "Authorization: Bearer $MACI_API_KEY" \
  -H "Idempotency-Key: a-value-of-your-own" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "service",
    "text": "Cleaned the condenser and checked the fans.",
    "performed_at": "2026-10-30T09:15:00Z"
  }'
Response 201
{
  "id": "bd58f66a-5f7e-494b-a81b-d5429bd71ba2",
  "unit_id": "0b6f4c1e-5a1d-4a57-9f0e-2f6f3f0c9a11",
  "component_id": null,
  "type": "service",
  "performed_at": "2026-10-30T09:15:00Z",
  "text": "Cleaned the condenser and checked the fans.",
  "company": "Example Cooling ApS",
  "created_at": "2026-10-30T09:15:00Z"
}