POST api/offices

Метод для создания нового "Офиса"

Полный URL-адрес запроса: https://sfa-api.ddapp.biz/api/offices

  Для этого метода требуется авторизация

Информация о запросе

URL параметры

Нет

Тело запроса


"Офис"

CreateOfficeModel
НазваниеОписаниеТип данныхДополнительная информация
VendorId

string

Длина: от 1 до 100

Соответствует регулярному выражению: ^[a-zA-Zа-яА-Я0-9_-]+$

Name

string

Обязательное поле

Длина: от 1 до 100

ResponsibleId

string

Обязательное поле

Location

CreateLocationModel

Обязательное поле

TimeZoneId

string

Обязательное поле

Форматы запросов

{
  "vendorId": "sample string 1",
  "name": "sample string 2",
  "responsibleId": "sample string 3",
  "location": {
    "countryId": "sample string 1",
    "provinceId": "6af24a95-5a19-4df0-9a21-c9d260d6d296",
    "addressLine": "sample string 3",
    "geoCoordinate": {
      "latitude": 1.1,
      "longitude": 1.1
    },
    "settlement": "sample string 4"
  },
  "timeZoneId": "sample string 4"
}
<CreateOfficeModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Offices">
  <Location xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Geo">
    <d2p1:AddressLine>sample string 3</d2p1:AddressLine>
    <d2p1:CountryId>sample string 1</d2p1:CountryId>
    <d2p1:GeoCoordinate>
      <d2p1:Latitude>1.1</d2p1:Latitude>
      <d2p1:Longitude>1.1</d2p1:Longitude>
    </d2p1:GeoCoordinate>
    <d2p1:ProvinceId>6af24a95-5a19-4df0-9a21-c9d260d6d296</d2p1:ProvinceId>
    <d2p1:Settlement>sample string 4</d2p1:Settlement>
  </Location>
  <Name>sample string 2</Name>
  <ResponsibleId>sample string 3</ResponsibleId>
  <TimeZoneId>sample string 4</TimeZoneId>
  <VendorId>sample string 1</VendorId>
</CreateOfficeModel>

Sample not available.

Информация об ответе

ResourceIdModel
НазваниеОписаниеТип данныхДополнительная информация
Id

globally unique identifier

Нет

Форматы ответа

{
  "id": "e5312365-7ea7-492c-9a90-d35e3ff88fdd"
}
<ResourceIdModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Alt.Api.Models.Response">
  <Id>e5312365-7ea7-492c-9a90-d35e3ff88fdd</Id>
</ResourceIdModel>