{
  "components": {
    "schemas": {
      "BusinessPartnerOfferApplicationDTO": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "resumeUrl": {
            "type": "string"
          },
          "student": {
            "$ref": "#/components/schemas/StudentDTO"
          }
        },
        "required": [
          "id",
          "createdAt",
          "student",
          "resumeUrl"
        ],
        "type": "object"
      },
      "LocationSchemaEntity": {
        "properties": {},
        "type": "object"
      },
      "OfferDTO": {
        "properties": {
          "annualGrossSalary": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "applications": {
            "items": {
              "$ref": "#/components/schemas/BusinessPartnerOfferApplicationDTO"
            },
            "type": "array"
          },
          "archived": {
            "type": "boolean"
          },
          "attachment": {
            "type": "string"
          },
          "canApply": {
            "type": "boolean"
          },
          "contractType": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/PartnerBusinessAdminDTO"
          },
          "description": {
            "type": "string"
          },
          "durationInMonths": {
            "type": "number"
          },
          "email": {
            "type": "string"
          },
          "enterpriseIndustry": {
            "type": "string"
          },
          "enterpriseName": {
            "type": "string"
          },
          "expireDate": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "levels": {
            "items": {
              "enum": [
                "PROFESSIONNAL",
                "A_0",
                "A_2",
                "A_3",
                "A_4",
                "A_5",
                "PHD"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "location": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LocationSchemaEntity"
              }
            ],
            "nullable": true,
            "type": "object"
          },
          "logo": {
            "type": "string"
          },
          "quickApply": {
            "type": "boolean"
          },
          "remoteJob": {
            "type": "string"
          },
          "skills": {
            "items": {
              "enum": [
                "FEEDBACK",
                "ADAPTATION",
                "INNOVATION",
                "CLARITY_SIMPLICITY",
                "VERBAL_COMMUNICATION",
                "CREATIVITY",
                "ACTIVE_LISTENNING",
                "COMFORTABLE_NUMBER",
                "CRITICAL_MIND",
                "DYNAMIC",
                "FIABILITY",
                "MANAGEMENT_TIME",
                "HONEST",
                "LEADERSHIP",
                "CUSTOMER_ORIENTED",
                "PERSUASION",
                "SPEAKING_PUBLIC",
                "THINK_OUTSIDE",
                "PROBLEM_SOLVING",
                "KNOW_WHITE",
                "MANAGEMENT_STRESS",
                "TEAM_WORK"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "startingDate": {
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "status": {
            "enum": [
              "PUBLISHED",
              "UNPUBLISHED",
              "DRAFT"
            ],
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "contractType",
          "description",
          "skills",
          "expireDate",
          "canApply",
          "quickApply",
          "createdAt",
          "levels",
          "startingDate",
          "location",
          "archived",
          "applications",
          "status"
        ],
        "type": "object"
      },
      "OffersResponse": {
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/Pagination"
          },
          "offers": {
            "items": {
              "$ref": "#/components/schemas/OfferDTO"
            },
            "type": "array"
          }
        },
        "required": [
          "offers",
          "metadata"
        ],
        "type": "object"
      },
      "Pagination": {
        "properties": {
          "currentPage": {
            "type": "number"
          },
          "pageSize": {
            "type": "number"
          },
          "totalPages": {
            "type": "number"
          },
          "totalResults": {
            "type": "number"
          }
        },
        "required": [
          "pageSize",
          "totalResults",
          "currentPage",
          "totalPages"
        ],
        "type": "object"
      },
      "PartnerBusinessAdminDTO": {
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "name"
        ],
        "type": "object"
      },
      "PartnerCreateOfferCommand": {
        "properties": {},
        "type": "object"
      },
      "StudentDTO": {
        "properties": {
          "email": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "fullName",
          "email"
        ],
        "type": "object"
      },
      "UpdateOfferCommand": {
        "properties": {},
        "type": "object"
      },
      "WebhookApplicationDTO": {
        "properties": {
          "conclusion": {
            "$ref": "#/components/schemas/WebhookConclusionDTO"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currentStep": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "offer": {
            "$ref": "#/components/schemas/WebhookOfferDTO"
          },
          "resumeUrl": {
            "type": "string"
          },
          "student": {
            "$ref": "#/components/schemas/WebhookStudentDTO"
          }
        },
        "required": [
          "id",
          "currentStep",
          "createdAt",
          "student",
          "resumeUrl",
          "offer"
        ],
        "type": "object"
      },
      "WebhookConclusionDTO": {
        "properties": {
          "comment": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "status": {
            "enum": [
              "REFUSED",
              "ACCEPTED",
              "PENDING"
            ],
            "type": "string"
          }
        },
        "required": [
          "status",
          "reason",
          "comment"
        ],
        "type": "object"
      },
      "WebhookEventDTO": {
        "properties": {
          "event": {
            "type": "string"
          },
          "payload": {
            "$ref": "#/components/schemas/WebhookPayloadDTO"
          }
        },
        "required": [
          "payload",
          "event"
        ],
        "type": "object"
      },
      "WebhookOfferDTO": {
        "properties": {
          "attachment": {
            "type": "string"
          },
          "contractType": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "email": {
            "type": "string"
          },
          "enterpriseIndustry": {
            "type": "string"
          },
          "enterpriseName": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "title",
          "contractType"
        ],
        "type": "object"
      },
      "WebhookPayloadDTO": {
        "properties": {
          "data": {
            "$ref": "#/components/schemas/WebhookApplicationDTO"
          },
          "entityId": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/WebhookStudentUserDTO"
          }
        },
        "required": [
          "entityId",
          "data",
          "user"
        ],
        "type": "object"
      },
      "WebhookStudentDTO": {
        "properties": {
          "email": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "fullName",
          "email",
          "externalId"
        ],
        "type": "object"
      },
      "WebhookStudentUserDTO": {
        "properties": {
          "email": {
            "type": "string"
          },
          "externalId": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "externalId",
          "id",
          "fullName",
          "email"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "bearerFormat": "JWT",
        "description": "Get token from Administrator account on Grimp Recruiter interface",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {
      "email": "florian@grimp.io",
      "name": "Grimp Team",
      "url": "https://www.grimp.io"
    },
    "description": "## Introduction\n\nThe Grimp Recruiter Partner API lets your ATS, job board or career site publish and manage job\nposts on Grimp Recruiter: create them, update them, list them and unpublish them.\n\nIt is a JSON REST API served over HTTPS. Every route lives under one base URL:\n\n```\nhttps://api.grimp.io/partner/business/v1\n```\n\n### Quick start\n\n1. Get an API token from an administrator account on Grimp Recruiter.\n2. List your job posts:\n\n```bash\ncurl https://api.grimp.io/partner/business/v1/jobs \\\n  -H \"Authorization: Bearer $GRIMP_API_TOKEN\"\n```\n\n3. Explore the endpoints below. Every operation has a **Test request** button: paste your\n   token once under *Authentication* and call the API straight from this page.\n\n## Authentication\n\nSend your token in the `Authorization` header of every request, as a bearer token:\n\n```http\nAuthorization: Bearer <your token>\n```\n\nThe token acts on behalf of your company: it only reaches your own job posts. A request\nwithout a valid token is answered `403 Forbidden`.\n\n## Errors and limits\n\nGrimp uses conventional HTTP status codes. An error body always carries the status and a\nhuman-readable message:\n\n```json\n{\n  \"statusCode\": 400,\n  \"message\": \"title should not be empty\"\n}\n```\n\n| Status | Meaning                                                 |\n| ------ | ------------------------------------------------------- |\n| `400`  | Invalid request: a field fails validation               |\n| `403`  | Missing or invalid token                                |\n| `404`  | The record does not exist                               |\n| `429`  | Too many requests: slow down and retry                  |\n| `5xx`  | Something went wrong on our side: retry later           |\n\n### Rate limit\n\nThe API accepts up to **20 requests per second** from the same IP address. Beyond that it\nanswers `429 Too Many Requests`: wait a moment, then retry.",
    "title": "Grimp Recruiter Partner API",
    "version": "1.0.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/partner/business/v1/jobs": {
      "get": {
        "description": "Get all jobs created from the interface or the API. Can be filtered using GET parameters.",
        "operationId": "OfferController_getOffers",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OffersResponse"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get list of all jobs",
        "tags": [
          "Job posts"
        ]
      },
      "post": {
        "description": "Create and publish a job. The job will be visible for candidates in the job board.",
        "operationId": "OfferController_createOffer",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PartnerCreateOfferCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferDTO"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create a job",
        "tags": [
          "Job posts"
        ]
      }
    },
    "/partner/business/v1/jobs/{id}": {
      "delete": {
        "description": "Unpublish a job. A job archived is not visible anymore for candidates but is still visible for you and your team. It's not possible to delete a job for now. Job ID in the path should be the Grimp ID or the external ID provided in the job creation from the API.",
        "operationId": "OfferController_unpublishOffer",
        "parameters": [
          {
            "description": "Grimp ID or the external ID provided when the job was created from the API.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Unpublish a job",
        "tags": [
          "Job posts"
        ]
      },
      "get": {
        "description": "Get details, including applications, for a job created from the interface or the API. Job ID in the path should be the Grimp ID or the external ID provided in the job creation from the API.",
        "operationId": "OfferController_getOffer",
        "parameters": [
          {
            "description": "Grimp ID or the external ID provided when the job was created from the API.",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferDTO"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get a job from his ID",
        "tags": [
          "Job posts"
        ]
      },
      "post": {
        "description": "Replace data for a job. Job ID in the path should be the Grimp ID or the external ID provided in the job creation from the API.",
        "operationId": "OfferController_updateOffer",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOfferCommand"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OfferDTO"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Update a job from his ID",
        "tags": [
          "Job posts"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.grimp.io",
      "description": "Production"
    },
    {
      "url": "https://api-preprod.grimp.app",
      "description": "Preprod"
    }
  ],
  "tags": [
    {
      "name": "Job posts"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Jobs",
      "tags": [
        "Job posts"
      ]
    }
  ]
}
