cURL
curl -X GET https://api.bizmori.com/api/v3/orders/ORDER_ID/reports/en-US \
-H "Authorization: Bearer YOUR_API_KEY"const orderId = 'ORDER_ID';
const locale = 'en-US';
const response = await fetch(`https://api.bizmori.com/api/v3/orders/${orderId}/reports/${locale}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const { data } = await response.json();
if (data.status === 'completed') window.location.href = data.download.url;
import requests
order_id = 'ORDER_ID'
locale = 'en-US'
response = requests.get(
f'https://api.bizmori.com/api/v3/orders/{order_id}/reports/{locale}',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()['data']
if data['status'] == 'completed':
pdf = requests.get(data['download']['url']).content
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bizmori.com/api/v3/orders/{orderId}/reports/{locale}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bizmori.com/api/v3/orders/{orderId}/reports/{locale}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bizmori.com/api/v3/orders/{orderId}/reports/{locale}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v3/orders/{orderId}/reports/{locale}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "1234567891",
"reportType": "watermarkDetection",
"locale": "en-US",
"status": "completed",
"download": {
"url": "https://s3.ap-northeast-2.amazonaws.com/...",
"expiresInSeconds": 300
},
"failure": null
}
}レポート
注文レポートを取得
レポートのステータスと、completed のときはダウンロード URL を取得します。作成リクエストのない locale は 404 REPORT_NOT_FOUND です。
download.url は呼び出すたびに新しく署名され、300 秒後に失効します。失効した URL はストレージが 403 を返し、更新できません。URL を保存せず、ユーザーがダウンロードを押したときにこの API を呼び出し、返された URL へすぐに移動してください。
注文の保管期限を過ぎると、レポートのステータスに関係なく 400 ORDER_EXPIRED を返します。
GET
/
api
/
v3
/
orders
/
{orderId}
/
reports
/
{locale}
cURL
curl -X GET https://api.bizmori.com/api/v3/orders/ORDER_ID/reports/en-US \
-H "Authorization: Bearer YOUR_API_KEY"const orderId = 'ORDER_ID';
const locale = 'en-US';
const response = await fetch(`https://api.bizmori.com/api/v3/orders/${orderId}/reports/${locale}`, {
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
});
const { data } = await response.json();
if (data.status === 'completed') window.location.href = data.download.url;
import requests
order_id = 'ORDER_ID'
locale = 'en-US'
response = requests.get(
f'https://api.bizmori.com/api/v3/orders/{order_id}/reports/{locale}',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()['data']
if data['status'] == 'completed':
pdf = requests.get(data['download']['url']).content
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bizmori.com/api/v3/orders/{orderId}/reports/{locale}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.bizmori.com/api/v3/orders/{orderId}/reports/{locale}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.bizmori.com/api/v3/orders/{orderId}/reports/{locale}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bizmori.com/api/v3/orders/{orderId}/reports/{locale}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"orderId": "1234567891",
"reportType": "watermarkDetection",
"locale": "en-US",
"status": "completed",
"download": {
"url": "https://s3.ap-northeast-2.amazonaws.com/...",
"expiresInSeconds": 300
},
"failure": null
}
}承認
外部クライアントアクセス用のBearer APIキー。本番キーは sk_ プレフィックスを使用し、テストキーは sk_test_ プレフィックスを使用して、処理やクレジット消費なしに注文ライフサイクルを検証します。
パスパラメータ
注文 ID
Pattern:
^[0-9]{1,20}$レポートの言語
利用可能なオプション:
ko-KR, en-US, ja-JP レスポンス
queued・processing・completed・failed 状態のレポート。download は completed のときだけ存在
Hide child attributes
Hide child attributes
注文 ID
BIZ MORI が注文の種類から決定
利用可能なオプション:
watermarkDetection, aiDetection 利用可能なオプション:
ko-KR, en-US, ja-JP レポートの作成ステータス
利用可能なオプション:
queued, processing, completed, failed ダウンロード情報。status が completed のときだけ存在