POST api/surveys
Метод для создания "Анкеты"
Полный URL-адрес запроса: https://sfa-api.ddapp.biz/api/surveys
Для этого метода требуется авторизация
Информация о запросе
URL параметры
Нет
Тело запроса
"Анкета"
CreateSurveyModelНазвание | Описание | Тип данных | Дополнительная информация |
---|---|---|---|
VendorId | string |
Нет |
|
Name | string |
Обязательное поле |
|
DateFrom | date |
Нет |
|
DateTill | date |
Нет |
|
Description | string |
Обязательное поле |
|
SurveyGroups | Collection of CreateSurveyGroupModel |
Обязательное поле |
|
ManualActivation | boolean |
Обязательное поле |
|
Trigger | SurveyTriggerModel |
Нет |
|
TradeOutletIds | Collection of string |
Нет |
|
TradeOutletCategoryIds | Collection of string |
Нет |
|
TradeOutletFormatIds | Collection of string |
Нет |
|
ProvinceIds | Collection of globally unique identifier |
Нет |
|
OfficeIds | Collection of string |
Нет |
|
SalesDepartmentIds | Collection of string |
Нет |
|
RouteIds | Collection of string |
Нет |
Форматы запросов
{ "vendorId": "sample string 1", "name": "sample string 2", "dateFrom": "2025-04-03T06:12:27.8291167Z", "dateTill": "2025-04-03T06:12:27.8291167Z", "description": "sample string 3", "surveyGroups": [ { "vendorId": "sample string 1", "orderIndex": 2, "name": "sample string 3", "questions": [ { "vendorId": "sample string 1", "orderIndex": 2, "name": "sample string 3", "entityDataType": "string", "required": true }, { "vendorId": "sample string 1", "orderIndex": 2, "name": "sample string 3", "entityDataType": "string", "required": true } ] }, { "vendorId": "sample string 1", "orderIndex": 2, "name": "sample string 3", "questions": [ { "vendorId": "sample string 1", "orderIndex": 2, "name": "sample string 3", "entityDataType": "string", "required": true }, { "vendorId": "sample string 1", "orderIndex": 2, "name": "sample string 3", "entityDataType": "string", "required": true } ] } ], "manualActivation": true, "trigger": { "event": 0, "scheduler": 0, "required": true }, "tradeOutletIds": [ "sample string 1", "sample string 2" ], "tradeOutletCategoryIds": [ "sample string 1", "sample string 2" ], "tradeOutletFormatIds": [ "sample string 1", "sample string 2" ], "provinceIds": [ "ccf48067-7c96-49cc-93bd-7f73532bb325", "e69826b2-e28e-47ef-bd17-f97e2ed50797" ], "officeIds": [ "sample string 1", "sample string 2" ], "salesDepartmentIds": [ "sample string 1", "sample string 2" ], "routeIds": [ "sample string 1", "sample string 2" ] }
<CreateSurveyModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Surveys"> <DateFrom>2025-04-03T06:12:27.8291167+00:00</DateFrom> <DateTill>2025-04-03T06:12:27.8291167+00:00</DateTill> <Description>sample string 3</Description> <ManualActivation>true</ManualActivation> <Name>sample string 2</Name> <OfficeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </OfficeIds> <ProvinceIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:guid>ccf48067-7c96-49cc-93bd-7f73532bb325</d2p1:guid> <d2p1:guid>e69826b2-e28e-47ef-bd17-f97e2ed50797</d2p1:guid> </ProvinceIds> <RouteIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </RouteIds> <SalesDepartmentIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </SalesDepartmentIds> <SurveyGroups xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Surveys.Groups"> <d2p1:CreateSurveyGroupModel> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:OrderIndex>2</d2p1:OrderIndex> <d2p1:Questions xmlns:d4p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Surveys.Questions"> <d4p1:CreateSurveyQuestionModel> <d4p1:EntityDataType>String</d4p1:EntityDataType> <d4p1:Name>sample string 3</d4p1:Name> <d4p1:OrderIndex>2</d4p1:OrderIndex> <d4p1:Required>true</d4p1:Required> <d4p1:VendorId>sample string 1</d4p1:VendorId> </d4p1:CreateSurveyQuestionModel> <d4p1:CreateSurveyQuestionModel> <d4p1:EntityDataType>String</d4p1:EntityDataType> <d4p1:Name>sample string 3</d4p1:Name> <d4p1:OrderIndex>2</d4p1:OrderIndex> <d4p1:Required>true</d4p1:Required> <d4p1:VendorId>sample string 1</d4p1:VendorId> </d4p1:CreateSurveyQuestionModel> </d2p1:Questions> <d2p1:VendorId>sample string 1</d2p1:VendorId> </d2p1:CreateSurveyGroupModel> <d2p1:CreateSurveyGroupModel> <d2p1:Name>sample string 3</d2p1:Name> <d2p1:OrderIndex>2</d2p1:OrderIndex> <d2p1:Questions xmlns:d4p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Surveys.Questions"> <d4p1:CreateSurveyQuestionModel> <d4p1:EntityDataType>String</d4p1:EntityDataType> <d4p1:Name>sample string 3</d4p1:Name> <d4p1:OrderIndex>2</d4p1:OrderIndex> <d4p1:Required>true</d4p1:Required> <d4p1:VendorId>sample string 1</d4p1:VendorId> </d4p1:CreateSurveyQuestionModel> <d4p1:CreateSurveyQuestionModel> <d4p1:EntityDataType>String</d4p1:EntityDataType> <d4p1:Name>sample string 3</d4p1:Name> <d4p1:OrderIndex>2</d4p1:OrderIndex> <d4p1:Required>true</d4p1:Required> <d4p1:VendorId>sample string 1</d4p1:VendorId> </d4p1:CreateSurveyQuestionModel> </d2p1:Questions> <d2p1:VendorId>sample string 1</d2p1:VendorId> </d2p1:CreateSurveyGroupModel> </SurveyGroups> <TradeOutletCategoryIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </TradeOutletCategoryIds> <TradeOutletFormatIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </TradeOutletFormatIds> <TradeOutletIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </TradeOutletIds> <Trigger> <Event>CheckIn</Event> <Required>true</Required> <Scheduler>SingleTime</Scheduler> </Trigger> <VendorId>sample string 1</VendorId> </CreateSurveyModel>
Sample not available.
Информация об ответе
ResourceIdModel
Название | Описание | Тип данных | Дополнительная информация |
---|---|---|---|
Id | globally unique identifier |
Нет |
Форматы ответа
{ "id": "fef52470-4153-47db-a374-e30deea4a609" }
<ResourceIdModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Alt.Api.Models.Response"> <Id>fef52470-4153-47db-a374-e30deea4a609</Id> </ResourceIdModel>