GET /surveyssurvey:indexなし5 rps| key | 説明 | 制約など |
|---|---|---|
| ids | アンケートID | 整数のみ、カンマ区切りで複数指定可能 |
| keyword | キーワード(*1) | - |
| page | ページ | 整数のみ、デフォルト:1 |
| limit | 1ページあたりの件数 | 整数のみ、デフォルト:50、最大: 250 |
| cursor | ページカーソル | - |
GET /surveys?keyword=店頭
[
{
"id": 2,
"store": {
"id": 2,
"name": "サブ店"
},
"name": "店頭販売",
"description": "店頭でのお客様の満足度を調査するアンケートです",
"note": "社内メモ",
"questions": [
{
"id": 1,
"question": "サービスの満足度を教えてください",
"type": "RADIO",
"is_required": true,
"choices": ["とても満足", "満足", "普通", "不満", "とても不満"]
},
{
"id": 2,
"question": "改善して欲しい点があれば教えてください",
"type": "TEXTAREA",
"is_required": false,
"choices": null
}
],
"created_at": 1744694240
},
{
"id": 2,
"store": null,
"name": "店頭買取",
"description": null,
"note": null,
"questions": [
{
"id": 3,
"question": "次回も利用したいですか?",
"type": "RADIO",
"is_required": true,
"choices": ["はい", "いいえ"]
}
],
"created_at": 1743577948
}
]
| key | type | 説明 |
|---|---|---|
| * | array<object> | アンケート |
| *.id | int | アンケートID |
| *.store | object | null | 店舗 |
| *.store.id | int | 店舗ID |
| *.store.name | string | 店舗名 |
| *.name | string | アンケート名 |
| *.description | string | null | アンケート説明 |
| *.note | string | null | 内部メモ |
| *.questions | array<object> | 設問リスト |
| *.questions.*.id | int | 設問ID |
| *.questions.*.question | string | 設問内容 |
| *.questions.*.type | string | 回答タイプ |
| *.questions.*.is_required | boolean | 回答必須かどうか |
| *.questions.*.choices | array<string> | 選択肢 |
| *.created_at | int | 作成日時 |
TEXT 一行テキストTEXTAREA 複数行テキストCHECKBOX チェックボックス(複数選択)RADIO ラジオボタン(単一選択)SELECT プルダウン(単一選択)GET /surveys/{survey_id}survey:showなし5 rpsGET /surveys/5
アンケート検索のレスポンスの1件と同様
GET /surveys/answerssurvey:answer:indexなし5 rps| key | 説明 | 制約など |
|---|---|---|
| ids | 回答ID | 整数のみ、カンマ区切りで複数指定可能 |
| survey_id | アンケートID | - |
| referable_ids | 関連先ID | 整数のみ、カンマ区切りで複数指定可能 |
| referable_type | 関連先タイプ | - |
| page | ページ | 整数のみ、デフォルト:1 |
| limit | 1ページあたりの件数 | 整数のみ、デフォルト:50、最大: 250 |
| cursor | ページカーソル | - |
GET /surveys/answers?survey_id=2
[
{
"id": 5,
"survey_id": 2,
"status": "DONE",
"details": [
{
"survey_question_id": 1,
"answers": ["満足"]
},
{
"survey_question_id": 2,
"answers": ["スタッフの対応が素晴らしかったです"]
}
],
"referable_id": 123,
"referable_type": "rt_sas",
"created_at": 1744694240,
"done_at": 1744694240
},
{
"id": 3,
"survey_id": 2,
"status": "IN_PROGRESS",
"details": [],
"created_at": 1744693240,
"done_at": null
}
]
| key | type | 説明 |
|---|---|---|
| * | array<object> | アンケート回答 |
| *.id | int | 回答ID |
| *.survey_id | int | アンケートID |
| *.status | string | ステータス |
| *.details | array<object> | 回答詳細 |
| *.details.*.survey_question_id | int | 設問ID |
| *.details.*.answers | array<string> | 回答内容 |
| *.referable_id | int | null | 関連先ID |
| *.referable_type | string | null | 関連先タイプ |
| *.created_at | int | null | 作成日時 |
| *.done_at | int | null | 完了日時 |
IN_PROGRESS 回答中DONE 回答済みGET /surveys/answers/{answer_id}survey:answer:showなし5 rpsGET /surveys/answers/5
アンケート回答検索のレスポンスの1件と同様
POST /surveys/{survey_id}/answerssurvey:answer:storeなし2 rps| key | type | 説明 | 制約など |
|---|---|---|---|
| referable_id | ?int | null | 関連先ID | - |
| referable_type | ?string | null | 関連先タイプ | - |
| note | ?string | null | メモ | - |
| details | ?array<object> | 回答詳細 | - |
| details.*.survey_question_id | int | 設問ID | - |
| details.*.answers | array<string> | 回答内容 | - |
POST /surveys/2/answers
{
"referable_id": 123,
"referable_type": "rt_sas",
"details": [
{
"survey_question_id": 1,
"answers": ["満足"]
},
{
"survey_question_id": 2,
"answers": ["スタッフの対応が素晴らしかったです"]
}
]
}
アンケート回答検索のレスポンスの1件と同様
PUT /surveys/answers/{answer_id}survey:answer:updateなし2 rpsアンケート回答作成との差分のみ記載
| key | type | 説明 | 制約など |
|---|---|---|---|
| referable_id | - | (更新不可) | - |
| referable_type | - | (更新不可) | - |
DONEの場合、ケースメモ以外の更新は無視されますPUT /surveys/answers/5
{
"note": "顧客からの追加フィードバック",
"details": [
{
"survey_question_id": 1,
"answers": ["とても満足"]
},
{
"survey_question_id": 2,
"answers": ["スタッフの対応が素晴らしかったです。特に接客の丁寧さが印象的でした。"]
}
]
}
アンケート回答検索のレスポンスの1件と同様
PUT /surveys/answers/{answer_id}/statussurvey:answer:status:updateなし2 rps| key | type | 説明 | 制約など |
|---|---|---|---|
| status | string | 変更後ステータス | (*1) |
IN_PROGRESS → DONEDONE → IN_PROGRESSPUT /surveys/answers/5/status
{
"status": "DONE"
}
アンケート回答検索のレスポンスの1件と同様
DELETE /surveys/answers/{answer_id}survey:answer:destroyなし2 rpsDELETE /surveys/answers/5
なし