응답 형식
지원되는 POST 라우트는 JSON 본문에 선택적 response_format 필드를 받습니다. 생략하거나 standard를 사용하면 기본 HIOBuy 통합 모델이 반환됩니다.
모드
| 값 | 설명 |
|---|---|
standard (default) | 정규화된 타입 — StandardProductDetail, StandardProductList, StandardOrderPreviewResult 등 |
upstream | 벤더 패스스루 — 필드 매핑 없이 공식 1688 Open API 또는 Taobao IOP JSON을 upstream에 반환 |
Upstream envelope
response_format이 upstream이면:
{
"channel": "1688",
"response_format": "upstream",
"upstream_api": "com.alibaba.fenxiao.crossborder/product.search.keywordQuery",
"upstream": {
"result": {
"success": true
}
},
"upstream_steps": [],
"request_id": "req_abc123"
}upstream_api— 기본 벤더 API 식별자(1688 path 또는 Taobao IOP route)upstream— 해당 호출의 원본 HTTP JSON 본문upstream_steps— 선택적 선행 호출(예: 이미지 검색 전 이미지 업로드)
Standard preview 응답 {#standard-preview}
POST /v1/orders/preview(1688 및 Taobao)는 standard 모드에서 StandardOrderPreviewResult를 반환합니다. 금액은 fen(CNY cents) 단위입니다. 필드 참조: Procurement orders.
{
"channel": "taobao",
"success": true,
"total": {
"payment": {
"amount": 12900,
"currency": "CNY"
},
"shipping": {
"amount": 0,
"currency": "CNY"
}
},
"unavailable_lines": [],
"sellers": [
{
"seller_id": "...",
"lines": [
{
"offer_id": "...",
"spec_id": "...",
"quantity": 5
}
]
}
],
"request_id": "req_..."
}1688은 trade_types, pay_channels, promotions를 추가합니다. response_format: "upstream"을 사용하면 preview는 원본 벤더 JSON을 반환합니다.
상품 라우트
| 엔드포인트 | 채널 | Upstream API(예시) |
|---|---|---|
POST /v1/products/detail | 1688, taobao | queryProductDetail / /traffic/item/get |
POST /v1/products/search | 1688, taobao | keywordQuery / /traffic/item/search |
POST /v1/products/search-by-image | 1688, taobao | upload + imageQuery / upload + /traffic/item/imgsearch |
POST /v1/products/parse는 항상 standard만 반환합니다. POST /v1/products/freight/estimate는 주문 preview와 동일한 본문을 사용하며 배송비만 반환합니다.
주문 라우트(1688 및 Taobao)
| 엔드포인트 | Standard | Upstream API(예시) |
|---|---|---|
POST /v1/orders/list | ✓ | alibaba.trade.getBuyerOrderList |
POST /v1/orders/1688/preview | ✓ | alibaba.createOrder.preview |
POST /v1/orders/1688/create | ✓ | alibaba.trade.createCrossOrder |
POST /v1/orders/preview | ✓ | channel에 따라 dispatch(1688 / taobao) |
POST /v1/orders/create | ✓ | channel에 따라 dispatch |
POST /v1/orders/taobao/preview | ✓ | /purchase/order/render |
POST /v1/orders/taobao/create | ✓ | /purchase/order/create |
POST /v1/orders/cancel | ✓ | alibaba.trade.cancel |
POST /v1/orders/pay | ✓ | channel에 따라 dispatch |
POST /v1/orders/detail | ✓ | order_id로 주문 상세 조회 |
POST /v1/orders/logistics/trace | ✓ | 중국 내 물류 추적 |
POST /v1/orders/purchase/query | ✓ | Taobao 구매 목록 |
예시 — upstream search
curl https://api.hiobuy.com/v1/products/search \
-H "Authorization: Bearer hio_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"response_format": "upstream",
"channel": "1688",
"keyword": "phone case",
"page": 1,
"page_size": 10,
"language": "en"
}'검증
유효하지 않은 값(예: vendor_raw)은 HTTP 400과 VALIDATION_ERROR를 반환합니다. Errors를 참고하세요.
OpenAPI
머신 판독 사양: openapi.json (스키마 UpstreamApiResponse, UpstreamStep).