POST api/service/BuyerAction
Создание, изменение, получение информации о покупателе услуги и его автомобилях
Request Information
URI Parameters
None.
Body Parameters
BuyerActionRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| ActionType |
Тип действия которое нужно совершить по товару |
string |
None. |
| ServiceBuyerId |
Идентификатор покупателя для изменения данных |
integer |
None. |
| Name |
Имя покупателя |
string |
None. |
| Phone |
Телефон покупателя |
string |
None. |
| CarName |
Наименование марки автомобиля |
string |
None. |
| CarNumber |
Гос. номер автомобиля |
string |
None. |
| CarId |
Идентификатор машины для изменения |
integer |
None. |
| LoyaltyRegistration |
Разрешение на регистрацию в программе лояльности |
boolean |
None. |
| AllowWhatsApp |
Разрешение на коммуникацию по каналу вотсап |
boolean |
None. |
| StorageContract |
Договор хранения шин автомобиля |
string |
None. |
| RegistrationId |
Идентификатор записи на услугу, по которой получают данные по покуптелю (нужно, чтобы явно понять какой из автомобилей покупателя фигурирует в записи) |
integer |
None. |
| Operator |
Идентификатор оператора программы лояльности |
integer |
None. |
| Token |
Токен пользователя, который инициирует данный запрос |
integer |
None. |
| SiteCode |
Уникальный код виджета по продаже подарочных сертификатов, который инициирует запрос |
string |
None. |
Request Formats
application/json, text/json
{
"ActionType": "sample string 1",
"ServiceBuyerId": 1,
"Name": "sample string 2",
"Phone": "sample string 3",
"CarName": "sample string 4",
"CarNumber": "sample string 5",
"CarId": 1,
"LoyaltyRegistration": true,
"AllowWhatsApp": true,
"StorageContract": "sample string 6",
"RegistrationId": 1,
"Operator": 1,
"Token": 1,
"SiteCode": "sample string 7"
}
application/xml, text/xml
<BuyerActionRequest 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 7</SiteCode> <Token xmlns="http://schemas.datacontract.org/2004/07/LCManagerPartner.Implementation.Abstractions">1</Token> <ActionType>sample string 1</ActionType> <AllowWhatsApp>true</AllowWhatsApp> <CarId>1</CarId> <CarName>sample string 4</CarName> <CarNumber>sample string 5</CarNumber> <LoyaltyRegistration>true</LoyaltyRegistration> <Name>sample string 2</Name> <Phone>sample string 3</Phone> <RegistrationId>1</RegistrationId> <ServiceBuyerId>1</ServiceBuyerId> <StorageContract>sample string 6</StorageContract> </BuyerActionRequest>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
BuyerActionResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| ServiceBuyer |
Идентификатор созданного покупателя услуги |
integer |
None. |
| BuyerData |
Данные по покупателю |
Collection of BuyerActionBuyerDataRow |
None. |
| Cars |
Данные по автомобилям клиента |
Collection of BuyerActionCarRow |
None. |
| CarRegData |
Данные по машине покупателя из конкретной записи |
Collection of BuyerActionCarRegDataRow |
None. |
| ErrorCode |
Код ошибки |
integer |
None. |
| Message |
Сообщение об ошибке |
string |
None. |
Response Formats
application/json, text/json
{
"ServiceBuyer": 1,
"BuyerData": [
{
"ServiceBuyerId": 1,
"Name": "sample string 1",
"Phone": 1,
"ClientId": 1,
"AllowWhatsApp": true
},
{
"ServiceBuyerId": 1,
"Name": "sample string 1",
"Phone": 1,
"ClientId": 1,
"AllowWhatsApp": true
}
],
"Cars": [
{
"Id": 64,
"CarId": 1,
"CarName": "sample string 1",
"CarNumber": "sample string 2",
"StorageContract": "sample string 3"
},
{
"Id": 64,
"CarId": 1,
"CarName": "sample string 1",
"CarNumber": "sample string 2",
"StorageContract": "sample string 3"
}
],
"CarRegData": [
{
"Id": 64,
"CarId": 1,
"CarName": "sample string 1",
"CarNumber": "sample string 2",
"StorageContract": "sample string 3"
},
{
"Id": 64,
"CarId": 1,
"CarName": "sample string 1",
"CarNumber": "sample string 2",
"StorageContract": "sample string 3"
}
],
"ErrorCode": 1,
"Message": "sample string 2"
}
application/xml, text/xml
<BuyerActionResponse 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>
<BuyerData>
<BuyerActionResponse.BuyerActionBuyerDataRow>
<AllowWhatsApp>true</AllowWhatsApp>
<ClientId>1</ClientId>
<Name>sample string 1</Name>
<Phone>1</Phone>
<ServiceBuyerId>1</ServiceBuyerId>
</BuyerActionResponse.BuyerActionBuyerDataRow>
<BuyerActionResponse.BuyerActionBuyerDataRow>
<AllowWhatsApp>true</AllowWhatsApp>
<ClientId>1</ClientId>
<Name>sample string 1</Name>
<Phone>1</Phone>
<ServiceBuyerId>1</ServiceBuyerId>
</BuyerActionResponse.BuyerActionBuyerDataRow>
</BuyerData>
<CarRegData>
<BuyerActionResponse.BuyerActionCarRegDataRow>
<CarId>1</CarId>
<CarName>sample string 1</CarName>
<CarNumber>sample string 2</CarNumber>
<Id>64</Id>
<StorageContract>sample string 3</StorageContract>
</BuyerActionResponse.BuyerActionCarRegDataRow>
<BuyerActionResponse.BuyerActionCarRegDataRow>
<CarId>1</CarId>
<CarName>sample string 1</CarName>
<CarNumber>sample string 2</CarNumber>
<Id>64</Id>
<StorageContract>sample string 3</StorageContract>
</BuyerActionResponse.BuyerActionCarRegDataRow>
</CarRegData>
<Cars>
<BuyerActionResponse.BuyerActionCarRow>
<CarId>1</CarId>
<CarName>sample string 1</CarName>
<CarNumber>sample string 2</CarNumber>
<Id>64</Id>
<StorageContract>sample string 3</StorageContract>
</BuyerActionResponse.BuyerActionCarRow>
<BuyerActionResponse.BuyerActionCarRow>
<CarId>1</CarId>
<CarName>sample string 1</CarName>
<CarNumber>sample string 2</CarNumber>
<Id>64</Id>
<StorageContract>sample string 3</StorageContract>
</BuyerActionResponse.BuyerActionCarRow>
</Cars>
<ServiceBuyer>1</ServiceBuyer>
</BuyerActionResponse>