상품 일부 수정
본문에 준 필드만 바꾼다. `images`는 이미지 목록을 통째로 바꾸고 첫 장이 대표 이미지(썸네일)다. 재고는 variant 재고 API로 바꾼다
본문에 준 필드만 바꾼다. images는 이미지 목록을 통째로 바꾸고 첫 장이 대표 이미지(썸네일)다. 재고는 variant 재고 API로 바꾼다
accessTokenAuthorizationBearer <JWT>Sayren 계정 토큰(로그인 토큰 또는 개인 액세스 토큰, RFC 9068 JWT)
productId*stringX-Store-Id*string대상 상점 id. 토큰의 상점 범위 밖이면 403 STORE_NOT_GRANTED, 없으면 400 STORE_ID_REQUIRED다
application/json- body
name?stringlength <= 100salePrice?integer10status?string"SALE""SUSPENDED""OUT_OF_STOCK""CLOSED"flowId?|주문 흐름(이슈 #115) — 게시한 흐름 id, null이면 카테고리의 흐름(없으면 기본 흐름). 생략하면 바꾸지 않는다
images?array<>상품 이미지 주소 목록. 주면 통째로 바꾼다(현재 목록과 병합하지 않는다). 첫 장이 대표 이미지(썸네일)다. 생략하면 바꾸지 않는다
1 <= items <= 10fulfillment?|상품 이행. 생략하면 바꾸지 않는다. 주면 유형 안 필드를 모두 담아 통째로 바꾼다(현재 값과 병합하지 않는다). 판매 이력이 있으면 유형을 바꿀 수 없다(409 FULFILLMENT_TYPE_LOCKED)
prices?array<>외화 판매가(이슈 #130). 기본 통화는 넣지 않는다. 주면 판매 중인 외화 안에서 목록 전체를 바꾸고(판매하지 않는 통화의 저장 값은 유지한다) 생략하면 유지한다. 목록에 없는 외화로는 팔지 않는다
items <= 15refundPolicy?|상품별 환불 정책. 주면 통째로 바꾼다(준 항목만 상점 기본을 덮어쓴다). null은 덮어쓰기를 지워 상점 기본을 따른다. 생략하면 바꾸지 않는다
pointEarnRateBp?|구매 적립률 덮어쓰기(만분율, 100 = 1%, 0~3000, 이슈 #93). null이면 상점 기본 적립률, 0이면 이 상품은 적립하지 않는다. 결제 확정 시점 값이 주문상품에 남는다. 생략하면 바꾸지 않는다
0 <= value <= 3000성공
application/json- response
meta*data*error*|nullcurl -X PATCH 'https://api.sayren.io/v1/products/string' \
-H 'X-Store-Id: string' \
-H 'Content-Type: application/json' \
-d '{}'{
"meta": {
"status": 200,
"code": "OK",
"message": "OK",
"isSuccess": true
},
"data": {
"productId": "string",
"productNo": null,
"name": "string",
"status": "SALE",
"salePrice": 0,
"discountedPrice": 0,
"stockQuantity": 0,
"categoryId": "string",
"thumbnailUrl": "http://example.com",
"hasOptions": true,
"fulfillment": {
"type": "SHIPPING",
"shipping": {
"deliveryType": "FREE",
"deliveryFee": 0,
"conditionalFreeAmount": 0,
"shippingAddressId": "string",
"returnAddressId": "string",
"prices": [
{
"currency": "string",
"deliveryFee": 0,
"conditionalFreeAmount": 0
}
]
},
"methods": [
"string"
]
},
"updatedAt": "string",
"sample": false,
"prices": [
{
"currency": "string",
"salePrice": 0,
"originalPrice": 0,
"discountAmount": 0
}
],
"description": "string",
"descriptionJson": "string",
"originalPrice": 0,
"pointEarnRateBp": 0,
"images": [
"http://example.com"
],
"attributes": [
{
"attributeId": "string",
"value": "string"
}
],
"optionGroups": [
{
"groupId": "string",
"name": "string",
"sortOrder": 0,
"values": [
{
"valueId": "string",
"name": "string",
"sortOrder": 0
}
]
}
],
"variants": [
{
"variantId": "string",
"variantNo": null,
"valueIds": [
"string"
],
"name": "string",
"additionalPrice": 0,
"prices": [
{
"currency": "string",
"additionalPrice": 0
}
],
"stockQuantity": 0,
"sku": "string",
"barcode": "string",
"costPrice": 0,
"weightGram": 0,
"sellerCode": "string",
"usable": true,
"attributes": {
"property1": "string",
"property2": "string"
},
"hasOrders": true
}
],
"addonGroups": [],
"customInputs": [],
"optionSort": "REGISTERED",
"inventoryMode": "string",
"flowId": "string",
"fulfillmentTypeLocked": true,
"refundPolicy": {
"preShipmentDeliveryFeeRefund": true,
"returnDeliveryFee": 0,
"exchangeDeliveryFee": 0,
"sellerFaultFreeShipping": true,
"conditionalFreeShortfallCharge": true,
"currencies": {
"property1": {
"returnDeliveryFee": 0,
"exchangeDeliveryFee": 0
},
"property2": {
"returnDeliveryFee": 0,
"exchangeDeliveryFee": 0
}
}
},
"discount": {
"productId": "string",
"discountType": "RATE",
"discountValue": 0,
"discountedPrice": 0,
"startAt": "string",
"endAt": "string"
},
"notice": {
"schemaId": "string",
"version": 0,
"values": {
"property1": "string",
"property2": "string"
}
},
"certifications": {
"subjects": [
{
"subject": "string",
"status": "string",
"exemption": "string"
}
],
"items": [
{
"kind": "string",
"agency": "string",
"number": "string"
}
]
},
"infoSectionIds": [],
"createdAt": "string"
},
"error": null
}