Getting routes from A-TMS
HTTPS Requests
For a request you need to send to the address
https://atms.a-tms.net/v2/DataExchange/xml/LoadRoutes
request type POST with XML data in the request body. If you cannot use HTTPS, you can access the same address via HTTP, but the data will not be secured during transmission.
Request XML File Format
Tag <Body> can be an arbitrary container, including nesting. APIKey and APISecret can be obtained by contacting A-TMS support at [email protected]
Request for planning date:
<? xml version = "1.0" encoding = "utf-8"?>
<Body>
<APIVersion> 1 </APIVersion>
<APIKey> QWERTYUIOP </APIKey>
<APISecret> ASDFGHJKL </APISecret>
<PlanDate> 10/07/2019 </PlanDate>
<SourceId> 1 </SourceId>
</Body>
Request for delivery date:
<? xml version = "1.0" encoding = "utf-8"?>
<Body>
<APIVersion> 1 </APIVersion>
<APIKey> QWERTYUIOP </APIKey>
<APISecret> ASDFGHJKL </APISecret>
<DeliveryDate> 10/07/2019 </DeliveryDate>
<SourceId> 1 </SourceId>
</Body>
XML response file format
XML file with planning results for the submitted PlanDate date. If there are no routes created by the logistician, PlanDate will receive a response with an empty <Routes /> tag. When the SourceId is filled in the request, only requests matching this field will be unloaded, it is used to split the planning result across several accounting systems.
<?xml version="1.0" encoding="utf-8"?>
<Body>
	<APIKey>QWERTYUIOP</APIKey>
	<Routes>
		<Route>
			<RouteCode>011174</RouteCode>
			<StartDate>07.10.2016</StartDate>
			<StartTime>09:00</StartTime>
			<DriverCode>1234ABCD</DriverCode>
			<DriverName>John</DriverName>
			<CarCode>АЕ1234-5</CarCode>
			<CarName>Volvo</CarName>
			<CarrierCode>123</CarrierCode>
			<CarrierName>Carrier</CarrierName>
			<WarehouseCode>17</WarehouseCode>
			<WarehouseName>Fresco</WarehouseName>
			<Orders>
				<Order>
					<SourceId>1</SourceId>
					<OrderCode>DNS001084V</OrderCode>
					<OrderDate>06.10.2013</OrderDate>
					<DeliveryDate>07.10.2013</DeliveryDate>
					<DeliveryTime>10:45</DeliveryTime>
					<Number>1</Number>
					<ConsignorCode/>
					<ConsignorName/>
					<CarriageCustomerCode/>
					<CarriageCustomerName/>
					<SalesRepTeam/>
					<ConsignmentNoteCode/>
					<ConsignmentNoteDate/>
					<Status>Planned</Status>
					<ExternalOrderId/>
					<ExternalOutletId/>
					<PointActions>
						<Action>
							<Code>Failed</Code>
							<Value>NoStamp</Value>
							<Unit>Accounting department</Unit>
						</Action>
						<Action>
							<Code>DriversNote</Code>
							<Value>Houston, we have a problem</Value>
						</Action>
					</PointActions>
					<OrderActions>
						<Action>
							<Code>PartlyFailed</Code>
							<Value>ClientRejected</Value>
						</Action>
						<Action>
							<Code>ActPhoto</Code>
							<Value>https://atmsapi.alfasoft.by/v2/Photo/KJGKGHFGFDGFDHFHG.jpg</Value>
						</Action>
					</OrderActions>
				</Order>
				<Order>
					<SourceId>1</SourceId>
					<OrderCode>DNS001081V</OrderCode>
					<OrderDate>06.10.2013</OrderDate>
					<DeliveryDate>07.10.2013</DeliveryDate>
					<DeliveryTime>12:20</DeliveryTime>
					<Number>2</Number>
					<ConsignorCode/>
					<ConsignorName/>
					<CarriageCustomerCode/>
					<CarriageCustomerName/>
					<SalesRepTeam/>
					<ConsignmentNoteCode/>
					<ConsignmentNoteDate/>
					<Status>Planned</Status>
					<ExternalOrderId/>
					<ExternalOutletId/>
					<PointActions/>
					<OrderActions/>
				</Order>
				<Order>
					<SourceId>1</SourceId>
					<OrderCode>DNS001085V</OrderCode>
					<OrderDate>06.10.2013</OrderDate>
					<DeliveryDate>07.10.2013</DeliveryDate>
					<DeliveryTime>16:30</DeliveryTime>
					<Number>3</Number>
					<ConsignorCode/>
					<ConsignorName/>
					<CarriageCustomerCode/>
					<CarriageCustomerName/>
					<SalesRepTeam/>
					<ConsignmentNoteCode/>
					<ConsignmentNoteDate/>
					<Status>Planned</Status>
					<ExternalOrderId/>
					<ExternalOutletId/>
					<PointActions/>
					<OrderActions/>
				</Order>
			</Orders>
		</Route>
	</Routes>
	<UnplannedOrders>
		<Order>
			<SourceId>1</SourceId>
			<OrderCode>AA0017224</OrderCode>
			<DeliveryDate>28.08.2020</DeliveryDate>
			<OrderDate>01.08.2020</OrderDate>
			<ExternalOrderId>92375b0e-d3df-11ea-ac73-005056b13af7</ExternalOrderId>
		</Order>
		<Order>
			<SourceId>1</SourceId>
			<OrderCode>BB0030574</OrderCode>
			<DeliveryDate>28.08.2020</DeliveryDate>
			<OrderDate>14.08.2020</OrderDate>
			<ExternalOrderId>49a7274b-de07-11ea-ac73-005056b13af7</ExternalOrderId>
		</Order>
	</UnplannedOrders>
</Body>
Made on
Tilda