특정 캠페인에 등록된 상품의 id(샵라이브에 상품 등록시 발급되는 상품의 id)로 판매 상태를 업데이트합니다.
- API를 호출하는 즉시 사용자의 화면에서 상품의 상태가 변경됩니다. (
when notify=true
) - 부가 기능으로, 운영자 고정 채팅 혹은 일반 채팅으로 지정한 메시지를 보낼 수 있습니다.
PUT /v1/goods/{accessKey}/campaign/{campaignKey}/salesStatus/id
REQUEST
Parameter | Type | Source | Description | Required | Note |
---|---|---|---|---|---|
accessKey | string | path | 발급 받은 accessKey | O | 샵라이브에서 발급받은 고객사의 키 |
Authorization | string | header | JWT 인증 토큰 | O | |
campaignKey | string | path | 캠페인 키 | O | |
goodsId | int64 | query | 상품의 ID | O | |
salesStatus | string | query | 판매 상태 | O | ON_SALE 판매중ALMOST_SOLD_OUT 품절 임박SOLD_OUT 품절 |
notify | bool | query | 알림 여부 | X | 상품의 상태 변경을 사용자에게 즉시 알립니다. default: true |
name | string | query | 운영자 이름 | X | 메세지를 보내는 운영자 이름 값이 없으면 캠페인 상세에 등록되어 있는 운영자 이름이 설정됩니다. |
adminChatNotice | string | query | 운영자 고정 채팅 메시지 | X | |
chatMessage | string | query | 운영자 채팅 메시지 | X |
RESPONSE
Parameter | Type | Description | Note |
---|---|---|---|
body | CampaignGoods | 캠페인 내 상품 정보 객체 |
Example
curl --location --request PUT 'https://papi.shoplive.cloud/v1/goods/{accessKey}/campaign/{campaignKey}/salesStatus/id' \
--header 'Authorization: Bearer {jwt token}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'goodsId=1339' \
--data-urlencode 'salesStatus=SOLD_OUT' \
--data-urlencode 'chatMessage=오버핏 더블 코트 상품이 매진되었습니다.'
{
"campaignId": "354",
"goodsId": "1339",
"sortOrder": 3,
"showingNow": true,
"salesStatus": "SOLD_OUT",
"goods": {
"id": "1339",
"customerId": "1",
"name": "오버핏 더블 코트",
"brand": "샵라이브",
"description": null,
"url": "https://path/to/goods/123",
"sku": "abcd1234",
"medias": [
{
"id": "1772",
"customerId": "0",
"mediaType": "IMAGE",
"name": null,
"description": null,
"originalUrl": null,
"url": "https://resource.shoplive.cloud/images/445e18d9-7e41-409f-a6ea-a9f30e2ebcf5.jpg",
"checksum": null,
"width": 50,
"height": 60,
"size": "1284",
"historyId": "0",
"thumbnails": null,
"createdAt": 1634541907000,
"updatedAt": 1634541907000
}
],
"originalPrice": 186000.0,
"discountedPrice": 128000.0,
"customOriginalPrice": null,
"customDiscountedPrice": null,
"currency": "THB",
"discountPercentage": 31.0,
"adminId": "5129923",
"adminName": "Demian",
"createdAt": 1634541907000,
"updatedAt": 1635155765000,
"checked": false,
"locked": false
},
"adminName": null,
"adminId": "5129923",
"createdAt": 1634615089000,
"updatedAt": 1635327876000
}