{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-list-hris-department-response-with-connection-schema.json",
  "title": "ListHrisDepartmentResponseWithConnection",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-hris-api-openapi.yml#/components/schemas/ListHrisDepartmentResponseWithConnection",
  "type": "object",
  "properties": {
    "departments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HrisDepartment"
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ]
    },
    "connection": {
      "$ref": "#/$defs/Connection"
    }
  },
  "required": [
    "departments",
    "connection"
  ],
  "$defs": {
    "Connection": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The UUID of the connection. Generated by Rutter."
        },
        "orgId": {
          "type": "string",
          "format": "uuid",
          "description": "Your organization id."
        },
        "platform": {
          "$ref": "#/$defs/Platform"
        }
      },
      "required": [
        "id",
        "orgId",
        "platform"
      ]
    },
    "HrisDepartment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The Rutter generated unique ID of the HRIS department.",
          "x-rutter-platforms": {
            "BAMBOO_HR": {},
            "DEEL": {},
            "GUSTO": {},
            "RIPPLING": {}
          }
        },
        "platform_id": {
          "type": "string",
          "description": "The platform specific ID of the HRIS department.",
          "x-rutter-platforms": {
            "BAMBOO_HR": {},
            "DEEL": {},
            "GUSTO": {},
            "RIPPLING": {}
          }
        },
        "manager_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "The Rutter ID of the [HRIS department](/rest/version/hris-employees) linked to the manager employee."
        },
        "parent_department_id": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "The Rutter ID of the [HRIS department](/rest/version/hris-departments) linked to the department.",
          "x-rutter-platforms": {
            "DEEL": {},
            "RIPPLING": {}
          }
        },
        "name": {
          "type": "string",
          "description": "The name of the department.",
          "x-rutter-platforms": {
            "BAMBOO_HR": {},
            "DEEL": {},
            "GUSTO": {},
            "RIPPLING": {}
          }
        },
        "custom_fields": {
          "type": "object",
          "additionalProperties": {},
          "description": "Custom fields on the department. Note: for field type 'select', please use the values from options presented through 'GET /accounting/departments/custom_fields' endpoint. For field type 'boolean', please pass in a boolean value."
        },
        "description": {
          "type": [
            "string",
            "null"
          ],
          "description": "The description about the department."
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp that the HRIS department was created.",
          "x-rutter-platforms": {
            "BAMBOO_HR": {},
            "RIPPLING": {}
          }
        },
        "updated_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp that the HRIS department was last updated.",
          "x-rutter-platforms": {
            "BAMBOO_HR": {},
            "RIPPLING": {}
          }
        },
        "last_synced_at": {
          "type": "string",
          "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp when the HRIS department was last synced by Rutter.",
          "x-rutter-platforms": {
            "BAMBOO_HR": {},
            "DEEL": {},
            "GUSTO": {},
            "RIPPLING": {}
          }
        },
        "platform_data": {
          "type": "object",
          "additionalProperties": {},
          "description": "The raw platform data corresponding to the Rutter object."
        }
      },
      "required": [
        "id",
        "platform_id",
        "manager_id",
        "parent_department_id",
        "name",
        "description",
        "created_at",
        "updated_at",
        "last_synced_at"
      ]
    },
    "Platform": {
      "type": "string",
      "enum": [
        "AMAZON",
        "EBAY",
        "ETSY",
        "FNAC",
        "WALMART",
        "SHOPEE",
        "LAZADA",
        "MERCADOLIBRE",
        "ALIBABA",
        "WAYFAIR",
        "SHEIN",
        "NOON",
        "SHOPLINE",
        "PRESTASHOP",
        "SHOPIFY",
        "MAGENTO",
        "WOO_COMMERCE",
        "SQUARESPACE",
        "WIX",
        "SHOPER",
        "SHOPLAZZA",
        "BIG_COMMERCE",
        "SALLA",
        "ZID",
        "TIKTOKSHOP",
        "COMMERCELAYER",
        "WEBFLOW",
        "GUMROAD",
        "ECWID",
        "PAYPAL",
        "SQUARE",
        "STRIPE",
        "CLOVER",
        "MOLLIE",
        "PAYNL",
        "AUTHORIZENET",
        "RECHARGE",
        "CHARGIFY",
        "CHARGEBEE",
        "RECURLY",
        "KASHFLOW",
        "SAGE_INTACCT",
        "SAGE_INTACCT_V2",
        "DYNAMICS365",
        "DYNAMICS365FO",
        "ZOHOBOOKS",
        "EXACTONLINE",
        "FREEAGENT",
        "QUICKBOOKS",
        "QUICKBOOKS_DESKTOP",
        "FRESHBOOKS",
        "XERO",
        "SAGE_BUSINESS_CLOUD",
        "SAGE_50",
        "VISTA",
        "NETSUITE",
        "WAVE",
        "DUALENTRY",
        "CAMPFIRE",
        "RILLET",
        "SOFTLEDGER",
        "VISMA",
        "SPIRIS",
        "LEXWARE",
        "MONEYBIRD",
        "SAGE200CLOUD",
        "MX",
        "PLAID",
        "TELLER",
        "RAMP",
        "ODOO",
        "ACUMATICA",
        "FULFIL",
        "TALLY",
        "SAPBUSINESSONE",
        "SAPS4HANA",
        "WORKDAY",
        "ANFIX",
        "ORACLEFUSION",
        "HOLDED",
        "MYOBBUSINESS",
        "FORTNOX",
        "GOOGLE",
        "FACEBOOK",
        "TIKTOK",
        "INTUIT_BANK_FEEDS",
        "PLAID_BANK_FEEDS",
        "SAGE",
        "SAGE_BANK_FEEDS",
        "YODLEE_BANK_FEEDS",
        "QUICKBOOKS_HRIS",
        "BAMBOO_HR",
        "GUSTO",
        "DEEL",
        "RIPPLING"
      ],
      "description": "The underlying platform."
    }
  }
}