指定したカレンダーの日付に表示する作業の一覧を取得します。
外部のポータルに、ユーザー・店舗ごとの閲覧可能な作業をカレンダー形式で表示することが可能です。
呼び出し先URL
{your-domain} の部分をご利用の環境にあわせて変更してください。
https://{your-domain}/h2/STRTaskManipurator.doリクエスト
| パラメータ | 意味 | 必須 | 制約 |
|---|---|---|---|
func | 動作モード | 〇 | 必ず findByPeriod を指定します。 |
key | WebAPIキー | 〇 | 作業の操作が可能なWebAPIキーを指定します。 |
storeCode | 店舗コード | 〇 | 対象となる店舗コードを指定します。 |
staffCode | 店舗スタッフコード | 店舗スタッフ機能を利用時には対象となる店舗スタッフを指定します。 | |
date | 対象日付 | 作業を取得したい日付を yyyy-MM-dd 形式の文字列で指定します。補足事項 ・7日以内の期間を指定する場合は、 yyyy-MM-dd,yyyy-MM-dd のように期間の開始日と終了日をカンマ(,)で区切って指定します。・8日以上の期間を指定した場合はエラーとなります。 ・パラメータの指定を省略した場合は、今日の日付を指定したものと解釈します。 | |
timeZone | タイムゾーン | 対象のタイムゾーンIDを文字列で指定します。利用可能なタイムゾーンは「こちら」を参照してください。 補足事項 パラメータの指定を省略した場合は、対象店舗に設定されたタイムゾーンを指定したものと解釈します。 | |
targetKind | 取得データ種別 | 取得するデータの種別を指定します。notice:お知らせ作業schedule:店舗スケジュール作業補足事項 パラメータの指定を省略した場合は、すべての取得データ種別を指定したものと解釈します。 | |
categoryResponseType | チェックされているカテゴリ項目を category として返すときの値の種別 | 数字の 1 を指定した時、category(X)=Y の Y の部分をカテゴリ項目のIDではなく、表示文字列として返します。補足事項 パラメータの指定を省略した場合は、カテゴリ項目のIDを返します。 |
レスポンス
API の呼び出し結果は以下のスキーマのXML文書として返されます。
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="response">
<xsd:sequence>
<xsd:element name="result" type="xsd:int" minOccurs="1" maxOccurs="1" />
<xsd:element name="errors" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="notice-list">
<xsd:sequence>
<xsd:element name="task" minOccurs="0">
<xsd:attribute name="id" type="xsd:string" use="required" />
<xsd:attribute name="notice-id" type="xsd:string" use="required" />
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="begin" type="xsd:string" use="required" />
<xsd:attribute name="end" type="xsd:string" use="required" />
<xsd:attribute name="weekly-schedule-area" type="xsd:string" use="required" />
<xsd:attribute name="end" type="xsd:string" use="required" />
<xsd:attribute name="plan-volume" type="xsd:string" use="optional" />
<xsd:attribute name="result-date" type="xsd:string" use="optional" />
<xsd:attribute name="result-staff" type="xsd:string" use="optional" />
<xsd:attribute name="result-volume" type="xsd:string" use="optional" />
<xsd:attribute name="status" type="xsd:string" use="optional" />
<xsd:attribute name="url" type="xsd:string" use="required" />
<xsd:attribute name="app" type="xsd:string" use="optional" />
</xsd:element>
</xsd:sequence>
</xsd:element>
<xsd:element name="schedule-list">
<xsd:sequence>
<xsd:element name="schedule" minOccurs="0">
<xsd:attribute name="id" type="xsd:string" use="required" />
<xsd:attribute name="title" type="xsd:string" use="required" />
<xsd:attribute name="begin" type="xsd:string" use="required" />
<xsd:attribute name="end" type="xsd:string" use="required" />
<xsd:attribute name="last-modified" type="xsd:string" use="required" />
<xsd:attribute name="pub-group" type="xsd:string" use="required" />
<xsd:attribute name="pub-user" type="xsd:string" use="required" />
<xsd:attribute name="weekly-schedule-area" type="xsd:string" use="optional" />
<xsd:attribute name="category" type="xsd:string" use="optional" />
<xsd:attribute name="description" type="xsd:string" use="required" />
<xsd:attribute name="plan-volume" type="xsd:string" use="optional" />
<xsd:attribute name="result-date" type="xsd:string" use="optional" />
<xsd:attribute name="result-staff" type="xsd:string" use="optional" />
<xsd:attribute name="result-volume" type="xsd:string" use="optional" />
<xsd:attribute name="status" type="xsd:string" use="optional" />
</xsd:element>
</xsd:sequence>
</xsd:element>
</xsd:sequence>
</xsd:element>
</xsd:schema>
レスポンス要素
| 要素 | 意味 | 備考 |
|---|---|---|
//response/result | リザルトコード | 以下の値をとります。1: 成功4: 入力パラメータの内容にエラーがある8: その他のシステムエラーが発生 |
//response/errors | エラーメッセージ | エラーが発生した場合は、詳細なエラーメッセージが文字列として返されます。 |
//response/tasklist/task | お知らせ作業 | 対象のお知らせ作業の情報が返されます。 以下の情報が属性値で指定されます。 (日付/時刻はすべて yyyy-MM-dd HH:mm:ss 形式のUTC時刻)id : スケジュール番号notice-id : お知らせ番号name : 作業名begin : 実施期間の開始端end : 実施期間の終了端plan-volume : 予定工数result-date : 報告実施日result-staff : 作業実施者result-volume : 実績工数status : 実施状況 0:未実施 1:完了weekly-schedule-area : 週間カレンダーのスケジュール表示位置url : お知らせを開くためのURLapp : 売場ノートアプリでお知らせを開くためのURL。売場ノートアプリが有効な時にのみ返します。 |
//response/schedulelist/schedule | 店舗スケジュール | 対象の店舗スケジュール作業の情報が返されます。 以下の情報が属性値で指定されます。 (日付/時刻はすべて yyyy-MM-dd HH:mm:ss 形式のUTC時刻)id : スケジュール番号title : スケジュール名description : スケジュールの説明weekly-schedule-area : 週間カレンダーのスケジュール表示位置pub-group : 発信部署名pub-user : 発信者名begin : 実施期間の開始端end : 実施期間の終了端last-modified : 最終更新日plan-volume : 予定工数result-date : 報告実施日result-staff : 作業実施者result-volume : 実績工数status : 実施状況 0:未実施 1:完了category : 関連づけられたカテゴリの定義チェックされているカテゴリ項目分 category(X)=ID\n を返します。X の部分はカテゴリグループのIDとなります。複数のカテゴリグループが存在するとき、結果はカテゴリグループのソート順でソートされます。 |
取得に成功した場合のレスポンスXMLの例
<response>
<result>1</result>
<task-list>
<task begin="2020-11-15 15:00:00" end="2020-11-15 15:00:00" id="314_0" name="POS レジキー変更" notice-id="314" planvolume="0.5" result-date="2020-11-15 19:32:45" result-staff="山本" result-volume="0.5" status="1" weekly-schedule-area="task" />
</task-list>
<schedule-list>
<schedule begin="2020-11-15 15:00:00" category="category(635)=1
category(636)=1" description="新商品入ります。" end="2020-11-16 15:00:00" id="dd25eca5-e8e9-47c1-974e-029475fd4a01" last-modified="2020-11-15 09:21:55" plan-volume="1.5" status="2" pub-group="IT" pub-user="情シス管理" title="入荷商品の検品" weekly-schedule-area="task" />
</schedule-list>
</response>
上の例では、//response/result の値が 1 なので呼び出しは成功しています。//response/tasklist/task に対象のお知らせ作業が、//response/schedule-list/schedule に対象の店舗スケジュール作業が返されます。