상품 생성
curl --request POST \
--url https://api.steppay.kr/api/v1/products \
--header 'Content-Type: application/json' \
--header 'Secret-Token: <api-key>' \
--data '
{
"type": "SOFTWARE",
"status": "SALE",
"name": "유튜브 구독 상품",
"productOrder": 0,
"featuredImageUrl": "Url string",
"imageUrls": [
"Url string"
],
"description": "유튜브 프리미엄",
"summary": "string",
"sku": "회",
"quantity": null,
"enabledDemo": true,
"demoPeriod": 30,
"demoPeriodUnit": "DAY",
"useCombination": false,
"optionCombinations": [],
"categoryIds": [],
"eventBadge": [
{
"event": "string",
"startDateTime": "9999-01-01T00:00:00",
"endDateTime": "9999-01-01T00:00:00"
}
],
"useWidget": {
"useDemo": true,
"useEventBadge": true,
"useOnetimePurchasable": true,
"useNotice": true
}
}
'import requests
url = "https://api.steppay.kr/api/v1/products"
payload = {
"type": "SOFTWARE",
"status": "SALE",
"name": "유튜브 구독 상품",
"productOrder": 0,
"featuredImageUrl": "Url string",
"imageUrls": ["Url string"],
"description": "유튜브 프리미엄",
"summary": "string",
"sku": "회",
"quantity": None,
"enabledDemo": True,
"demoPeriod": 30,
"demoPeriodUnit": "DAY",
"useCombination": False,
"optionCombinations": [],
"categoryIds": [],
"eventBadge": [
{
"event": "string",
"startDateTime": "9999-01-01T00:00:00",
"endDateTime": "9999-01-01T00:00:00"
}
],
"useWidget": {
"useDemo": True,
"useEventBadge": True,
"useOnetimePurchasable": True,
"useNotice": True
}
}
headers = {
"Secret-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Secret-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'SOFTWARE',
status: 'SALE',
name: '유튜브 구독 상품',
productOrder: 0,
featuredImageUrl: 'Url string',
imageUrls: ['Url string'],
description: '유튜브 프리미엄',
summary: 'string',
sku: '회',
quantity: null,
enabledDemo: true,
demoPeriod: 30,
demoPeriodUnit: 'DAY',
useCombination: false,
optionCombinations: [],
categoryIds: [],
eventBadge: [
{
event: 'string',
startDateTime: '9999-01-01T00:00:00',
endDateTime: '9999-01-01T00:00:00'
}
],
useWidget: {
useDemo: true,
useEventBadge: true,
useOnetimePurchasable: true,
useNotice: true
}
})
};
fetch('https://api.steppay.kr/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.steppay.kr/api/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'SOFTWARE',
'status' => 'SALE',
'name' => '유튜브 구독 상품',
'productOrder' => 0,
'featuredImageUrl' => 'Url string',
'imageUrls' => [
'Url string'
],
'description' => '유튜브 프리미엄',
'summary' => 'string',
'sku' => '회',
'quantity' => null,
'enabledDemo' => true,
'demoPeriod' => 30,
'demoPeriodUnit' => 'DAY',
'useCombination' => false,
'optionCombinations' => [
],
'categoryIds' => [
],
'eventBadge' => [
[
'event' => 'string',
'startDateTime' => '9999-01-01T00:00:00',
'endDateTime' => '9999-01-01T00:00:00'
]
],
'useWidget' => [
'useDemo' => true,
'useEventBadge' => true,
'useOnetimePurchasable' => true,
'useNotice' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Secret-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.steppay.kr/api/v1/products"
payload := strings.NewReader("{\n \"type\": \"SOFTWARE\",\n \"status\": \"SALE\",\n \"name\": \"유튜브 구독 상품\",\n \"productOrder\": 0,\n \"featuredImageUrl\": \"Url string\",\n \"imageUrls\": [\n \"Url string\"\n ],\n \"description\": \"유튜브 프리미엄\",\n \"summary\": \"string\",\n \"sku\": \"회\",\n \"quantity\": null,\n \"enabledDemo\": true,\n \"demoPeriod\": 30,\n \"demoPeriodUnit\": \"DAY\",\n \"useCombination\": false,\n \"optionCombinations\": [],\n \"categoryIds\": [],\n \"eventBadge\": [\n {\n \"event\": \"string\",\n \"startDateTime\": \"9999-01-01T00:00:00\",\n \"endDateTime\": \"9999-01-01T00:00:00\"\n }\n ],\n \"useWidget\": {\n \"useDemo\": true,\n \"useEventBadge\": true,\n \"useOnetimePurchasable\": true,\n \"useNotice\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Secret-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.steppay.kr/api/v1/products")
.header("Secret-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"SOFTWARE\",\n \"status\": \"SALE\",\n \"name\": \"유튜브 구독 상품\",\n \"productOrder\": 0,\n \"featuredImageUrl\": \"Url string\",\n \"imageUrls\": [\n \"Url string\"\n ],\n \"description\": \"유튜브 프리미엄\",\n \"summary\": \"string\",\n \"sku\": \"회\",\n \"quantity\": null,\n \"enabledDemo\": true,\n \"demoPeriod\": 30,\n \"demoPeriodUnit\": \"DAY\",\n \"useCombination\": false,\n \"optionCombinations\": [],\n \"categoryIds\": [],\n \"eventBadge\": [\n {\n \"event\": \"string\",\n \"startDateTime\": \"9999-01-01T00:00:00\",\n \"endDateTime\": \"9999-01-01T00:00:00\"\n }\n ],\n \"useWidget\": {\n \"useDemo\": true,\n \"useEventBadge\": true,\n \"useOnetimePurchasable\": true,\n \"useNotice\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steppay.kr/api/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Secret-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"SOFTWARE\",\n \"status\": \"SALE\",\n \"name\": \"유튜브 구독 상품\",\n \"productOrder\": 0,\n \"featuredImageUrl\": \"Url string\",\n \"imageUrls\": [\n \"Url string\"\n ],\n \"description\": \"유튜브 프리미엄\",\n \"summary\": \"string\",\n \"sku\": \"회\",\n \"quantity\": null,\n \"enabledDemo\": true,\n \"demoPeriod\": 30,\n \"demoPeriodUnit\": \"DAY\",\n \"useCombination\": false,\n \"optionCombinations\": [],\n \"categoryIds\": [],\n \"eventBadge\": [\n {\n \"event\": \"string\",\n \"startDateTime\": \"9999-01-01T00:00:00\",\n \"endDateTime\": \"9999-01-01T00:00:00\"\n }\n ],\n \"useWidget\": {\n \"useDemo\": true,\n \"useEventBadge\": true,\n \"useOnetimePurchasable\": true,\n \"useNotice\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"code": "product_AbCdEfGhI",
"type": "SOFTWARE",
"status": "SALE",
"name": "유튜브 구독 상품",
"subTitle": null,
"featuredImageUrl": "Url string",
"imageUrls": [
"Url string"
],
"description": "유튜브 프리미엄",
"summary": "string",
"reasonOfReject": null,
"sku": "회",
"quantity": null,
"combinedProducts": [],
"optionGroups": [],
"useCombination": false,
"optionCombinations": [],
"prices": [],
"createdAt": "9999-01-01T00:00:00.000000",
"modifiedAt": "9999-01-01T00:00:00.000000",
"enabledDemo": true,
"demoPeriod": 30,
"demoPeriodUnit": "DAY",
"categories": [],
"vendorUuid": "206992bb-6462-4b4f-9847-cf2f40d55b48",
"productOrder": 0,
"isOnetimePurchasable": false,
"eventBadge": [
{
"event": "string",
"startDateTime": "9999-01-01T00:00:00",
"endDateTime": "9999-01-01T00:00:00"
}
],
"notice": null,
"useWidget": {
"useDemo": false,
"useEventBadge": false,
"useOnetimePurchasable": false,
"useNotice": false
},
"groupId": null,
"countrySetting": null
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}상품 API
상품 생성
상품을 생성할 때 호출합니다.
POST
/
api
/
v1
/
products
상품 생성
curl --request POST \
--url https://api.steppay.kr/api/v1/products \
--header 'Content-Type: application/json' \
--header 'Secret-Token: <api-key>' \
--data '
{
"type": "SOFTWARE",
"status": "SALE",
"name": "유튜브 구독 상품",
"productOrder": 0,
"featuredImageUrl": "Url string",
"imageUrls": [
"Url string"
],
"description": "유튜브 프리미엄",
"summary": "string",
"sku": "회",
"quantity": null,
"enabledDemo": true,
"demoPeriod": 30,
"demoPeriodUnit": "DAY",
"useCombination": false,
"optionCombinations": [],
"categoryIds": [],
"eventBadge": [
{
"event": "string",
"startDateTime": "9999-01-01T00:00:00",
"endDateTime": "9999-01-01T00:00:00"
}
],
"useWidget": {
"useDemo": true,
"useEventBadge": true,
"useOnetimePurchasable": true,
"useNotice": true
}
}
'import requests
url = "https://api.steppay.kr/api/v1/products"
payload = {
"type": "SOFTWARE",
"status": "SALE",
"name": "유튜브 구독 상품",
"productOrder": 0,
"featuredImageUrl": "Url string",
"imageUrls": ["Url string"],
"description": "유튜브 프리미엄",
"summary": "string",
"sku": "회",
"quantity": None,
"enabledDemo": True,
"demoPeriod": 30,
"demoPeriodUnit": "DAY",
"useCombination": False,
"optionCombinations": [],
"categoryIds": [],
"eventBadge": [
{
"event": "string",
"startDateTime": "9999-01-01T00:00:00",
"endDateTime": "9999-01-01T00:00:00"
}
],
"useWidget": {
"useDemo": True,
"useEventBadge": True,
"useOnetimePurchasable": True,
"useNotice": True
}
}
headers = {
"Secret-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Secret-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'SOFTWARE',
status: 'SALE',
name: '유튜브 구독 상품',
productOrder: 0,
featuredImageUrl: 'Url string',
imageUrls: ['Url string'],
description: '유튜브 프리미엄',
summary: 'string',
sku: '회',
quantity: null,
enabledDemo: true,
demoPeriod: 30,
demoPeriodUnit: 'DAY',
useCombination: false,
optionCombinations: [],
categoryIds: [],
eventBadge: [
{
event: 'string',
startDateTime: '9999-01-01T00:00:00',
endDateTime: '9999-01-01T00:00:00'
}
],
useWidget: {
useDemo: true,
useEventBadge: true,
useOnetimePurchasable: true,
useNotice: true
}
})
};
fetch('https://api.steppay.kr/api/v1/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.steppay.kr/api/v1/products",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'SOFTWARE',
'status' => 'SALE',
'name' => '유튜브 구독 상품',
'productOrder' => 0,
'featuredImageUrl' => 'Url string',
'imageUrls' => [
'Url string'
],
'description' => '유튜브 프리미엄',
'summary' => 'string',
'sku' => '회',
'quantity' => null,
'enabledDemo' => true,
'demoPeriod' => 30,
'demoPeriodUnit' => 'DAY',
'useCombination' => false,
'optionCombinations' => [
],
'categoryIds' => [
],
'eventBadge' => [
[
'event' => 'string',
'startDateTime' => '9999-01-01T00:00:00',
'endDateTime' => '9999-01-01T00:00:00'
]
],
'useWidget' => [
'useDemo' => true,
'useEventBadge' => true,
'useOnetimePurchasable' => true,
'useNotice' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Secret-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.steppay.kr/api/v1/products"
payload := strings.NewReader("{\n \"type\": \"SOFTWARE\",\n \"status\": \"SALE\",\n \"name\": \"유튜브 구독 상품\",\n \"productOrder\": 0,\n \"featuredImageUrl\": \"Url string\",\n \"imageUrls\": [\n \"Url string\"\n ],\n \"description\": \"유튜브 프리미엄\",\n \"summary\": \"string\",\n \"sku\": \"회\",\n \"quantity\": null,\n \"enabledDemo\": true,\n \"demoPeriod\": 30,\n \"demoPeriodUnit\": \"DAY\",\n \"useCombination\": false,\n \"optionCombinations\": [],\n \"categoryIds\": [],\n \"eventBadge\": [\n {\n \"event\": \"string\",\n \"startDateTime\": \"9999-01-01T00:00:00\",\n \"endDateTime\": \"9999-01-01T00:00:00\"\n }\n ],\n \"useWidget\": {\n \"useDemo\": true,\n \"useEventBadge\": true,\n \"useOnetimePurchasable\": true,\n \"useNotice\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Secret-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.steppay.kr/api/v1/products")
.header("Secret-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"SOFTWARE\",\n \"status\": \"SALE\",\n \"name\": \"유튜브 구독 상품\",\n \"productOrder\": 0,\n \"featuredImageUrl\": \"Url string\",\n \"imageUrls\": [\n \"Url string\"\n ],\n \"description\": \"유튜브 프리미엄\",\n \"summary\": \"string\",\n \"sku\": \"회\",\n \"quantity\": null,\n \"enabledDemo\": true,\n \"demoPeriod\": 30,\n \"demoPeriodUnit\": \"DAY\",\n \"useCombination\": false,\n \"optionCombinations\": [],\n \"categoryIds\": [],\n \"eventBadge\": [\n {\n \"event\": \"string\",\n \"startDateTime\": \"9999-01-01T00:00:00\",\n \"endDateTime\": \"9999-01-01T00:00:00\"\n }\n ],\n \"useWidget\": {\n \"useDemo\": true,\n \"useEventBadge\": true,\n \"useOnetimePurchasable\": true,\n \"useNotice\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.steppay.kr/api/v1/products")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Secret-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"SOFTWARE\",\n \"status\": \"SALE\",\n \"name\": \"유튜브 구독 상품\",\n \"productOrder\": 0,\n \"featuredImageUrl\": \"Url string\",\n \"imageUrls\": [\n \"Url string\"\n ],\n \"description\": \"유튜브 프리미엄\",\n \"summary\": \"string\",\n \"sku\": \"회\",\n \"quantity\": null,\n \"enabledDemo\": true,\n \"demoPeriod\": 30,\n \"demoPeriodUnit\": \"DAY\",\n \"useCombination\": false,\n \"optionCombinations\": [],\n \"categoryIds\": [],\n \"eventBadge\": [\n {\n \"event\": \"string\",\n \"startDateTime\": \"9999-01-01T00:00:00\",\n \"endDateTime\": \"9999-01-01T00:00:00\"\n }\n ],\n \"useWidget\": {\n \"useDemo\": true,\n \"useEventBadge\": true,\n \"useOnetimePurchasable\": true,\n \"useNotice\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 1,
"code": "product_AbCdEfGhI",
"type": "SOFTWARE",
"status": "SALE",
"name": "유튜브 구독 상품",
"subTitle": null,
"featuredImageUrl": "Url string",
"imageUrls": [
"Url string"
],
"description": "유튜브 프리미엄",
"summary": "string",
"reasonOfReject": null,
"sku": "회",
"quantity": null,
"combinedProducts": [],
"optionGroups": [],
"useCombination": false,
"optionCombinations": [],
"prices": [],
"createdAt": "9999-01-01T00:00:00.000000",
"modifiedAt": "9999-01-01T00:00:00.000000",
"enabledDemo": true,
"demoPeriod": 30,
"demoPeriodUnit": "DAY",
"categories": [],
"vendorUuid": "206992bb-6462-4b4f-9847-cf2f40d55b48",
"productOrder": 0,
"isOnetimePurchasable": false,
"eventBadge": [
{
"event": "string",
"startDateTime": "9999-01-01T00:00:00",
"endDateTime": "9999-01-01T00:00:00"
}
],
"notice": null,
"useWidget": {
"useDemo": false,
"useEventBadge": false,
"useOnetimePurchasable": false,
"useNotice": false
},
"groupId": null,
"countrySetting": null
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}{
"errorCode": "<string>",
"traceId": "<string>",
"errorMessage": "<string>",
"details": {}
}Body
application/json
판매 가능 국가(region)
판매 가능 국가(region)
Available options:
AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, US_ALABAMA, US_ALASKA, US_ARIZONA, US_ARKANSAS, US_CALIFORNIA, US_COLORADO, US_CONNECTICUT, US_DELAWARE, US_FLORIDA, US_GEORGIA, US_HAWAII, US_IDAHO, US_ILLINOIS, US_INDIANA, US_IOWA, US_KANSAS, US_KENTUCKY, US_LOUISIANA, US_MAINE, US_MARYLAND, US_MASSACHUSETTS, US_MICHIGAN, US_MINNESOTA, US_MISSISSIPPI, US_MISSOURI, US_MONTANA, US_NEBRASKA, US_NEVADA, US_NEW_HAMPSHIRE, US_NEW_JERSEY, US_NEW_MEXICO, US_NEW_YORK, US_NORTH_CAROLINA, US_NORTH_DAKOTA, US_OHIO, US_OKLAHOMA, US_OREGON, US_PENNSYLVANIA, US_RHODE_ISLAND, US_SOUTH_CAROLINA, US_SOUTH_DAKOTA, US_TENNESSEE, US_TEXAS, US_UTAH, US_VERMONT, US_VIRGINIA, US_WASHINGTON, US_WEST_VIRGINIA, US_WISCONSIN, US_WYOMING, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW Response
정상적으로 생성됨
상품 정보