POST api/relationships

Метод для создания "Взаимоотношения" между Клиентом и Дистрибьютором (aka Договор)

Полный URL-адрес запроса: https://sfa-api.ddapp.biz/api/relationships?api-version=2.0

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

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

URL параметры

Нет

Тело запроса


Информация о "Взаимоотношениях"

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

string

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

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

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

Name

string

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

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

CustomerId

string

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

CurrencyId

string

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

Максимальная длина: 3

Минимальная длина: 3

PriceCategoryId

string

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

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

Deferment

integer

Интервал: с 0 по 2147483646

Limit

decimal number

Интервал: с -2147483646 по 2147483646

MinOrder

decimal number

Интервал: с -2147483646 по 2147483646

Active

boolean

Нет

DateFrom

date

Нет

DateTill

date

Нет

OrderIndex

integer

Нет

IsFixedPriceCategory

boolean

Нет

PriceTiers

Collection of string

Нет

PaymentTypeIds

Collection of string

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

PaymentForms

Collection of integer

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

DeliveryTypeIds

Collection of string

Нет

Debts

Collection of CreateMultiCurrencySumModel

Нет

OverdueDebts

Collection of CreateMultiCurrencySumModel

Нет

Discounts

Collection of CreateRelationshipDiscountModel

Нет

BrandPriceCategories

Collection of CreateRelationshipBrandPriceCategoryModel

Нет

GroupPriceCategories

Collection of CreateRelationshipGroupPriceCategoryModel

Нет

Properties

Collection of CreateEntityPropertyValueModel

Нет

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

