주문 가능 여부 확인
curl --request GET \
--url https://api.edicus.io/v2/projects/{project_id}/order/can_order \
--header 'edicus-api-key: <api-key>'import requests
url = "https://api.edicus.io/v2/projects/{project_id}/order/can_order"
headers = {"edicus-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'edicus-api-key': '<api-key>'}};
fetch('https://api.edicus.io/v2/projects/{project_id}/order/can_order', 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/can_order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"edicus-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.edicus.io/v2/projects/{project_id}/order/can_order"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("edicus-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.edicus.io/v2/projects/{project_id}/order/can_order")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edicus.io/v2/projects/{project_id}/order/can_order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"can_order": true,
"doc_rev": 3,
"status": "editing"
}주문
주문 가능 여부 확인
프로젝트가 주문 가능한 상태인지 알려줍니다. 사용자가 뒤로가기나 브라우저 강제 종료로 저장하지 못한 경우를 걸러내기 위한 것입니다.
서버는 문서 리비전이 0이 아닌지(doc_rev !== 0)로 판단합니다. 리비전이 기록되지 않은 프로젝트는 doc_rev가 null이고 can_order는 true입니다.
can_order가 false여도 오류가 아니라 200입니다. edicus-uid가 필요 없습니다.
GET
/
v2
/
projects
/
{project_id}
/
order
/
can_order
주문 가능 여부 확인
curl --request GET \
--url https://api.edicus.io/v2/projects/{project_id}/order/can_order \
--header 'edicus-api-key: <api-key>'import requests
url = "https://api.edicus.io/v2/projects/{project_id}/order/can_order"
headers = {"edicus-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'edicus-api-key': '<api-key>'}};
fetch('https://api.edicus.io/v2/projects/{project_id}/order/can_order', 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/can_order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"edicus-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.edicus.io/v2/projects/{project_id}/order/can_order"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("edicus-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.edicus.io/v2/projects/{project_id}/order/can_order")
.header("edicus-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.edicus.io/v2/projects/{project_id}/order/can_order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["edicus-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"can_order": true,
"doc_rev": 3,
"status": "editing"
}Authorizations
모션원에서 발급받는 API 키입니다. 외부에 유출되지 않도록 각별히 주의합니다.
Path Parameters
프로젝트 id
Minimum string length:
1