POST api/routes
Метод для создания "Маршрута"
Полный URL-адрес запроса: https://sfa-api.ddapp.biz/api/routes?api-version=2.0
Для этого метода требуется авторизация
Информация о запросе
URL параметры
Нет
Тело запроса
"Маршрут"
CreateRouteModel2| Название | Описание | Тип данных | Дополнительная информация |
|---|---|---|---|
| VendorId | string |
Нет |
|
| TypeId | string |
Обязательное поле |
|
| SalesDepartmentId | string |
Обязательное поле |
|
| ManufacturerId | globally unique identifier |
Нет |
|
| ResponsibleId | string |
Обязательное поле |
|
| Name | string |
Обязательное поле |
|
| Warehouses | Collection of CreateRouteWarehouseModel |
Обязательное поле |
|
| BrandIds | Collection of string |
Нет |
|
| GroupIds | Collection of string |
Нет |
|
| RelationshipIds | Collection of string |
Нет |
|
| OrderPricePolicy | PricePolicyModel |
Нет |
|
| RefundPricePolicy | PricePolicyModel |
Нет |
|
| FetchMethod | DataFetchMethod |
Нет |
|
| IgnoreOtherDiscounts | boolean |
Нет |
Форматы запросов
{
"vendorId": "sample string 1",
"typeId": "sample string 2",
"salesDepartmentId": "sample string 3",
"manufacturerId": "676b36e2-8097-4a2e-9204-77c13627aa87",
"responsibleId": "sample string 4",
"name": "sample string 5",
"warehouses": [
{
"warehouseId": "sample string 1",
"orderIndex": 2
},
{
"warehouseId": "sample string 1",
"orderIndex": 2
}
],
"brandIds": [
"sample string 1",
"sample string 2"
],
"groupIds": [
"sample string 1",
"sample string 2"
],
"relationshipIds": [
"sample string 1",
"sample string 2"
],
"orderPricePolicy": {
"priceEditEnabled": true,
"discountPercentEnabled": true,
"discountPercentIsFractional": true,
"discountPercentFrom": 4.1,
"discountPercentTill": 5.1,
"markupPercentEnabled": true,
"markupPercentIsFractional": true,
"markupPercentFrom": 8.1,
"markupPercentTill": 9.1
},
"refundPricePolicy": {
"priceEditEnabled": true,
"discountPercentEnabled": true,
"discountPercentIsFractional": true,
"discountPercentFrom": 4.1,
"discountPercentTill": 5.1,
"markupPercentEnabled": true,
"markupPercentIsFractional": true,
"markupPercentFrom": 8.1,
"markupPercentTill": 9.1
},
"fetchMethod": "byRelationships",
"ignoreOtherDiscounts": true
}
<CreateRouteModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V2.Routes">
<BrandIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</BrandIds>
<FetchMethod>ByRelationships</FetchMethod>
<GroupIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</GroupIds>
<IgnoreOtherDiscounts>true</IgnoreOtherDiscounts>
<ManufacturerId>676b36e2-8097-4a2e-9204-77c13627aa87</ManufacturerId>
<Name>sample string 5</Name>
<OrderPricePolicy xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Miscellaneous">
<d2p1:DiscountPercentEnabled>true</d2p1:DiscountPercentEnabled>
<d2p1:DiscountPercentFrom>4.1</d2p1:DiscountPercentFrom>
<d2p1:DiscountPercentIsFractional>true</d2p1:DiscountPercentIsFractional>
<d2p1:DiscountPercentTill>5.1</d2p1:DiscountPercentTill>
<d2p1:MarkupPercentEnabled>true</d2p1:MarkupPercentEnabled>
<d2p1:MarkupPercentFrom>8.1</d2p1:MarkupPercentFrom>
<d2p1:MarkupPercentIsFractional>true</d2p1:MarkupPercentIsFractional>
<d2p1:MarkupPercentTill>9.1</d2p1:MarkupPercentTill>
<d2p1:PriceEditEnabled>true</d2p1:PriceEditEnabled>
</OrderPricePolicy>
<RefundPricePolicy xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Miscellaneous">
<d2p1:DiscountPercentEnabled>true</d2p1:DiscountPercentEnabled>
<d2p1:DiscountPercentFrom>4.1</d2p1:DiscountPercentFrom>
<d2p1:DiscountPercentIsFractional>true</d2p1:DiscountPercentIsFractional>
<d2p1:DiscountPercentTill>5.1</d2p1:DiscountPercentTill>
<d2p1:MarkupPercentEnabled>true</d2p1:MarkupPercentEnabled>
<d2p1:MarkupPercentFrom>8.1</d2p1:MarkupPercentFrom>
<d2p1:MarkupPercentIsFractional>true</d2p1:MarkupPercentIsFractional>
<d2p1:MarkupPercentTill>9.1</d2p1:MarkupPercentTill>
<d2p1:PriceEditEnabled>true</d2p1:PriceEditEnabled>
</RefundPricePolicy>
<RelationshipIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>sample string 1</d2p1:string>
<d2p1:string>sample string 2</d2p1:string>
</RelationshipIds>
<ResponsibleId>sample string 4</ResponsibleId>
<SalesDepartmentId>sample string 3</SalesDepartmentId>
<TypeId>sample string 2</TypeId>
<VendorId>sample string 1</VendorId>
<Warehouses>
<CreateRouteWarehouseModel>
<OrderIndex>2</OrderIndex>
<WarehouseId>sample string 1</WarehouseId>
</CreateRouteWarehouseModel>
<CreateRouteWarehouseModel>
<OrderIndex>2</OrderIndex>
<WarehouseId>sample string 1</WarehouseId>
</CreateRouteWarehouseModel>
</Warehouses>
</CreateRouteModel>
Sample not available.
Информация об ответе
ResourceIdModel
| Название | Описание | Тип данных | Дополнительная информация |
|---|---|---|---|
| Id | globally unique identifier |
Нет |
Форматы ответа
{
"id": "e1ede32b-9fb4-44d4-9675-350ff50aa46d"
}
<ResourceIdModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Alt.Api.Models.Response"> <Id>e1ede32b-9fb4-44d4-9675-350ff50aa46d</Id> </ResourceIdModel>