フォーラムへの返信
-
mub 2021年2月8日
LT様
ご回答いただきましてありがとうございます。
色々試してみましたが要件を実現するのは難しく、抜け道はなさそうとの事理解いたしました。
代替案を考えて対応してみます。お忙しいところありがとうございました。
mub 2021年1月15日
部門の権限が個別設定されていましたので、すべてを対象にしましたら登録できました。
ご教示いただきましてありがとうございました。
mub 2021年1月12日
こちら自己解決できましたのでご放念いただければと思います。
mub 2021年1月12日
申し訳ありません。下記になります。
よろしくお願いいたします。
INFO – 2021-01-12 09:28:43 –> Array
(
[url] => https://api.freee.co.jp/api/1/invoices
[content_type] => application/json; charset=utf-8
[http_code] => 400
[header_size] => 562
[request_size] => 232
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.411597
[namelookup_time] => 0.126666
[connect_time] => 0.137937
[pretransfer_time] => 0.165023
[size_upload] => 1674
[size_download] => 198
[speed_download] => 481
[speed_upload] => 4067
[download_content_length] => -1
[upload_content_length] => 1674
[starttransfer_time] => 0.176794
[redirect_time] => 0
[redirect_url] =>
[primary_ip] => xxx.xxx.xxx.xxx
[certinfo] => Array
(
)[primary_port] => 443
[local_ip] => xxx.xxx.xxx.xxx
[local_port] => 38994
)mub 2021年1月12日
ご担当者様
お世話になっております。
ご確認いただきましてありがとうございます。
以下に、リクエスト、レスポンス、指定ヘッダを記載いたします。
不備がありましらご指摘いただけますと幸いです。
お手数ですがよろしくお願いいたします。
INFO – 2021-01-12 06:51:50 –> リクエスト
INFO – 2021-01-12 06:51:50 –> stdClass Object
(
[company_id] => xxxxxxx
[partner_id] => xxxxxxxx
[partner_code] =>
[invoice_number] =>
[due_date] =>
[partner_contact_info] =>
[partner_zipcode] =>
[partner_prefecture_code] => 0
[partner_address1] =>
[partner_address2] =>
[company_name] =>
[company_zipcode] =>
[company_prefecture_code] => 0
[company_address1] =>
[company_address2] =>
[company_contact_info] => 〒xxx-xxxx xxxxx
[payment_type] => transfer
[payment_bank_info] => xxxxx
[use_virtual_transfer_account] => not_use
[message] =>
[notes] =>
[invoice_layout] => envelope_classic
[tax_entry_method] => inclusive
[issue_date] => 2020-01-02
[booking_date] => 2020-01-03
[description] => xxx-xxxx-xxxx マーチ xxxx テスト(JP+BT)
[invoice_status] => draft
[partner_display_name] => 請求先名テスト
[partner_title] => 様
[invoice_contents] => Array
(
[0] => stdClass Object
(
[order] => 1
[type] => normal
[qty] => 1
[item_id] => 179531843
[unit] => km
[unit_price] => 0
[description] =>xxxx-xxxx-xxxx マーチ xxxx
[account_item_id] => 437027838
[tax_code] => 0
[section_id] => 1239667
[tag_ids] => Array
(
[0] => 12909311
)[segment_1_tag_id] => 136675
[segment_2_tag_id] => 136719
[segment_3_tag_id] => 136730
))
)
INFO – 2021-01-12 06:51:50 –> レスポンス
INFO – 2021-01-12 06:51:50 –> Array
(
[status_code] => 400
[errors] => Array
(
[0] => stdClass Object
(
[type] => status
[messages] => Array
(
[0] => 不正なリクエストです。
))
[1] => stdClass Object
(
[type] => validation
[messages] => Array
(
[0] => Invoice contents > Sectionは指定できません:1239667。
))
)
)
指定ヘッダー(PHPコード)
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
‘Content-Type: application/json’, ‘Authorization:Bearer ‘ . $this->_access_token));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘POST’);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonstr);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, KAIKEIFREEE_URL);