Skip to content

API Specification

dowon0113 edited this page Mar 17, 2025 · 9 revisions

API 문서

회원 인증 관련 API

담당자 진행상황 Method 기능 권한 URL Request Header Request Response
현지 노 시작 전 POST 회원가입 ALL /api/v1/auth/signup Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"username": "string",
"password": "string",
"nickname": "string",
"slackId": "string",
"email": "string",
"role": "string"
}
{
"message": "string",
"statusCode": 201,
"data": { "username": "string", "nickname": "string", "slackId": "string", "email": "string", "role": "string" }
}
현지 노 시작 전 POST 로그인 ALL /api/v1/auth/signin Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"username": "string",
"password": "string"
}
{
"message": "string",
"statusCode": 200,
"accessToken": "jwt-access-token",
"refreshToken": "jwt-refresh-token",
"data": { "username": "string", "role": "string" }
}
현지 노 시작 전 POST Refresh 토큰 재발급 ALL /api/v1/auth/refresh Authorization: Bearer {accessToken} {
"refreshToken": "string"
}
{
"message": "string",
"statusCode": 200,
"accessToken": "jwt-access-token",
"refreshToken": "jwt-refresh-token",
"data": { "username": "string", "role": "string" }
}
현지 노 시작 전 GET 사용자 정보 조회 (마스터) MASTER /api/v1/users/{userId} Authorization: Bearer {accessToken}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- {
"message": "string",
"statusCode": 200,
"data": { "username": "string", "slackId": "string", "role": "string" }
}
현지 노 시작 전 DELETE 사용자 탈퇴 MASTER /api/v1/users/{userId} Authorization: Bearer {accessToken}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- 204 No Content

발송 시한 API

담당자 진행상황 Method 기능 권한 URL Request Header Request Response
현지 노 시작 전 POST 발송 시한 정보 생성 (AI 연동) ALL /api/v1/ai/shipment/deadline Authorization: Bearer {accessToken}
Content-Type: application/json
B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"inputData": "string"
}
{
"message": "최종 발송 시한을 계산한 결과입니다.",
"statusCode": 200,
"outputData": "주문 번호 1번의 최종 발송 시한은 12월 10일 오전 9시입니다. 이 시점까지 출고해야 납기일을 맞출 수 있습니다."
}

업체 관리 API

담당자 진행상황 Method 기능 권한 URL Request Header Request Response
예지 송 시작 전 POST 업체 생성 HUB, MASTER /api/vi/companies Authorization: Bearer JWT토큰
Content-Type: application/json
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Company에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
{
"companyName": "건조 식품 가공 업체",
"companyType": "SUPPLIER",
"hubId": 7
}
{
"message": "등록되었습니다.",
"stateCode": 201,
"company": {
"companyId": 1,
"companyName": "건조 식품 가공 업체",
"companyType": "SUPPLIER",
"hubId": 7
}
}
예지 송 시작 전 GET 업체 조회 ALL /api/vi/companies/? Accept: application/json
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Company에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
- {
"message": "조회 완료하였습니다.",
"stateCode": 200,
"company": [
{
"companyId": 1,
"companyName": "건조 식품 가공 업체",
"companyType": "SUPPLIER",
"hubId": 7
},
{
"companyId": 2,
"companyName": "수산물 도매 업체",
"companyType": "RECEIVER",
"hubId": 8
}
],
"pageInfo": {
"page": 0,
"size": 10,
"totalElements": 124,
"totalPages": 13,
"isLast": false,
"sort": "createdAt",
"direction": "desc"
}
}
예지 송 시작 전 PUT 업체 수정 COMPANY, HUB, MASTER /api/vi/companies/{company_id} Authorization: Bearer JWT토큰
Content-Type: application/json
Accept: application/json
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Company에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
{
"companyName": "수정된 업체 이름",
"companyType": "RECEIVER",
"hubId": 8
}
{
"message": "수정되었습니다.",
"stateCode": 200,
"company": {
"companyId": 1,
"companyName": "수정된 업체 이름",
"companyType": "RECEIVER",
"hubId": 8
}
}
예지 송 시작 전 DELETE 업체 삭제 HUB, MASTER /api/vi/companies/{company_id} Authorization: Bearer JWT토큰
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Company에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
- 204 No Content

