POST api/service/ServiceCalculate

Расчёт стоимости услуги без записи и с записью в БД

Request Information

URI Parameters

None.

Body Parameters

ServiceCalculateRequest
NameDescriptionTypeAdditional information
ActionType

Тип действия (Create, Calculate, Update)

string

None.

CalculateId

Идентификатор записи расчёта для изменения

integer

None.

SourceType

Тип источника запроса (1 = сайт-виджет, 2 = CRM, 3 = 1C)

byte

None.

Create

Признак "Расчёта" или "Записи расчёта"

boolean

None.

SessionId

Идентификатор сессии сайта

integer

None.

Client

Идентификатор клиента, который инициирует расчёт

integer

None.

BuyerId

Идентификатор покупателя, который инициирует расчёт

integer

None.

CarTypeId

Идентификатор типа машины

byte

None.

CountWheel

Количество колёс для шиномонтажа

byte

None.

GoodId

Идентификатор товара (диска колеса)

integer

None.

WheelDiskId

Идентификатор диска колеса

byte

None.

TireTypeId

Идентификатор типа шин

byte

None.

AddServices

Табличный тип данных: список доп. услуг

Collection of AddServiceRow

None.

AddConditions

Табличный тип данных: список описаний доп. услуг

Collection of AddConditionRow

None.

Operator

Идентификатор оператора программы лояльности

integer

None.

Token

Токен пользователя, который инициирует данный запрос

integer

None.

SiteCode

Уникальный код виджета по продаже подарочных сертификатов, который инициирует запрос

string

None.

Request Formats

application/json, text/json

Sample:
{
  "ActionType": "sample string 1",
  "CalculateId": 1,
  "SourceType": 64,
  "Create": true,
  "SessionId": 1,
  "Client": 1,
  "BuyerId": 1,
  "CarTypeId": 64,
  "CountWheel": 64,
  "GoodId": 1,
  "WheelDiskId": 64,
  "TireTypeId": 64,
  "AddServices": [
    {
      "Id": 1,
      "AdditionalId": 1
    },
    {
      "Id": 1,
      "AdditionalId": 1
    }
  ],
  "AddConditions": [
    {
      "Id": 1,
      "AdditionalId": 1
    },
    {
      "Id": 1,
      "AdditionalId": 1
    }
  ],
  "Operator": 1,
  "Token": 1,
  "SiteCode": "sample string 2"
}

application/xml, text/xml

Sample:
<ServiceCalculateRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Request.ServiceRequest">
  <Operator xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Operator>
  <SiteCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 2</SiteCode>
  <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token>
  <ActionType>sample string 1</ActionType>
  <AddConditions>
    <AddConditionRow>
      <AdditionalId>1</AdditionalId>
      <Id>1</Id>
    </AddConditionRow>
    <AddConditionRow>
      <AdditionalId>1</AdditionalId>
      <Id>1</Id>
    </AddConditionRow>
  </AddConditions>
  <AddServices>
    <AddServiceRow>
      <AdditionalId>1</AdditionalId>
      <Id>1</Id>
    </AddServiceRow>
    <AddServiceRow>
      <AdditionalId>1</AdditionalId>
      <Id>1</Id>
    </AddServiceRow>
  </AddServices>
  <BuyerId>1</BuyerId>
  <CalculateId>1</CalculateId>
  <CarTypeId>64</CarTypeId>
  <Client>1</Client>
  <CountWheel>64</CountWheel>
  <Create>true</Create>
  <GoodId>1</GoodId>
  <SessionId>1</SessionId>
  <SourceType>64</SourceType>
  <TireTypeId>64</TireTypeId>
  <WheelDiskId>64</WheelDiskId>
</ServiceCalculateRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ServiceCalculateResponse
NameDescriptionTypeAdditional information
Price

Цена услуги после расчёта

decimal number

None.

PriceAdditional

Цена доп. услуг в расчёте (эта цифра включена в price)

decimal number

None.

PriceComplex

Цена комплекса услуг в расчёте (эта цифра включена в price)

decimal number

None.

Calculate

Идентификатор созданной записи расчёта

integer

None.

Data

Записи расчёта

Collection of ServiceCalculateDataRow

None.

ErrorCode

Код ошибки

integer

None.

Message

