{
  "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\nL'API Partenaire Grimp Recruiter permet à votre ATS, votre job board ou votre site carrière de\npublier et gérer vos offres sur Grimp Recruiter : les créer, les modifier, les lister et les\ndépublier.\n\nC'est une API REST en JSON, servie en HTTPS. Toutes les routes partagent une même URL de base :\n\n```\nhttps://api.grimp.io/partner/business/v1\n```\n\n### Démarrage rapide\n\n1. Récupérez un token API depuis un compte administrateur Grimp Recruiter.\n2. Listez vos offres :\n\n```bash\ncurl https://api.grimp.io/partner/business/v1/jobs \\\n  -H \"Authorization: Bearer $GRIMP_API_TOKEN\"\n```\n\n3. Parcourez les endpoints ci-dessous. Chaque opération a un bouton **Tester la requête** :\n   collez votre token une fois dans la partie *Authentification* et appelez l'API directement\n   depuis cette page.\n\n## Authentification\n\nEnvoyez votre token dans l'en-tête `Authorization` de chaque requête, en bearer token :\n\n```http\nAuthorization: Bearer <votre token>\n```\n\nLe token agit au nom de votre entreprise : il n'accède qu'à vos propres offres. Une requête\nsans token valide reçoit une réponse `403 Forbidden`.\n\n## Erreurs et limites\n\nGrimp utilise les codes de statut HTTP habituels. Le corps d'une erreur contient toujours le\nstatut et un message lisible :\n\n```json\n{\n  \"statusCode\": 400,\n  \"message\": \"title should not be empty\"\n}\n```\n\n| Statut | Signification                                       |\n| ------ | --------------------------------------------------- |\n| `400`  | Requête invalide : un champ ne passe pas la validation |\n| `403`  | Token absent ou invalide                            |\n| `404`  | L'enregistrement n'existe pas                       |\n| `429`  | Trop de requêtes : ralentissez et réessayez         |\n| `5xx`  | Un problème de notre côté : réessayez plus tard     |\n\n### Limite de débit\n\nL'API accepte jusqu'à **20 requêtes par seconde** depuis une même adresse IP. Au-delà, elle\nrépond `429 Too Many Requests` : patientez un instant, puis réessayez.",
    "title": "Grimp API Partenaire Recruiter",
    "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": [
          "Offres"
        ]
      },
      "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": [
          "Offres"
        ]
      }
    },
    "/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": [
          "Offres"
        ]
      },
      "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": [
          "Offres"
        ]
      },
      "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": [
          "Offres"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.grimp.io",
      "description": "Production"
    },
    {
      "url": "https://api-preprod.grimp.app",
      "description": "Préproduction"
    }
  ],
  "tags": [
    {
      "name": "Offres"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "x-tagGroups": [
    {
      "name": "Offres",
      "tags": [
        "Offres"
      ]
    }
  ]
}