상품 관리 API

담당자 진행상황 Method 기능 권한 URL Request Header Request Response
예지 송 시작 전 POST 상품 생성 COMPANY, HUB /api/v1/products Authorization: Bearer JWT토큰
Accept: application/json
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Product에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
{
"productName": "마른 오징어",
"productQuantity": 30,
"companyId": 10
}
{
"message": "등록되었습니다.",
"stateCode": 201,
"product": {
"productId": 1,
"productName": "마른 오징어",
"productQuantity": 30,
"companyId": 10
}
}
예지 송 시작 전 GET 상품 조회 ALL /api/v1/products/? Accept: application/json
// 단순 조회시
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Product에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
// 주문 시
X-B3-TraceId: Order에서 전달된 Trace ID
X-B3-SpanId: Product에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Order에서 전달된 Trace ID
X-B3-Sampled: 1
- {
"message": "조회 완료하였습니다.",
"stateCode": 200,
"product": [
{
"productId": 1,
"productName": "마른 오징어",
"productQuantity": 30,
"companyId": 10
},
{
"productId": 2,
"productName": "마른 문어",
"productQuantity": 10,
"companyId": 11
}
],
"pageInfo": {
"page": 0,
"size": 10,
"totalElements": 124,
"totalPages": 13,
"isLast": false,
"sort": "createdAt",
"direction": "desc"
}
}
예지 송 시작 전 PUT 상품 수정 COMPANY, HUB, MASTER /api/v1/products/{product_id} Authorization: Bearer JWT토큰
Accept: application/json
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Product에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
{
"productName": "수정된 마른 오징어",
"productQuantity": 30,
"companyId": 10
}
{
"message": "수정되었습니다.",
"stateCode": 200,
"product": {
"productId": 1,
"productName": "수정된 마른 오징어",
"productQuantity": 30,
"companyId": 10
}
}
예지 송 시작 전 DELETE 상품 삭제 HUB, MASTER /api/v1/products/{product_id} Authorization: Bearer JWT토큰
X-B3-TraceId: Gateway에서 전달된 Trace ID
X-B3-SpanId: Product에서 생성한 새로운 Span ID
X-B3-ParentSpanId: Gateway에서 전달된 Trace ID
X-B3-Sampled: 1
- 204 No Content

배송 관리 API

