受領請求書取込

OpenAPI説明

本APIは、請求書連携SaaSより複数の請求書を一括取り込む際に利用します

OpenAPI権限

本APIはグループモードの権限が必要です

リクエストURI

/api/openapi/btob/invoices/import

リクエスト形式

POST

リクエスト例

{
  "companyCode": "Test001",
  "serviceCode": "0",
  "invoiceDTOS": [
    {
      "invoiceNumber": "1234567890",
      "invoiceUUID": "1111111111",
      "referenceNumber": "XXXXXXXX",
      "invoiceType": "INVOICE",
      "registeredAt": "2024-02-05 23:00:00",
      "confirmationDatetime": "2024-02-05 23:00:00",
      "tradeDate": "2024-02-06",
      "payeeUnitDTO": {
        "vendorName": "テスト株式会社",
        "businessRegistrationNumber": "T12345678901",
        "businessCategory": "1001",
        "contactName": "社員1"
      },
      "invoiceAmount": 1000,
      "headerInvoiceCurrency": "JPY",
      "headerInvoiceExchangeRate": 1.0,
      "totalTaxIncludedAmount": 1100,
      "totalTaxExcludedAmount": 1000,
      "totalTaxAmount": 100,
      "requestExemptedDTOS": [
        {
          "consumptionTaxCode": "Tax01",
          "priceAmount": 1100,
          "priceTaxAmount": 1000,
          "taxAmount": 100,
          "foreignCurrencyExchangeRate": 1.0,
          "foreignCurrencyPriceAmount": 1100,
          "foreignCurrencyPriceTaxAmount": 1000,
          "foreignCurrencyTaxAmount": 100
        }
      ],
      "destinationBankAccounts": [
        {
          "destinationBankName": "日本銀行",
          "destinationBankKana": "ニツポン",
          "destinationBankCode": "0000",
          "destinationBranchName": "本店",
          "destinationBranchKana": "ホンテン",
          "destinationBranchCode": "093",
          "destinationAccountType": "1",
          "destinationRawAccountName": "鈴木",
          "destinationAccountName": "スズキ",
          "destinationAccountNumber": "1234567"
        }
      ],
      "paymentLineDTOS": [
        {
          "paymentMethod": "銀行振込",
          "paymentDeadline": "2024-02-05"
        }
      ],
      "requestFileStr": "XXXXXXXX",
      "requestFileName": "請求書.pdf",
      "qualifiedStatus": "Y",
      "receivingDepartment": "DxCG連携用受領部門名",
      "handoverMemo": "XXXXXXXX",
      "fileId": "100000000001"
    }
  ]
}

リクエスト項目

請求書明細情報

項目 タイプ 必須 キー 制限 説明
companyCode String 最大36文字 会社コード
serviceCode String 最大2文字 請求書受領サービス
0:BillOne
1:日本ICS請求書管理オプション
2:楽楽精算
3:Bakuraku
4:奉行Edge受領請求書DXクラウド
invoiceDTOS invoiceDTO[] 請求書データリスト

invoiceDTO

項目 タイプ 必須 キー 制限 説明
invoiceNumber String 最大50文字 請求書番号
invoiceUUID String 最大100文字 請求書ID
referenceNumber String 最大100文字 外部照会用情報
invoiceType String 最大50文字 請求書種別
registeredAt String フォーマット:yyyy-MM-dd HH:mm:ss 登録日
confirmationDatetime String フォーマット:yyyy-MM-dd HH:mm:ss 確定日時(最終承認日時)
tradeDate String フォーマット:yyyy-MM-dd 取引年月日
payeeUnitDTO payeeUnitDTO[] 支払先情報
invoiceAmount Number 最大13桁 請求金額
headerInvoiceCurrency String 固定3文字 通貨コード
headerInvoiceExchangeRate Number 最大17桁 為替レート
totalTaxIncludedAmount Number 最大13桁 合計税込金額
1:3つのうち2つは埋まっている必要がある
totalTaxExcludedAmount Number 最大13桁 合計税抜金額
1:3つのうち2つは埋まっている必要がある
totalTaxAmount Number 最大13桁 合計税額
1:3つのうち2つは埋まっている必要がある
requestExemptedDTOS requestExemptedDTO[] 積み上げ計算情報リスト
destinationBankAccounts destinationBankAccount[] 振込先口座情報リスト
paymentLineDTOS paymentLineDTO[] 支払情報リスト
requestFileStr String Base64エンコード変換で文字列として連携 請求書データ
requestFileName String 最大50文字 請求書ファイル名
qualifiedStatus String 最大30文字 適格請求書の判定ステータス
receivingDepartment String 最大100文字 受領部門
handoverMemo String 最大400文字 申し送りメモ
fileId String 最大12文字 ファイルID
ファイル再取込時に採番される番号