{
  "vendorId": "sample string 1",
  "name": "sample string 2",
  "customerId": "sample string 3",
  "currencyId": "sample string 4",
  "priceCategoryId": "sample string 5",
  "deferment": 1,
  "limit": 1.0,
  "minOrder": 1.0,
  "active": true,
  "dateFrom": "2024-10-06T19:18:59.8147307Z",
  "dateTill": "2024-10-06T19:18:59.8147307Z",
  "orderIndex": 1,
  "isFixedPriceCategory": true,
  "priceTiers": [
    "sample string 1",
    "sample string 2"
  ],
  "paymentTypeIds": [
    "sample string 1",
    "sample string 2"
  ],
  "paymentForms": [
    1,
    2
  ],
  "deliveryTypeIds": [
    "sample string 1",
    "sample string 2"
  ],
  "debts": [
    {
      "currencyId": "sample string 1",
      "sum": 2.0
    },
    {
      "currencyId": "sample string 1",
      "sum": 2.0
    }
  ],
  "overdueDebts": [
    {
      "currencyId": "sample string 1",
      "sum": 2.0
    },
    {
      "currencyId": "sample string 1",
      "sum": 2.0
    }
  ],
  "discounts": [
    {
      "groupId": "sample string 1",
      "brandId": "sample string 2",
      "percent": 3.1
    },
    {
      "groupId": "sample string 1",
      "brandId": "sample string 2",
      "percent": 3.1
    }
  ],
  "brandPriceCategories": [
    {
      "brandId": "sample string 1",
      "priceCategoryId": "sample string 2"
    },
    {
      "brandId": "sample string 1",
      "priceCategoryId": "sample string 2"
    }
  ],
  "groupPriceCategories": [
    {
      "groupId": "sample string 1",
      "priceCategoryId": "sample string 2"
    },
    {
      "groupId": "sample string 1",
      "priceCategoryId": "sample string 2"
    }
  ],
  "properties": [
    {
      "propertyId": "sample string 1",
      "value": "sample string 2"
    },
    {
      "propertyId": "sample string 1",
      "value": "sample string 2"
    }
  ]
}
<CreateRelationshipModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V2.Relationships">
  <Active>true</Active>
  <BrandPriceCategories>
    <CreateRelationshipBrandPriceCategoryModel>
      <BrandId>sample string 1</BrandId>
      <PriceCategoryId>sample string 2</PriceCategoryId>
    </CreateRelationshipBrandPriceCategoryModel>
    <CreateRelationshipBrandPriceCategoryModel>
      <BrandId>sample string 1</BrandId>
      <PriceCategoryId>sample string 2</PriceCategoryId>
    </CreateRelationshipBrandPriceCategoryModel>
  </BrandPriceCategories>
  <CurrencyId>sample string 4</CurrencyId>
  <CustomerId>sample string 3</CustomerId>
  <DateFrom>2024-10-06T19:18:59.8147307+00:00</DateFrom>
  <DateTill>2024-10-06T19:18:59.8147307+00:00</DateTill>
  <Debts xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Miscellaneous.MultiCurrency">
    <d2p1:CreateMultiCurrencySumModel>
      <d2p1:CurrencyId>sample string 1</d2p1:CurrencyId>
      <d2p1:Sum>2</d2p1:Sum>
    </d2p1:CreateMultiCurrencySumModel>
    <d2p1:CreateMultiCurrencySumModel>
      <d2p1:CurrencyId>sample string 1</d2p1:CurrencyId>
      <d2p1:Sum>2</d2p1:Sum>
    </d2p1:CreateMultiCurrencySumModel>
  </Debts>
  <Deferment>1</Deferment>
  <DeliveryTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </DeliveryTypeIds>
  <Discounts xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Relationships">
    <d2p1:CreateRelationshipDiscountModel>
      <d2p1:BrandId>sample string 2</d2p1:BrandId>
      <d2p1:GroupId>sample string 1</d2p1:GroupId>
      <d2p1:Percent>3.1</d2p1:Percent>
    </d2p1:CreateRelationshipDiscountModel>
    <d2p1:CreateRelationshipDiscountModel>
      <d2p1:BrandId>sample string 2</d2p1:BrandId>
      <d2p1:GroupId>sample string 1</d2p1:GroupId>
      <d2p1:Percent>3.1</d2p1:Percent>
    </d2p1:CreateRelationshipDiscountModel>
  </Discounts>
  <GroupPriceCategories>
    <CreateRelationshipGroupPriceCategoryModel>
      <GroupId>sample string 1</GroupId>
      <PriceCategoryId>sample string 2</PriceCategoryId>
    </CreateRelationshipGroupPriceCategoryModel>
    <CreateRelationshipGroupPriceCategoryModel>
      <GroupId>sample string 1</GroupId>
      <PriceCategoryId>sample string 2</PriceCategoryId>
    </CreateRelationshipGroupPriceCategoryModel>
  </GroupPriceCategories>
  <IsFixedPriceCategory>true</IsFixedPriceCategory>
  <Limit>1</Limit>
  <MinOrder>1</MinOrder>
  <Name>sample string 2</Name>
  <OrderIndex>1</OrderIndex>
  <OverdueDebts xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.Miscellaneous.MultiCurrency">
    <d2p1:CreateMultiCurrencySumModel>
      <d2p1:CurrencyId>sample string 1</d2p1:CurrencyId>
      <d2p1:Sum>2</d2p1:Sum>
    </d2p1:CreateMultiCurrencySumModel>
    <d2p1:CreateMultiCurrencySumModel>
      <d2p1:CurrencyId>sample string 1</d2p1:CurrencyId>
      <d2p1:Sum>2</d2p1:Sum>
    </d2p1:CreateMultiCurrencySumModel>
  </OverdueDebts>
  <PaymentForms xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </PaymentForms>
  <PaymentTypeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </PaymentTypeIds>
  <PriceCategoryId>sample string 5</PriceCategoryId>
  <PriceTiers xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </PriceTiers>
  <Properties xmlns:d2p1="http://schemas.datacontract.org/2004/07/DDApp.Shared.Api.Models.V1.EntityProperties.Values">
    <d2p1:CreateEntityPropertyValueModel>
      <d2p1:PropertyId>sample string 1</d2p1:PropertyId>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:CreateEntityPropertyValueModel>
    <d2p1:CreateEntityPropertyValueModel>
      <d2p1:PropertyId>sample string 1</d2p1:PropertyId>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:CreateEntityPropertyValueModel>
  </Properties>
  <VendorId>sample string 1</VendorId>
</CreateRelationshipModel>

Sample not available.

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

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

globally unique identifier

Нет

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

{
  "id": "69165039-9320-4e9b-a3e3-d4722d7bc726"
}
<ResourceIdModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DDApp.Alt.Api.Models.Response">
  <Id>69165039-9320-4e9b-a3e3-d4722d7bc726</Id>
</ResourceIdModel>