진행상황 Method 기능 URL 권한 Request Header Request Response 담당자
시작 전 POST 배송 생성 /api/v1/deliveries MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: 주문 생성 Trace ID
X-B3-SpanId: Span ID
X-B3-ParentSpanId: 주문 생성 Span ID
X-B3-Sampled: true
{
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"deliveryAddress": "서울특별시 강남구 테헤란로 123",
"recipientId": "123e4567-e89b-12d3-a456-426614174003",
"recipientSlackId": "123e4567-e89b-12d3-a456-426614174004",
"deliveryDriverId": "123e4567-e89b-12d3-a456-426614174005"
}
{
"message": "배송 생성 성공",
"statusCode": 200,
"data": {
"drivery_id": "123e4567-e89b-12d3-a456-426614173000",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"deliveriyStatus": "허브 대기중",
"createdAt": "2024-03-11T12:00:00",
"traceId": "f9f5a3b7e89b12d3"
}
}
정다예
시작 전 GET 배송 조회 /api/v1/deliveries ALL Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/deliveries?status=배송중&page=0&size=10
GET /api/v1/deliveries?page=0&size=10&sort=createdAt&order=desc
{
"message": "배송 조회 성공",
"statusCode": 200,
"totalElements": 100,
"totalPages": 10,
"currentPage": 0,
"size": 10,
"data": [
{
"deliveryId": "123e4567-e89b-12d3-a456-426614173000",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"deliveriyStatus": "배송중",
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"createdAt": "2024-03-11T12:00:00",
"traceId": "f9f5a3b7e89b12d3"
}
]}
정다예
시작 전 GET 배송 상세 조회 /api/v1/deliveries/{delivery_id} ALL Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/deliveries/123e4567-e89b-12d3-a456-426614173000 {
"message": "배송 생성 성공",
"statusCode": 200,
"data": {
"deliveryId": "123e4567-e89b-12d3-a456-426614173000",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"deliveriyStatus": "배송중",
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"deliveryAddress": "서울특별시 강남구 테헤란로 123",
"recipientId": "123e4567-e89b-12d3-a456-426614174003",
"recipientSlackId": "123e4567-e89b-12d3-a456-426614174004",
"companyDriverId": "123e4567-e89b-12d3-a456-426614174005",
"createdAt": "2024-03-11T12:00:00",
"updatedAt": "2024-03-11T14:30:00",
"traceId": "f9f5a3b7e89b12d3"
}
}
정다예
시작 전 PATCH 배송 정보 수정 /api/v1/deliveries/{delivery_id} DRIVER, HUB, MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"status": "배송 완료",
"deliveryAddress": "서울특별시 강남구 삼성동 456",
"companyDriverId": "123e4567-e89b-12d3-a456-426614174005"
}
{
"message": "배송 정보 수정 성공",
"statusCode": 200,
"data": {
"deliveryId": "123e4567-e89b-12d3-a456-426614173000",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"deliveriyStatus": "배송 완료",
"deliveryAddress": "서울특별시 강남구 삼성동 456",
"companyDriverId": "123e4567-e89b-12d3-a456-426614174005",
"updatedAt": "2024-03-12T15:00:00",
"traceId": "abcdef1234567890"
}
}
정다예
시작 전 DELETE 배송 삭제 /api/v1/deliveries/{delivery_id} HUB, MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- 204 No Content 정다예

배송 경로 관리 API

