コンテンツにスキップ

荷主取得

GET
/shippers/{shipper_id}
curl --request GET \
--url 'https://api.smaregi.dev/TARGET-CONTRACT-ID/ec-oms/shippers/example?fields=shipperId%2CcompanyName' \
--header 'Authorization: Bearer <token>'

荷主を取得します。

shipper_id
required
string
>= 1 characters

荷主ID

fields
Array<string>
>= 1 items unique items
Allowed values: shipperId companyName companyKana

取得するフィールドをカンマ区切りで指定します。 指定がない場合すべてのフィールドを取得します。

Example
?fields=shipperId,companyName

取得成功

Media typeapplication/json
Shipper
object
shipperId

荷主ID

string
>= 1 characters <= 9 characters
companyName

荷主名

string
nullable >= 1 characters <= 50 characters
companyKana

荷主名カナ

string
nullable >= 1 characters <= 50 characters
Examples
Exampledefault
{
"shipperId": "1",
"companyName": "テスト荷主",
"companyKana": "テストニヌシ"
}

Fieldsに指定外の値が設定されている場合

Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
status
integer
Examples
Examplefieldsに指定外の値が設定されている場合
{
"type": "about:blank",
"title": "BadRequest",
"detail": "指定されたfields項目が不正です: {invalid_field}",
"status": 400
}

指定されたIDのリソースが存在しない場合

Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
status
integer
Examples
Example指定したリソースが存在しない場合
{
"type": "about:blank",
"title": "NotFound",
"detail": "指定されたIDのリソースが見つかりません",
"status": 404
}

サーバー内部エラー

Media typeapplication/json
object
type
required
string
title
required
string
detail
One of:
string
status
integer
Examples
Exampledefault
{
"type": "about:blank",
"title": "InternalServerError",
"status": 500
}