GET /surveys
survey: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 rps
GET /surveys/5
アンケート検索のレスポンスの1件と同様
GET /surveys/answers
survey:answer:index
なし
5 rps
key | 説明 | 制約など |
---|---|---|
ids | 回答ID | 整数のみ、カンマ区切りで複数指定可能 |
survey_id | アンケートID | - |
referable_id | 関連先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": ["スタッフの対応が素晴らしかったです"]
}
],
"created_at": 1744694240,
"updated_at": 1744694240
},
{
"id": 3,
"survey_id": 2,
"status": "IN_PROGRESS",
"details": [],
"created_at": 1744693240,
"updated_at": 1744693240
}
]
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> | 回答内容 |
*.created_at | int | null | 作成日時 |
*.updated_at | int | null | 更新日時 |
IN_PROGRESS
回答中DONE
回答済みGET /surveys/answers/{answer_id}
survey:answer:show
なし
5 rps
GET /surveys/answers/5
アンケート回答検索のレスポンスの1件と同様
POST /surveys/{survey_id}/answers
survey: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 | - | (更新不可) | - |
PUT /surveys/answers/5
{
"note": "顧客からの追加フィードバック",
"details": [
{
"survey_question_id": 1,
"answers": ["とても満足"]
},
{
"survey_question_id": 2,
"answers": ["スタッフの対応が素晴らしかったです。特に接客の丁寧さが印象的でした。"]
}
]
}
アンケート回答検索のレスポンスの1件と同様
PUT /surveys/answers/{answer_id}/status
survey:answer:status:update
なし
2 rps
key | type | 説明 | 制約など |
---|---|---|---|
status | string | 変更後ステータス | IN_PROGRESS DONE のいずれか |
PUT /surveys/answers/5/status
{
"status": "DONE"
}
アンケート回答検索のレスポンスの1件と同様
DELETE /surveys/answers/{answer_id}
survey:answer:destroy
なし
2 rps
DELETE /surveys/answers/5
なし