タイムカード「日別勤怠(事業所別合計)取得」APIにおいて、返り値のContent-Typeが仕様書と異なる

タイムカード「日別勤怠(事業所別合計)取得」APIのCallBackURLに返されるレスポンスについてですが、こちらの仕様書では、application/json形式で返される事になっております。しかしながら、返り値のデータヘッダーを確認したところ、application/x-www-form-urlencodedとなっており、そのためデータ処理が非常に厳しい形になっております。

以下がCallBackURLに返されるデータの例となりますが、ご覧のデータの通り通常のForm形式でKey-valueデータが送られてきているため、特にこのAPIのようにネストされたJSONデータの場合、キーが配列の文字列となってしまい、データを管理するのが難しい形です。(例:shiftStoreDaily[20210110][dailyTotalStaff]という文字列がキーで、2がValue)

こちら仕様書の方が正しければ、applicatoin/json形式に変更していただけますでしょうか?逆にapplication/x-www-form-urlencodedで返される形式の方が仕様の場合、教えていただけると幸いです。どうぞよろしくお願いいたします。


ImmutableMultiDict([('year', '2021'),
 ('month', '01'),
 ('storeId', '2'),
 ('storeName', '支店'),
 ('storeAbbr', 'シテン'),
 ('division', 'result'),
 ('shiftStoreDaily[20210110][dailyTotalStaff]', '2'),
 ('shiftStoreDaily[20210110][dailyTotalHour]', '24.2'),
 ('shiftStoreDaily[20210110][dailyTotalMinute]', '1452'),
 ('shiftStoreDaily[20210110][staffs][0][staffId]', '5'),
 ('shiftStoreDaily[20210110][staffs][0][workingMinute]', '1452'),
 ('shiftStoreDaily[20210110][staffs][0][workingHour]', '24.2'),
 ('shiftStoreDaily[20210110][staffs][0][personnelExpenses]', '24100'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][0][shiftResultId]', '5'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][0][staffId]', '5'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][0][staffName]', '会社2-従業員1'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][0][attendance]', '2021-01-10 17:51:00'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][0][leaving]', '2021-01-10 17:58:00'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][1][shiftResultId]', '9'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][1][staffId]', '5'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][1][staffName]', '会社2-従業員1'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][1][attendance]', '2021-01-10 18:41:00'),
 ('shiftStoreDaily[20210110][staffs][0][shifts][1][leaving]', '2021-01-11 18:40:00'),
 ('shiftStoreDaily[20210110][totalPersonnelExpenses]', '24100'),
 ('shiftStoreDaily[20210112][dailyTotalStaff]', '1'),
 ('shiftStoreDaily[20210112][dailyTotalHour]', '0.0667'),
 ('shiftStoreDaily[20210112][dailyTotalMinute]', '4'),
 ('shiftStoreDaily[20210112][staffs][0][staffId]', '5'),
 ('shiftStoreDaily[20210112][staffs][0][workingMinute]', '4'),
 ('shiftStoreDaily[20210112][staffs][0][workingHour]', '0.0667'),
 ('shiftStoreDaily[20210112][staffs][0][personnelExpenses]', '67'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][0][shiftResultId]', '10'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][0][staffId]', '5'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][0][staffName]', '会社2-従業員1'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][0][attendance]', '2021-01-12 21:46:00'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][0][leaving]', '2021-01-12 21:46:00'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][1][shiftResultId]', '11'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][1][staffId]', '5'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][1][staffName]', '会社2-従業員1'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][1][attendance]', '2021-01-12 21:50:00'),
 ('shiftStoreDaily[20210112][staffs][0][shifts][1][leaving]', '2021-01-12 21:54:00'),
 ('shiftStoreDaily[20210112][totalPersonnelExpenses]', '67'),
 ('shiftStoreDaily[20210113][dailyTotalStaff]', '2'),
 ('shiftStoreDaily[20210113][dailyTotalHour]', '44.9167'),
 ('shiftStoreDaily[20210113][dailyTotalMinute]', '2695'),
 ('shiftStoreDaily[20210113][staffs][0][staffId]', '5'),
 ('shiftStoreDaily[20210113][staffs][0][workingMinute]', '2695'),
 ('shiftStoreDaily[20210113][staffs][0][workingHour]', '44.9167'),
 ('shiftStoreDaily[20210113][staffs][0][personnelExpenses]', '22617'),
 ('shiftStoreDaily[20210113][staffs][0][shifts][0][shiftResultId]', '12'),
 ('shiftStoreDaily[20210113][staffs][0][shifts][0][staffId]', '5'),
 ('shiftStoreDaily[20210113][staffs][0][shifts][0][staffName]', '会社2-従業員1'),
 ('shiftStoreDaily[20210113][staffs][0][shifts][0][attendance]', '2021-01-13 08:39:00'),
 ('shiftStoreDaily[20210113][staffs][0][shifts][0][leaving]', '2021-01-14 07:16:00'),
 ('shiftStoreDaily[20210113][totalPersonnelExpenses]', '22617')])

答え

  • @Naoto

    度々ご迷惑お掛けし、申し訳ございません。

    仕様書に記載されている通り、`applicatoin/json`形式が正となります。

    こちらは後日、修正をさせていただきます。

    別件のご連絡となりますが、Callbackではなく直接返却する仕様に変更する予定を1/27リリースで現在調整しておりますので、

    ひとまず、直接返却での対応とさせていただけますと幸いです。

    どうぞよろしくお願い致します。

  • @スマレジ 早川

    迅速なご返信ありがとうございます。早くも1/27リリースで直接返却となること、非常に嬉しいです。正しい形式でテストデータを返すローカルのモックサーバーを作っており、リリースまではそちらでテストできますので、ひとまずは大丈夫です。引き続きどうぞよろしくお願いいたします。

  • @スマレジ 早川

    お世話になっております。今日のリリースで本APIにて、callback URLを渡さないことで、直接JSONが返却される形に変わったことを確認させていただきました。迅速なご対応ありがとうございます。

  • @Naoto 様

    ご連絡が遅くなり申し訳ございません。

    こちらご確認いただきましたとのこと、ご連絡ありがとうございます。