Сообщение об ошибке

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Price": 1.0,
  "PriceAdditional": 1.0,
  "PriceComplex": 1.0,
  "Calculate": 1,
  "Data": [
    {
      "CalculateId": 1,
      "ProcTime": "2024-06-16T12:20:19.2385273+03:00",
      "Price": 1.0,
      "PriceComplex": 1.0,
      "PriceAdditional": 1.0,
      "CarTypeId": 64,
      "CarTypeName": "sample string 1",
      "CountWheel": 64,
      "GoodId": 1,
      "GoodName": "sample string 2",
      "WheelDiskId": 64,
      "WheelDiskName": "sample string 3",
      "TireTypeId": 64,
      "TireTypeName": "sample string 4",
      "BuyerId": 1,
      "AdditionalConditions": [
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1"
        },
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1"
        }
      ],
      "AdditionalServices": [
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1",
          "Price": 1.0
        },
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1",
          "Price": 1.0
        }
      ]
    },
    {
      "CalculateId": 1,
      "ProcTime": "2024-06-16T12:20:19.2385273+03:00",
      "Price": 1.0,
      "PriceComplex": 1.0,
      "PriceAdditional": 1.0,
      "CarTypeId": 64,
      "CarTypeName": "sample string 1",
      "CountWheel": 64,
      "GoodId": 1,
      "GoodName": "sample string 2",
      "WheelDiskId": 64,
      "WheelDiskName": "sample string 3",
      "TireTypeId": 64,
      "TireTypeName": "sample string 4",
      "BuyerId": 1,
      "AdditionalConditions": [
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1"
        },
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1"
        }
      ],
      "AdditionalServices": [
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1",
          "Price": 1.0
        },
        {
          "Id": 64,
          "AdditionalId": 64,
          "Name": "sample string 1",
          "Price": 1.0
        }
      ]
    }
  ],
  "ErrorCode": 1,
  "Message": "sample string 2"
}

application/xml, text/xml

Sample:
<ServiceCalculateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Response.ServiceResponse">
  <ErrorCode xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</ErrorCode>
  <Message xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">sample string 2</Message>
  <Calculate>1</Calculate>
  <Data>
    <ServiceCalculateResponse.ServiceCalculateDataRow>
      <AdditionalConditions>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
      </AdditionalConditions>
      <AdditionalServices>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
          <Price>1</Price>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
          <Price>1</Price>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
      </AdditionalServices>
      <BuyerId>1</BuyerId>
      <CalculateId>1</CalculateId>
      <CarTypeId>64</CarTypeId>
      <CarTypeName>sample string 1</CarTypeName>
      <CountWheel>64</CountWheel>
      <GoodId>1</GoodId>
      <GoodName>sample string 2</GoodName>
      <Price>1</Price>
      <PriceAdditional>1</PriceAdditional>
      <PriceComplex>1</PriceComplex>
      <ProcTime>2024-06-16T12:20:19.2385273+03:00</ProcTime>
      <TireTypeId>64</TireTypeId>
      <TireTypeName>sample string 4</TireTypeName>
      <WheelDiskId>64</WheelDiskId>
      <WheelDiskName>sample string 3</WheelDiskName>
    </ServiceCalculateResponse.ServiceCalculateDataRow>
    <ServiceCalculateResponse.ServiceCalculateDataRow>
      <AdditionalConditions>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalCondition>
      </AdditionalConditions>
      <AdditionalServices>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
          <Price>1</Price>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
        <ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
          <AdditionalId>64</AdditionalId>
          <Id>64</Id>
          <Name>sample string 1</Name>
          <Price>1</Price>
        </ServiceCalculateResponse.ServiceCalculateDataRow.ServiceCalculateAdditionalService>
      </AdditionalServices>
      <BuyerId>1</BuyerId>
      <CalculateId>1</CalculateId>
      <CarTypeId>64</CarTypeId>
      <CarTypeName>sample string 1</CarTypeName>
      <CountWheel>64</CountWheel>
      <GoodId>1</GoodId>
      <GoodName>sample string 2</GoodName>
      <Price>1</Price>
      <PriceAdditional>1</PriceAdditional>
      <PriceComplex>1</PriceComplex>
      <ProcTime>2024-06-16T12:20:19.2385273+03:00</ProcTime>
      <TireTypeId>64</TireTypeId>
      <TireTypeName>sample string 4</TireTypeName>
      <WheelDiskId>64</WheelDiskId>
      <WheelDiskName>sample string 3</WheelDiskName>
    </ServiceCalculateResponse.ServiceCalculateDataRow>
  </Data>
  <Price>1</Price>
  <PriceAdditional>1</PriceAdditional>
  <PriceComplex>1</PriceComplex>
</ServiceCalculateResponse>