단일 상품을 등록합니다.
- 상품 코드(sku) 또는 상품 URL(url)이 이미 존재하는 경우 등록할 수 없습니다.
- 상품 이미지(mediaUrl)이 없어도 등록이 가능합니다.
POST https://papi.shoplive.cloud/v1/goods/{accessKey}
REQUEST
Parameter | Type | Source | Description | Required | Note |
---|---|---|---|---|---|
accessKey | string | path | 발급 받은 accessKey | O | 샵라이브에서 발급받은 고객사의 키 |
Authorization | string | header | JWT 인증 토큰 | O | |
body | Goods | body | 상품 데이터 객체 | O | 등록하고자 하는 상품 정보 |
RESPONSE
Parameter | Type | Description | Note |
---|---|---|---|
body | Goods | 생성된 상품 정보 |
curl --location --request POST 'https://papi.shoplive.cloud/v1/goods/{access key}' \
--header 'Authorization: Bearer {jwt token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "상품명1",
"brand": "shoplive",
"description": null,
"url": "https://www.shoplive.cloud",
"sku": "shoplive-goods-1",
"mediaUrl": "https://shopping-phinf.pstatic.net/main_2658650/26586502065.jpg",
"originalPrice": 700000.0,
"discountedPrice": 490000.0,
"discountPercentage": 30.0
}'
{
"id": 729,
"name": "상품명1",
"brand": "shoplive",
"description": null,
"url": "https://www.shoplive.cloud",
"sku": "shoplive-goods-1",
"mediaUrl": "https://shopping-phinf.pstatic.net/main_2658650/26586502065.jpg",
"medias": [
{
"id": 727,
"mediaType": "IMAGE",
"url": "https://resource.shoplive.cloud/images/2be33800-4977-4ded-be1f-29ebda7bfee8.jpg",
"size": 18501,
"width": 500,
"height": 500,
"thumbnails": [
{
"imageUrl": "https://resource.shoplive.cloud/images/2be33800-4977-4ded-be1f-29ebda7bfee8_w120.jpg",
"original": false,
"width": 120,
"height": 120,
"fileSize": 0,
"size": 2323
},
{
"imageUrl": "https://resource.shoplive.cloud/images/2be33800-4977-4ded-be1f-29ebda7bfee8_w240.jpg",
"original": false,
"width": 240,
"height": 240,
"fileSize": 0,
"size": 5675
},
{
"imageUrl": "https://resource.shoplive.cloud/images/2be33800-4977-4ded-be1f-29ebda7bfee8_w480.jpg",
"original": false,
"width": 480,
"height": 480,
"fileSize": 0,
"size": 15871
}
]
}
],
"originalPrice": 700000.0,
"discountedPrice": 490000.0,
"currency": "KRW",
"discountPercentage": 30.0
}