Info
Welcome to the generated API reference. Get Postman Collection
0. User
APIs for users
Retrieve information of login user
ログインユーザーの情報を取得します。
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/user/me" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/user/me"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"response": {
"id": 1,
"role": 1,
"name": "Administrator",
"email": "admin@xplus.co.jp",
"email_verified_at": null,
"created_at": "2020-04-13 15:39:22",
"updated_at": "2020-04-13 15:39:22"
},
"extra": []
}
HTTP Request
GET api/user/me
Update information of login user
ログインユーザーの情報を更新します。
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/api/user/me" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"odio","email":"sint"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/user/me"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "odio",
"email": "sint"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"response": {
"id": 1,
"role": 1,
"name": "Administrator",
"email": "admin@xplus.co.jp",
"email_verified_at": null,
"created_at": "2020-04-13 15:39:22",
"updated_at": "2020-04-13 15:39:22"
},
"extra": []
}
HTTP Request
PUT api/user/me
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | optional | ユーザー名 |
email |
string | optional | メールアドレス |
Retrieve whether login user can approve or not
ログインユーザーが承認権限を持っているかどうかを返します。
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/user/can/approve" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/user/can/approve"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"response": true,
"extra": []
}
HTTP Request
GET api/user/can/approve
1. Project
企画(Project)のAPIです。
List projects
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/project?n=20&page=1&trashed=esse&draft=voluptas&factory=1&name=%E3%83%94%E3%82%AB%E3%83%81%E3%83%A5%E3%82%A6&memo=%E3%83%A1%E3%83%A2&exf_at=2020&sculpt_first_at=similique&sculpt_duplication_decomaster_at=sit&decomaster_at=2020-04&sculpt_production_at=error&estimated_at=qui&order_started_at=sed&order_ended_at=modi&sample_molding_at=facilis&sample_decoration_at=debitis&sample_production_at=tenetur&sample_shipping_at=nobis&created_at=nemo&updated_at=iste&deleted_at=et" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project"
);
let params = {
"n": "20",
"page": "1",
"trashed": "esse",
"draft": "voluptas",
"factory": "1",
"name": "ピカチュウ",
"memo": "メモ",
"exf_at": "2020",
"sculpt_first_at": "similique",
"sculpt_duplication_decomaster_at": "sit",
"decomaster_at": "2020-04",
"sculpt_production_at": "error",
"estimated_at": "qui",
"order_started_at": "sed",
"order_ended_at": "modi",
"sample_molding_at": "facilis",
"sample_decoration_at": "debitis",
"sample_production_at": "tenetur",
"sample_shipping_at": "nobis",
"created_at": "nemo",
"updated_at": "iste",
"deleted_at": "et",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/project
Query Parameters
Parameter | Status | Description |
---|---|---|
n |
optional | int 1ページあたりの取得数。設定しない場合は全てのレコードを取得する |
page |
optional | int 取得ページ |
trashed |
optional | int 1で削除済レコードも取得。初期値は0 |
draft |
optional | int 1で未承認の商品を含む企画のみ抽出 |
factory |
optional | int 工場IDで検索 |
name |
optional | string 企画名をlike検索 スペース区切りで OR検索 |
memo |
optional | string メモをlike検索 スペース区切りでOR検索 |
exf_at |
optional | datetime 日付を年/月/日単位で検索 |
sculpt_first_at |
optional | datetime 日付を年/月/日単位で検索 |
sculpt_duplication_decomaster_at |
optional | datetime 日付を年/月/日単位で検索 |
decomaster_at |
optional | datetime 日付を年/月/日単位で検索 |
sculpt_production_at |
optional | datetime 日付を年/月/日単位で検索 |
estimated_at |
optional | datetime 日付を年/月/日単位で検索 |
order_started_at |
optional | datetime 日付を年/月/日単位で検索 |
order_ended_at |
optional | datetime 日付を年/月/日単位で検索 |
sample_molding_at |
optional | datetime 日付を年/月/日単位で検索 |
sample_decoration_at |
optional | datetime 日付を年/月/日単位で検索 |
sample_production_at |
optional | datetime 日付を年/月/日単位で検索 |
sample_shipping_at |
optional | datetime 日付を年/月/日単位で検索 |
created_at |
optional | datetime 日付を年/月/日単位で検索 |
updated_at |
optional | datetime 日付を年/月/日単位で検索 |
deleted_at |
optional | datetime 日付を年/月/日単位で検索 |
Create a project
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/project" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"\u30a6\u30eb\u30c8\u30e9\u30bb\u30d6\u30f3\u98db\u884c\u30dd\u30fc\u30ba"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "\u30a6\u30eb\u30c8\u30e9\u30bb\u30d6\u30f3\u98db\u884c\u30dd\u30fc\u30ba"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/project
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
required | optional | 企画名 |
Retrieve a project
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/project/1?trashed=0" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project/1"
);
let params = {
"trashed": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/project/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 取得したい企画のID |
Query Parameters
Parameter | Status | Description |
---|---|---|
trashed |
optional | 1で削除済みレコードも取得。初期値は0 |
Update a project
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/api/project/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/project/{id}
PATCH api/project/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 取得したい企画のID |
Remove a project
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/project/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/project/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 取得したい企画のID |
List attributes of project
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/project/keys" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project/keys"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/project/keys
Add an image of project
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/project/1/image" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"image":"nam"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project/1/image"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image": "nam"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/project/{id}/image
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 対象商品のID |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
image |
file | required | 登録する画像ファイル |
Remove an image of project
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/project/1/image" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"image_id":7}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/project/1/image"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image_id": 7
}
fetch(url, {
method: "DELETE",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/project/{id}/image
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 対象商品のID |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
image_id |
integer | required | 画像ID |
2. Product
APIs for products
List products
商品一覧を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/product?n=20&page=1&trashed=0&draft=1&factory=1&name=%E3%83%94%E3%82%AB%E3%83%81%E3%83%A5%E3%82%A6&memo=%E3%83%A1%E3%83%A2&approved_at=2020-07&licensor_approved_at=2020-07&sold_at=2020-07&created_at=2020-07&updated_at=2020-07&deleted_at=2020-07" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product"
);
let params = {
"n": "20",
"page": "1",
"trashed": "0",
"draft": "1",
"factory": "1",
"name": "ピカチュウ",
"memo": "メモ",
"approved_at": "2020-07",
"licensor_approved_at": "2020-07",
"sold_at": "2020-07",
"created_at": "2020-07",
"updated_at": "2020-07",
"deleted_at": "2020-07",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"response": [
{
"id": 1,
"name": "ピカチュウ2001 少年リック(越境) 限定",
"account": {
"id": 1,
"name": "怪獣",
"code": "411"
},
"project": {
"id": 1
},
"warehouse": {
"id": 4,
"name": "ハマキョウレックス",
"alias": "H",
"status": 1,
"cost_base": 26400
},
"status": 2,
"jan": {
"id": 2,
"code": "4532149018890",
"series": "デフォリアル",
"product_name": "ピカチュウ2001 少年リック(越境) 限定",
"style_number": "411-PDJW07R",
"sold_at": "2020-07-01 00:00:00",
"remarks": ""
},
"style_number": {
"id": 1,
"code": "411-PDJW07R"
},
"version": {
"id": 2,
"name": "限定",
"alias": "R"
},
"qty": 950,
"qty_actual": 60,
"purchase_price": 68.02,
"purchase_price_actual": 54.93,
"retail_price": 77500,
"route": {
"id": 2,
"name": "少年リック(越境)",
"alias": "R",
"type": 1,
"ratio": 100,
"ratio_expense": 4
},
"route_price_ratio": 80,
"route_price_ratio_offset": 15,
"shipping_price_ratio": null,
"shipping_price_ratio_offset": 3,
"approved_at": "2020-02-25",
"package_designer": [],
"cost_package_design": 82794,
"cost_pb_advertising": 1092,
"cost_ec_payment_fee": 400,
"cost_domestic_process": 60805,
"licensor": {
"id": 2,
"name": "PLEX(東宝ギガンティック,RMC)",
"alias": "P",
"loyalty_for": 1,
"loyalty_ratio": 9,
"sample_qty_normal": 0,
"sample_qty_limited": 4
},
"licensor_loyality_for": null,
"licensor_loyality_ratio": null,
"licensor_sample_qty": 6,
"licensor_approval": 6,
"licensor_approved_at": "2020-03-14",
"sold_at": "2020-07-01",
"memo": null,
"created_at": "2020-03-17",
"updated_at": "2020-03-17",
"deleted_at": null,
"images": []
}
],
"extra": {
"count": 56,
"total": 56,
"currentPage": 1,
"perPage": 56,
"lastPage": 1
}
}
HTTP Request
GET api/product
Query Parameters
Parameter | Status | Description |
---|---|---|
n |
optional | 1ページあたりの取得数。設定しない場合は全てのレコードを取得する |
page |
optional | 取得ページ |
trashed |
optional | 削除済レコード取得フラグ。0:取得しない(初期値), 1:取得する |
draft |
optional | 未承認フラグ。0:すべて(初期値), 1:未承認商品のみ |
factory |
optional | 工場IDで検索 |
name |
optional | 企画名をlike検索 スペース区切りでAND検索 |
memo |
optional | メモをlike検索 スペース区切りでAND検索 |
approved_at |
optional | 日付を年/月/日単位で検索 |
licensor_approved_at |
optional | 日付を年/月/日単位で検索 |
sold_at |
optional | 日付を年/月/日単位で検索 |
created_at |
optional | 日付を年/月/日単位で検索 |
updated_at |
optional | 日付を年/月/日単位で検索 |
deleted_at |
optional | 日付を年/月/日単位で検索 |
Create a product
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/product" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"ipsum","status":12,"project_id":9,"account_id":16,"warehouse_id":7,"version_id":15,"qty":3,"qty_actual":11,"purchase_price":3048180.47,"purchase_price_actual":115.867229,"retail_price":18,"route_id":17,"route_price_ratio":4.8341,"route_price_ratio_offset":416.2314679,"shipping_price":11,"shipping_price_ratio_offset":10.00976,"approved_at":"aut","package_designer_id":8,"cost_package_design":14,"cost_pb_advertising":609.5366954,"cost_ec_payment_fee":8529562.37,"cost_domestic_process":9,"licensor_id":20,"licensor_loyality_for":20,"licensor_loyality_ratio":59574948,"licensor_sample_qty":15,"licensor_approval":20,"licensor_approved_at":"magnam","sold_at":"reprehenderit","memo":"maxime"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "ipsum",
"status": 12,
"project_id": 9,
"account_id": 16,
"warehouse_id": 7,
"version_id": 15,
"qty": 3,
"qty_actual": 11,
"purchase_price": 3048180.47,
"purchase_price_actual": 115.867229,
"retail_price": 18,
"route_id": 17,
"route_price_ratio": 4.8341,
"route_price_ratio_offset": 416.2314679,
"shipping_price": 11,
"shipping_price_ratio_offset": 10.00976,
"approved_at": "aut",
"package_designer_id": 8,
"cost_package_design": 14,
"cost_pb_advertising": 609.5366954,
"cost_ec_payment_fee": 8529562.37,
"cost_domestic_process": 9,
"licensor_id": 20,
"licensor_loyality_for": 20,
"licensor_loyality_ratio": 59574948,
"licensor_sample_qty": 15,
"licensor_approval": 20,
"licensor_approved_at": "magnam",
"sold_at": "reprehenderit",
"memo": "maxime"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/product
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name |
string | optional | 商品名 |
status |
integer | optional | ステータス 0:有効(初期値), 1:パラレル, 2:ドロップ |
project_id |
integer | required | 企画ID |
account_id |
integer | required | 営業アカウントID |
warehouse_id |
integer | required | 倉庫ID |
version_id |
integer | required | バージョンID 1:一般, 2:限定 |
qty |
integer | optional | 計画数 |
qty_actual |
integer | optional | 実績数 |
purchase_price |
float | optional | 予測仕入単価 ($) |
purchase_price_actual |
float | optional | 実績仕入単価 ($) |
retail_price |
integer | optional | 上代 |
route_id |
integer | required | 売先ID |
route_price_ratio |
float | optional | 売先 掛け率 |
route_price_ratio_offset |
float | optional | 売先 相殺経費 |
shipping_price |
integer | optional | 送料売上 |
shipping_price_ratio_offset |
float | optional | 送料相殺経費 ※上代対比 |
approved_at |
datetime | optional | 承認日 |
package_designer_id |
integer | optional | パッケージデザイナーID |
cost_package_design |
integer | optional | PKGデザイン |
cost_pb_advertising |
float | optional | PB広告費率 |
cost_ec_payment_fee |
float | optional | EC決済手数料率 |
cost_domestic_process |
integer | optional | 国内加工費 |
licensor_id |
integer | optional | ライセンサーID |
licensor_loyality_for |
integer | optional | ロイヤリティ対象 0:なし(初期値), 1:上代, 2:FOB |
licensor_loyality_ratio |
float | optional | ロイヤリティ率 |
licensor_sample_qty |
integer | optional | サンプル提出数 |
licensor_approval |
integer | optional | 企画申請 |
licensor_approved_at |
datetime | optional | 企画申請承認日 |
sold_at |
datetime | optional | 売上予定年月 |
memo |
text | optional | メモ |
Retrieve a product
商品情報を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/product/1?trashed=qui" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product/1"
);
let params = {
"trashed": "qui",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/product/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 取得したい商品のID |
Query Parameters
Parameter | Status | Description |
---|---|---|
trashed |
optional | int 1で削除済みレコードも取得。初期値は0 |
Update a product
商品を更新する
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/api/product/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/product/{id}
PATCH api/product/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 取得したい商品のID |
Remove a product
商品を削除する
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/product/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/product/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 取得したい商品のID |
List attributes of product
商品の属性一覧を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/product/keys" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product/keys"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"response": [
"account",
"warehouse",
"status",
"jan",
"style_number",
"version",
"qty",
"qty_actual",
"purchase_price",
"purchase_price_actual",
"retail_price",
"route",
"route_price_ratio",
"route_price_ratio_offset",
"shipping_price",
"shipping_price_ratio_offset",
"approved_at",
"pkg_designer",
"cost_package_design",
"cost_pb_advertising",
"cost_ec_payment_fee",
"cost_domestic_process",
"licensor",
"licensor_loyalty_for",
"licensor_loyalty_ratio",
"licensor_sample_qty",
"licensor_approval",
"licensor_approved_at",
"sold_at",
"memo"
],
"extra": []
}
HTTP Request
GET api/product/keys
api/product/{id}/second
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/product/1/second" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product/1/second"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/product/{id}/second
Add an image of product
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/product/consequatur/image" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"image":"eos"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product/consequatur/image"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image": "eos"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/product/{id}/image
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 商品ID |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
image |
file | required | 登録する画像ファイル |
Remove an image of product
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/product/possimus/image" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"image_id":16}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/product/possimus/image"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"image_id": 16
}
fetch(url, {
method: "DELETE",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/product/{id}/image
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 商品ID |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
image_id |
integer | required | 画像ID |
3. Contract
APIs for contracts
List contracts
成約一覧を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/contract" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/contract
Create a contract
成約を新規作成する
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/contract" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/contract
Retrieve a contract
成約詳細を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/contract/amet" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract/amet"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (404):
{
"message": ""
}
HTTP Request
GET api/contract/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 成約ID |
Update a contract
成約を更新する
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/api/contract/harum" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract/harum"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/contract/{id}
PATCH api/contract/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 成約ID |
Remove a contract
成約を削除する
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/contract/eos" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract/eos"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/contract/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 成約ID |
Retrieve export data of contracts
成約のCSVエクスポート用情報を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/contract/porro/export" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract/porro/export"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (404):
{
"message": ""
}
HTTP Request
GET api/contract/{id}/export
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 成約ID |
Simulate a contract and shipments
商品から成約、輸送をシミュレートする
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/contract/simulate" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"products":"{\"products\": [{\"id\": 15,\"qty\": 600},{\"id\": 16,\"qty\": 300}]}"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract/simulate"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"products": "{\"products\": [{\"id\": 15,\"qty\": 600},{\"id\": 16,\"qty\": 300}]}"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/contract/simulate
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
products |
string | required | JSON形式 |
Resimulate a contract and shipments
商品と数量から成約、輸送を再計算する
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/contract/resimulate" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"shipments":"{\"shipments\": {\"type\": 1,\"warehouse\": 2,\"products\": [{\"id\": 15,\"qty\": 600},{\"id\": 16,\"qty\": 300}]}}"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract/resimulate"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"shipments": "{\"shipments\": {\"type\": 1,\"warehouse\": 2,\"products\": [{\"id\": 15,\"qty\": 600},{\"id\": 16,\"qty\": 300}]}}"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/contract/resimulate
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
shipments |
string | required | JSON形式 |
Save simulated result
シミュレート結果を登録する。入力値はsimulate, resimulateのレスポンスでerrorsを除いたもの
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/contract/create" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"status":11,"month":"repudiandae","summary":"voluptatem","shipments":"in"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/contract/create"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"status": 11,
"month": "repudiandae",
"summary": "voluptatem",
"shipments": "in"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/contract/create
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
status |
integer | required | ステータス |
month |
string | required | 成約月:yyyy-mm |
summary |
string | required | JSON形式:成約情報のサマリー情報 |
shipments |
string | required | JSON形式:成約に含まれる輸送情報 |
4. Shipment
APIs for shipments
List shipments
輸送一覧を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/shipment" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/shipment"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/shipment
Create a shipment
輸送を新規作成する
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/shipment" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/shipment"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/shipment
Retrieve a shipment
輸送詳細を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/shipment/atque" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/shipment/atque"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (404):
{
"message": ""
}
HTTP Request
GET api/shipment/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 輸送ID |
Update a shipment
輸送を更新する
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/api/shipment/delectus" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/shipment/delectus"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/shipment/{id}
PATCH api/shipment/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 輸送ID |
Remove a shipment
輸送を削除する
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/shipment/a" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/shipment/a"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/shipment/{id}
URL Parameters
Parameter | Status | Description |
---|---|---|
id |
required | 輸送ID |
Get warehouses for devanning
デバンニングする倉庫業者候補を取得する(ただし、第三国取引の場合は不要な場合もある)
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/shipment/warehouses" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/shipment/warehouses"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/shipment/warehouses
5. Master Table
APIs for master tables
List records of specific master table
指定テーブルのレコード一覧を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/master/10" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/master/10"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/master/{table}
URL Parameters
Parameter | Status | Description |
---|---|---|
table |
required | charge, sculptor, factory, warehouse, route, licensor, agent, package_designer, photographer, series, box_size, package_size, duty, account |
Create a record of specific master table
指定テーブルのレコードを新規作成する
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/master/6" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/master/6"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/master/{table}
URL Parameters
Parameter | Status | Description |
---|---|---|
table |
required | charge, sculptor, factory, warehouse, route, licensor, agent, package_designer, photographer, series, box_size, package_size, duty, account |
Retrieve a record of specific master table
指定テーブルのレコード情報を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/master/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/master/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/master/{table}/{id}
Update a record of specific master table
指定テーブルのレコード情報を更新する
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/api/master/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/master/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/master/{table}/{id}
Remove a record of specific master table
指定テーブルのレコードを削除する
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/master/1/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/master/1/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/master/{table}/{id}
6. Management
APIs to manage JAN / Style number / Exchange rate
List JAN codes
JAN一覧を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/management/jan" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/management/jan"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/management/jan
List style numbers
品番一覧を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/management/style_number?=itaque" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/management/style_number"
);
let params = {
"": "itaque",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/management/style_number
Query Parameters
Parameter | Status | Description |
---|---|---|
`` | optional |
Retrieve Exchange rate
為替レートを取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/management/exchange/usd/jpy" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/management/exchange/usd/jpy"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"response": {
"TT": 111.45,
"TTS": 113,
"TTSM": 118
},
"extra": []
}
HTTP Request
GET api/management/exchange/{base}/{target}
URL Parameters
Parameter | Status | Description |
---|---|---|
base |
required | 為替レートのベースとなる通貨 |
target |
required | 為替レートを取得する通貨 |
7. Sales History
Class SalesHistoryController
Retrieve sales history of a year
特定年(12ヶ月)の売上計画実績を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/history/2020" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/history/2020"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/history/{year}
URL Parameters
Parameter | Status | Description |
---|---|---|
year |
required | 対象年(4桁) |
Update sales history of a year
特定年(12ヶ月)の売上計画実績を上書き更新(作成)する
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/history/2020" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"data":"{\"1\":{\"planned\":9000000,\"actual\":12500000,\"memo\":\"\u30b4\u30b8\u30e9\u7e70\u308a\u4e0b\u3052\"},\"2\":...}"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/history/2020"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"data": "{\"1\":{\"planned\":9000000,\"actual\":12500000,\"memo\":\"\u30b4\u30b8\u30e9\u7e70\u308a\u4e0b\u3052\"},\"2\":...}"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/history/{year}
URL Parameters
Parameter | Status | Description |
---|---|---|
year |
required | 対象年(4桁) |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
data |
string | required | JSON形式で月ごとの計画/実績/メモを入力 |
Retrieve sales history of a month
特定月の売上計画実績を取得する
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/history/2020/06" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/history/2020/06"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/history/{year}/{month}
URL Parameters
Parameter | Status | Description |
---|---|---|
year |
required | 対象年(4桁) |
month |
required | 対象月(2桁) |
Update sales history of a month
特定月の売上計画実績を上書き更新(作成)する
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/history/2020/06" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"data":"{\"planned\":9000000,\"actual\":12500000,\"memo\":\"\u30b4\u30b8\u30e9\u7e70\u308a\u4e0b\u3052\"}"}'
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/history/2020/06"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"data": "{\"planned\":9000000,\"actual\":12500000,\"memo\":\"\u30b4\u30b8\u30e9\u7e70\u308a\u4e0b\u3052\"}"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/history/{year}/{month}
URL Parameters
Parameter | Status | Description |
---|---|---|
year |
required | 対象年(4桁) |
month |
required | 対象月(2桁) |
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
data |
string | required | JSON形式で月ごとの計画/実績/メモを入力 |
general
Authorize a client to access the user's account.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/authorize
Approve the authorization request.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/authorize
Deny the authorization request.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/authorize
Authorize a client to access the user's account.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/oauth/token" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/token"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/token
Get all of the authorized tokens for the authenticated user.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/oauth/tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/tokens
Delete the given token.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/oauth/tokens/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/tokens/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/tokens/{token_id}
Get a fresh transient token cookie for the authenticated user.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/oauth/token/refresh" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/token/refresh"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/token/refresh
Get all of the clients for the authenticated user.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/oauth/clients" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/clients"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/clients
Store a new client.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/oauth/clients" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/clients"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/clients
Update the given client.
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/oauth/clients/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/clients/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT oauth/clients/{client_id}
Delete the given client.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/oauth/clients/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/clients/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/clients/{client_id}
Get all of the available scopes for the application.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/oauth/scopes" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/scopes"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/scopes
Get all of the personal access tokens for the authenticated user.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/oauth/personal-access-tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/personal-access-tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET oauth/personal-access-tokens
Create a new personal access token for the user.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/oauth/personal-access-tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/personal-access-tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST oauth/personal-access-tokens
Delete the given token.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/oauth/personal-access-tokens/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/oauth/personal-access-tokens/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE oauth/personal-access-tokens/{token_id}
api
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET api
api/test/{id}
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/test/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/test/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"success": true,
"response": {
"id": "1",
"method": "GET"
},
"extra": []
}
HTTP Request
GET api/test/{id}
POST api/test/{id}
PUT api/test/{id}
DELETE api/test/{id}
OPTIONS api/test/{id}
api/logout
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/logout" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/logout"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/logout
Authorize a client to access the user's account.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/oauth/authorize
Approve the authorization request.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/oauth/authorize
Deny the authorization request.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/oauth/authorize" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/authorize"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/oauth/authorize
Authorize a client to access the user's account.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/oauth/token" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/token"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/oauth/token
Get all of the authorized tokens for the authenticated user.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/oauth/tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/oauth/tokens
Delete the given token.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/oauth/tokens/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/tokens/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/oauth/tokens/{token_id}
Get a fresh transient token cookie for the authenticated user.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/oauth/token/refresh" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/token/refresh"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/oauth/token/refresh
Get all of the clients for the authenticated user.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/oauth/clients" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/clients"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/oauth/clients
Store a new client.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/oauth/clients" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/clients"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/oauth/clients
Update the given client.
Example request:
curl -X PUT \
"https://api.sachiko.xplus.co.jp/api/oauth/clients/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/clients/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
PUT api/oauth/clients/{client_id}
Delete the given client.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/oauth/clients/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/clients/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/oauth/clients/{client_id}
Get all of the available scopes for the application.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/oauth/scopes" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/scopes"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/oauth/scopes
Get all of the personal access tokens for the authenticated user.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/api/oauth/personal-access-tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/personal-access-tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET api/oauth/personal-access-tokens
Create a new personal access token for the user.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/api/oauth/personal-access-tokens" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/personal-access-tokens"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/oauth/personal-access-tokens
Delete the given token.
Example request:
curl -X DELETE \
"https://api.sachiko.xplus.co.jp/api/oauth/personal-access-tokens/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/api/oauth/personal-access-tokens/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/oauth/personal-access-tokens/{token_id}
Show the application dashboard.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (302):
null
HTTP Request
GET /
Show the application's login form.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET login
Handle a login request to the application.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/login" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/login"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST login
Log the user out of the application.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/logout" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/logout"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST logout
Show the application registration form.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET register
Handle a registration request for the application.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/register" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/register"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST register
Display the form to request a password reset link.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/password/reset" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/password/reset"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET password/reset
Send a reset link to the given user.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/password/email" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/password/email"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST password/email
Display the password reset view for the given token.
If no token is present, display the link request form.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/password/reset/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/password/reset/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
null
HTTP Request
GET password/reset/{token}
Reset the given user's password.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/password/reset" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/password/reset"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST password/reset
Display the password confirmation view.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/password/confirm" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/password/confirm"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET password/confirm
Confirm the given user's password.
Example request:
curl -X POST \
"https://api.sachiko.xplus.co.jp/password/confirm" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/password/confirm"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST password/confirm
Show the application dashboard.
Example request:
curl -X GET \
-G "https://api.sachiko.xplus.co.jp/home" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.sachiko.xplus.co.jp/home"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (401):
{
"message": "Unauthenticated."
}
HTTP Request
GET home