이 문서는 REST API를 구현한 JEEOKSHOP-DELIVERY API 사용 방법을 안내합니다.
개요
Http 동사
본 REST API에서 사용하는 HTTP 동사(verbs)는 가능한 표준 HTTP 와 REST 규약을 따릅니다.
동사 | 용례 |
---|---|
|
리소스를 가져올 때 사용 |
|
새 리소스를 만들 때 사용 |
|
기존 리소스를 수정할 때 사용 |
|
기존 리소스의 일부를 수정할 때 사용 |
|
기존 리소스를 삭제할 떄 사용 |
HTTP 상태 코드
본 REST API에서 사용하는 HTTP 상태 코드는 가능한 표준 HTTP와 REST 규약을 따릅니다.
상태 코드 | 용례 |
---|---|
|
요청을 성공적으로 처리함 |
|
새 리소스를 성공적으로 생성함. 응답의 |
|
기존 리소스를 성공적으로 수정함. |
|
잘못된 요청을 보낸 경우. 응답 본문에 더 오류에 대한 정보가 담겨있다. |
|
요청한 리소스가 없음. |
|
클라이언트의 요청이 서버의 상태와 충돌이 발생한 경우. |
기본 정보
로그인 및 권한정보를 request header에 포함하여 인증
Key | Value | Description |
---|---|---|
|
|
로그인 후 리턴 받은 accessToken |
라이더 모드
배송
라이더는 배송을 픽하기 위해 배송준비중인 배송 목록 및 상세를 조회할 수 있습니다.
배송 목록
요청
GET //delivery.jeeokshop.jeeok.com/rider/deliveries?searchDeliveryStatus&page=0&size=10&searchDeliveryStatus= HTTP/1.1
Host: https
Parameter | Description |
---|---|
|
검색 페이지 |
|
검색 사이즈 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1663
{"transaction_time":"2022-11-21T22:30:33.04149","code":"SUCCESS","message":null,"errors":null,"data":[{"deliveryId":23,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":24,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":25,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":26,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":27,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":28,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":29,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":30,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":31,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":32,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null}]}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
배송 고유번호 |
|
|
배송 주소 |
|
|
배송 상태 |
|
|
멤버 고유번호 |
|
|
주문 고유번호 |
|
|
라이더 고유번호 |
|
|
라이더 이름 |
|
|
휴대폰번호 |
배송 상세
요청
GET //delivery.jeeokshop.jeeok.com/rider/deliveries/38 HTTP/1.1
Host: https
Parameter | Description |
---|---|
|
배송 고윱번호 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 259
{"transaction_time":"2022-11-21T22:30:33.0754905","code":"SUCCESS","message":null,"errors":null,"data":{"deliveryId":38,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
배송 고유번호 |
|
|
배송 주소 |
|
|
배송 상태 |
|
|
멤버 고유번호 |
|
|
주문 고유번호 |
|
|
라이더 고유번호 |
|
|
라이더 이름 |
|
|
휴대폰번호 |
배송 라이더
라이더는 배송준비인 목록을 확인하고 배송을 픽하고 수정, 취소 할 수 있습니다.
내 배송 라이더 목록 조회
요청
GET //delivery.jeeokshop.jeeok.com/rider/deliveryRiders?searchRiderId&page=0&size=10&searchRiderId= HTTP/1.1
member-id: 100
Host: https
Parameter | Description |
---|---|
|
검색 페이지 |
|
검색 사이즈 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 291
{"transaction_time":"2022-11-21T22:30:35.5981581","code":"SUCCESS","message":null,"errors":null,"data":[{"deliveryRiderId":8,"riderId":100,"riderName":"홍길동","phoneNumber":"01089221189","deliveryId":46,"deliveryAddress":"(88372) 서울시","deliveryStatus":"배송준비","orderId":1}]}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
배송 라이더 고유번호 |
|
|
라이더 고유번호 |
|
|
라이더 이름 |
|
|
휴대폰번호 |
|
|
배송 고유번호 |
|
|
배송 주소 |
|
|
배송 상태 |
|
|
주문 고유번호 |
내 배송 라이더 상세
요청
Parameter | Description |
---|---|
|
배송 라이더 고유번호 |
GET //delivery.jeeokshop.jeeok.com/rider/deliveryRiders/7 HTTP/1.1
Host: https
Parameter | Description |
---|---|
|
배송 라이더 고유번호 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 288
{"transaction_time":"2022-11-21T22:30:35.541158","code":"SUCCESS","message":null,"errors":null,"data":{"deliveryRiderId":7,"riderId":100,"riderName":"홍길동","phoneNumber":"01089221189","deliveryId":45,"deliveryAddress":"(88372) 서울시","deliveryStatus":"배송준비","orderId":1}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
배송 라이더 고유번호 |
|
|
라이더 고유번호 |
|
|
라이더 이름 |
|
|
휴대폰번호 |
|
|
배송 고유번호 |
|
|
배송 주소 |
|
|
배송 상태 |
|
|
주문 고유번호 |
배송하기
POST //delivery.jeeokshop.jeeok.com/rider/deliveryRiders HTTP/1.1
Content-Type: application/json;charset=UTF-8
member-id: 1
Content-Length: 17
Host: https
{"deliveryId":42}
Path | Type | Description |
---|---|---|
|
|
배송 고유번호 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 130
{"transaction_time":"2022-11-21T22:30:35.4558302","code":"SUCCESS","message":null,"errors":null,"data":{"savedDeliveryRiderId":4}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
저장된 배송 라이더 고유번호 |
내 배송 라이더 수정
요청
Parameter | Description |
---|---|
|
배송 라이더 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/rider/deliveryRiders/6 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 53
Host: https
{"riderName":"채치수","phoneNumber":"01088831100"}
Path | Type | Description |
---|---|---|
|
|
라이더 이름 |
|
|
휴대폰번호 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 131
{"transaction_time":"2022-11-21T22:30:35.504157","code":"SUCCESS","message":null,"errors":null,"data":{"updatedDeliveryRiderId":6}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
수정된 배송 라이더 고유번호 |
배송 라이더 취소
요청
Parameter | Description |
---|---|
|
배송 라이더 고유번호 |
DELETE //delivery.jeeokshop.jeeok.com/rider/deliveryRiders/5 HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 108
{"transaction_time":"2022-11-21T22:30:35.4801573","code":"SUCCESS","message":null,"errors":null,"data":null}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
데이터 |
관리자 모드
배송
관리자는 배송 조회, 저장, 수정 및 삭제 할 수 있고, 배송 상태를 업데이트 할 수 있습니다.
배송 목록 조회
요청
GET //delivery.jeeokshop.jeeok.com/admin/deliveries?searchDeliveryStatus=READY&page=0&size=10 HTTP/1.1
Host: https
Parameter | Description |
---|---|
|
배송 상태 |
|
검색 페이지 |
|
검색 사이즈 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1659
{"transaction_time":"2022-11-21T22:30:32.6977064","code":"SUCCESS","message":null,"errors":null,"data":[{"deliveryId":4,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":5,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":6,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":7,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":8,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":9,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":10,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":11,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":12,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null},{"deliveryId":13,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":null,"riderName":null,"phoneNumber":null}]}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
배송 고유번호 |
|
|
배송 주소 |
|
|
배송 상태 |
|
|
멤버 고유번호 |
|
|
주문 고유번호 |
|
|
라이더 고유번호 |
|
|
라이더 이름 |
|
|
휴대폰번호 |
배송 단건 조회
요청
Parameter | Description |
---|---|
|
배송 고유번호 |
GET //delivery.jeeokshop.jeeok.com/admin/deliveries/21 HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 273
{"transaction_time":"2022-11-21T22:30:32.9474871","code":"SUCCESS","message":null,"errors":null,"data":{"deliveryId":21,"address":"(38273) 서울시","deliveryStatus":"배송준비","memberId":1,"orderId":1,"riderId":11,"riderName":"스미스","phoneNumber":"01048231009"}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
배송 고유번호 |
|
|
배송 주소 |
|
|
배송 상태 |
|
|
멤버 고유번호 |
|
|
주문 고유번호 |
|
|
라이더 고유번호 |
|
|
라이더 이름 |
|
|
휴대폰번호 |
배송 저장
POST //delivery.jeeokshop.jeeok.com/admin/deliveries HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 26
Host: https
{"memberId":1,"orderId":1}
Path | Type | Description |
---|---|---|
|
|
멤버 고유번호 |
|
|
주문 고유번호 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 125
{"transaction_time":"2022-11-21T22:30:32.890487","code":"SUCCESS","message":null,"errors":null,"data":{"savedDeliveryId":19}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
저장된 배송 고유번호 |
배송 수정
요청
Parameter | Description |
---|---|
|
배송 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/admin/deliveries/22 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 41
Host: https
{"zipcode":"33871","address":"세종시"}
Path | Type | Description |
---|---|---|
|
|
우편번호 |
|
|
주소 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 128
{"transaction_time":"2022-11-21T22:30:32.9844886","code":"SUCCESS","message":null,"errors":null,"data":{"updatedDeliveryId":22}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
수정된 배송 고유번호 |
배송 시작
요청
Parameter | Description |
---|---|
|
배송 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/admin/deliveries/20/delivery HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 108
{"transaction_time":"2022-11-21T22:30:32.9184929","code":"SUCCESS","message":null,"errors":null,"data":null}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
배송 완료
요청
Parameter | Description |
---|---|
|
배송 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/admin/deliveries/3/complete HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 108
{"transaction_time":"2022-11-21T22:30:32.4519422","code":"SUCCESS","message":null,"errors":null,"data":null}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
배송 취소
요청
Parameter | Description |
---|---|
|
배송 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/admin/deliveries/1/cancel HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 108
{"transaction_time":"2022-11-21T22:30:32.2975142","code":"SUCCESS","message":null,"errors":null,"data":null}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
배송 삭제
요청
Parameter | Description |
---|---|
|
배송 고유번호 |
DELETE //delivery.jeeokshop.jeeok.com/admin/deliveries/2 HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 108
{"transaction_time":"2022-11-21T22:30:32.4221017","code":"SUCCESS","message":null,"errors":null,"data":null}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
배송 라이더
관리자는 배송 라이더를 추가할 수 있고 수정 및 삭제할 수 있습니다.
배송 라이더 저장
POST //delivery.jeeokshop.jeeok.com/admin/deliveryRiders HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 29
Host: https
{"deliveryId":41,"riderId":5}
Path | Type | Description |
---|---|---|
|
|
배송 고유번호 |
|
|
라이더 고유번호 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 130
{"transaction_time":"2022-11-21T22:30:35.3814246","code":"SUCCESS","message":null,"errors":null,"data":{"savedDeliveryRiderId":3}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
저장된 배송 라이더 고유번호 |
배송 라이더 수정
요청
Parameter | Description |
---|---|
|
배송 라이더 고유번호 |
PUT //delivery.jeeokshop.jeeok.com/admin/deliveryRiders/2 HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 53
Host: https
{"riderName":"채치수","phoneNumber":"01088831100"}
Path | Type | Description |
---|---|---|
|
|
라이더 이름 |
|
|
휴대폰번호 |
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 131
{"transaction_time":"2022-11-21T22:30:35.328046","code":"SUCCESS","message":null,"errors":null,"data":{"updatedDeliveryRiderId":2}}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
수정된 배송 라이더 고유번호 |
배송 라이더 삭제
요청
Parameter | Description |
---|---|
|
배송 라이더 고유번호 |
DELETE //delivery.jeeokshop.jeeok.com/admin/deliveryRiders/1 HTTP/1.1
Host: https
응답
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 107
{"transaction_time":"2022-11-21T22:30:35.265285","code":"SUCCESS","message":null,"errors":null,"data":null}
Path | Type | Description |
---|---|---|
|
|
api 요청 시간 |
|
|
SUCCESS or ERROR |
|
|
메시지 |
|
|
에러 |
|
|
데이터 |