The description of the formation of the fields for introduction into the form is presented in Table 2.2.
Examples:
|
Example of an XML code for a single submission, wait=1:
|
Example of request execution
|
|
<?xmlversion="1.0"encoding="UTF-8"?>
<param>
<login>login</login>
<function>CreateShipments</function>
<request>
<Shipments>
<CreateShipment>
<Calculate>true</Calculate>
<ClientsShipmentRef>000-
00000001</ClientsShipmentRef>
<ClientUID>62f66c7c-cd19-11df-bb67-00215aee3ebe
</ClientUID>
<Sender>Відправник</Sender>
<SenderService>0</SenderService>
<SenderBranch_UID>75ec298e-a8dd-11de-bac3-
0030485903e8</SenderBranch_UID>
<SenderStreet_UID/>
<SenderTel>0673405775</SenderTel>
<Receiver>Отримувач</Receiver>
<ReceiverService>1</ReceiverService>
<ReceiverBranch_UID/>
<ReceiverStreet_UID>6e23d513-e0d2-11df-9b37-
00215aee3ebe</ReceiverStreet_UID>
<ReceiverHouse>2</ReceiverHouse>
<ReceiverFlat>66</ReceiverFlat>
<ReceiverFloor></ReceiverFloor>
<ReceiverTel>123123123</ReceiverTel>
<COD>1000</COD>
<Notation>ТестуванняАПІ</Notation>
<Receiver_Pay>1</Receiver_Pay>
<TypePay>0</TypePay>
<Conditions_items>
<ContitionsName>6e23d513-e0d2-11df-9b37-
00215aee3ebe</ContitionsName>
</Conditions_items>
<Places_items>
<SendingFormat>PAX</SendingFormat>
<Quantity>1</Quantity>
<Volume>0,012</Volume>
<Weight>6</Weight>
<Packaging/>
<Insurance>300</Insurance>
<Length></Length>
<Width></Width>
<Height></Height>
</Places_items>
<DescriptionOfContents_items>
<ContentName>Футболка</ContentName> <ContentQuantity>1</ContentQuantity> - <ContentWeight>0.6</ContentWeight > <ContentValue>12</ContentValue> <CustomsCode>1111111111</CustomsCode> <ContentCountry>UA</ContentCountry> </DescriptionOfContents_items> <PlanDeliveryDate>22.10.2015</PlanDeliveryDate>
<PlanDeliveryTimeFrom>10:00</PlanDeliveryTimeFrom><PlanDeliveryTimeTo>14:00</PlanDeliveryTimeTo>
</CreateShipment>
</Shipments></request> <sign>sign*</sign> </param> |
<?xmlversion="1.0"encoding="UTF-8" standalone="yes"?>
<return>
<api>API-1C</api>
<apiversion>1</apiversion>
<result_table>
<items>
<ClientsShipmentRef>000-
00000001</ClientsShipmentRef>
<BarCode>000-8302714</BarCode>
<PriceOfDelivery>25</PriceOfDelivery>
<Error>000</Error>
</items>
</result_table>
<result_uuid>24288</result_uuid>
<errors>
<code>000</code>
<name></name>
</errors>
</return>
|
Table 2.2. Description of the contents of <request>XML code.
| Field | Description | Type |
|
CreateShipment
|
Block for description of departure
|
|
|
Calculate
|
true/false
if true - response will return price of delivey in tag PriceOfDelivery
|
|
|
ClientsShipmentRef
|
The sending code (number) is assigned by the Contractor Text
|
Text
|
|
ClientUID
|
Unique customer ID assigned after a counterpart is entered into the system (Mandatory) Unique Identifier
|
Uniqueidentifier
|
|
Fields for the description of the sender's details
|
||
|
Sender
|
Sender
|
Text
|
|
SenderService
|
Type of service if
«0» - warehouse
«1» - door
(Mandatory))
|
Boolean (1/0)
|
|
SenderBranch_UID
|
The unique identifier of the Sender unit, the result of the Branch function, paragraph 1.7. Installs if
[SenderService] = 0 (If the sender service is a warehouse -
Obligatory)
|
Uniqueidentifier
|
|
SenderStreet_UID
|
Unique street identifier (address) of the Sender, the result of the "Adress" function, p.1.6. Installed if [SenderService] = 1 and [SenerAdressType] = 0 (If the sender's service door is Required) |
Uniqueidentifier
|
|
SenderHouse
|
House number is the sender's address. Installed if [SenderService] = 1 (If the sender service door -
Obligatory)
|
Text
|
|
SenderFlat
|
The number of the sender's apartment.
|
Text
|
|
|
Installed if [SenderService] = 1 |
|
|
SenderTel
|
Telephone Sender
|
Text
|
|
Fields to describe the Recipient's details
|
|
|
|
Receiver
|
Receiver
|
Text
|
|
ReceiverService
|
Type of service if
"0" - warehouse
"1" - door (Mandatory)
|
Boolean (1/0)
|
|
ReceiverBranch_UID
|
Unique identifier of the Recipient subdivision, the result of the Branch function, p.1.7. Installed if [ReceiverService] = 0
(If the service provider has a time-
Obligatory)
|
Uniqueidentifier
|
|
ReceiverStreet_UID
|
Unique identifier of the addresses (addresses) of the Recipient, the result of the "Address" function, p.1.6. Installed if [ReceiverService] = 1
(If the servicing door -
Obligatory)
|
Uniqueidentifier
|
|
ReceiverHouse
|
Address of the Recipient's home address. Installed if [ReceiverService] = 1
(If the recipient's door service is -
Obligatory)
|
Text
|
|
ReceiverFlat
|
The apartment number of the address of the Recipient. Installed if [ReceiverService] = 1 |
Text
|
|
ReceiverFloor
|
Indicates the floor number on which to lift the load. The "Rise on the floor" service is automatically turned on and calculated. |
Int
|
|
ReceiverTel
|
Telephone number of the Recipient. (Obligatory) |
Text
|
|
COD
|
Declared value (amount) of return shipping
|
Number
|
|
Receiver_Pay
|
Payment method if
"0" - the payer pays
"1" - Pays Recipient (Required)
|
Boolean (1/0)
|
|
TypePay
|
Type of payment, if
"0" - cashless
"1" - cash (Mandatory)
|
Boolean (1/0)
|
|
Notation
|
Notation
|
Text
|
|
Description of additional delivery conditions
|
||
|
Conditions_items
|
The block may have one or more entries, the result of the "ShipmentOptCondition" function, p.1.10. | |
|
ContitionsName
|
Unique condition identifier
|
Uniqueidentifier
|
|
Description of the places of departure
|
||
|
Places_items
|
The result of the "ShipmentFormats" function p.1.9.
The block may have one or more entries. When forming a place, check the format of the shipping in accordance with the minimum and maximum parameters
weight, volume, insurance. (Mandatory)
|
|
|
SendingFormat
|
Code of departure format (Required)
|
Text
|
|
Quantity
|
Number (Required)
|
Number
|
|
Volume
|
Volume
|
Number
|
|
Weight
|
Weight (Mandatory)
|
Number
|
|
Packaging
|
Packaging
|
Uniqueidentifier(отримується з функції ShipmentPackaging)
|
|
Insurance
|
Insurance (Mandatory)
|
Number
|
| Length | Length | Text |
| Width | Width | Text |
| Height | Height | Text |
|
|
||
|
Block for the transfer of goods
|
||
|
good
|
For each item of goods, a separate <good> block is created. The block is optional.
Goods are entered for the maintenance of a commodity account or for realization
partial order functions.
|
|
|
good_id
|
Unique product identifier. Used to create a product in the relay database and for further synchronization
|
Uniqueidentifier
|
|
good_name
|
Product name
|
Text
|
|
goodSN_name
|
Serial number of the product
|
Text
|
|
qty
|
Quantity of goods
|
Int
|
|
price
|
Price of the product for one piece, UAH
|
Number
|
|
summ
|
Cost of goods, UAH
|
Number
|
|
weight
|
Weight of product, kg
|
Number
|
| Description of the contents of the sending | ||
| DescriptionOfContents_items | Block fields provide the ability to convey the description of the contents of the submission. The block is optional, none of the fields in the block is optional. | |
|
ContentName
|
Product name
|
Text
|
|
ContentQuantity
|
Number of units
|
Number
|
|
ContentWeight
|
Weight
|
Number
|
|
ContentValue
|
Cost
|
Number
|
|
CustomsCode
|
Customs Code
|
Text
|
|
ContentCountry
|
Country of manufacture of goods
|
Text
|
|
PlanDeliveryDate
|
Desired / Planned Order Date (Optional)
|
Date: dd.MM.yyyy |
| PlanDeliveryTimeFrom | Start the time range of the order. Fills in if the PlanDeliveryDate is specified. (Optional parameter) | Time: hh:mm |
| PlamDeliveryTimeTo | End of time range authorization. Fills in if the PlanDeliveryDate is specified. (At least 2 hours after PlanDeliveryTimeFrom) (Optional) | Time: hh:mm |
The [CreateShipment] tag restricts one shipment. In the code you can create one or several items.
If the user sets [Wait] = 1, the system does not break the connection (means the forced waiting for the result of creating a new record). When the sending system is successfully created, the system generates a barcode. In our example, barcode [BarCode] = '000-8302714'. In the event of an error, the System will list the Error Code in the [Error] field.
If the user sets [Wait] = 0, the system returns only the unique request ID in the [uuid] field, for example: [uuid] = '24228'. The user may at the time convenient for him to receive sending information using this code.