Изменения

Перейти к: навигация, поиск

API Documentation

2012 байт добавлено, 10:03, 2 июля 2021
м
Order status query
17 - Order with this number already exists.
== Order status query Status ==
 === Order Status Query Request Example ===
<source lang="xml">
<client>CLIENT</client>
<orderno>1234</orderno>
<orderno2>5678</orderno2>
<ordercode>34234</ordercode>
<givencode>234534</givencode>
<datefrom>20162021-0706-21</datefrom> <dateto>20162021-0706-21</dateto> <target>Car-making factoryCompany</target>
<done>ONLY_NOT_DONE</done>
<changes>ONLY_LAST</changes>
</source>
=== The description of status query fields Fields Description ===
'''statusreq''' is a root container. It is a mandatory element.
*'''auth''' is authorization. It is a mandatory element. *'''client''' — indicates whether it is an attribute of a customer client or an agenta delivery service partner. It is an optional element. Possible values: :* CLIENT is an attribute of a customer, the default value .:* AGENT is an attribute of an agent— delivery service partner. In response the Response contains information on the orders passed on to the agent tendered for their delivery is returned . *'''orderno''' — order number. It is an optional element.*'''ordercode''' — internal order numbercode. It is an optional element. *'''orderno2''' is an — urgent order number from the list of urgent orders. It is an optional element. *'''datefrom''' is a — order creation date “from”"from". It is a mandatory an optional element. *'''dateto''' is a — order creation date “to”"to". It is a mandatory an optional element. *'''target''' is a find stringsearch text. It allows indicating the text that You can specify a part of recipient company name or receiver`s recipient address contains.*'''done''' can have the following — possible values: :* ONLY_DONE — delivered only. Success stauses like '''Delivered''', '''Partially delivered'''.:* ONLY_NOT_DONE - for undelivered only . Statuses like '''Not delivered''', '''Lost'''.:* ONLY_DONE - for delivered ONLY_NEW — new only .:* ONLY_NEW - ONLY_DELIVERY — orders in process only. These are orders in any status except for new only final statuses '''Delivered''', '''Not delivered''', '''Canceled''' and the like.:* ''Empty'' - for all correspondence shipments.*'''changes''' can have take only one ONLY_LAST value - ONLY_LAST. If this parameter is setspecified, all other parameters, except quickstatus, will be are ignored. The description of this mode is given here: For more information, see [[#Newly changed statuses transferGet Latest Changed Statuses|Newly changed statuses transferGet Latest Changed Statuses]] .
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
# You can request statuses of orders created no earlier than 2 months before the '''Please, note!to'''# Period of status query date ('''<code>datefrom''' </code> and '''<code>dateto''' </code> containers) is limited to two months &mdash; two months to the date '''"to"'''. # In case both dates are not specified &mdash; '''If no date is provided, <code>dateto''' is accepted equal to </code> equals the current date. # In case '''Omitting <code>dateto''' date is not specified &mdash; it is accepted equal </code> defaults to '''<code>datefrom''' </code> plus two months. # In case '''Omitting <code>datefrom''' date is not specified &mdash; it is accepted equal </code> defaults to '''<code>dateto''' </code> minus two months.
</div>
<br />
=== Response Examples of responses ===
'''The example of a successful responseSuccess'''
<source lang="xml">
<sender>
<company>Ministry of Internal Affairs</company>
<person>I. I. IvanovSam Goe</person>
<phone>123-45-67</phone>
<contacts>
<phone>+74951234567</phone>
</contacts>
<town code="23432">Saint-Petersburgcity</town> <address>Room 35, 38 Petrovka Str., 38, Room 35</address> <date>20142021-03-22</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
<receiver>
<company>Ministry of Internal Affairs</company>
<person>I. I. IvanovTom Well</person> <phone>123-45-67 - IvanTom, (916)234.45.21 PyotrSam, mvdmia@mailgmail.rucom</phone>
<contacts>
<phone>+74951234567</phone>
<phone>+79162344521</phone>
<email>mvdmia@mailgmail.rucom</email>
</contacts>
<inn>1112223335</inn>
<zipcode>125480</zipcode>
<town code="23432153361" regioncode="78" regionname="Saint-Petersburg city">Saint-Petersburgcity</town> <address>Room 35, 38 Petrovka Str., 38, Room 35</address> <pvz> <code>126</code> <clientcode>QWERTY</clientcode> </pvz> <date>20142021-03-22</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
<coords lat="55.680327" lon="37.604456"></coords>
</receiver>
<pickup>NO</pickup>
<weight>5.1</weight>
<return_weight>5.1</return_weight>
<quantity>2</quantity>
<paytype>CASH</paytype>
<service>2</service>
<return_service>2</service>
<type>3</type>
<return_type>3</return_type>
<waittime>12</waittime>
<price>387.5</price>
<print_check>YES</print_check>
<inshprice>387.5</inshprice>
<enclosure>Children`s Kids toys</enclosure> <instruction>Check in the buyer's presence of the buyer, sign acceptance actcertificate</instruction> <currcoords lat="55.680327" lon="37.604456" accuracy="50" RequestDateTime="20142021-04-21 18:07:45"></currcoords>
<courier>
<code>26</code>
<name>Vladimir Petrovich IvanovKatie Summerhill</name>
<phone>+79161234567</phone>
</courier>
<deliveryprice total="158.6" delivery="100.00" return="58.6"> <advprice code="1" price="150">..Base</advprice> ( <advprice code="2" price details are not yet supported)="0">% of declared value</advprice> <advprice code="3" price="8..6">Fuel surcharge</advprice> <advprice code="4" price="0">Rounding</advprice>
</deliveryprice>
<receiverpays>NO</receiverpays>
<acceptpartially>NO</acceptpartially> <status eventstore="Saint-Petersburg branchBranch office" eventtime="20162021-06-02 17:22:00" createtimegmt="20162021-06-03 16:14:44" message="" title="Delivered">COMPLETE</status>
<statushistory>
<status eventstore="Moscow branchoffice" eventtime="20162021-05-30 10:20:00" createtimegmt="20162021-06-03 16:14:44" message="" title="New">NEW</status> <status eventstore="Moscow branchoffice" eventtime="20162021-06-01 17:38:00" createtimegmt="20162021-06-03 16:14:44" message="Saint-Petersburg branchBranch office" title="Dispatch is Shipment planned">DEPARTURING</status> <status eventstore="Moscow branchoffice" eventtime="20162021-06-01 19:53:00" createtimegmt="20162021-06-03 16:14:44" message="Saint-Petersburg branchBranch office" title="Dispatched from the warehouseShipped">DEPARTURE</status> <status eventstore="Saint-Petersburg branchBranch office" eventtime="20162021-06-02 07:41:00" createtimegmt="20162021-06-03 16:14:44" message="" title="Received by the warehouse">ACCEPTED</status> <status eventstore="Saint-Petersburg branchBranch office" eventtime="20162021-06-02 09:17:00" createtimegmt="20162021-06-03 16:14:44" message="" title="Given to the courier to be delivered Out for delivery">DELIVERY</status> <status eventstore="Saint-Petersburg branchBranch office" eventtime="20162021-06-02 17:22:00" createtimegmt="20162021-06-03 16:14:44" message="" title="Delivered (to be confirmed)as reported by courier">COURIERDELIVERED</status> <status eventstore="Saint-Petersburg branchBranch office" eventtime="20162021-06-02 17:22:00" createtimegmt="20162021-06-03 16:14:44" message="" title="Delivered">COMPLETE</status>
</statushistory>
<customstatecode>2<customstatecode>
<clientstatecode></clientstatecode> <costcode>cc12345</costcode> <receipt fdNum="124555" fnSn="9289000100295555" kktNum="0001611984048555" inn="7722756555" fdValue="2899551555" summ="387.5" ofdUrl="gate.ofd.ru">https://ofd.ru/rec/7722756555/0001611984048555/9289000100295555/124555/2899551555</receipt> <deliveredto>IvanovaMary Smith, sec.secretary</deliveredto> <delivereddate>20162021-06-02</delivereddate>
<deliveredtime>17:22</deliveredtime>
<arrival>2021-05-02 23:21</arrival>
<outstrbarcode>EXT123456</outstrbarcode>
<return_message>Delivered undamaged</return_message>
<department>Accounting</department>
<items>
<item code="34533" extcode="abc123" quantity="1" mass="0.2" retprice="37.5" VATrate="0" barcode="2345625213125" article="1" returns="0" origincountry="040" GTD="" excise="0.00" governmentCode="11223311" suppcompany="Miller and Company" suppINN="1112223334" suppphone="79161234567">BallPrincess house</item> <item code="34456" extcode="abc124" quantity="2" mass="2" retprice="100" VATrate="10" barcode="4645625213138" article="2" returns="0" governmentCode="">Hula hoopSword</item> <item code="34421" extcode="abc125" quantity="3" mass="0.3" retprice="50" VATrate="18" barcode="2345625213126" itemcode="44123" article="3" returns="0" governmentCode="">Yellow rattlerJedi lightsaber</item>
</items>
<packages>
<package code="33331" strbarcode="ORD0000001" mass="1" message="" got="YES"></package>
<package code="33332" strbarcode="ORD0000002" mass="2.5" message="" got="NO"></package>
</packages>
</order>
</statusreq>
</source>
'''A response example in the absence of ordersNo Orders'''
<source lang="xml">
</source>
'''A response example in case of the authorization errorAuthorization Error'''
<source lang="xml">
</source>
'''A response example in case of the syntax errorSyntax Error'''
<source lang="xml">
</source>
=== Status response fields description Response Fields ===All the fields of response correspond with order structure when creating an order, with some additions:
* ''order'' container attributes: :* '''''awb''''' is a courier company related waybill number.:* '''''orderno2''''' is an order number from All responce fields correspond to the urgent delivery subsystem.:* '''''ordercode''''' is an internal code [[#Example of the New Order|order in creating request]] structure, with the system which is applied for some internal operations.following additions:* '''''givencode''''' is an internal code of the order in the system which is applied for some internal operations.
* The '''order''' container attributes: :* '''code''awb''''' attribute — number of the courier company packing slip.:* '''item''orderno2' container is an internal code '''' — number of order string the packing slip in the system which is applied courier service urgent delivery subsystem.:* '''''ordercode''''' — order internal code, for some internal operationsuse.:* '''''returnsgivencode''''' is the amount of a certain product unit which a receiver has refused. It will have a non-zero value only in case of a partial refusal— order internal code, for internal use.
* The '''''code''''' attribute of the '''item''' container — internal order line code, for interal use.:* '''''returns''''' is the amount of the article rejected by the recipient. It is not 0 only in case of partial refusal. * The '''''got''''' attribute of the '''package''' container — indicates whether a package is accepted. Possible values: YES, NO.:* '''''returns''''' is the amount of the article rejected by the recipient. It is not 0 only in case of partial refusal.* '''''coords''''' in '''receiver''' container — recipient location coordinates.* '''pickup''' — indicates receiver positionwhether it is a pickup order. Possible values: YES, NO. If YES, the entire order is considered to be the assignment for pickup, not for delivery. * '''currcoords''' indicates current order positionlocation cordinates. Its attributes are::* '''''lat''''' is latitude :* '''''lon''''' is longitude:* '''''accuracy''''' indicates the degree of — location accuracy in meters :* '''''RequestDateTime''''' is date/and time of the latest position location update. * '''courier''' — information on the courier who carries the order. If the order is not out for delivery, plan courier data is shown.* '''waittime''' — courier waiting time. * '''deliveryprice''' is the price — cost of delivery denominated in the customer`s settlement currency. It has the following attributes::* '''''total''''' — total delivery cost.:* '''''delivery''''' — one-way trip cost.:* '''''return''''' — return trip cost (if '''order''' > '''return=YES''').
* '''status''' is a delivery status (see the list of statuses below). It has the following attributes (they are filled in starting from version 2008.0.0.670 of the system):
:* '''''eventstore''''' is a branch which the following status is related to

Навигация