取引を作成
curl --request POST \
--url https://api.strixai.jp/v1/deals/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"properties": {
"name": "株式会社サンプル 新規導入",
"amount": 5000000,
"close_date": "2026-09-30",
"stage": "proposal"
}
}
'import requests
url = "https://api.strixai.jp/v1/deals/"
payload = { "properties": {
"name": "株式会社サンプル 新規導入",
"amount": 5000000,
"close_date": "2026-09-30",
"stage": "proposal"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
properties: {
name: '株式会社サンプル 新規導入',
amount: 5000000,
close_date: '2026-09-30',
stage: 'proposal'
}
})
};
fetch('https://api.strixai.jp/v1/deals/', 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.strixai.jp/v1/deals/",
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([
'properties' => [
'name' => '株式会社サンプル 新規導入',
'amount' => 5000000,
'close_date' => '2026-09-30',
'stage' => 'proposal'
]
]),
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.strixai.jp/v1/deals/"
payload := strings.NewReader("{\n \"properties\": {\n \"name\": \"株式会社サンプル 新規導入\",\n \"amount\": 5000000,\n \"close_date\": \"2026-09-30\",\n \"stage\": \"proposal\"\n }\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.strixai.jp/v1/deals/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"properties\": {\n \"name\": \"株式会社サンプル 新規導入\",\n \"amount\": 5000000,\n \"close_date\": \"2026-09-30\",\n \"stage\": \"proposal\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strixai.jp/v1/deals/")
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 \"properties\": {\n \"name\": \"株式会社サンプル 新規導入\",\n \"amount\": 5000000,\n \"close_date\": \"2026-09-30\",\n \"stage\": \"proposal\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "Rb7XkQpYz3Lh9vMs2N",
"properties": {
"name": "株式会社サンプル 新規導入",
"amount": 5000000,
"close_date": "2026-09-30",
"stage": "proposal",
"account_id": "Ac7XkQpYz3Lh9vMs2N",
"account_name": "株式会社サンプル",
"account_restricted": false,
"owner_id": "Us7XkQpYz3Lh9vMs2N",
"owner_name": "山田 太郎",
"stage_label": "提案",
"stage_category": "open",
"product_name": "商材A",
"latest_score": "38/50",
"latest_score_rank": "B"
},
"created_at": "2026-06-01T09:00:00Z",
"updated_at": "2026-06-12T05:40:00Z"
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}Deals
取引を作成
新しい取引を作成する。レスポンスの id(record_id)を保存し、以降の参照・更新に使う。
POST
/
v1
/
deals
/
取引を作成
curl --request POST \
--url https://api.strixai.jp/v1/deals/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"properties": {
"name": "株式会社サンプル 新規導入",
"amount": 5000000,
"close_date": "2026-09-30",
"stage": "proposal"
}
}
'import requests
url = "https://api.strixai.jp/v1/deals/"
payload = { "properties": {
"name": "株式会社サンプル 新規導入",
"amount": 5000000,
"close_date": "2026-09-30",
"stage": "proposal"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
properties: {
name: '株式会社サンプル 新規導入',
amount: 5000000,
close_date: '2026-09-30',
stage: 'proposal'
}
})
};
fetch('https://api.strixai.jp/v1/deals/', 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.strixai.jp/v1/deals/",
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([
'properties' => [
'name' => '株式会社サンプル 新規導入',
'amount' => 5000000,
'close_date' => '2026-09-30',
'stage' => 'proposal'
]
]),
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.strixai.jp/v1/deals/"
payload := strings.NewReader("{\n \"properties\": {\n \"name\": \"株式会社サンプル 新規導入\",\n \"amount\": 5000000,\n \"close_date\": \"2026-09-30\",\n \"stage\": \"proposal\"\n }\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.strixai.jp/v1/deals/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"properties\": {\n \"name\": \"株式会社サンプル 新規導入\",\n \"amount\": 5000000,\n \"close_date\": \"2026-09-30\",\n \"stage\": \"proposal\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.strixai.jp/v1/deals/")
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 \"properties\": {\n \"name\": \"株式会社サンプル 新規導入\",\n \"amount\": 5000000,\n \"close_date\": \"2026-09-30\",\n \"stage\": \"proposal\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "Rb7XkQpYz3Lh9vMs2N",
"properties": {
"name": "株式会社サンプル 新規導入",
"amount": 5000000,
"close_date": "2026-09-30",
"stage": "proposal",
"account_id": "Ac7XkQpYz3Lh9vMs2N",
"account_name": "株式会社サンプル",
"account_restricted": false,
"owner_id": "Us7XkQpYz3Lh9vMs2N",
"owner_name": "山田 太郎",
"stage_label": "提案",
"stage_category": "open",
"product_name": "商材A",
"latest_score": "38/50",
"latest_score_rank": "B"
},
"created_at": "2026-06-01T09:00:00Z",
"updated_at": "2026-06-12T05:40:00Z"
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}{
"error": {
"code": "validation_error",
"message": "リクエストの検証に失敗しました。",
"fields": [
{
"name": "properties.name",
"code": "required",
"message": "この項目は必須です。"
}
]
}
}承認
ボディ
application/json
レスポンス
作成成功
取引(Deal)レコード
取引のプロパティ集合。name は必須。
amount/close_date/stage 等のコアフィールドと、組織別カスタムプロパティが
同じ namespace で扱われる。
リレーションは record_id 文字列で表す。
account_id— 商談先の会社(Account)owner_id— 担当ユーザー(User)。GET /v1/users/で解決する 一覧画面・CSV と同じ項目を読み取り専用で返す(GET /properties/のis_read_only)。作成・更新で指定すると 400。stage_label/stage_category—stageのラベル(一覧画面・CSV の表示)と区分(open/won/lost)。stageの値は選択肢の作成時に決まりラベルだけ変えられるため、値が意味と食い違うことがある(例: 値closed_wonのラベルが「No Opportunity」で区分がlost)。未設定や選択肢に無い値では nullproduct_name— 商材名。商材名で絞り込めるlatest_score/latest_score_rank— 最新の完了スコア(38/50の形)とランク。スコアがなければ nullaccount_name/account_restricted— 会社名。閲覧できない会社は null でaccount_restrictedが trueowner_name/created_by_name— 一覧と同じ表示名。組織を離れたメンバーは固定のラベルになるcontact_ids— 閲覧できるコンタクトの record_id の配列activity_count/last_activity_at— アクティビティの件数と最終日時pathway_*— 受注確率とヘルス。Pathway が有効な組織にのみ存在する<source_type>_<api_name>— SFA 由来のプロパティ(例:hubspot_J08UB0D3)
Show child attributes
Show child attributes