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": "2024-11-22T00:13:37.8567808Z", "dateTill": "2024-11-22T00:13:37.8567808Z", "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": [ "14cb660f-4298-44fd-9f8b-54812b814905", "aceb6527-9ada-4757-959c-2c5f0d68deff" ], "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>2024-11-22T00:13:37.8567808+00:00</DateFrom> <DateTill>2024-11-22T00:13:37.8567808+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>14cb660f-4298-44fd-9f8b-54812b814905</d2p1:guid> <d2p1:guid>aceb6527-9ada-4757-959c-2c5f0d68deff</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": "60e99761-7977-4c57-b9da-b25231dafa59" }
<ResourceIdModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Alt.Api.Models.Response"> <Id>60e99761-7977-4c57-b9da-b25231dafa59</Id> </ResourceIdModel>