sayren Docs
상품

상품 목록 조회

GET
/v1/products

Authorization

accessToken
headerAuthorizationBearer <token>

Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)

Query Parameters

page?string

페이지 번호 (1부터, 기본 1)

size?string

페이지 크기 (기본 20, 최대 100)

categoryId?string

카테고리 필터 — 하위 카테고리의 상품도 포함

keyword?string

상품명 검색 (포함)

sellerCode?string

판매자 상품코드 — 이 코드가 붙은 variant를 가진 상품

sort?string

정렬 (기본 createdAt.desc)

Value in"createdAt.desc""createdAt.asc""salePrice.asc""salePrice.desc""updatedAt.desc"
productNo?string

상품번호(이슈 #107) — 이 상점의 그 번호 상품만. 숫자가 아니면 400 INVALID_PARAMETER

status?string

판매 상태 필터

Value in"SALE""SUSPENDED""OUT_OF_STOCK""CLOSED"

Header Parameters

X-Store-Id*string

대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다

Response Body

성공

application/json
  1. response
meta*
data*
error*|null
curl -X GET 'https://api.sayren.io/v1/products' \  -H 'X-Store-Id: string'
{  "meta": {    "status": 200,    "code": "OK",    "message": "OK",    "isSuccess": true  },  "data": {    "page": 0,    "size": 0,    "totalElements": 0,    "totalPages": 0,    "contents": [      {        "productId": "string",        "productNo": null,        "name": "string",        "status": "SALE",        "salePrice": 0,        "discountedPrice": 0,        "stockQuantity": 0,        "categoryId": "string",        "thumbnailUrl": "http://example.com",        "hasOptions": true,        "fulfillment": {          "type": "string"        },        "updatedAt": "string",        "sample": false      }    ]  },  "error": null}