FansquareAPI reference
Open the app

Planning

Remove an absence

DELETE/v1/absences/{absence_id}

The employee works that day again (today or later): their shifts are theirs again. Needs a key for all creators. Confirm with the user first.

Required scopewrite:planning
Rate limit30 requests per minute
curl -X DELETE 'https://api.fansquare.so/v1/absences/88bd19bf-d104-4593-abd4-ce4145aba3ca' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "type": "https://developers.offmy.co/errors/validation_failed",
  "title": "Validation failed",
  "status": 400,
  "detail": "limit: Number must be less than or equal to 200",
  "instance": "/v1/absences/12345",
  "errors": [
    {
      "keyword": "invalid_string",
      "instancePath": "/absence_id",
      "schemaPath": "#/absence_id/invalid_string",
      "params": {
        "issue": {
          "code": "invalid_string",
          "validation": "uuid",
          "path": [
            "absence_id"
          ],
          "message": "Invalid uuid"
        }
      },
      "message": "Invalid uuid",
      "path": "absence_id"
    }
  ]
}

Parameters

Headers

  • Fansquare-Versionstringrequired

    API version to pin. Accepts the mineral name or the release date of a version.

Path

  • absence_idstringrequired

    Absence id.

    format uuid

Response

No content

No response body

curl -X DELETE 'https://api.fansquare.so/v1/absences/88bd19bf-d104-4593-abd4-ce4145aba3ca' \
  -H "Authorization: Bearer $API_KEY" \
  -H "Fansquare-Version: Amethyste"
{
  "type": "https://developers.offmy.co/errors/validation_failed",
  "title": "Validation failed",
  "status": 400,
  "detail": "limit: Number must be less than or equal to 200",
  "instance": "/v1/absences/12345",
  "errors": [
    {
      "keyword": "invalid_string",
      "instancePath": "/absence_id",
      "schemaPath": "#/absence_id/invalid_string",
      "params": {
        "issue": {
          "code": "invalid_string",
          "validation": "uuid",
          "path": [
            "absence_id"
          ],
          "message": "Invalid uuid"
        }
      },
      "message": "Invalid uuid",
      "path": "absence_id"
    }
  ]
}