Page tree
Skip to end of metadata
Go to start of metadata

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

Для расчёта тарифа применяется запрос OrderRequest (Mode=Calculation).

На что обратить внимание

В случае успешного расчёта тарифа ответ API будет содержать статус  заказа Calculated, а также заполненный блок DeliveryRateSet.

Рекомендуется передавать не более 1 заказа в одном запросе.

Спецификация

Ниже приведён пример расчёта тарифа. 

Описание типов данных здесь.

Request
Request code
<?xml version="1.0" encoding="utf-8"?>
<Request xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="OrderRequest">
	<Id>1</Id> <!--Optional-->
	<Mode>Calculation</Mode> <!--Required-->
	<OrderList> <!--Required-->
		<Order> <!--Required-->
			<ServiceList> <!--Required-->
				<Service xsi:type="DeliveryService"> <!--Required-->
					<Mode>Express</Mode> <!--Optional-->
					<Sender> <!--Required-->
						<Address> <!--Required-->
							<Country>Россия</Country> <!--Optional-->
							<PostCode>127023</PostCode> <!--Optional-->
							<City>Москва</City> <!--Required-->
							<StreetAddress>ул.Строителей, д.13</StreetAddress> <!--Required-->
						</Address>
					</Sender>
					<Recipient> <!--Required-->
						<Address> <!--Required-->
							<Country>Россия</Country> <!--Optional-->
							<Region>Красноярcкий край</Region> <!--Optional-->
							<PostCode>660013</PostCode> <!--Optional-->
							<City>Красноярск</City> <!--Required-->
							<StreetAddress>ул.Взлетная, д.1</StreetAddress> <!--Required-->
						</Address>
					</Recipient>
					<CargoList> <!--Required-->
						<Cargo> <!--Required at least one-->
							<Dimentions> <!--Optional-->
								<Length>350</Length> <!--Required if parent node present-->
								<Width>500</Width> <!--Required if parent node present-->
								<Height>300</Height> <!--Required if parent node present-->
							</Dimentions>
							<Weight>1400</Weight> <!--Required-->
							<Cost>5000</Cost> <!--Optional-->
						</Cargo>
						<Cargo>
							<Dimentions>
								<Length>250</Length>
								<Width>300</Width>
								<Height>200</Height>
							</Dimentions>
							<Weight>800</Weight>
							<Cost>2000</Cost>
						</Cargo>
					</CargoList>
				</Service>
			</ServiceList>
		</Order>
	</OrderList>
</Request>

Response