진행상황 Method 기능 URL 권한 Request Header Request Response 담당자
시작 전 POST 배송 경로 생성 /api/v1/delivery-routes MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: 주문 생성 Trace ID
X-B3-SpanId: Span ID
X-B3-ParentSpanId: 배송 생성의 Span ID
X-B3-Sampled: true
{
"deliveryId": "123e4567-e89b-12d3-a456-426614173000",
"routes": [
{
"routeSequence": 1,
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"expectedDistance": 15.2,
"expectedDuration": 45,
"deliveriyRouteStatus": "허브 이동 대기중"
},
{
"routeSequence": 2,
"originHubId": "123e4567-e89b-12d3-a456-426614174002",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174003",
"expectedDistance": 30.5,
"expectedDuration": 90,
"deliveriyRouteStatus": "허브 이동중"
}
]}
{
"message": "배송 경로 생성 성공",
"statusCode": 200,
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614173100",
"deliveryId": "123e4567-e89b-12d3-a456-426614173000",
"routeSequence": 1,
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"expectedDistance": 15.2,
"expectedDuration": 45,
"deliveriyRouteStatus": "허브 이동 대기중",
"createdAt": "2024-03-11T12:01:00",
"traceId": "f9f5a3b7e89b12d3"
}
]}
정다예
시작 전 GET 배송 경로 조회 /api/v1/delivery-routes ALL Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/delivery-routes?deliveryId=123e4567-e89b-12d3-a456-426614173000&page=0&size=10&sort=routeSequence,asc {
"message": "배송 경로 조회 성공",
"statusCode": 200,
"totalElements": 4,
"totalPages": 1,
"currentPage": 0,
"size": 10,
"data": [
{
"deliveryRouteId": "123e4567-e89b-12d3-a456-426614173101",
"deliveryId": "123e4567-e89b-12d3-a456-426614173000",
"routeSequence": 1,
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"expectedDistance": 15.2,
"expectedDuration": 45,
"deliveriyRouteStatus": "허브 이동 대기중",
"createdAt": "2024-03-11T12:01:00",
"traceId": "abcdef1234567890"
}
]}
정다예
시작 전 GET 배송 경로 상세 조회 /api/v1/delivery-routes/{delivery_routes_id} ALL Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/delivery-routes/123e4567-e89b-12d3-a456-426614173001 {
"message": "배송 경로 조회 성공",
"statusCode": 200,
"data": {
"deliveryRouteId": "123e4567-e89b-12d3-a456-426614173001",
"deliveryId": "123e4567-e89b-12d3-a456-426614173500",
"routeSequence": 2,
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"expectedDistance": 15.5,
"expectedDuration": 30,
"actualDistance": 16.2,
"actualDuration": 32,
"deliveriyRouteStatus": "IN_TRANSIT_TO_HUB",
"createdAt": "2024-03-11T12:00:00",
"updatedAt": "2024-03-11T14:30:00",
"traceId": "f9f5a3b7e89b12d3"
}
}
정다예
시작 전 PATCH 배송 경로 수정 /api/v1/delivery-routes/{delivery_routes_id} DRIVER, HUB, MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"deliveriyRouteStatus": "허브 이동 중",
"actualDistance": 15.7,
"actualDuration": 50
}
{
"message": "배송 경로 수정 성공",
"statusCode": 200,
"data": {
"deliveryRouteId": "123e4567-e89b-12d3-a456-426614173100",
"deliveryId": "123e4567-e89b-12d3-a456-426614173000",
"routeSequence": 1,
"originHubId": "123e4567-e89b-12d3-a456-426614174001",
"destinationHubId": "123e4567-e89b-12d3-a456-426614174002",
"expectedDistance": 15.2,
"expectedDuration": 45,
"actualDistance": 15.7,
"actualDuration": 50,
"deliveriyRouteStatus": "허브 이동 중",
"updatedAt": "2024-03-11T12:30:00",
"traceId": "abcdef1234567890"
}
}
정다예
시작 전 DELETE 배송 경로 삭제 /api/v1/delivery-routes/{delivery_routes_id} HUB, MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- 204 No Content 정다예

슬랙 메시지 관리 API

