cURL
curl -X POST https://api.bizmori.com/api/v3/orders/ORDER_ID/reports \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locale": "en-US"
}'
const orderId = 'ORDER_ID';
const response = await fetch(`https://api.bizmori.com/api/v3/orders/${orderId}/reports`, {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"locale": "en-US"
})
});
const { data } = await response.json();
import requests
order_id = 'ORDER_ID'
response = requests.post(
f'https://api.bizmori.com/api/v3/orders/{order_id}/reports',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
"locale": "en-US"
}
)
data = response.json()['data']
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bizmori.com/api/v3/orders/{orderId}/reports",
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([
'locale' => 'en-US'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.bizmori.com/api/v3/orders/{orderId}/reports"
payload := strings.NewReader("{\n \"locale\": \"en-US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.bizmori.com/api/v3/orders/{orderId}/reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locale\": \"en-US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v3/orders/{orderId}/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locale\": \"en-US\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "<string>",
"reportType": "watermarkDetection",
"locale": "ko-KR",
"status": "queued",
"download": {
"url": "<string>",
"expiresInSeconds": 300
},
"failure": {
"code": "REPORT_GENERATION_FAILED",
"retryable": true
}
}
}
レポート
注文レポートを作成
注文の PDF 分析レポートを作成します。レポートの種類は BIZ MORI が注文の種類から決めるため、送信しません。
- v3 API で作成した watermark 抽出注文 →
watermarkDetection - AI Detection 注文 →
aiDetection
画像の watermark レポートは ko-KR、en-US、ja-JP、PDF の watermark レポートは ko-KR のみ対応します。同じ注文・locale を再度リクエストすると既存のレポートを返します。
レスポンス
202とqueued・processing: 作成中です。GET /api/v3/orders/{orderId}/reports/{locale}で照会してください200とcompleted: 作成済みのレポートで、downloadを含みます200とfailed: 作成に失敗し、再試行できません(failure.retryableがfalse)
watermark レポートの再試行
watermark レポートが failed の場合、同じ注文・locale で再度呼び出すと新しく作成します(202)。試行ごとに 1 クレジットを予約し、失敗した試行は返金され、成功した試行だけが差し引かれます。失敗が 3 回に達すると再作成しません。
注文の保管期限を過ぎると、レポートがあっても 400 ORDER_EXPIRED を返します。
POST
/
api
/
v3
/
orders
/
{orderId}
/
reports
cURL
curl -X POST https://api.bizmori.com/api/v3/orders/ORDER_ID/reports \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locale": "en-US"
}'
const orderId = 'ORDER_ID';
const response = await fetch(`https://api.bizmori.com/api/v3/orders/${orderId}/reports`, {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"locale": "en-US"
})
});
const { data } = await response.json();
import requests
order_id = 'ORDER_ID'
response = requests.post(
f'https://api.bizmori.com/api/v3/orders/{order_id}/reports',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
"locale": "en-US"
}
)
data = response.json()['data']
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bizmori.com/api/v3/orders/{orderId}/reports",
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([
'locale' => 'en-US'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.bizmori.com/api/v3/orders/{orderId}/reports"
payload := strings.NewReader("{\n \"locale\": \"en-US\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.bizmori.com/api/v3/orders/{orderId}/reports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"locale\": \"en-US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v3/orders/{orderId}/reports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locale\": \"en-US\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "<string>",
"reportType": "watermarkDetection",
"locale": "ko-KR",
"status": "queued",
"download": {
"url": "<string>",
"expiresInSeconds": 300
},
"failure": {
"code": "REPORT_GENERATION_FAILED",
"retryable": true
}
}
}
承認
外部クライアントアクセス用のBearer APIキー。本番キーは sk_ プレフィックスを使用し、テストキーは sk_test_ プレフィックスを使用して、処理やクレジット消費なしに注文ライフサイクルを検証します。
パスパラメータ
注文 ID
ボディ
application/json
レポートの言語。デフォルトは ko-KR
利用可能なオプション:
ko-KR, en-US, ja-JP レスポンス
作成済みのレポート、または再試行できない失敗レポート
Hide child attributes
Hide child attributes
注文 ID
BIZ MORI が注文の種類から決定
利用可能なオプション:
watermarkDetection, aiDetection 利用可能なオプション:
ko-KR, en-US, ja-JP レポートの作成ステータス
利用可能なオプション:
queued, processing, completed, failed ダウンロード情報。status が completed のときだけ存在