API Documentation

API Endpoint

Holidays

Holidays

Supported filter params

  • after

  • before

GET /api/v2/holidays
Requestsreturns holidays

GET  /api/v2/holidays

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "15",
      "type": "holidays",
      "attributes": {
        "name": "International Goof Off Day",
        "date": "2020-08-11"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 288
          }
        },
        "subsidiary": {
          "data": {
            "type": "subsidiaries",
            "id": "13"
          }
        }
      }
    },
    {
      "id": "16",
      "type": "holidays",
      "attributes": {
        "name": "International Goof Off Day",
        "date": "2020-08-11"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 288
          }
        },
        "subsidiary": {
          "data": {
            "type": "subsidiaries",
            "id": "14"
          }
        }
      }
    },
    {
      "id": "17",
      "type": "holidays",
      "attributes": {
        "name": "International Goof Off Day",
        "date": "2020-08-11"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 288
          }
        },
        "subsidiary": {
          "data": {
            "type": "subsidiaries",
            "id": "15"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "13",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary13",
        "invoice_number_format": null,
        "deleted_at": null,
        "archived_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 288
          }
        },
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        }
      }
    },
    {
      "id": "14",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary14",
        "invoice_number_format": null,
        "deleted_at": null,
        "archived_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 288
          }
        },
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        }
      }
    },
    {
      "id": "15",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary15",
        "invoice_number_format": null,
        "deleted_at": null,
        "archived_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 288
          }
        },
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://www.example.com/api/v2/holidays?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://www.example.com/api/v2/holidays?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 3,
    "page_size": 30,
    "max_page_size": 200,
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get all holidays
GET/api/v2/holidays


GET /api/v2/holidays/1
Requestsreturns holiday

GET  /api/v2/holidays/18

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "18",
    "type": "holidays",
    "attributes": {
      "name": "International Goof Off Day",
      "date": "2020-08-11"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 289
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "17"
        }
      }
    }
  },
  "included": [
    {
      "id": "17",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary17",
        "invoice_number_format": null,
        "deleted_at": null,
        "archived_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 289
          }
        },
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get a holiday
GET/api/v2/holidays/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday id


POST /api/v2/holidays
Requestscreates the holidayreturns error

POST  /api/v2/holidays

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "holidays",
    "attributes": {
      "name": "Dont Cry over Spilled Milk Day",
      "date": "2017-02-11",
      "subsidiary_id": 20
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "24",
    "type": "holidays",
    "attributes": {
      "name": "Dont Cry over Spilled Milk Day",
      "date": "2017-02-11"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 290
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "20"
        }
      }
    }
  },
  "included": [
    {
      "id": "20",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary20",
        "invoice_number_format": null,
        "deleted_at": null,
        "archived_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 290
          }
        },
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

POST  /api/v2/holidays

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "holidays",
    "attributes": {}
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/date"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/subsidiary"
      }
    }
  ]
}

Create a holiday
POST/api/v2/holidays

URI Parameters
HideShow
name
string (required) Example: Name

name

date
date (required) Example: 2018-01-01

date


PATCH /api/v2/holidays/1
Requestsupdats holidayreturns error

PATCH  /api/v2/holidays/28

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "holidays",
    "attributes": {
      "name": "Lame Duck Day",
      "date": "2017-02-06"
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "28",
    "type": "holidays",
    "attributes": {
      "name": "Lame Duck Day",
      "date": "2017-02-06"
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 292
        }
      },
      "subsidiary": {
        "data": {
          "type": "subsidiaries",
          "id": "29"
        }
      }
    }
  },
  "included": [
    {
      "id": "29",
      "type": "subsidiaries",
      "attributes": {
        "name": "Subsidiary29",
        "invoice_number_format": null,
        "deleted_at": null,
        "archived_at": null,
        "export_integration_type_id": null,
        "invoice_logo_url": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 292
          }
        },
        "bill_from": {
          "data": null
        },
        "integration": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/holidays/31

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "holidays",
    "attributes": {
      "name": null
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/name"
      }
    }
  ]
}

Update a holiday
PATCH/api/v2/holidays/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday id


DELETE /api/v2/holidays/1
Requestsdeletes a holiday

DELETE  /api/v2/holidays/34

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a holiday
DELETE/api/v2/holidays/{id}

URI Parameters
HideShow
id
number (required) Example: 1

holiday id


Generated by aglio on 10 Aug 2020