진행상황 Method 기능 URL 권한 Request Header Request Response 담당자
시작 전 POST 슬랙 메시지 발송 /api/v1/slack-messages ALL Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"notifiedSlackId": "123e4567-e89b-12d3-a456-426614174999",
"messageContent": "주문 번호 : 1\n주문자 정보 : 김말숙 / msk@seafood.world\n상품 정보 : 마른 오징어 50박스\n...",
"orderId": "123e4567-e89b-12d3-a456-426614174000",
"deliveryDriverId": "123e4567-e89b-12d3-a456-426614174005"
}
{
"message": "슬랙 메시지 전송 성공",
"statusCode": 200,
"data": {
"slackMessageId": "123e4567-e89b-12d3-a456-426614173999",
"notifiedSlackId": "123e4567-e89b-12d3-a456-426614174999",
"messageContent": "주문 번호 : 1\n주문자 정보 : 김말숙 / msk@seafood.world\n...",
"createdAt": "2025-03-13T09:00:00",
"traceId": "f9f5a3b7e89b12d3"
}
}
정다예
시작 전 GET 슬랙 메시지 전체 조회 /api/v1/slack-messages MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/slack-messages?page=0&size=20&sort=createdAt,desc&notifiedSlackId=123e4567-e89b-12d3-a456-426614174999 {
"message": "슬랙 메시지 조회 성공",
"statusCode": 200,
"data": {
"content": [
{
"slackMessageId": "123e4567-e89b-12d3-a456-426614173999",
"notifiedSlackId": "123e4567-e89b-12d3-a456-426614174999",
"messageContent": "주문 번호 : 1\n주문자 정보 : 김말숙 / msk@seafood.world\n...",
"createdAt": "2025-03-13T09:00:00",
"traceId": "f9f5a3b7e89b12d3"
}
],
"totalElements": 2,
"totalPages": 1,
"currentPage": 0,
"pageSize": 10
}
}
정다예
시작 전 GET 슬랙 메시지 상세 조회 /api/v1/slack-messages/{slackMessageId} MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/slack-messages/123e4567-e89b-12d3-a456-426614173999 {
"message": "슬랙 메시지 상세 조회 성공",
"statusCode": 200,
"data": {
"slackMessageId": "123e4567-e89b-12d3-a456-426614173999",
"notifiedSlackId": "123e4567-e89b-12d3-a456-426614174999",
"messageContent": "주문 번호 : 1\n주문자 정보 : 김말숙 / msk@seafood.world\n상품 정보 : 마른 오징어 50박스\n...",
"createdAt": "2025-03-13T09:00:00",
"traceId": "f9f5a3b7e89b12d3"
}
}
정다예
시작 전 PUT 슬랙 메시지 수정 /api/v1/slack-messages/{slackMessageId} MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"messageContent": "수정된 메시지 내용: 주문 번호 1, 요청 사항 변경 등...",
"notifiedSlackId": "123e4567-e89b-12d3-a456-426614174999"
}
{
"message": "슬랙 메시지 수정 성공",
"statusCode": 200,
"data": {
"slackMessageId": "123e4567-e89b-12d3-a456-426614173999",
"notifiedSlackId": "123e4567-e89b-12d3-a456-426614174999",
"messageContent": "수정된 메시지 내용: 주문 번호 1, 요청 사항 변경 등...",
"updatedAt": "2025-03-13T10:30:00",
"traceId": "f9f5a3b7e89b12d3"
}
}
정다예
시작 전 DELETE 슬랙 메시지 삭제 /api/v1/slack-messages/{slackMessageId} MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- 204 No Content 정다예

주문 관리 API