payeeUnitDTO

項目 タイプ 必須 キー 制限 説明
vendorName String 最大50文字 取引先名
businessRegistrationNumber String 最大14文字 事業者登録番号
businessCategory String 事業者区分
1001:課税事業者
1002:免税事業者
contactName String 最大30文字 取引先の連絡先(担当者名)

requestExemptedDTO

項目 タイプ 必須 キー 制限 説明
consumptionTaxCode String 最大10文字 消費税率
priceAmount Number 最大13桁 税込額(円貨)
priceTaxAmount Number 最大13桁 税抜額(円貨)
taxAmount Number 最大13桁 税額(円貨)
foreignCurrencyExchangeRate Number 最大17桁 為替レート
foreignCurrencyPriceAmount Number 最大13桁 税込額(外貨)
foreignCurrencyPriceTaxAmount Number 最大13桁 税抜額(外貨)
foreignCurrencyTaxAmount Number 最大13桁 税額(外貨)

destinationBankAccount

項目 タイプ 必須 キー 制限 説明
destinationBankName String 最大50文字 振込先口座(銀行名)
destinationBankKana String 最大15文字 振込先口座(銀行名カナ)
destinationBankCode String 最大4文字 振込先口座(金融機関コード)
destinationBranchName String 最大50文字 振込先口座(支店名)
destinationBranchKana String 最大15文字 振込先口座(支店名カナ)
destinationBranchCode String 最大3文字 振込先口座(支店コード)
destinationAccountType String 1:普通預金
2:当座預金
4:貯蓄預金
9:その他種別
振込先口座(口座種別)
destinationRawAccountName String 最大50文字 振込先口座(口座名義)
destinationAccountName String 最大30文字 振込先口座(口座名義カナ)
destinationAccountNumber String 最大7文字 振込先口座(口座番号)

paymentLineDTO

項目 タイプ 必須 キー 制限 説明
paymentMethod String 最大100文字 支払方法
paymentDeadline String フォーマット:yyyy-MM-dd 支払期日

OpenAPIリターン例

{
  "companyCode": "Test001",
  "serviceCode": "0",
  "total": 4,
  "success": 2,
  "failure": 2,
  "errorCode": "120001",
  "message": "テナントの権限がありません",
  "successDatas": [ {
    "invoiceUUID": "請求書ID1"
  }, {
    "invoiceUUID": "請求書ID2"
  }
  ],
  "errorDatas": [ {
    "invoiceUUID": "請求書ID3",
    "errorCode": "XXXXX",
    "errorMessage": "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }, {
    "invoiceUUID": "請求書ID4",
    "errorCode": "XXXXX",
    "errorMessage": "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }
  ]
}

項目説明

項目 タイプ 説明
companyCode String 会社コード
serviceCode String Saasコード
total String 総件数
success String 成功件数
failure String 失敗件数
errorCode String エラーメッセージコードを返す
message String エラーメッセージ内容を返す
successDatas successData[] 成功リスト
errorDatas errorData[] 失敗リスト

successData

項目 タイプ 説明
invoiceUUID String 請求書IDを返す

errorData

項目 タイプ 説明
errorCode String エラーメッセージコードを返す
errorMessage String エラーメッセージ内容を返す

エラーコード説明

errorCode message 説明
120001 テナントの権限がありません
120003 {0}は指定必須の項目です
0013 {0}は{1}文字以内で指定してください
121310 指定した会社はステータスが無効になっているか、存在しません
spd.32741.003 既に取込み済みの請求書です
5018003 銀行コードまたは支店コードが無効です
spd.32741.012 対応外の請求書受領サービスです
spd.40920.001 ファイルID:{0}が存在しません