GET /bas_cases
bas_case:index
なし
5 rps
key | 説明 | 制約など |
---|---|---|
ids | ケースID | 整数のみ、カンマ区切りで複数指定可能 |
codes | ケースコード | カンマ区切りで複数指定可能 |
statuses | ステータス | カンマ区切りで複数指定可能 |
created_at_from | 作成日から | 2024-04-12 12:08:38 形式 |
created_at_to | 作成日まで | 同上 |
updated_at_from | 更新日から | 同上 |
updated_at_to | 更新日まで | 同上 |
done_at_from | 完了日から | 同上 |
done_at_to | 完了日まで | 同上 |
page | ページ | 整数のみ、デフォルト:1 |
limit | 1ページあたりの件数 | 整数のみ、デフォルト:50、最大: 250 |
cursor | ページカーソル | - |
GET /bas_cases?codes=BS230905MA72
[
{
"id": 245,
"code": "BS230905MA72",
"store": {
"id": 1,
"name": "本店"
},
"cashier": {
"id": 2,
"name": "レジ2"
},
"status": "ASSESSING",
"member_id": 742,
"last_name": "てすと",
"last_kana": "テスト",
"first_name": "太郎",
"first_kana": "タロウ",
"postal_code": "5640051",
"prefecture": "大阪府",
"address1": "吹田市",
"address2": "豊津町",
"occupation": "会社員",
"tel": "06-0000-0000",
"sex": "MALE",
"email": "demo@demo.com",
"birthdate": "2024-09-05",
"is_invoice_provider": true,
"invoice_provider_number": "T1234567890123",
"note": "aaa",
"customer_note": null,
"bank_code": "0033",
"bank_branch_code": "001",
"bank_account_number": "1234567",
"bank_account_name": "テストタロウ",
"done_at": null,
"created_at": 1719542383,
"updated_at": 1727678538,
"attachments": [
{
"id": 179,
"file_key": "PdoJcUm1wtopvpX5goCSB36GR45FGuRJCrQAsvky.jpg",
"tag": "PHOTO",
"file_name": "photo.jpg",
"url": "https://...",
"mime_type": "image/jpeg"
}
],
"coupons": [
{
"amount": 100,
"coupon_id": 4
}
],
"goods": [
{
"id": 1022,
"serial": 1,
"is_canceled": false,
"quantity": 1,
"grade": {
"id": 2,
"name": "状態A"
},
"condition_tags": [
{
"id": 3,
"name": "aaa"
}
],
"condition_note": null,
"note": null,
"unit_price": 1000,
"selling_unit_price": 2000,
"unit_adjustment": 0,
"case_adjustment": 200,
"coupon_adjustment": 100,
"tax": 0,
"included_tax": 118,
"tax_rate": 10,
"tax_rate_type": "GENERAL",
"attribute": null,
"product_id": 174,
"item_id": null
}
],
"summary": {
"quantity": 1,
"sub_total": 1000,
"case_adjustment": 200,
"coupon_adjustment": 100,
"total": 1300,
"taxes": [
{
"tax_rate_type": "GENERAL",
"tax_rate": 10,
"tax": 0,
"included_tax": 118,
"taxable_amount": 1300
}
]
}
}
]
key | type | 説明 |
---|---|---|
* | array<object> | ケース |
*.id | int | ケースID |
*.code | string | ケースコード |
*.store | object | 店舗 |
*.store.id | int | 店舗ID |
*.store.name | string | 店舗名 |
*.cashier | object | null | レジ |
*.cashier.id | int | レジID |
*.cashier.name | string | レジ名 |
*.status | string | ステータス |
*.member_id | int | null | 会員ID |
*.last_name | string | null | 姓 |
*.last_kana | string | null | セイ |
*.first_name | string | null | 名 |
*.first_kana | string | null | メイ |
*.postal_code | string | null | 郵便番号 |
*.prefecture | string | null | 都道府県 |
*.address1 | string | null | 住所1 |
*.address2 | string | null | 住所2 |
*.tel | string | null | 電話番号 |
*.sex | string | null | 性別 |
string | null | メールアドレス | |
*.birthdate | string | null | 生年月日 |
*.is_invoice_provider | bool | 適格事業者か |
*.invoice_provider_number | string | null | 適格事業者番号 |
*.note | string | null | ケースメモ |
*.customer_note | string | null | 顧客メモ |
*.bank_code | string | null | 銀行コード |
*.bank_branch_code | string | null | 銀行支店コード |
*.bank_account_number | string | null | 銀行口座番号 |
*.bank_account_name | string | null | 銀行口座名義 |
*.done_at | int | null | 完了日時 |
*.created_at | int | null | 作成日時 |
*.updated_at | int | null | 更新日時 |
*.attachments | array<object> | ファイル |
*.attachments.*.id | int | ファイルID |
*.attachments.*.file_key | string | ファイルキー |
*.attachments.*.tag | string | タグ |
*.attachments.*.file_name | string | null | ファイル名 |
*.attachments.*.url | string | 一時URL (*1) |
*.attachments.*.mime_type | string | MIMEタイプ |
*.coupons | array<object> | クーポン |
*.coupons.*.coupon_id | int | クーポンID |
*.coupons.*.amount | int | 適用額 |
*.goods | array<object> | 買取明細 |
*.goods.*.id | int | 買取明細ID |
*.goods.*.serial | int | 買取明細通し番号 |
*.goods.*.product_id | int | カタログID |
*.goods.*.is_canceled | bool | 単品キャンセルか |
*.goods.*.quantity | int | 数量 |
*.goods.*.grade | object | グレード |
*.goods.*.grade.id | int | グレードID |
*.goods.*.grade.name | string | グレード名 |
*.goods.*.condition_tags | array<object> | コンディションタグ |
*.goods.*.condition_tags.*.id | int | コンディションタグID |
*.goods.*.condition_tags.*.name | string | コンディションタグ名 |
*.goods.*.condition_note | string | null | コンディション詳細 |
*.goods.*.note | string | null | 商品メモ |
*.goods.*.unit_price | int | 買取単価 |
*.goods.*.selling_unit_price | int | 販売単価 |
*.goods.*.unit_adjustment | int | 調整単価 |
*.goods.*.case_adjustment | int | 小計調整 |
*.goods.*.coupon_adjustment | int | クーポン調整 |
*.goods.*.tax | int | 外税 |
*.goods.*.included_tax | int | 内税 |
*.goods.*.tax_rate | int | 税率 |
*.goods.*.tax_rate_type | string | 税区分 |
*.goods.*.item_id | int | null | 在庫ID |
*.goods.*.attribute | object | null | 在庫属性 |
*.summary | object | ケースサマリー |
*.summary.quantity | int | 数量合計 |
*.summary.case_adjustment | int | 小計調整合計 |
*.summary.coupon_adjustment | int | クーポン調整合計 |
*.summary.sub_total | int | 小計 |
*.summary.total | int | 合計 |
*.summary.taxes | array<object> | 税 |
*.summary.taxes.*.tax_rate_type | string | 税区分 |
*.summary.taxes.*.tax_rate | int | 税率 |
*.summary.taxes.*.tax | int | 外税 |
*.summary.taxes.*.included_tax | int | 内税 |
*.summary.taxes.*.taxable_amount | int | 課税対象金額 |
ASSESSING
査定中ASSESSED
査定完了CONFIRMED
査定承認済みCANCELED
全件不成約DONE
買取完了GENERAL
一般RELIEF
軽減税率NO_TAX
非課税GET /bas_cases/{case_id}
bas_case:show
なし
5 rps
GET /bas_cases/44
店頭買取ケース検索のresponse[0]と同様
POST /bas_cases
bas_case:store
store_id (またはX-Store-Idヘッダ)
2 rps
key | type | 説明 | 制約など |
---|---|---|---|
cashier_id | ?int | null | レジID | - |
member_id | ?int | null | 会員ID | - |
last_name | ?string | null | 姓 | 50文字まで |
last_kana | ?string | null | セイ | 50文字まで |
first_name | ?string | null | 名 | 50文字まで |
first_kana | ?string | null | メイ | 50文字まで |
postal_code | ?string | null | 郵便番号 | /^[0-9]{3}-?[0-9]{4}$/ |
prefecture | ?string | null | 都道府県 | 10文字まで |
address1 | ?string | null | 市区町村 | - |
address2 | ?string | null | それ以降の住所 | - |
occupation | ?string | null | 職業 | 20文字まで |
tel | ?string | null | 電話番号 | /^0[0-9]{9,10}$/ または/^0[0-9]{1,3}-[0-9]{2,4}-[0-9]{3,4}$/ |
sex | ?string | null | 性別 | MALE FEMALE OTHER のいずれか |
?string | null | メールアドレス | メールアドレス形式、256文字まで | |
birthdate | ?string | null | 生年月日 | YYYY-MM-DD 形式 |
is_invoice_provider | ?bool | 適格事業者か | - |
invoice_provider_number | ?string | null | 適格事業者番号 | /^T[0-9]{13}$/ |
customer_note | ?string | null | 顧客メモ | - |
note | ?string | null | ケースメモ | - |
case_adjustment | ?int | 小計調整 | 99,999,999以下 |
coupon_ids | ?array<int> | クーポンID | - |
bank_code | ?string | null | 銀行コード | 4文字、数値のみ |
bank_branch_code | ?string | null | 銀行支店コード | 3文字、数値のみ |
bank_account_number | ?string | null | 銀行口座番号 | 7文字、数値のみ |
bank_account_name | ?string | null | 銀行口座名義 | 30文字まで、ひらがなカタカナ英数字記号のみ |
goods | ?array<object> | 買取明細 | - |
goods.*.product_id | int | カタログID | - |
goods.*.is_canceled | bool | 単品キャンセルか | - |
goods.*.quantity | ?int | 数量 | 0以上 9,999以下 |
goods.*.grade_id | int | グレードID | - |
goods.*.condition_tag_ids | ?array<int> | コンディションタグID | - |
goods.*.condition_note | ?string | null | コンディションメモ | - |
goods.*.note | ?string | null | 商品メモ | - |
goods.*.unit_price | ?int | 買取単価 | 0以上 99,999,999以下 |
goods.*.unit_adjustment | ?int | 調整単価 | -99,999,999以上 99,999,999以下 |
goods.*.selling_unit_price | ?int | 販売単価 | 0以上 99,999,999以下 |
goods.*.attribute | ?object | 在庫属性 | - |
POST /bas_cases
{
"note": "メモ",
"goods": [
{
"product_id": 12,
"is_canceled": false,
"grade_id": 1
}
]
}
店頭買取ケース取得と同様
PUT /bas_cases/{case_id}
bas_case:update
なし
2 rps
店頭買取ケース作成との差分のみ記載
key | type | 説明 | 制約など |
---|---|---|---|
goods.*.action | string | アクション | CREATE UPDATE DELETE |
goods.*.id | ?int (*2) | 買取明細ID | - |
goods.*.product_id | ?int (*1) | カタログID | - |
goods.*.is_canceled | ?bool (*1) | 単品キャンセルか | - |
goods.*.grade_id | ?int (*1) | グレードID | - |
CREATE
の場合必須UPDATE
DELETE
の場合必須ASSESSED
CONFIRMED
の場合、金額や契約内容が変わるようなカラムの更新は無視されますDONE
CANCELED
の場合、ケースメモ以外の更新は無視されますPUT /bas_cases/44
{
"note": null,
"goods": [
{
"action": "CREATE",
"product_id": 12,
"is_canceled": false,
"grade_id": 1
},
{
"action": "UPDATE",
"id": 234,
"grade_id": 2
},
{
"action": "DELETE",
"id": 235
}
]
}
店頭買取ケース取得と同様
DELETE /bas_cases/{case_id}
bas_case:destroy
なし
2 rps
DELETE /bas_cases/44
なし
PUT /bas_cases/{case_id}/status
bas_case:status:update
なし
2 rps
key | type | 説明 | 制約など |
---|---|---|---|
status | string | 変更後ステータス | ASSESSING ASSESSED CONFIRMED CANCELED |
PUT /bas_cases/44/status
{
"status": "CONFIRMED"
}
店頭買取ケース取得と同様
PUT /bas_cases/{case_id}/checkout
bas_case:checkout:update
なし
2 rps
key | type | 説明 | 制約など |
---|---|---|---|
charges | array<object> | 金種 | - |
charges.*.payment_id | int | 金種ID | - |
charges.*.amount | int | 金額 | 1以上 |
PUT /bas_cases/44/checkout
{
"charges": [
{
"payment_id": 1,
"amount": 1100
}
]
}
なし
POST /bas_cases/{case_id}/attachments
bas_case:attachment:store
なし
2 rps
key | type | 説明 | 制約など |
---|---|---|---|
file_key | string | ファイルキー (*1) | - |
tag | string | タグ | (*2) |
file_name | ?string | null | ファイル名 | 100文字まで |
PHOTO
顧客顔写真POST /bas_cases/122/attachments
{
"file_key": "PdoJcUm1wtopvpX5goCSB36GR45FGuRJCrQAsvky.jpg",
"tag": "PHOTO",
"file_name": "顔写真.jpg"
}
店頭買取ケース取得のattachments[0]と同様
DELETE /bas_cases/{case_id}/attachments/{attachment_id}
bas_case:attachment:destroy
なし
2 rps
DELETE /bas_case/122/attachments/345
(なし)