curl --request POST \
--url https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp \
--header 'Content-Type: application/json' \
--header 'edicus-api-key: <api-key>' \
--header 'edicus-uid: <edicus-uid>' \
--data '
{
"order_count": 1,
"total_price": 23500,
"vdp_dataset": {
"rows": [
{
"cols": [
{
"id": "name",
"value": {
"text": "홍길동"
}
}
]
}
]
}
}
'import requests
url = "https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp"
payload = {
"order_count": 1,
"total_price": 23500,
"vdp_dataset": { "rows": [{ "cols": [
{
"id": "name",
"value": { "text": "홍길동" }
}
] }] }
}
headers = {
"edicus-uid": "<edicus-uid>",
"edicus-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'edicus-uid': '<edicus-uid>',
'edicus-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order_count: 1,
total_price: 23500,
vdp_dataset: {rows: [{cols: [{id: 'name', value: {text: '홍길동'}}]}]}
})
};
fetch('https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp', 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.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp",
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([
'order_count' => 1,
'total_price' => 23500,
'vdp_dataset' => [
'rows' => [
[
'cols' => [
[
'id' => 'name',
'value' => [
'text' => '홍길동'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"edicus-api-key: <api-key>",
"edicus-uid: <edicus-uid>"
],
]);
$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.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp"
payload := strings.NewReader("{\n \"order_count\": 1,\n \"total_price\": 23500,\n \"vdp_dataset\": {\n \"rows\": [\n {\n \"cols\": [\n {\n \"id\": \"name\",\n \"value\": {\n \"text\": \"홍길동\"\n }\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("edicus-uid", "<edicus-uid>")
req.Header.Add("edicus-api-key", "<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.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp")
.header("edicus-uid", "<edicus-uid>")
.header("edicus-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order_count\": 1,\n \"total_price\": 23500,\n \"vdp_dataset\": {\n \"rows\": [\n {\n \"cols\": [\n {\n \"id\": \"name\",\n \"value\": {\n \"text\": \"홍길동\"\n }\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["edicus-uid"] = '<edicus-uid>'
request["edicus-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_count\": 1,\n \"total_price\": 23500,\n \"vdp_dataset\": {\n \"rows\": [\n {\n \"cols\": [\n {\n \"id\": \"name\",\n \"value\": {\n \"text\": \"홍길동\"\n }\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body잠정 주문 (VDP)
가변 데이터를 포함한 잠정 주문을 넣습니다. 그 외에는 잠정 주문과 같습니다.
보내는 방법이 두 가지입니다.
vdp_dataset(JSON):Content-Type: application/json으로 보냅니다. dataset 객체를 그대로 넣습니다. 서버가 직렬화하므로 미리 stringify하지 않습니다. 대량 데이터에는 맞지 않습니다.vdp_dataset_file(파일):Content-Type: multipart/form-data로 보냅니다. JSON 문자열이 담긴 File 또는 Blob이어야 합니다. 대량 데이터는 이쪽을 씁니다.
multipart로 보낼 때는 vdp_dataset_file을 제외한 모든 필드가 문자열로 전달되고, 서버가 숫자와 불리언으로 바꿔 검증합니다. vdp_dataset_file이 있으면 vdp_dataset은 무시됩니다.
vdp_dataset은 삭제되고 복구되지 않습니다.curl --request POST \
--url https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp \
--header 'Content-Type: application/json' \
--header 'edicus-api-key: <api-key>' \
--header 'edicus-uid: <edicus-uid>' \
--data '
{
"order_count": 1,
"total_price": 23500,
"vdp_dataset": {
"rows": [
{
"cols": [
{
"id": "name",
"value": {
"text": "홍길동"
}
}
]
}
]
}
}
'import requests
url = "https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp"
payload = {
"order_count": 1,
"total_price": 23500,
"vdp_dataset": { "rows": [{ "cols": [
{
"id": "name",
"value": { "text": "홍길동" }
}
] }] }
}
headers = {
"edicus-uid": "<edicus-uid>",
"edicus-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'edicus-uid': '<edicus-uid>',
'edicus-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
order_count: 1,
total_price: 23500,
vdp_dataset: {rows: [{cols: [{id: 'name', value: {text: '홍길동'}}]}]}
})
};
fetch('https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp', 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.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp",
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([
'order_count' => 1,
'total_price' => 23500,
'vdp_dataset' => [
'rows' => [
[
'cols' => [
[
'id' => 'name',
'value' => [
'text' => '홍길동'
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"edicus-api-key: <api-key>",
"edicus-uid: <edicus-uid>"
],
]);
$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.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp"
payload := strings.NewReader("{\n \"order_count\": 1,\n \"total_price\": 23500,\n \"vdp_dataset\": {\n \"rows\": [\n {\n \"cols\": [\n {\n \"id\": \"name\",\n \"value\": {\n \"text\": \"홍길동\"\n }\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("edicus-uid", "<edicus-uid>")
req.Header.Add("edicus-api-key", "<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.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp")
.header("edicus-uid", "<edicus-uid>")
.header("edicus-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"order_count\": 1,\n \"total_price\": 23500,\n \"vdp_dataset\": {\n \"rows\": [\n {\n \"cols\": [\n {\n \"id\": \"name\",\n \"value\": {\n \"text\": \"홍길동\"\n }\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edicus.io/v2/projects/{project_id}/order/tentative_with_vdp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["edicus-uid"] = '<edicus-uid>'
request["edicus-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_count\": 1,\n \"total_price\": 23500,\n \"vdp_dataset\": {\n \"rows\": [\n {\n \"cols\": [\n {\n \"id\": \"name\",\n \"value\": {\n \"text\": \"홍길동\"\n }\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
모션원에서 발급받는 API 키입니다. 외부에 유출되지 않도록 각별히 주의합니다.
Headers
고객사가 사용자에게 부여한 고유 id입니다. 1~70자이고 a-z, A-Z, 0-9, _, !, @, -, +, =만 쓸 수 있습니다. 없거나 규칙을 어기면 400 invalid_request입니다.
1 - 70^[a-zA-Z0-9_!@\-+=]+$Path Parameters
프로젝트 id
1Body
잠정 주문을 넣을 때 보내는 body입니다. order_count와 total_price는 필수입니다.
주문 수량. 1 이상의 정수입니다
x >= 1실 결제 금액. 0 이상입니다
x >= 0파트너사 주문 번호. 255자 이내입니다
255주문을 구분하는 이름(주문명). 형식은 정해져 있지 않아 주문자 이름을 넣어도 됩니다. 255자 이내입니다. 렌더링 변수 $OT는 userdata_json의 order_name이 없을 때 이 값을 씁니다
255렌더링 테스트용 주문 여부입니다. true면 테스트용 렌더링 환경에서만 렌더링됩니다
Edicus Link 주문 여부입니다. 일반 연동에서는 보내지 않습니다
사용자 데이터를 JSON 문자열로 저장합니다. 렌더링할 때 고객 정보가 필요하면 이 필드로 전달합니다. 1000자 이내의 JSON 문자열이어야 하고, 아니면 400 invalid_request입니다.
{ "user_name": "주문자 이름", "receiver_name": "수령인 이름", "order_name": "주문명", "production_count": 1, "title": "제목" }
1000가변 데이터입니다. dataset 객체를 그대로 넣습니다. 서버가 직렬화해서 저장하므로 미리 stringify하지 않습니다. 대량 데이터는 잠정 주문(VDP)의 vdp_dataset_file을 씁니다
Show child attributes
Show child attributes
{ "rows": [ { "cols": [ { "id": "name", "value": { "text": "전 지 현" }, "shrink": true }, { "id": "title-role", "value": { "text": "최강미모" } } ] } ] }