진행상황 Method 기능 URL 권한 Request Header Request Response 담당자
시작 전 POST 주문 생성 /api/v1/orders COMPANY, MASTER Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json
{
"supplierId": "{supplier-id}",
"consumerId": "{consumer-id}",
"paymentId": "{payment-id}",
"items": [
{
"productId": "{product-id}",
"amount": 2,
"price": 10000
}
],
"totalPrice": 25000
}
{
"message": "success",
"status": 200,
"data": {
"orderId": "{orderId}",
"supplierId": "{supplierId}",
"consumerId": "{consumerId}",
"totalPrice": 25000,
"items": [
{
"itemId": "item-001",
"productId": "product-123",
"orderAmount": 2,
"price": 10000
},
{
"itemId": "item-002",
"productId": "product-456",
"orderAmount": 1,
"orderPrice": 5000
}
],
"createdAt": "YYYY-MM-DD HH:HH;HH"
}
}
도원 김
시작 전 GET 주문 단일 조회 /api/v1/orders/{order_id} COMPANY, HUB, MASTER Authorization: Bearer {JWT_TOKEN}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/orders/{order-id} {
"message": "success",
"status": 200,
"data": {
"orderId": "{order-uuid}",
"supplierId": "{supplier-id}",
"consumerId": "{consumer-id}",
"orderTotalPrice": 25000,
"items": [
{
"itemId": "item-001",
"productId": "product-123",
"amount": 2,
"price": 10000
}
],
"deliveryId": "{deliveryId}",
"createdAt": "YYYY-MM-DD HH:HH;HH"
}
}
도원 김
시작 전 GET 주문 전체 조회 /api/v1/orders?page=1&size=10 COMPANY, HUB, MASTER Authorization: Bearer {JWT_TOKEN}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/orders?page=1&size=10 {
"message": "success",
"status": 200,
"data": {
"page": 1,
"size": 10,
"totalPages": 5,
"orders": [
{
"orderId": "order-789",
"supplierId": "supplier-001",
"consumerId": "consumer-002",
"orderStatus": "PENDING",
"amount": 3,
"totalPrice": 25000,
"deliveryId": "{deliveryId}",
"createdAt": "2025-03-11T10:30:00Z"
},
{
"orderId": "order-790",
"supplierId": "supplier-002",
"consumerId": "consumer-003",
"orderStatus": "CONFIRMED",
"amount": 3,
"totalPrice": 35000,
"deliveryId": "{deliveryId}",
"createdAt": "YYYY-MM-DD HH:HH;HH"
}
]
}
도원 김
시작 전 PATCH 주문 수정 /api/v1/orders/{order_id} COMPANY, MASTER Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"consumer_id": "consumer-003",
"price": 500000
}
{
"message": "success",
"status": 200,
"data": {
"orderId": "order-789",
"supplierId": "supplier-001",
"consumerId": "consumer-003",
"totalPrice": 500000,
"updatedAt": "YYYY-MM-DD HH:HH;HH"
}
}
도원 김
시작 전 PATCH 주문 취소 /api/v1/orders/{order_id}/cancel COMPANY, MASTER Authorization: Bearer {JWT_TOKEN}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
PATCH /api/orders/{order-id} {
"message": "success",
"status": 200,
"data": {
"orderId": "order-789",
"isDeleted": "CANCELLED",
"updatedAt": "YYYY-MM-DD HH:HH;HH"
}
}
도원 김
시작 전 GET 주문 검색 /api/v1/orders/search COMPANY, HUB, MASTER Authorization: Bearer {JWT_TOKEN}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/orders/search?supplier_id=supplier-001&status=CONFIRMED&page=1&size=10 {
"message": "success",
"status": 200,
"data": {
"page": 1,
"size": 10,
"totalPages": 2,
"orders": [
{
"orderId": "order-789",
"supplierId": "supplier-001",
"consumerId": "consumer-002",
"amount": 5,
"totalPrice": 25000,
"createdAt": "YYYY-MM-DD HH:HH;HH"
},
{
"orderId": "order-790",
"supplierId": "supplier-001",
"consumerId": "consumer-004",
"amount": 5,
"totalPrice": 45000,
"createdAt": "YYYY-MM-DD HH:HH;HH"
}
]
}
도원 김

주문 아이템 관리 API

진행상황 Method 기능 URL 권한 Request Header Request Response 담당자
시작 전 GET 특정 주문의 상품 목록 조회 /api/v1/orders/{order_id}/items COMPANY, HUB, MASTER Authorization: Bearer {JWT_TOKEN}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /orders/{orderId}/items {
"message": "success",
"status": 200,
"data": {
"orderId": "order-789",
"items": [
{
"itemId": "item-001",
"productId": "product-123",
"amount": 2,
"price": 10000
},
{
"itemId": "item-002",
"productId": "product-456",
"amount": 1,
"price": 5000
}
]
}
}
도원 김
시작 전 PATCH 주문 아이템 수정 /api/v1/orders/{order_id}/items/{item_id} COMPANY, MASTER Authorization: Bearer {JWT_TOKEN}
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"amount": 3,
"price": 9000
}
{
"message": "success",
"status": 200,
"data": {
"itemId": "item-001",
"orderId": "order-789",
"productId": "product-123",
"amount": 3,
"price": 9000,
"updatedAt": "YYYY-MM-DD HH:HH;HH"
}
}
도원 김
시작 전 DELETE 주문 아이템 삭제 /api/v1/orders/{order_id}/items/{item_id} COMPANY, MASTER Authorization: Bearer {JWT_TOKEN}
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
DELETE /api/orders/order-789/items/{item-001} 204 No Content 도원 김