Response code
<?xml version="1.0" encoding="utf-8"?>
<Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<RequestId>1</RequestId>
	<OrderList>
		<Order>
			<Payment>
				<PaymentContract>
					<Number>70-989</Number>
				</PaymentContract>
			</Payment>
			<ServiceList>
				<Service xsi:type="DeliveryService">
					<StatusList />
					<Calculation xsi:type="DeliveryCalculation">
						<CargoAmount>2</CargoAmount>
						<Weight>2200</Weight>
						<VolumeWeight>13500</VolumeWeight>
						<IsDangerous>false</IsDangerous>
						<IsOversized>false</IsOversized>
						<SenderDT>2019-09-09T15:40:30.17</SenderDT>
						<IsCashBanIM>false</IsCashBanIM>
						<DeliveryRateSet>
							<DeliveryRate>
								<Mode>Express</Mode>
								<Sum>3703.51</Sum>
								<VAT>740.7</VAT>
								<MinTerm>1</MinTerm>
								<MaxTerm>2</MaxTerm>
								<TermUnit>WorkDay</TermUnit>
								<FuelChargePercent>13.5</FuelChargePercent>
								<DiscountPercent>0</DiscountPercent>
								<Description>Экспресс почта</Description>
								<OrderDT>16:00</OrderDT>
								<CargoDT>18:00</CargoDT>
								<PickupTimeFrom>15:40</PickupTimeFrom>
								<PickupTimeTo>18:00</PickupTimeTo>
								<DeliveryMethod>Курьерская доставка</DeliveryMethod>
								<CardPaymentAvailable>false</CardPaymentAvailable>
								<CashPaymentAvailable>true</CashPaymentAvailable>
								<ContractNumber>70-989</ContractNumber>
								<AdditionalServices>
									<DeliveryAdditionalService>
										<Code>1036</Code>
										<Name>Доставка 18+</Name>
										<Description>Доставка с проверкой возраст получателя</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>337.5</Sum>
										<VAT>67.5</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1026</Code>
										<Name>Услуга возврат частичный</Name>
										<Description>Услуга возврат частичный</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>100</Sum>
										<VAT>20</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1022</Code>
										<Name>СМС-уведомление отправителя</Name>
										<Description>SMS-уведомление отправителя</Description>
										<IncludingType>Included</IncludingType>
										<Sum>30</Sum>
										<VAT>6</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1013</Code>
										<Name>Возврат документов</Name>
										<Description>Возврат документов</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>300</Sum>
										<VAT>60</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1015</Code>
										<Name>Лично в руки</Name>
										<Description>Лично в руки</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>150</Sum>
										<VAT>30</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1039</Code>
										<Name>Сбор за доставку литиевой батареи</Name>
										<Description>Сбор за доставку литиевой батареи</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>350</Sum>
										<VAT>70</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1004</Code>
										<Name>Объявленная ценность</Name>
										<Description>Объявленная ценность</Description>
										<IncludingType>Included</IncludingType>
										<Sum>70</Sum>
										<VAT>14</VAT>
									</DeliveryAdditionalService>
								</AdditionalServices>
								<StrZoneNumber>5</StrZoneNumber>
							</DeliveryRate>
							<DeliveryRate>
								<Mode>Express</Mode>
								<Sum>3703.51</Sum>
								<VAT>740.7</VAT>
								<MinTerm>1</MinTerm>
								<MaxTerm>2</MaxTerm>
								<TermUnit>WorkDay</TermUnit>
								<FuelChargePercent>13.5</FuelChargePercent>
								<DiscountPercent>0</DiscountPercent>
								<Description>Экспресс почта</Description>
								<OrderDT>16:00</OrderDT>
								<CargoDT>18:00</CargoDT>
								<PickupTimeFrom>15:40</PickupTimeFrom>
								<PickupTimeTo>18:00</PickupTimeTo>
								<DeliveryMethod>Самовывоз</DeliveryMethod>
								<ContractNumber>70-989</ContractNumber>
								<AdditionalServices>
									<DeliveryAdditionalService>
										<Code>1036</Code>
										<Name>Доставка 18+</Name>
										<Description>Доставка с проверкой возраст получателя</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>337.5</Sum>
										<VAT>67.5</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1026</Code>
										<Name>Услуга возврат частичный</Name>
										<Description>Услуга возврат частичный</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>100</Sum>
										<VAT>20</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1022</Code>
										<Name>СМС-уведомление отправителя</Name>
										<Description>SMS-уведомление отправителя</Description>
										<IncludingType>Included</IncludingType>
										<Sum>30</Sum>
										<VAT>6</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1013</Code>
										<Name>Возврат документов</Name>
										<Description>Возврат документов</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>300</Sum>
										<VAT>60</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1015</Code>
										<Name>Лично в руки</Name>
										<Description>Лично в руки</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>150</Sum>
										<VAT>30</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1039</Code>
										<Name>Сбор за доставку литиевой батареи</Name>
										<Description>Сбор за доставку литиевой батареи</Description>
										<IncludingType>MayBeIncluded</IncludingType>
										<Sum>350</Sum>
										<VAT>70</VAT>
									</DeliveryAdditionalService>
									<DeliveryAdditionalService>
										<Code>1004</Code>
										<Name>Объявленная ценность</Name>
										<Description>Объявленная ценность</Description>
										<IncludingType>Included</IncludingType>
										<Sum>70</Sum>
										<VAT>14</VAT>
									</DeliveryAdditionalService>
								</AdditionalServices>
								<StrZoneNumber>5</StrZoneNumber>
							</DeliveryRate>
						</DeliveryRateSet>
					</Calculation>
					<Mode>Express</Mode>
					<Sender>
						<Address>
							<Country>Россия</Country>
							<PostCode>127023</PostCode>
							<City>Москва</City>
							<StreetAddress>ул.Строителей, д.13</StreetAddress>
							<PostCodeInfoList />
						</Address>
						<PersonList />
						<ServiceAtPointList />
					</Sender>
					<Recipient>
						<Address>
							<Country>Россия</Country>
							<Region>Красноярcкий край</Region>
							<PostCode>660013</PostCode>
							<City>Красноярск</City>
							<StreetAddress>ул.Взлетная, д.1</StreetAddress>
							<PostCodeInfoList />
						</Address>
						<PersonList />
						<ServiceAtPointList />
					</Recipient>
					<CargoList>
						<Cargo>
							<Dimentions>
								<Length>350</Length>
								<Width>500</Width>
								<Height>300</Height>
							</Dimentions>
							<Weight>1400</Weight>
							<Cost>5000</Cost>
						</Cargo>
						<Cargo>
							<Dimentions>
								<Length>250</Length>
								<Width>300</Width>
								<Height>200</Height>
							</Dimentions>
							<Weight>800</Weight>
							<Cost>2000</Cost>
						</Cargo>
					</CargoList>
					<ItemGroupList />
					<ItemList />
					<PackItemList />
					<DocumentList />
					<DeliveryStatuses />
					<AdditionalServices />
				</Service>
			</ServiceList>
			<StatusList>
				<OrderStatus>
					<Description>Order has been calculated</Description>
					<Date>2019-09-09T15:40:32.957</Date>
					<Code>Calculated</Code>
				</OrderStatus>
			</StatusList>
			<ConsolidationList />
			<ExternalDataList />
		</Order>
	</OrderList>
	<MessageList />
</Response>




  • No labels