{
    "swagger": "2.0",
    "host": "api.dcX.pageuppeople.com",
    "basePath": "/v3/{tenantId}/recruitment",
    "info": {
        "version": "v1",
        "title": "PageUP Applicant API"
	},
    "schemes": [
        "https"
    ],
    "paths": {      
        "/applicant": {
            "get": {
                "tags": [
                    "Developer Portal: Recruitment > Applicant"
                ],
                "summary": "Returns a single Applicant using the received email",
                "operationId": "Applicant_GetAnyByEmail",
                "consumes": [],
                "produces": [
                    "application/json",
                    "text/json",
                    "text/plain",
                    "application/xml",
                    "text/xml"
                ],
                "parameters": [
                    {
                        "name": "email",
                        "in": "query",
                        "description": "Email",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A JSON representation of the applicant."
                    },
                    "400": {
                        "description": "Bad request error."
                    },
                    "404": {
                        "description": "Not Found - The requested resource could not be found."
                    },
                    "500": {
                        "description": "Internal Server error."
                    }
                }
            },
            "post": {
                "tags": [
                    "Developer Portal: Recruitment > Applicant"
                ],
                "summary": "Creates and returns a single Applicant using the received applicant json",
                "operationId": "Applicant_Create",
                "consumes": [
                    "application/json",
                    "text/json",
                    "text/plain",
                    "application/xml",
                    "text/xml",
                    "application/x-www-form-urlencoded"
                ],
                "produces": [
                    "application/json",
                    "text/json",
                    "text/plain",
                    "application/xml",
                    "text/xml"
                ],
                "parameters": [
                    {
                        "name": "publicApplicant",
                        "in": "body",
                        "description": "Public Applicant",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/PageUp.DTO.v2.PublicApplicant"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A JSON representation of the applicant after it is created."
                    },
                    "400": {
                        "description": "Tried to create an applicant with an existing email."
                    },
                    "404": {
                        "description": "Not Found - The requested resource could not be created."
                    },
                    "500": {
                        "description": "Internal Server error."
                    }
                }
            }
        },
        "/applicant/exists": {
            "get": {
                "tags": [
                    "Developer Portal: Recruitment > Applicant"
                ],
                "summary": "Checks if an Applicant exists using the received email",
                "operationId": "Applicant_DoesAnyApplicantExistWithEmail",
                "consumes": [],
                "produces": [
                    "application/json",
                    "text/json",
                    "text/plain",
                    "application/xml",
                    "text/xml"
                ],
                "parameters": [
                    {
                        "name": "email",
                        "in": "query",
                        "description": "Email",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A JSON representation of the applicant if it exists."
                    },
                    "400": {
                        "description": "Bad request error."
                    },
                    "404": {
                        "description": "Not Found - The requested resource could not be found."
                    },
                    "500": {
                        "description": "Internal Server error."
                    }
                }
            }
        },
        "/applicant/{id}": {
            "put": {
                "tags": [
                    "Developer Portal: Recruitment > Applicant"
                ],
                "summary": "Updates and returns a single Applicant using the received applicant json",
                "operationId": "Applicant_Update",
                "consumes": [
                    "application/json",
                    "text/json",
                    "text/plain",
                    "application/xml",
                    "text/xml",
                    "application/x-www-form-urlencoded"
                ],
                "produces": [
                    "application/json",
                    "text/json",
                    "text/plain",
                    "application/xml",
                    "text/xml"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "description": "id",
                        "required": true,
                        "type": "integer",
                        "format": "int32"
                    },
                    {
                        "name": "publicApplicant",
                        "in": "body",
                        "description": "Public Applicant",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/PageUp.DTO.v2.PublicApplicant"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A JSON representation of the applicant after it is updated."
                    },
                    "400": {
                        "description": "Tried to update an applicant with an email that doesn't exist."
                    },
                    "404": {
                        "description": "Not Found - The requested resource could not be updated."
                    },
                    "500": {
                        "description": "Internal Server error."
                    }
                }
            }
        },
        "/applicant/flags": {
          "get": {
            "tags": [
              "Developer Portal: Recruitment > Applicant"
            ],
            "summary": "Get all applicant flags.",
            "description": "Required OAuth scopes for authentication: Public.Applicant.Read",
            "operationId": "Applicant_GetFlags",
            "consumes": [
              "application/json",
              "text/json",
              "text/plain",
              "application/xml",
              "text/xml",
              "application/x-www-form-urlencoded"
            ],
            "produces": [
              "application/json",
              "text/json",
              "text/plain",
              "application/xml",
              "text/xml"
            ],
            "parameters": [],
            "responses": {
              "200": {
                "description": "A JSON representation of the available flags in the system."
              },
              "500": {
                "description": "Internal Server error."
              }
            }
          }
        },
        "/applicant/{applicantId}/flags": {
          "put": {
            "tags": [
              "Developer Portal: Recruitment > Applicant"
            ],
            "summary": "Add or update applicant flags.",
            "description": "Required OAuth scopes for authentication: Public.Applicant.Write",
            "operationId": "Applicant_AddOrUpdateApplicantFlags",
            "consumes": [
              "application/json",
              "text/json",
              "text/plain",
              "application/xml",
              "text/xml",
              "application/x-www-form-urlencoded"
            ],
            "produces": [
              "application/json",
              "text/json",
              "text/plain",
              "application/xml",
              "text/xml"
            ],
            "parameters": [
              {
                "name": "applicantId",
                "in": "path",
                "required": true,
                "type": "integer",
                "format": "int32"
              },
              {
                "name": "applicantFlag",
                "in": "body",
                "required": true,
                "schema": {
                  "$ref": "#/definitions/PageUp.API.V2.Controllers.ApplicantController.PublicApplicantFlag"
                }
              }
            ],
            "responses": {
              "200": {
                "description": "A JSON representation of the updated applicant flags based on the supplied applicant Id."
              },
              "500": {
                "description": "Internal Server error."
              }
            }
          }
        }
      },
    "definitions": {
        "PageUp.DTO.v2.PublicApplicant": {
            "type": "object",
            "properties": {
              "id": {
                "format": "int32",
                "type": "integer"
              },
              "personId": {
                "format": "int32",
                "type": "integer"
              },
              "number": {
                "format": "int32",
                "type": "integer"
              },
              "gender": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "firstName": {
                "type": "string"
              },
              "lastName": {
                "type": "string"
              },
              "altFirstName": {
                "type": "string"
              },
              "altLastName": {
                "type": "string"
              },
              "prefName": {
                "type": "string"
              },
              "currentRole": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "phone": {
                "type": "string"
              },
              "phone2": {
                "type": "string"
              },
              "phone3": {
                "type": "string"
              },
              "alternateContact": {
                "type": "string"
              },
              "street": {
                "type": "string"
              },
              "street2": {
                "type": "string"
              },
              "street3": {
                "type": "string"
              },
              "suburb": {
                "type": "string"
              },
              "postcode": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "country": {
                "type": "string"
              },
              "created": {
                "format": "date-time",
                "type": "string"
              },
              "audit": {
                "format": "date-time",
                "type": "string"
              },
              "externalWebsites": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/PageUp.DTO.v2.PublicApplicantExternalWebsite"
                }
              },
              "originalSubSource": {
                "type": "string"
              },
              "active": {
                "type": "boolean"
              },
              "applicationApplicantFlags": {
                "type": "array",
                "items": {
                  "$ref": "#/definitions/PageUp.DTO.Public.ApplicationApplicantFlag"
                }
              },
              "nominatedEmploymentStatus": {
                "type": "string"
              },
              "badgeID": {
                "description": "The applicant's badge identifier, saved when the applicant is created (POST) or updated (PUT). Spaces at the start and end are removed. On create, a null, empty or whitespace value saves no badge identifier. On update, it leaves the saved badge identifier unchanged. A value longer than 50 characters returns 400 Bad Request.",
                "type": "string",
                "maxLength": 50
              }
            }
          },
          "PageUp.DTO.v2.PublicApplicantExternalWebsite": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string"
              },
              "avatarUrl": {
                "type": "string"
              },
              "socialMediaSource": {
                "type": "string"
              },
              "socialMediaPersonId": {
                "type": "string"
              }
            }
          },
          "PageUp.DTO.Public.ApplicationApplicantFlag": {
            "type": "object",
            "properties": {
              "description": {
                "type": "string"
              },
              "order": {
                "format": "int32",
                "type": "integer"
              },
              "image": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            }
          },
          "PageUp.API.V2.Controllers.ApplicantController.PublicApplicantFlag": {
            "type": "object",
            "properties": {
              "applicationId": {
                "format": "int32",
                "description": "Application Id",
                "type": "integer"
              },
              "flagIds": {
                "description": "Selected Flag Ids",
                "type": "array",
                "items": {
                  "format": "int32",
                  "type": "integer"
                }
              },
              "redeploymentSystemFlag": {
                "description": "Redeployment system flag checked",
                "type": "boolean"
              },
              "assessmentCompleteSystemFlag": {
                "description": "Assessment Complete system flag checed",
                "type": "boolean"
              }
            }
          }
    }
}