Repository navigation
REST‐API
Donghun Park edited this page Dec 31, 2023
·
3 revisions
POST /recruitment/
{
"companyID": 1,
"position": "백엔드 주니어 개발자",
"reward": 1000000,
"content": "원티드랩에서 백엔드 주니어 개발자를 채용합니다. 자격요건은..",
"skill": "Python"
}{
"message": "채용 공고를 등록하였습니다.",
"data": {
"companyID": 1,
"position": "백엔드 주니어 개발자",
"reward": 1000000,
"content": "원티드랩에서 백엔드 주니어 개발자를 채용합니다. 자격요건은..",
"skill": "Python",
"recruitID": "1",
"createdAt": "2023-10-12T11:39:07.000Z",
"updatedAt": "2023-10-12T11:39:07.000Z"
}
}{
"message": "Company with ID 99 not found.",
"error": "Not Found",
"statusCode": 404
}PATCH /recruitment/:id
{
"position": "백엔드 주니어 개발자",
"reward": 1500000,
"content": "원티드랩에서 백엔드 주니어 개발자를 '적극' 채용합니다. 자격요건은..",
"skill": "NodeJS"
}{
"message": "채용공고 11번을 수정하였습니다.",
"data": {
"position": "백엔드 주니어 개발자",
"reward": 1500000,
"content": "원티드랩에서 백엔드 주니어 개발자를 '적극' 채용합니다. 자격요건은..",
"skill": "NodeJS"
}
}{
"message": "채용공고의 position/reward/content/skill 내용이 비어있습니다.",
"error": "Bad Request",
"statusCode": 400
}DELETE /recruitment/:id
{
"message": "채용공고 14번을 삭제하였습니다."
}{
"message": "채용공고 14번이 존재하지 않습니다.",
"error": "Not Found",
"statusCode": 404
}GET /recruitment
- Parameters
- page: 페이지 번호(기본값: 1)
- rows: 페이지 당 채용공고 개수(기본값: 10)
- sort: 정렬 방식(기본값: DESC, DESC/ASC)
- search: 검색 키워드
GET /recruitment?page=1&rows=10&sort=DESC
{
"message": "채용공고를 검색하였습니다.",
"data": [
{
"recruitID": 30,
"position": "백엔드 주니어 개발자",
"reward": 1500000,
"skill": "Python",
"companyID": 1,
"companyName": "원티드랩",
"country": "한국",
"region": "서울"
},
{
"recruitID": 29,
"position": "백엔드 주니어 개발자",
"reward": 1000000,
"skill": "NodeJS",
"companyID": 3,
"companyName": "넥슨",
"country": "한국",
"region": "판교"
},
{
"recruitID": 28,
"position": "프론트엔드 개발자",
"reward": 500000,
"skill": "javascript",
"companyID": 1,
"companyName": "원티드랩",
"country": "한국",
"region": "서울"
},
...
]
}GET /recruitment?page=1&rows=10&sort=ASC&search=nodejs
{
"message": "채용공고를 검색하였습니다.",
"data": [
{
"recruitID": 10,
"position": "백엔드 주니어 개발자",
"reward": 1500000,
"skill": "NodeJS",
"companyID": 1,
"companyName": "원티드랩",
"country": "한국",
"region": "서울"
},
{
"recruitID": 26,
"position": "NodeJS 주니어 개발자",
"reward": 1500000,
"skill": "Typescript",
"companyID": 1,
"companyName": "원티드랩",
"country": "한국",
"region": "서울"
},
{
"recruitID": 29,
"position": "백엔드 주니어 개발자",
"reward": 1000000,
"skill": "NodeJS",
"companyID": 3,
"companyName": "넥슨",
"country": "한국",
"region": "판교"
},
...
]
}GET /recruitment/:id
{
"message": "채용 상세 페이지 10번을 검색하였습니다.",
"data": {
"recruitID": 10,
"position": "백엔드 주니어 개발자",
"reward": 1500000,
"content": "원티드랩에서 백엔드 주니어 개발자를 '적극' 채용합니다. 자격요건은..",
"skill": "NodeJS",
"companyID": 1,
"companyName": "원티드랩",
"country": "한국",
"region": "서울",
"otherRecruitment": [
10,
15,
...
]
}
}{
"message": "회사 ID 99번이 존재하지 않습니다.",
"error": "Not Found",
"statusCode": 404
}POST /recruitment/:id/apply
{
"userID": "creator98@naver.com"
}{
"message": "10번 채용공고에 지원하였습니다.",
"data": {
"recruitID": "10",
"userID": "creator98@naver.com",
"createdAt": "2023-10-12T11:39:07.000Z",
"updatedAt": "2023-10-12T11:39:07.000Z"
}
}{
"message": "이미 creator98@naver.com가 지원한 채용공고입니다.",
"error": "Bad Request",
"statusCode": 400
}{
"message": "채용공고 99번이 존재하지 않습니다.",
"error": "Not Found",
"statusCode": 404
}