캠페인에 등록된 상품의 상태 변경 (상품 ID로 변경)

특정 캠페인에 등록된 상품의 id(샵라이브에 상품 등록시 발급되는 상품의 id)로 판매 상태를 업데이트합니다.

  • API를 호출하는 즉시 사용자의 화면에서 상품의 상태가 변경됩니다. (when notify=true)
  • 부가 기능으로, 운영자 고정 채팅 혹은 일반 채팅으로 지정한 메시지를 보낼 수 있습니다.
PUT /v1/goods/{accessKey}/campaign/{campaignKey}/salesStatus/id

REQUEST

ParameterTypeSourceDescriptionRequiredNote
accessKeystringpath발급 받은 accessKeyO샵라이브에서 발급받은 고객사의 키
AuthorizationstringheaderJWT 인증 토큰O
campaignKeystringpath캠페인 키O
goodsIdint64query상품의 IDO
salesStatusstringquery판매 상태OON_SALE 판매중
ALMOST_SOLD_OUT 품절 임박
SOLD_OUT 품절
notifyboolquery알림 여부X상품의 상태 변경을 사용자에게 즉시 알립니다.
default:true
namestringquery운영자 이름X메세지를 보내는 운영자 이름
값이 없으면 캠페인 상세에 등록되어 있는 운영자 이름이 설정됩니다.
adminChatNoticestringquery운영자 고정 채팅 메시지X
chatMessagestringquery운영자 채팅 메시지X

RESPONSE

ParameterTypeDescriptionNote
bodyCampaignGoods캠페인 내 상품 정보 객체

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
}