허브 관리 API

진행상황 Method 기능 URL 권한 Request Header Request Response Error Response 담당자
시작 전 POST 허브 등록 /api/v1/hubs MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"name": "서울 허브",
"address": "서울특별시 센터 : 서울특별시 송파구 송파대로 55",
"latitude": 37.475081089936,
"longitude": 127.12349734954
}
{
"message": "허브가 생성되었습니다.",
"statusCode": 201
}
{
"errorCode": "INVALID_REQUEST",
"message": "BAD_REQUEST",
"status": 400
}
중건 안
시작 전 PATCH 허브 수정 /api/v1/hubs/{hubs_id} MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-ParentSpanId: {허브 조회 Span ID}
X-B3-Sampled: true
{
"name": "서울 허브",
"address": "서울특별시 센터 : 서울특별시 송파구 송파대로 100",
"latitude": 38.475081089936,
"longitude": 127.12349734954
}
{
"message": "허브 정보가 수정되었습니다.",
"statusCode": 200
}
{
"errorCode": "HUB_UPDATE_CONFLICT",
"message": "허브 수정 충돌이 발생하였습니다.",
"status": 409
}
중건 안
시작 전 DELETE 허브 삭제 /api/v1/hubs/{hubs_id} MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- 204 No Content {
"errorCode": "RESOURCE_NOT_FOUND",
"message": "NOT_FOUND",
"status": 404
}
중건 안
시작 전 GET 허브 단일 조회 /api/v1/hubs/{hubs_id} COMPANY, DRIVER, HUB, MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: {주문 생성 Trace ID}
X-B3-SpanId: {새로운 허브 조회 Span ID}
X-B3-ParentSpanId: {주문 생성 Span ID}
X-B3-Sampled: true
- {
"statusCode": 200,
"message": "허브 정보 조회하였습니다.",
"data": {
"name": "서울 허브",
"address": "서울특별시 센터 : 서울특별시 송파구 송파대로 55",
"latitude": 37.475081089936,
"longitude": 127.12349734954
}
}
{
"errorCode": "TRACE_ID_MISSING",
"message": "Zipkin 트레이싱 데이터 없음Zipkin Trace ID가 누락되었습니다.",
"status": 503,
"traceId": "f9f5a3b7e89b12d3"
}
중건 안
시작 전 GET 허브 전체 조회 /api/v1/hubs COMPANY, DRIVER, HUB, MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- {
"statusCode": 200,
"message": "허브 전체 조회하였습니다.",
"totalElements": 20,
"totalPages": 10,
"currentPage": 1,
"size": 10,
"data": [
{
"name": "서울 허브",
"address": "서울특별시 센터 : 서울특별시 송파구 송파대로 55",
"latitude": 37.475081089936,
"longitude": 127.12349734954
},
{
"name": "부산 허브",
"address": "부산광역시 중구 중앙대로 120",
"latitude": 33.475081089936,
"longitude": 129.12349734954
}
]}
{
"errorCode": "INTERNAL_SERVER_ERROR",
"message": "SERVER_ERROR",
"status": 500
}
중건 안
시작 전 GET 허브 검색 /api/v1/hubs/search COMPANY, DRIVER, HUB, MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/hubs/search?keyword=경기&page=1&size=10 {
"statusCode": 200,
"message": "허브 검색",
"totalElements": 20,
"totalPages": 10,
"currentPage": 1,
"size": 10,
"data": [
{
"hubId": "550e8400-e29b-41d4-a716-446655440000",
"name": "경기 북부 허브",
"address": "경기도 고양시 덕양구 권율대로 570",
"latitude": 37.47508109,
"longitude": 127.12349735
},
{
"hubId": "9b5d3b1d-f9c1-4b0e-91a3-f4c9d2a2e5f5",
"name": "경기 남부 허브",
"address": "경기도 이천시 덕평로 257-21",
"latitude": 37.47508109,
"longitude": 127.12349735
}
]}
{
"errorCode": "TRACE_ID_MISSING",
"message": "Zipkin 트레이싱 데이터 없음Zipkin Trace ID가 누락되었습니다.",
"status": 503,
"traceId": "f9f5a3b7e89b12d3"
}
중건 안

