受注伝票
プロパティ
プロパティ | 説明 |
---|---|
id | [読取専用] ID 受注伝票をユニークに識別するための数値です。主に、APIでのアクセスに使用します。受注コードとは異なります。 |
code | [必須] 受注コード |
parent_code | 親受注コード |
document_status | [読取専用] 伝票ステータス |
delivery_status | [読取専用] 配送ステータス |
incoming_payment_status | 入金ステータス |
authorization_status | 承認ステータス |
customer_code | 顧客コード |
buyer_name_1 | [必須] 購入者名(1) |
buyer_name_2 | 購入者名(2) |
buyer_name_kana_1 | 購入者名かな(1) |
buyer_name_kana_2 | 購入者名かな(2) |
buyer_country | 購入者 国 - デフォルトは JP |
buyer_post_code | 購入者 郵便番号 |
buyer_prefecture | 購入者 都道府県 |
buyer_address_1 | 購入者 住所1 |
buyer_address_2 | 購入者 住所2 |
buyer_address_3 | 購入者 住所3 |
buyer_phone | 購入者 電話番号 |
buyer_fax | 購入者 FAX番号 |
buyer_email | 購入者メールアドレス |
recipient_name_1 | [必須] お届け先名(1) |
recipient_name_2 | お届け先名(2) |
recipient_name_kana_1 | お届け先名かな(1) |
recipient_name_kana_2 | お届け先名かな(2) |
recipient_country | お届け先 国 - デフォルトは JP |
recipient_post_code | お届け先 郵便番号 |
recipient_prefecture | お届け先 都道府県 |
recipient_address1 | [必須] お届け先 住所1 |
recipient_address2 | お届け先 住所2 |
recipient_address3 | お届け先 住所3 |
recipient_phone | お届け先 電話番号 |
recipient_fax | お届け先 FAX番号 |
recipient_email | お届け先 メールアドレス |
use_point | ポイント利用 - デフォルトは 0 |
use_coupon | クーポン利用 - デフォルトは 0 |
delivery_fee | 送料 - デフォルトは 0 |
sundry_fee | その他手数料 - デフォルトは 0 |
discount | 値引き - デフォルトは 0 |
tax_processing_method | 税の計算順序 - デフォルトは マーチャントの設定 |
tax_rounding_method | 税の丸め - デフォルトは マーチャントの設定 |
document_tax_rate | 伝票の税率 - デフォルトは 0 |
payment_method | [必須] 支払方法 |
delivery_method | [必須] 配送方法 |
delivery_package_quantity | 梱包数 - デフォルトは 1 |
express_type | お急ぎ区分 |
delivery_temperature_control | 配送温度 - デフォルトは Normal |
scheduled_shipping_date | [登録時のみ - 出荷伝票に転記] 出荷予定日 - Y-m-d 形式 (例 : 2018-01-01 ) |
delivery_preferred_date | お届け希望日 - Y-m-d 形式 (例 : 2018-01-01 ) |
delivery_preferred_time_zone | お届け希望時間帯 |
is_isolated_area | 離島かどうか - 離島の場合は 1 |
delivery_tracking_number | 配送追跡番号 出荷伝票に登録された配送追跡番号のうち、1つを返却します。 |
buyer_comment | 購入者備考欄 |
merchant_comment | マーチャント備考欄 |
statement_notes | 納品書 特記事項 |
picking_notes | 出荷指示書 特記事項 |
way_bill_notes | 送り状 特記事項 |
gift | ギフトかどうか - ギフトの場合は 1 |
wrapping | ラッピング |
noshi | 熨斗 |
attr1 | フリー項目1 |
attr2 | フリー項目2 |
attr3 | フリー項目3 |
ordered_at | 注文日時 - Y-m-d H:i:s 形式 (例 : 2018-01-01 23:59:59 ) - デフォルトは現在時刻 |
lines | [必須] 明細行 - Linesのプロパティを参照 |
store | [必須] 店舗 - 店舗ID、または店舗コードで指定 |
warehouse | 出荷元倉庫 - 倉庫IDで指定 / 指定がない場合は店舗のデフォルトの出荷元倉庫を使用 |
cod_total | [登録時のみ - 出荷伝票に転記] 代金引換金額 - デフォルトは受注伝票の合計金額(通常は指定しません) |
lines
プロパティ | 説明 |
---|---|
id | [読取専用] ID 受注伝票明細行をユニークに識別するための数値です。主に、APIでのアクセスに使用します。 |
article_code | [必須] 商品コード |
article_name | [必須] 商品名 |
article_option | 明細行備考欄 |
price | 価格 - デフォルトは 0 |
quantity | 数量 |
tax_indicator | 税区分 - デフォルトは Included |
tax_rate | 税率 - デフォルトは 8 |
エンドポイント
受注伝票の一覧を取得
リクエスト
GET /api/v1/merchant/#{merchant_id}/sales_orders
パラメーター | 説明 |
---|---|
limit | 取得する結果の数 - デフォルトは 20 最大値は 100 |
page | ページ - デフォルトは 1 |
document_status | 伝票ステータス - 複数指定する場合はカンマ区切り |
delivery_status | 配送ステータス - 複数指定する場合はカンマ区切り |
incoming_payment_status | 入金ステータス - 複数指定する場合はカンマ区切り |
authorization_status | 承認ステータス - 複数指定する場合はカンマ区切り |
ordered_at_from | 注文日時(From) - Y-m-d H:i:s 形式 (例 : 2018-01-01 23:59:59 ) |
ordered_at_to | 注文日時(To) - Y-m-d H:i:s 形式 (例 : 2018-01-01 23:59:59 ) |
finished_at_from | 完了日時(From) - Y-m-d H:i:s 形式 (例 : 2018-01-01 23:59:59 ) |
finished_at_to | 完了日時(To) - Y-m-d H:i:s 形式 (例 : 2018-01-01 23:59:59 ) |
store | 店舗 - 店舗ID |
レスポンス
HTTP/1.1 200
{
"data":[
{
"id": "7621",
"code": "test-20180101-4",
"document_date": "2018-02-02",
"posting_date": "2018-02-02",
"status": "WaitingForAllocation",
"delivery_status": "WaitingForShipment",
"incoming_payment_status": "NotPaid",
"authorization_status": "Authorized",
"buyer_name1": "山田 太郎",
"buyer_country": "JP",
"recipient_name1": "山田 華子",
"recipient_country": "JP",
"recipient_post_code": "1700005",
"recipient_prefecture": "東京都",
"recipient_address1": "豊島区",
"recipient_address2": "南大塚3-36-7",
"recipient_address3": "南大塚T&Tビル 5F",
"subtotal": 1000,
"use_point": 0,
"discount": 0,
"delivery_fee": 0,
"sundry_fee": 0,
"tax_processing_method": "LineByLine",
"tax_rounding_method": "RoundOff",
"document_tax_rate": 8,
"tax_total": 0,
"payment_method": "credit_card_payment",
"delivery_method": "yamato",
"delivery_package_quantity": 1,
"delivery_temperature_control": "Normal",
"is_isolated_area": 0,
"gift": 0,
"waiting_for_confirmation": 1,
"shipping_confirmed": 0,
"is_multiple_deliveries": 0,
"total_quantity": 1,
"ordered_at": "2018-02-02 17:49:45",
"created_at": "2018-02-02 17:49:46",
"updated_at": "2018-02-02 17:49:46",
"lines":[
{
"id": 8837,
"status": "WaitingForAllocation",
"article_code": "article-1",
"article_name": "商品(1)"
}
]
}
],
"current_page": 1,
"limit": 20,
"total_count": 1
}
受注情報を登録
リクエスト
POST /api/v1/merchant/#{merchant_id}/sales_orders/new
{
"sales_order": {
"code":"test-20180101-1",
"buyer_name_1":"山田 太郎",
"recipient_name_1":"山田 華子",
"recipient_post_code":"170-0005",
"recipient_prefecture":"東京都",
"recipient_address1":"豊島区",
"recipient_address2":"南大塚3-36-7",
"recipient_address3":"南大塚T&Tビル 5F",
"payment_method":"credit_card_payment",
"delivery_method":"yamato",
"ordered_at":"2018-01-01 23:59:59",
"lines": [
{
"article_code":"article-1",
"article_name":"商品(1)",
"price":1000,
"quantity":1
}
],
"store": 51
}
}
レスポンス
HTTP/1.1 201 Created
{
"id": "7621",
"code": "test-20180101-4",
"document_date": "2018-02-02",
"posting_date": "2018-02-02",
"status": "WaitingForAllocation",
"delivery_status": "WaitingForShipment",
"incoming_payment_status": "NotPaid",
"authorization_status": "Authorized",
"buyer_name1": "山田 太郎",
"buyer_country": "JP",
"recipient_name1": "山田 華子",
"recipient_country": "JP",
"recipient_post_code": "1700005",
"recipient_prefecture": "東京都",
"recipient_address1": "豊島区",
"recipient_address2": "南大塚3-36-7",
"recipient_address3": "南大塚T&Tビル 5F",
"subtotal": 1000,
"use_point": 0,
"discount": 0,
"delivery_fee": 0,
"sundry_fee": 0,
"tax_processing_method": "LineByLine",
"tax_rounding_method": "RoundOff",
"document_tax_rate": 8,
"tax_total": 0,
"payment_method": "credit_card_payment",
"delivery_method": "yamato",
"delivery_package_quantity": 1,
"delivery_temperature_control": "Normal",
"is_isolated_area": 0,
"gift": 0,
"waiting_for_confirmation": 1,
"shipping_confirmed": 0,
"is_multiple_deliveries": 0,
"total_quantity": 1,
"ordered_at": "2018-02-02 17:49:45",
"created_at": "2018-02-02 17:49:46",
"updated_at": "2018-02-02 17:49:46",
"lines":[
{
"id": 8837,
"status": "WaitingForAllocation",
"article_code": "article-1",
"article_name": "商品(1)"
}
]
}