{
  "swagger": "2.0",
  "info": {
    "version": "v1",
    "title": "Fourth Account SCIM API",
    "description": "The Fourth Account SCIM API returns a customer's Fourth user accounts. Its purpose is to support managing user identities with our partners, particularly those with single sign-on (SSO) connections. <br /> <br />To use this API, you will need: <br /> &nbsp; &nbsp; &bull; &nbsp; OAuth credentials<br /> &nbsp; &nbsp; &bull; &nbsp; The root URLs for the test and live sites<br /><br />Your mutual Fourth customer must request these details on your behalf. Please ensure they do this as soon as possible. <br /> <br /><b>Testing:</b> A test environment is available. <br /><br /><b>Availability:</b> All regions. <br /><br /><b>Updates:</b> See the [Release Notes page](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/release-notes) for this API. <br /> <br />See these guides for further information: <br /> &nbsp; &nbsp; &bull; &nbsp; <b>Fourth Accounts:</b> see [Identity and Access Management](https://developer.fourth.com/en-gb/docs/identity-and-access-management). <br />  &nbsp; &nbsp; &bull; &nbsp; <b>This API:</b> see the [Fourth Account SCIM API Guide](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/guide).<br /> &nbsp; &nbsp; &bull; &nbsp; <b>OAuth:</b> see [Authenticating with OAuth](https://developer.fourth.com/en-gb/docs/authenticating-oauth).<br />"
  },
  "schemes": [
    "https"
  ],
  "paths": {
    "/scim/Me": {
      "get": {
        "tags": [
          "Me"
        ],
        "summary": "Get Fourth Account for API user",
        "description": "Returns the Fourth Account information for the authenticated API user. The information returned is the same as for the `/user` endpoints. <br />For error messages and troubshooting, see the [Fourth Account SCIM API Guide](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/guide).",
        "operationId": "Get",
        "consumes": [

        ],
        "produces": [
          "application/json",
          "text/plain"
        ],
        "parameters": [

        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Core2EnterpriseUser"
            },
            "examples": {
              "application/json": {
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                  "employeeNumber": "2AkvSni4X3",
                  "organization": "Acme Dining Group Ltd"
                },
                "active": true,
                "displayName": "Tessa Thompson",
                "emails": [
                  {
                    "type": "work",
                    "primary": true,
                    "value": "firstname.lastname@fourth.com"
                  }
                ],
                "locale": "en_US",
                "meta": {
                  "resourceType": "User",
                  "created": "2020-09-01T10:35:54.9513346Z",
                  "lastModified": "2020-09-02T10:35:54.9513347Z",
                  "location": "baseUrl/scim/Users/0058E000002MlVnQAK"
                },
                "name": {
                  "formatted": "Tessa Thompson",
                  "familyName": "Thompson",
                  "givenName": "Tessa"
                },
                "preferredLanguage": "en_US",
                "title": "Manager",
                "userName": "tessa.thompson@example.com",
                "id": "0058E000002MlVnQAK",
                "schemas": [
                  "urn:ietf:params:scim:schemas:core:2.0:User",
                  "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "invalidPath",
                "detail": "Resource not found",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "500": {
            "description": "Server Error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "scim"
            ]
          }
        ]
      }
    },
    "/scim/ResourceTypes": {
      "get": {
        "tags": [
          "ResourceTypes"
        ],
        "summary": "Get Resource metadata",
        "description": "Returns the metadata of the resources we support. There are two types of resources in SCIM: **Users** (which holds attributes about employees) and **Groups** (which holds the users that belong to a group). We support **Users** only. <br />For error messages and troubshooting, see the [Fourth Account SCIM API Guide](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/guide).",
        "operationId": "Get",
        "consumes": [

        ],
        "produces": [
          "application/json",
          "text/plain"
        ],
        "parameters": [

        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Core2ResourceType"
            },
            "examples": {
              "application/json": {
                "id": "User",
                "description": "User Account",
                "name": "User",
                "endpoint": "/Users",
                "meta": {
                  "resourceType": "ResourceType",
                  "created": "2020-09-02T10:35:54.953103Z",
                  "lastModified": null,
                  "location": "BaseUrl/ResourceType/User"
                },
                "schema": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
                "schemas": [
                  "urn:ietf:params:scim:schemas:extension:enterprise:2.0:ResourceType"
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "invalidPath",
                "detail": "Resource not found",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "500": {
            "description": "Server Error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "scim"
            ]
          }
        ]
      }
    },
    "/scim/Schemas": {
      "get": {
        "tags": [
          "Schemas"
        ],
        "summary": "Get schemas for resources",
        "description": "Returns the attributes and their characteristics for the **User** resource. <br />For error messages and troubshooting, see the [Fourth Account SCIM API Guide](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/guide).",
        "operationId": "Get",
        "consumes": [

        ],
        "produces": [
          "application/json",
          "text/plain"
        ],
        "parameters": [

        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "uniqueItems": false,
              "type": "array",
              "items": {
                "$ref": "#/definitions/TypeScheme"
              }
            },
            "examples": {
              "application/json": [
                {
                  "description": "User Account",
                  "id": "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
                  "name": "User",
                  "attributes": [
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The location where the employee is employed. The max length is 1043 characters.",
                      "mutability": "readOnly",
                      "name": "department",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The customer’s ID for the employee. This may come from an external HR or Payroll system.",
                      "mutability": "readOnly",
                      "name": "employeeNumber",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "server"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The Fourth customer whose employee data you are retrieving.",
                      "mutability": "readOnly",
                      "name": "organization",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "Boolean",
                      "description": "Whether the employee is a current employee (true) or an employee whose account has been deactivated, suspended or terminated (false).",
                      "mutability": "readOnly",
                      "name": "active",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The employee’s name that should preferably be shown in user interfaces. The max length is 121 characters.",
                      "mutability": "readOnly",
                      "name": "displayName",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "Complex",
                      "description": "Array of email address data.",
                      "mutability": "readOnly",
                      "name": "emails",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The email type. We provide one type only: 'work'.",
                      "mutability": "readWrite",
                      "name": "emails.type",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "Boolean",
                      "description": "Set to 'true', as the API returns only one email address for users.",
                      "mutability": "readOnly",
                      "name": "emails.primary",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The work email address for the employee. This may be blank, as many Fourth users are not provided with a work email address. The max length is 80 characters.",
                      "mutability": "readOnly",
                      "name": "emails.value",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "server"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The location of the user. This is a tag as defined by RFC5646; for example: 'es-US' is the United States.",
                      "mutability": "readOnly",
                      "name": "locale",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "Complex",
                      "description": "Holds metadata about the resource.",
                      "mutability": "readOnly",
                      "name": "meta",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The resource type returned in the response.",
                      "mutability": "readOnly",
                      "name": "meta.resourceType",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "DateTime",
                      "description": "UTC time and date when the user record was created in Fourth's platform.",
                      "mutability": "readOnly",
                      "name": "meta.created",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "DateTime",
                      "description": "UTC time and date when the user record was last modified in Fourth's platform.",
                      "mutability": "readOnly",
                      "name": "meta.lastModified",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "URL for the resource.",
                      "mutability": "readOnly",
                      "name": "meta.location",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "Complex",
                      "description": "Object holding the employee’s name details.",
                      "mutability": "readOnly",
                      "name": "name",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The given and last name of the user with a space inbetween. For example 'Sasha Crane'. The max length is 121 characters.",
                      "mutability": "readOnly",
                      "name": "name.formatted",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The last name of the user; for example 'Crane'. The max length is 80 characters.",
                      "mutability": "readOnly",
                      "name": "name.familyName",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The given name of the user; for example 'Sasha'. The max length is 40 characters.",
                      "mutability": "readOnly",
                      "name": "name.givenName",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The user’s preferred language. This is a tag as defined by RFC7231/RFC5646; for example: 'es-US' is American Spanish.",
                      "mutability": "readOnly",
                      "name": "preferredLanguage",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The employee’s job title. For example: 'Head Chef'. The max length is 256 characters.",
                      "mutability": "readOnly",
                      "name": "title",
                      "multiValued": false,
                      "required": false,
                      "returned": "default",
                      "uniqueness": "none"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "The employee’s username. This is normally a personal email address. For example: 'sasha.crane@example.com'. The max length is 80 characters.",
                      "mutability": "readOnly",
                      "name": "userName",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "server"
                    },
                    {
                      "caseExact": false,
                      "type": "String",
                      "description": "Fourth Account ID for the employee. This ID is globally unique in Fourth, and is an 18-digit alphanumeric string.",
                      "mutability": "readOnly",
                      "name": "id",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "server"
                    },
                    {
                      "caseExact": false,
                      "type": "Complex",
                      "description": "Array of schema for this resource.",
                      "mutability": "readOnly",
                      "name": "schemas",
                      "multiValued": false,
                      "required": true,
                      "returned": "default",
                      "uniqueness": "none"
                    }
                  ]
                }
              ]
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "invalidPath",
                "detail": "Resource not found",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "500": {
            "description": "Server Error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "scim"
            ]
          }
        ]
      }
    },
    "/scim/ServiceProviderConfig": {
      "get": {
        "tags": [
          "ServiceProviderConfiguration"
        ],
        "summary": "Get service provider details",
        "description": "Returns general information about Fourth's SCIM service. <br />For error messages and troubshooting, see the [Fourth Account SCIM API Guide](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/guide).",
        "operationId": "Get",
        "consumes": [

        ],
        "produces": [
          "application/json",
          "text/plain"
        ],
        "parameters": [

        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Core2ServiceConfiguration"
            },
            "examples": {
              "application/json": {
                "authenticationSchemes": [
                  {
                    "type": "oauth2",
                    "description": "Oauth2 authentication with client credentials flow",
                    "documentationUri": "https://developer.fourth.com/docs/authenticating-oauth",
                    "name": "Oauth2",
                    "primary": true,
                    "specUri": "https://tools.ietf.org/html/rfc6749"
                  }
                ],
                "meta": {
                  "resourceType": "ServiceProviderConfig",
                  "created": "2020-06-16T00:00:00",
                  "lastModified": "2020-06-16T00:00:00",
                  "location": "scim/ServiceProviderConfig"
                },
                "bulk": {
                  "maxOperations": 0,
                  "maxPayloadSize": 0,
                  "supported": true
                },
                "documentationUri": null,
                "eTag": {
                  "supported": false
                },
                "filter": {
                  "maxResults": 0,
                  "supported": true
                },
                "changePassword": {
                  "supported": false
                },
                "patch": {
                  "supported": false
                },
                "sort": {
                  "supported": false
                },
                "schemas": [
                  "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "500": {
            "description": "Server Error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "scim"
            ]
          }
        ]
      }
    },
    "/scim/Users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get Fourth Accounts for all users",
        "description": "Returns the Fourth Account information for all employees. <br />For error messages and troubshooting, see the [Fourth Account SCIM API Guide](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/guide).",
        "operationId": "Get",
        "consumes": [

        ],
        "produces": [
          "application/json",
          "text/plain"
        ],
        "parameters": [

        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/QueryResponse[Core2EnterpriseUser]"
            },
            "examples": {
              "application/json": {
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:ListResponse"
                ],
                "totalResults": 1,
                "itemsPerPage": 1,
                "startIndex": 0,
                "Resources": [
                  {
                    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                      "department": "123456789abcd Covent Garden Front of House",
                      "employeeNumber": "2AkvSni4X3",
                      "organization": "Acme Restaurants"
                    },
                    "active": true,
                    "displayName": "Tessa Thompson",
                    "emails": [
                      {
                        "type": "work",
                        "primary": true,
                        "value": "tessa.thompson@example.com"
                      }
                    ],
                    "locale": "en_US",
                    "meta": {
                      "resourceType": "User",
                      "created": "2020-09-01T10:35:54.9673421Z",
                      "lastModified": "2020-09-02T10:35:54.9673422Z",
                      "location": "baseUrl/scim/Users/0058E000002MlVnQAK"
                    },
                    "name": {
                      "formatted": "Tessa Thompson",
                      "familyName": "Thompson",
                      "givenName": "Tessa"
                    },
                    "preferredLanguage": "en_US",
                    "userName": "tessa.thompson@example.com",
                    "id": "0058E000002MlVnQAK",
                    "schemas": [
                      "urn:ietf:params:scim:schemas:core:2.0:User",
                      "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
                    ]
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "500": {
            "description": "Server Error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "scim"
            ]
          }
        ]
      }
    },
    "/scim/Users/{identifier}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get Fourth Account for a user",
        "description": "Returns the Fourth Account information for one employee. <br />For error messages and troubshooting, see the [Fourth Account SCIM API Guide](https://developer.fourth.com/en-gb/docs/fourth-account-scim-api/guide).",
        "operationId": "Get",
        "consumes": [

        ],
        "produces": [
          "application/json",
          "text/plain"
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "description": "Fourth Account ID for the user.",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Core2EnterpriseUser"
            },
            "examples": {
              "application/json": {
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                  "employeeNumber": "2AkvSni4X3",
                  "organization": "Acme Dining Group Ltd"
                },
                "active": true,
                "displayName": "Tessa Thompson",
                "emails": [
                  {
                    "type": "work",
                    "primary": true,
                    "value": "firstname.lastname@fourth.com"
                  }
                ],
                "locale": "en_US",
                "meta": {
                  "resourceType": "User",
                  "created": "2020-09-01T10:35:54.9680903Z",
                  "lastModified": "2020-09-02T10:35:54.9680904Z",
                  "location": "baseUrl/scim/Users/0058E000002MlVnQAK"
                },
                "name": {
                  "formatted": "Tessa Thompson",
                  "familyName": "Thompson",
                  "givenName": "Tessa"
                },
                "preferredLanguage": "en_US",
                "title": "Manager",
                "userName": "tessa.thompson@example.com",
                "id": "0058E000002MlVnQAK",
                "schemas": [
                  "urn:ietf:params:scim:schemas:core:2.0:User",
                  "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "404": {
            "description": "Not Found",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "invalidPath",
                "detail": "Resource not found",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          },
          "500": {
            "description": "Server Error",
            "schema": {
              "$ref": "#/definitions/ErrorResponse"
            },
            "examples": {
              "application/json": {
                "scimType": "",
                "detail": "",
                "schemas": [
                  "urn:ietf:params:scim:api:messages:2.0:Error"
                ]
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "scim"
            ]
          }
        ]
      }
    }
  },
  "definitions": {
    "Core2EnterpriseUser": {
      "description": "User base class",
      "type": "object",
      "properties": {
        "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
          "$ref": "#/definitions/ExtensionAttributeEnterpriseUser2"
        },
        "active": {
          "description": "Whether the employee is: <br /> — `True`: A current employee. <br /> — `False`: An employee whose account has been deactivated, suspended or terminated.",
          "type": "boolean"
        },
        "displayName": {
          "description": "The employee’s name that should preferably be shown in user interfaces. <br /> **Max:** 121 characters",
          "type": "string"
        },
        "emails": {
          "description": "Object holding the employee’s email details.",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "$ref": "#/definitions/ElectronicMailAddress"
          }
        },
        "locale": {
          "description": "The location of the user. Use this for localizing such items as currency, date time format, or numerical representations. The value is a language tag defined in RFC5646; for example: <br /> — es-US: USA <br /> — en-GB: UK <br /> — bg-BG: Bulgaria",
          "type": "string"
        },
        "meta": {
          "allOf": [
            { "$ref": "#/definitions/Core2Metadata" }
          ],
           "description" : "The metadata for the resource. For user-related requests, this is the metadata for each individual user."
        },
        "name": {
          "allOf": [
            { "$ref": "#/definitions/Name" }
          ],
          "description": "Object holding the employee’s name details."
        },
        "preferredLanguage": {
          "description": "The user’s preferred language. Use this to localize your user interface. The value is a language tag defined in RFC7231/RFC5646; for example: <br /> — `en-GB`: American English <br /> — `es-US`: American Spanish <br /> — `en-GB`: UK English <br /> Note: Only one language is returned.",
          "type": "string"
        },
        "title": {
          "description": "The employee’s job title. For example: `Head Chef`. <br /> **Max:** 256 characters",
          "type": "string"
        },
        "userName": {
          "description": "The employee’s username. This is normally a personal email address. For example: `sasha.crane@gmail.com`. <br />This address should not be used to contact the end user without their consent.<br /> **Max:** 80 characters",
          "type": "string"
        },
        "id": {
          "description": "Fourth Account ID for the employee. This ID is globally unique in Fourth, and is an 18-digit alphanumeric string.",
          "type": "string"
        },
        "schemas": {
          "description": "Identifies the schema used in this response.",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "ExtensionAttributeEnterpriseUser2": {
      "type": "object",
      "properties": {
        "department": {
          "description": "The location where the employee is employed. This is made up of both a unique location ID and the name of the location. For example: <br /> `a0I3L00000OVGpLUAB Acme Covent Garden` <br /> The location ID is 18 characters, while the location name is up to 1024 characters (combined 1043).",
          "type": "string"
        },
        "employeeNumber": {
          "description": "The customer’s ID for the employee; this may come from an external HR or Payroll system.",
          "type": "string"
        },
        "organization": {
          "description": "The Fourth customer whose employee data you are retrieving.",
          "type": "string"
        }
      }
    },
    "Address": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string"
        },
        "formatted": {
          "type": "string"
        },
        "locality": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "streetAddress": {
          "type": "string"
        },
        "type": {
          "description": "The email type. We provide one type only: `work`.",
          "type": "string"
        },
        "primary": {
          "description": "Set to `true`, as the API returns only one email address for users.",
          "type": "boolean"
        }
      }
    },
    "ElectronicMailAddress": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The email type. We provide one type only: `work`.",
          "type": "string"
        },
        "primary": {
          "description": "Set to `true`, as the API returns only one email address for users.",
          "type": "boolean"
        },
        "value": {
          "description": "The work email address for the employee. <br />This may be blank, as many Fourth users are not provided with a work email address. <br />We check that the email format is valid. <br />**Max:** 80 characters",
          "type": "string"
        }
      }
    },
    "InstantMessaging": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The email type. We provide one type only: `work`.",
          "type": "string"
        },
        "primary": {
          "description": "Set to `true`, as the API returns only one email address for users.",
          "type": "boolean"
        },
        "value": {
          "description": "The work email address for the employee. <br />This may be blank, as many Fourth users are not provided with a work email address. <br />We check that the email format is valid. <br />**Max:** 80 characters",
          "type": "string"
        }
      }
    },
    "Core2Metadata": {
      "type": "object",
      "properties": {
        "resourceType": {
          "description": "The resource returned in the response; e.g. `ResourceType`, `User` or `ServiceProviderConfig`.",
          "type": "string"
        },
        "created": {
          "format": "date-time",
          "description": "UTC time and date when the resource was created. Format: `yyyy-mm-ddT00:00:00.000`.",
          "type": "string"
        },
        "lastModified": {
          "format": "date-time",
          "description": "UTC time and date when the resource last changed. Format: `yyyy-mm-ddT00:00:00.000`.",
          "type": "string"
        },
        "location": {
          "description": "URL for the resource.",
          "type": "string"
        }
      }
    },
    "Name": {
      "type": "object",
      "properties": {
        "formatted": {
          "description": "The given and last name of the user with a space inbetween. For example `Sasha Crane`. <br /> **Max:** 121 characters",
          "type": "string"
        },
        "familyName": {
          "description": "The last name of the user; for example `Crane`. <br />**Max:** 80 characters",
          "type": "string"
        },
        "givenName": {
          "description": "The given or first name of the user; for example `Sasha`. <br /> **Max:** 40 characters",
          "type": "string"
        }
      }
    },
    "PhoneNumber": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The email type. We provide one type only: `work`.",
          "type": "string"
        },
        "primary": {
          "description": "Set to `true`, as the API returns only one email address for users.",
          "type": "boolean"
        },
        "value": {
          "description": "The work email address for the employee. <br />This may be blank, as many Fourth users are not provided with a work email address. <br />We check that the email format is valid. <br />**Max:** 80 characters",
          "type": "string"
        }
      }
    },
    "Role": {
      "type": "object",
      "properties": {
        "display": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "type": {
          "description": "The email type. We provide one type only: `work`.",
          "type": "string"
        },
        "primary": {
          "description": "Set to `true`, as the API returns only one email address for users.",
          "type": "boolean"
        }
      }
    },
    "Manager": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        }
      }
    },
    "ErrorResponse": {
      "type": "object",
      "properties": {
        "scimType": {
          "type": "string"
        },
        "detail": {
          "type": "string"
        },
        "schemas": {
          "description": "Identifies the schema used in this response.",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Core2ResourceType": {
      "description": "Resource type model",
      "type": "object",
      "properties": {
        "id": {
          "description": "The resource’s unique ID. For users this is `User`.",
          "type": "string"
        },
        "description": {
          "description": "A description for the resource. For <b>users</b> this is `User Account`.",
          "type": "string"
        },
        "name": {
          "description": "The resource's name. For users this is `User`.",
          "type": "string"
        },
        "endpoint": {
          "description": "The resource's endpoint relative to the base URL.",
          "type": "string"
        },
        "meta": {
          "allOf": [
            { "$ref": "#/definitions/Core2Metadata" }
          ],
          "description": "The metadata for the ResourceTypes resource."
        },
        "schema": {
          "description": "The schema URN for the resource. For `Users` this is: <br /> `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User`",
          "type": "string"
        },
        "schemas": {
          "description": "Identifies the schema used in this response.",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "TypeScheme": {
      "description": "Type Scheme model",
      "type": "object",
      "properties": {
        "description": {
          "description": "One possible value: `User Account`.",
          "type": "string"
        },
        "id": {
          "description": "The schema URN for the `User` resource.",
          "type": "string"
        },
        "name": {
          "description": "The schema’s human-readable name.",
          "type": "string"
        },
        "attributes": {
          "uniqueItems": false,
          "description": "An array of resource attributes.",
          "type": "array",
          "items": {
            "$ref": "#/definitions/AttributeScheme"
          }
        }
      }
    },
    "AttributeScheme": {
      "type": "object",
      "properties": {
        "caseExact": {
          "description": "This applies to **string** attributes: <br /> — `true`: the attribute’s value is case-sensitive. <br /> — `false`: the attribute’s value is case-insensitive.",
          "type": "boolean"
        },
        "type": {
          "description": "The attribute's data type. Valid values for the `user` resource are `string`, `boolean`, `integer`, and `dateTime`. <br />The SCIM specification also allows for: `decimal`, `reference`, and `complex`.",
          "type": "string"
        },
        "description": {
          "description": "The attribute's human-readable description.",
          "type": "string"
        },
        "mutability": {
          "description": "Whether the attribute’s value is changeable (i.e. through POST or PATCH requests) and viewable in responses. As we currently support only GET requests, this value is set to `ReadOnly`.",
          "type": "string"
        },
        "name": {
          "description": "The attribute’s name.",
          "type": "string"
        },
        "multiValued": {
          "description": "Whether the attribute can have an array of values.",
          "type": "boolean"
        },
        "required": {
          "description": "Whether the attribute is required in the user record. <br /> — `true`: the attribute is required. <br /> — `false` : the attribute is optional.",
          "type": "boolean"
        },
        "returned": {
          "description": "Whether the attribute is always returned in a responses that can include the attribute: <br /> — `always`: the attribute is always returned <br /> — `default`: the attribute is returned as long as there is no `attribute` filter used to restrict the attributes returned. <br /> — `never`: the attribute is never included in responses.",
          "type": "string"
        },
        "uniqueness": {
          "description": "Whether the value is unique. <br /> — `none`: (default) The values are not intended to be unique in any way.For example, the user `familyName` is not unique. <br /> — `server`: The value is unique within the current SCIM service. For example, the user `id` is a unique value.",
          "type": "string"
        }
      }
    },
    "Core2ServiceConfiguration": {
      "type": "object",
      "properties": {
        "authenticationSchemes": {
          "uniqueItems": false,
          "type": "array",
          "items": {
            "$ref": "#/definitions/AuthenticationScheme"
          }
        },
        "meta": {
          "allOf": [
            { "$ref": "#/definitions/Core2Metadata" }
          ],
          "description": "The metadata for the ServiceProviderConfig resource."
        },
        "bulk": {
          "allOf": [
            { "$ref": "#/definitions/BulkRequestsFeature" }
          ],
          "description": "Our bulk messaging configuration for client POST, PUT, PATCH, or DELETE requests. We do not currently support these methods."
        },
        "documentationUri": {
          "description": "The URL to our online guide for this API.",
          "type": "string"
        },
        "eTag": {
          "allOf": [
            { "$ref": "#/definitions/Feature" }
          ],
          "description": "Our support of using entity-tags in HTTP headers for version control."
        },
        "filter": {
          "allOf": [
            { "$ref": "#/definitions/FilteringFeature" }
          ],
          "description": "Our support for filtering responses."
        },
        "changePassword": {
          "allOf": [
            { "$ref": "#/definitions/Feature" }
          ],
          "description": "Whether another service provider can update user passwords via this API. We do not currently offer this option."
        },
        "patch": {
          "allOf": [
            { "$ref": "#/definitions/Feature" }
          ],
          "description": "Our support for PATCH requests."
        },
        "sort": {
          "allOf": [
            { "$ref": "#/definitions/Feature" }
          ],
          "description": "Our support for sorting data in our GET responses."
        },
        "schemas": {
          "description": "Identifies the schema used in this response.",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "AuthenticationScheme": {
      "type": "object",
      "properties": {
        "type": {
          "description": "The type of authentication supported.",
          "type": "string"
        },
        "description": {
          "description": "A description of the authentication scheme.",
          "type": "string"
        },
        "documentationUri": {
          "description": "A URL to documentation about this authentication method.",
          "type": "string"
        },
        "name": {
          "description": "The authentication scheme’s name.",
          "type": "string"
        },
        "primary": {
          "description": "— `true`: Indicates it is the preferred authentication method.",
          "type": "boolean"
        },
        "specUri": {
          "description": "The URL to the specification for this authentication scheme.",
          "type": "string"
        }
      }
    },
    "BulkRequestsFeature": {
      "type": "object",
      "properties": {
        "maxOperations": {
          "format": "int32",
          "description": "The maximum number of operations. <br />\r\n— `0`: unsupported",
          "type": "integer"
        },
        "maxPayloadSize": {
          "format": "int32",
          "description": "The maximum payload size in bytes.<br />\r\n— `0`: unsupported",
          "type": "integer"
        },
        "supported": {
          "description": "— `true`: we support this functionality. <br /> — `false`: we do not support this functionality.",
          "type": "boolean"
        }
      }
    },
    "Feature": {
      "type": "object",
      "properties": {
        "supported": {
          "description": "— `true`: we support this functionality. <br /> — `false`: we do not support this functionality.",
          "type": "boolean"
        }
      }
    },
    "FilteringFeature": {
      "type": "object",
      "properties": {
        "maxResults": {
          "format": "int32",
          "description": "The maximum number of resources returned in a response.",
          "type": "integer"
        },
        "supported": {
          "description": "— `true`: we support this functionality. <br /> — `false`: we do not support this functionality.",
          "type": "boolean"
        }
      }
    },
    "QueryResponse[Core2EnterpriseUser]": {
      "type": "object",
      "properties": {
        "schemas": {
          "description": "Identifies the schema used in this response.",
          "uniqueItems": false,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "totalResults": {
          "format": "int32",
          "description": "The total number of users. <br />If you are using the `attributes` query parameter, then this is the total number of users matching this filter. <br />If you are paginating your requests, then this is the total number of users regardless of pagination.",
          "type": "integer"
        },
        "itemsPerPage": {
          "format": "int32",
          "description": "The number of users returned.",
          "type": "integer"
        },
        "startIndex": {
          "format": "int32",
          "description": "The index number where the pagination begins. Each index number is for one user. For example, 101 would be the 101st person in the index. The link between an index number and a specific user is not stateful. For more information, see https://developer.fourth.com/docs/fourth-account-scim-api/guide.",
          "type": "integer"
        },
        "Resources": {
          "uniqueItems": false,
          "type": "array",
          "items": {
            "$ref": "#/definitions/Core2EnterpriseUser"
          }
        }
      }
    }
  },
  "securityDefinitions": {
    "oauth2": {
      "flow": "application",
      "tokenUrl": "https://api.fourth.com/oauth/connect/token",
      "scopes": {
        "scim": "SCIM scope"
      },
      "type": "oauth2",
      "description": "Authenticate to OAuth2 using Client Credentials flow"
    }
  }
}