허브 간 이동 정보 관리 API

진행상황 Method 기능 URL 권한 Request Header Request Response Error Response 담당자
시작 전 POST 허브 간 이동 정보 등록 /api/v1/hub-movements MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-ParentSpanId: {배송 생성 Span ID}
X-B3-Sampled: true
{
"departureHubId": "550e8400-e29b-41d4-a716-446655440000",
"arrivalHubId": "9b5d3b1d-f9c1-4b0e-91a3-f4c9d2a2e5f5",
"distance": 300,
"durationTime": 180
}
{
"message": "이동 경로가 생성되었습니다.",
"statusCode": 201
}
{
"errorCode": "HUB_MOVEMENT_CREATION_TIMEOUT",
"message": "허브 이동 정보 생성이 지연되었습니다.",
"status": 504
}
중건 안
시작 전 DELETE 허브 이동 정보 삭제 /api/v1/hub-movements/{hub_movements_id} MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- 204 No Content {
"errorCode": "RESOURCE_NOT_FOUND",
"message": "NOT_FOUND",
"status": 404
}
중건 안
시작 전 GET 허브 간 이동 정보 조회 /api/v1/hub-movements ALL Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: {주문 Trace ID}
X-B3-SpanId: Span ID
X-B3-Sampled: true
GET /api/v1/hub-movements?departureHubId={departureHubId}&arrivalHubId={arrivalHubId} {
"message": "이동 정보 조회 성공",
"statusCode": 200,
"data": [
{
"hubMovementsId": "a3d9c1b5-2f9c-4e0e-91a3-f4c9d2a2e5f5",
"departureHubId": "550e8400-e29b-41d4-a716-446655440000",
"arrivalHubId": "9b5d3b1d-f9c1-4b0e-91a3-f4c9d2a2e5f5",
"distance": 300,
"durationTime": 180
}
]}
{
"errorCode": "TRACE_ID_MISSING",
"message": "Zipkin 트레이싱 데이터 없음Zipkin Trace ID가 누락되었습니다.",
"status": 503,
"traceId": "f9f5a3b7e89b12d3"
}
중건 안
시작 전 GET 특정 이동 정보 조회 /api/v1/hub-movements/{hub_movements_id} ALL Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
- {
"message": "이동 정보 조회 성공",
"statusCode": 200,
"data": {
"hubMovementsId": "a3d9c1b5-2f9c-4e0e-91a3-f4c9d2a2e5f5",
"departureHubId": "550e8400-e29b-41d4-a716-446655440000",
"arrivalHubId": "9b5d3b1d-f9c1-4b0e-91a3-f4c9d2a2e5f5",
"distance": 300,
"durationTime": 180
}
}
{
"errorCode": "RESOURCE_NOT_FOUND",
"message": "NOT_FOUND",
"status": 404
}
중건 안
시작 전 PATCH 이동 경로 수정 /api/v1/hub-movements/{hub_movements_id} MASTER Authorization: Bearer jwt_token_string
Content-Type: application/json
X-B3-TraceId: Trace ID
X-B3-SpanId: Span ID
X-B3-Sampled: true
{
"distance": 320,
"durationTime": 190
}
{
"message": "이동 경로가 수정되었습니다.",
"statusCode": 200
}
{
"errorCode": "HUB_MOVEMENT_UPDATE_CONFLICT",
"message": "이동 경로 수정 충돌이 발생하였습니다.",
"status": 409
}
중건 안

Clone this wiki locally