カレンダーの指定日に表示するお知らせ一覧を取得します。
外部のカレンダーに、ユーザー・店舗ごとのお知らせを表示できます。
お知らせごとに個別URLが付与され、シングルサインオンでお知らせを表示できます。
呼び出し先URL
{your-domain} の部分は、ご利用の環境に合わせて変更してください。
https://{your-domain}/h2/STRNoticeFinder.doリクエスト
〇:必須
△:loginId または storeCode のいずれか必須
| パラメータ名 | 意味 | 必須 | 制約 |
|---|---|---|---|
| func | 動作モード | 〇 | 必ず findByPeriod を指定します。 |
| key | WebAPIキー | 〇 | お知らせ操作APIが利用可能なWebAPIキーを指定します。 |
| loginId | 本部ユーザー | △ | 対象となる本部ユーザーを指定します。storeCode パラメータと、どちらか一方の指定が必要です。 |
| storeCode | 店舗コード | △ | 対象となる店舗コードを指定します。loginId パラメータと、どちらか一方の指定が必要です。 |
| staffCode | スタッフコード | 店舗スタッフ機能を利用している場合に、店舗スタッフを指定します。 | |
| date | 対象日付 | 取得対象の日付を yyyy-MM-dd 形式の文字列で指定します。単一の日付を指定した場合は、指定日に公開されたお知らせと、過去7日間の未読お知らせを返します。 ℹ 補足:7日以内の期間を指定する場合は、 yyyy-MM-dd,yyyy-MM-dd のように、開始日と終了日をカンマ(,)区切りで指定します。ℹ 補足:8日以上の期間を指定した場合はエラーになります。 ℹ 補足:パラメータを省略した場合は、今日の日付が指定されたものとして扱われます。 | |
| timeZone | タイムゾーン | 対象のタイムゾーンIDを文字列で指定します。利用可能なタイムゾーンは「こちら」を参照してください。 ℹ 補足:パラメータを省略した場合は、対象店舗に設定されたタイムゾーンを指定したものとして扱われます。 | |
| targetKind | 取得データ種別 | 取得するデータ種別を指定します。notice:お知らせschedule:店舗スケジュールお知らせℹ 補足:パラメータを省略した場合は、すべての取得データ種別を指定したものとして扱われます。 | |
| priority | 取得する重要度 | 指定した値以上の重要度を取得します。3:通常4:重要7:緊急例) 4 を指定した場合は、重要度が 重要 と 緊急 のお知らせを取得します。ℹ 補足:存在しない重要度を指定した場合、またはパラメータを省略した場合は、すべての重要度のお知らせを返します。 | |
| responseType | レスポンス形式 | レスポンス形式を指定します。1:チェックされているカテゴリ項目を category(X)=Y の Y の部分について、カテゴリ項目IDではなく表示文字列として返します。2:お知らせの送り先の店舗コードを改行区切り(\r\n)で返します。ℹ 補足:複数の値を指定する場合は、ビット加算して指定します。 3 を指定すると、1 と 2 の両方を指定したことになります。ℹ 補足:パラメータを省略した場合は、カテゴリ項目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="notice" minOccurs="0">
<xsd:attribute name="id" type="xsd:long" use="required" />
<xsd:attribute name="title" type="xsd:string" use="required" />
<xsd:attribute name="open" type="xsd:string" use="required" />
<xsd:attribute name="open-text" type="xsd:string" use="optional" />
<xsd:attribute name="close" 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="approved" type="xsd:string" use="optional" />
<xsd:attribute name="reply-type" type="xsd:int" use="required" />
<xsd:attribute name="reply-date" type="xsd:string" use="optional" />
<xsd:attribute name="pub-group" type="xsd:string" use="required" />
<xsd:attribute name="pub-user" type="xsd:string" use="required" />
<xsd:attribute name="priority" type="xsd:int" use="optional" />
<xsd:attribute name="category" type="xsd:string" use="optional" />
<xsd:attribute name="recv-stores" type="xsd:string" use="optional" />
<xsd:attribute name="read" type="xsd:boolean" use="optional" />
<xsd:attribute name="text" type="xsd:string" use="required" />
<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:element>
</xsd:sequence>
</xsd:element>
</xsd:sequence>
</xsd:element>
</xsd:schema>
| 要素 | 意味 | 備考 |
|---|---|---|
//response/result | リザルトコード | 次の値を返します。1:成功4:入力パラメータの内容にエラーがある8:その他のシステムエラーが発生 |
//response/errors | エラーメッセージ | エラーが発生した場合は、詳細なエラーメッセージが文字列で返されます。 |
//response/notice-list/notice | 新着お知らせ | 新着のお知らせ情報が返されます。以下の情報が属性値で指定されます。 (日付・時刻はすべて yyyy-MM-dd HH:mm:ss 形式のUTC時刻です)title:お知らせのタイトルid:お知らせ番号open:公開開始時刻open-text:WebAPIを呼び出した時点で、お知らせ一覧画面に表示される公開日列の値です。yyyy/MM/dd または HH:mm 形式の文字列です。close:公開終了時刻begin:実施期間の開始端end:実施期間の終了端last-modified:最終更新日approved:お知らせの承認日時。承認機能を利用しない場合は登録日時です。reply-type:回答タイプ(0=回答なし、1=1店舗ごと1回答、2=店舗ごと複数回答、3=スタッフごと回答)reply-date:回答期限pub-group:発信部署名pub-user:発信者名recv-stores:送り先の店舗コード。改行コード(\r\n)区切りの文字列として返します。priority:重要度(critical=緊急、important=重要、normal=通常)calendar-display-style:カレンダー表示方法(1=実施期間中ずっと表示する、2=実施期間の開始日のみ表示する、3=表示しない、4=実施期間の開始日と終了日のみ表示する)calendar-area:週間カレンダーのスケジュール表示位置category:関連づけられたカテゴリ定義。チェックされているカテゴリ項目分の category(X)=ID\n を返します。X はカテゴリグループのIDです。複数のカテゴリグループがある場合は、カテゴリグループのソート順で返されます。read:セッションキーのセッションが店舗・店舗スタッフの場合に、既読状況を返します。true=既読、false=未読。既読状況の反映には1分程度かかる場合があります。text:お知らせ雛形に入力されたテキストデータurl:お知らせを開くためのURLapp:売場ノートアプリでお知らせを開くためのURL。売場ノートアプリが有効な場合のみ返します。 |
//response/schedule-list/schedule | 店舗スケジュール | 対象の店舗スケジュール情報が返されます。以下の情報が属性値で指定されます。 (日付・時刻はすべて yyyy-MM-dd HH:mm:ss 形式のUTC時刻です)id:スケジュール番号title:スケジュール名description:スケジュールの説明weekly-schedule-area:週間カレンダーのスケジュール表示位置pub-group:発信部署名pub-user:発信者名begin:実施期間の開始端end:実施期間の終了端last-modified:最終更新日category:関連づけられたカテゴリ定義。チェックされているカテゴリ項目分の category(X)=ID\n を返します。X はカテゴリグループのIDです。複数のカテゴリグループがある場合は、カテゴリグループのソート順で返されます。 |
カレンダー表示お知らせの取得に成功した場合のレスポンスXML例
<response>
<result>1</result>
<notice-list>
<notice approved="2020-11-15 09:12:08" begin="2020-11-15 15:00:00" calendar-area="product" calendar-display-style="1" category="category(2)=1
category(2)=2" close="0000-00-00 00:00:00" end="2020-11-17 15:00:00" id="314" last-modified="2020-11-15 09:12:05" open="2020-11-14 15:00:00" open-text="18:12" priority="normal" pub-group="IT" pub-user="情シス 管理" read="false" reply-type="0" text="売価変更を行ってください。対象商品は添付ファイルの通り。" title="売価変更指示" url="/h/STRStorePage.do?sso=506488_9d7ff071-7006-496ba68f-ca1ffe8e59ad_p6v3RWkg&startPage=STRViewNotice.do%3FnoticeId%3D314%26version%3D0" app="shopruns://domain/h2/_/q_Orq6urq6u5Vqurq6s" weekly-schedule-area="notice" />
</notice-list>
<schedule-list>
<schedule begin="2020-11-15 15:00:00" category="category(1)=1
category(1)=2
category(1)=3" description="本社会議室A で行っています。" end="2020-11-16 15:00:00" id="a7ac46b1-2514-4eac-8b39-530f045376cf" last-modified="2020-11-15 09:14:02" pub-group="IT" pub-user="情シス 管理" title="関東地区店長会" weekly-schedule-area="notice" />
</schedule-list>
</response>
上の例では、//response/result の値が 1 のため、呼び出しは成功しています。//response/notice-list/notice にお知らせが、//response/schedule-list/schedule に店舗スケジュールが返されます。