108
правок
Изменения
→Response Examples
MeaSoft has an option of integration by means of XML API under through HTTP POST protocol.
The API is designed for integrating customers (online shops and other companies ordering delivery) with courier services working under MeaSoft.
When writing the given documentation we assume that a person reading it has the level of expertise in coding sufficient for understanding the contents of this documentation, has a knowledge of XML and integration development environment. If you are not qualified as a developer you will have to hire a professional developer to implement your project.
If you still have questions after reading the given documentation, feel free to ask them via e-mail [mailto:support@courierexe.ru support@courierexe.ru]. In your e-mail email message you should , please introduce yourself, leave your contact information (your phone number, Skype login) and the name of the company that you want to integrate with.
== CMS Integrations ==
|-
|[[Файл:bitrix.png|center|x44px]]
|style="text-align: center;"|[httphttps://marketplace.1c-bitrix.ru/solutions/measoft.courier/ Install]
|Supports version 14.5 and higher.
|-
|[[Файл:prestashop.png|center|x60px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/prestashop.zip Download]
|Supports version 1.5.2.0 and higher (including 2.x)
|-
|[[Файл:OpencartOCStore.png|center|x60px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/opencart.zip For version 1.5.5.1]<br>[httphttps://courierexe.ru/download/api/measoft_oc2.ocmod.zip For version 2.0]<br>[httphttps://courierexe.ru/download/api/measoft_oc2.3.ocmod.zip For version 2.3]<br>[httphttps://courierexe.ru/download/api/measoft_ос3.ocmod.zip For version 3.0]
|Supports version 1.5.5.1 and higher.<br>Select a module for your OpenCart version.<br>[https://opencartforum.com/files/file/2906-avtomatizaciya-otpravki-i-otslezhivanie-dostavok-courierexe-dlya-opencart-15x/ Alternative third-party module]
|-
|The module is designed for sending orders to delivery service, while the plugin calculates delivery cost on creating an order.
|-
<!--|[[Файл:advantshop.png|center|x44px]]
|style="text-align: center;"|[https://promo-z.ru/ PROMO company site]
|The PROMO company has developed the module. Contact PROMO to set up integration between MeaSoft and ADVANTSHOP.
|--->
|[[Файл:insales.png|center|x80px]]
|style="text-align: center;"|Configure using MeaSoft [[Личный кабинет клиента|client account]]
|-
|[[Файл:Joomla2.jpg|center|x60px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/com_measoft.zip Download]
|Integration with Virtuemart is available only.
|-
|-
|[[Файл:wordpress.jpg|center|x80px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/wordpress.zip Download]
|
|-
|style="text-align: center;"|[https://marketplace.cs-cart.com/measoft-en.html Download]
|Supports versions 4.10 and higher.
|-
|style="height:100px; text-align: center;"|'''Webhook'''
|style="text-align: center;"|See [[Webhook|here]]
|Transfer of status and order info to your system
|-
|}
== Test Account ==
For debugging , you can access your test client account at
https://home.courierexe.ru/8
login testlogin password testmpass
In the '''Integration''' > '''Debug''', you can execute API requests for debugging purposes and see sent requests. You will see all created orders on the '''Placed Orders''' tab.
To simplify the process of integration, you can download [httphttps://courierexe.ru/download/api/php_sample.zip the example of addressing the service using PHP].
== Account for Integration ==
== General Terms ==
Courier service provides access to a web service at https://home.courierexe.ru/api/. "/" (slash) on the end of the link is required. Use the following credentials for test access:
login: testlogin password: testmpass
extra client code: 8
* 3000 queries from a single account per 1 hour.
* 200 MB text data downloaded per 3 hours.
* Number of non-existing order status queries must not exceed the number of queries of existing order statuses.
If a limit is exceeded, the IP address is blocked for up to 3 hours.
* Attacking our API with status queries with numbers of all you orders. Mind that the <code>tracking</code> queries are not intended for that, see [[API documentation#Order tracking by number|description]]. These queries are especially bad at the top of the hour.
* Sending queries like "Show statuses of all orders for the last 3 months" every 5 minutes.
* Sending a large amount of order numbers trying to guess which one is valid.
Correct actions:
* Queries are created for existing orders only.
* To check order statuses, use <code>statusreq</code> queries with parameter <code>changes=ONLY_LAST</code>.
* When requesting for changed statuses, you must confirm that the statuses were sucessfully received by query <code>commitlaststatus</code>.
<costcode>cc12345</costcode>
<items>
<item extcode="abc123" quantity="1" mass="0.2" retprice="37.5" VATrate="0" barcode="2345625213125" textArticle="1" article="1" volume="3" origincountry="AUT" GTD="321546654" excise="15.20" suppcompany="ООО LLC "Miller and Partners"" suppphone="79161234567" suppINN="1112223334" governmentCode="11223311">Race car</item>
<item extcode="abc124" quantity="2" mass="2" retprice="100" inshprice="100" VATrate="10" barcode="4645625213138" article="2" length="10" width="20" height="30" origincountry="004">Princess castle</item>
<item extcode="abc125" quantity="3" mass="0.3" retprice="50" inshprice="50" barcode="2345625213126" itemcode="44123" article="3" type="1">Clay mass</item>
</items>
<packages>
<package strbarcode="ORD0000001" mass="1" message="" quantity="3"></package>
<package strbarcode="ORD0000002" mass="2.5" message="" length="10" width="20" height="30"></package>
</packages>
<deliveryset above_price="100" return_price="1000" VATrate="10">
<below below_sum="500" price="500" />
<below below_sum="2000" price="300" />
</deliveryset>
<advprices>
<advprice>
<code>1</code>
<value>123</value>
</advprice>
<advprice>
<code>2</code>
<value>10.5</value>
</advprice>
<advprice>
<code>3</code>
<value>true</value>
</advprice>
</advprices>
<overall_volume>81</overall_volume>
<userid>user123</userid>
<groupid>customer</groupid>
</order>
</neworder>
=== Order Elements ===
'''Required Elements'''
For MeaSoft, only three fields are required:* either receiver->company or receiver->person*'''neworder''' is a root container, a mandatory element. receiver->address :*'''''newfolder''''' is an attribute of a new order, possible values: '''YES''', '''NO'''. If '''YES''', a new order is created for the specified shipment in the courier service system. It is an optional elementreceiver->phone.
<spoiler text="Example of order with minimum data"><source lang="xml"><?xml version="1.0" encoding="UTF-8"?><neworder> <auth extra="8" login="login" pass="pass" /> <order> <receiver> <company>Company</company> <phone>(495)123-45-67</phone> <address>Petrovka, 38</address> </receiver> </order></neworder></source></spoiler>'''Fields Description'''*'''neworder''' — root container, required. :*'''barcode''newfolder''''' — attribute of a new order, possible values: '''YES''', '''NO'''. If '''YES''' , a new order is created for the specified shipment in the courier service system. It is an optional element. *'''order''' — container used for description of one order, required. A single '''neworder''' container can have a number of '''order''' containers to create several orders by using one query.:*'''''orderno''''' — order number. Specify it if it is assigned by the client. In case it is not assigned, this field can be left empty. The system will generate its own number and send it back in the response. The system checks whether the specified number has been used within the current calendar year. If it already exists in the system, the order is not created, error 17 "Such number exists" returns. *'''barcode''' — order barcode. In case the customer uses barcodes for his dispatches and the barcode is different from the order number, the barcode is entered into this field. In case there are several packages and they are individually marked, underscore character can be used as a mask to indicate barcoded item number varying for different packages within one order.
''For example'': There are 20 items in order No. 123 packed in 3 packages. The client generates 3 barcodes for each package: CLNT0012301, CLNT0012302, CLNT0012303, where CLNT is a client prefix, 00123 is an order number, 01-03 is the number for each package in the order. In this case CLNT00123__ should be entered into the '''barcode''' field. Thus, MeaSoft knows the last 2 characters can be any values and will display barcodes for the same order. If it is not you who will print packing slips with the specified barcode, the barcode must not exceed 25 characters, otherwise it cannot be fully seen on the standard printing forms.
*'''sender''' — presents the information about order sender. It is an optional container.
<source lang="xml">
<sender>
<person>Sender company contact person</person>
<phone>Sender phone number, email</phone>
<town>Sender location in the "<[name> ] city" format</town>
<address>Sender address</address>
<date>Pickup date in the "YYYY-MM-DD" format</date>
</source>
* '''receiver''' is the information about the recipient. It is a mandatory containerRequired.
<source lang="xml">
<receiver>
<person>Recipient company contact person</person>
<phone>Recipient phone number, email</phone>
<town regioncode="Region code"> Recipient location in the "<[name> city” ] city" format</town>
<address>Recipient address</address>
<date>Delivery date in the "YYYY-MM-DD" format</date>
*'''phone''' is a phone number. You can specify several phone numbers and emails.
*'''town''' is the name of the town.
*'''pvz''' is the pickup point code from the '''Branches''' reference. Besides, you can specify the pickup point in the <code>address</code> parameter by one of the following:
** Pickup point code in our system.
** Pickup point code in service partner's system.
For the '''town''' tag, you can speify the value from the '''Regions ''' reference in the '''regioncode''' attribute. The town is searched for in the specified region.
In the '''country''' attribute, you can specify the recipient country according to the [https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes ISO 3166-1] standard. For example: "AT", "AUT" or "040" for Austria.
*'''service''' — delivery mode (service type). It is transferred as a code from the '''Urgency Kinds''' reference.
*'''type''' – shipment type. It is transferred as a code from the '''Shipment Types''' reference.
*'''return_type ''' - return shipment type. It is transferred as a code from the '''Shipment Types''' reference.
*'''price''' — order amount. If the '''items''' container is present, this parameter is ignored and calculated automatically.
*'''deliveryprice'''— delivery fee. If the '''items''' container is present, the "Delivery" item is added to it.
*'''receiverpays''' — indicates whether recipient pays the delivery fee. If '''YES''', the recipient pays, if '''NO''', the sender pays.
*'''department''' — the order creator's department.
*'''pickup''' — indicates whether it is a pickup order. If '''YES''', the entire order is considered to be the assignment for pickup, not for delivery. It is used for calling a courier to the sender's place to pick up shipments. '''Note'''. If warehouse goods are added to the order, their type must be '''[7]Goods pickup'''. Any other type is automatically changed to type 7 on submitting the order.
* '''acceptpartially''' — indicates whether the recepient can partially accept order items.
*'''items''' — a container describing order items. It is an optional container. It has the following attributes:
:* '''''item''''' — item name.
:*'''''inshprice''''' — declareed value of an article. Rounds to the hundredths. If not specified, considered equal to '''retprice'''.
:* '''''VATrate''''' — VAT rate which is specified as integer percentage. If a value is not indicated, then “18” value is entered.
:* '''''barcode''''' — item barcode. [[File:Article.png|thumb|100px|right]]
:* '''''article''''' — supplier SKU ID. ''Attention!'' Supplier SKU ID is required only for the items stored at the courier service warehouse and if cross-docking is required for them. In this case the system tries to associate the item with a corresponding item in [[API#Nomenclature list|nomenclature list]]. If the item is not found in the nomenclature list, the error message is displayed. If several items are found with the same supplier SKU ID, one of the IDs is selected randomly. It might result in incorrect cross-docking.
:*'''''itemcode''''' — internal SKU ID/ You can use instead of supplier SKU ID. ''Attention!'' SKU ID is required only for the items stored at the courier service warehouse and if cross-docking is required for them. The system uses SKU ID to associate the item with a corresponding item in [[API#Nomenclature list|nomenclature list]]. If the item is not found, the error message is displayed.
:*'''''type''''' — item type. Possible values:
::1 — Goods. The default value.::2 — Delivery. The item is added automatically if '''order''' > '''deliveryprice''' is specified.::3 — Service::4 — Advance payment. The amount is specified. '''quantity''' is ignored, always "1". The amount in the order is displayed with the negative sign irrespective of the sign in the request. The item is added automatically if '''order''' > '''paytype=NO''' is specified.::6 - Credit payment. The amount is specified. '''quantity''' is ignored, always "1". The amount in the order is displayed with the negative sign irrespective of the sign in the request.::7 - Pickup. Use it if you have to pick up the items from the recipient. The amount in the order is displayed with the negative sign irrespective of the sign in the request.
:* '''''extcode''''' — external line code. It is used to identify the order lines when obtaining statuses. It is an optional field.
:* '''''origincountry''''' - origin country code according to [https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes ISO 3166-1].
:* '''''width''''' — package width in cm.
:* '''''height''''' — package height in cm.
:* '''''quantity''''' — number of packages with the specified dimensions and mass. Total number of packages in the order cannot be more than 1000.
* '''deliveryset''' — custom delivery rate setup. It has the following attributes:
:* '''''price''''' — purchase amount within the limit.
* '''advprices''' — a container describing additional value-added services. It is an optional container. It has the following attributes: <span style="color: red;>To use it in the API, in the [[Courier Service Account#Setting Up Client Account|client account settings]], enable the '''Additional Value-added services''' field for new order and pickup request.</span>
:* '''''code''''' — service code.
:* '''''value''''' — service value. If service type is Boolean, set the value to '''True'''.
If you want to apply additional value-added services (for example, delivery, cross-docking, lifting upstairs, etc.), specify them in the same '''items''' container as items without a SKU ID.
*'''costcode''' — employee cost code.
*'''overall_volume''' — total volume, m3. An optional virtual field. It is used to calculate the package dimensions. The calculation works only if every package contains zero values of length, heigth, or width.
*'''userid''' — user ID, either string or integer type. Virual field, optional. The field is used in the custom delivery rate settings. It defines the rule priority. You can use the field for CMS and CRM to set delivery fee for each customer individually.
*'''groupid''' — user group ID, either string or integer type. Virual field, optional. The field is used in the custom delivery rate settings. It defines the rule priority. You can use the field for CMS and CRM to set delivery fee for each customer group individually.
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
When submitting orders with scheduled delivery or pickup date earlier than the nearest possible date, the delivery or pickup date changes automatically to the [[Courier Service Account#Calculating the Nearest Possible Delivery Date|nearest possible date]].</div>
=== Response Examples of responses === If a request is executed successfully and an order is created, the order amount in the <code>orderprice</code> attribute and the 0 error returns. Otherwise, an error number and its description in the <code>errormsg</code> attribute returns. The <code>orderno</code> attribute contains order number, <code>barcode</code> — order barcode. '''The example of a successful responseSuccess'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<neworder>
<createorder orderno="AB23541" barcode="67567#114" error="0" errormsg="successSuccess" orderprice="5000"></createorder> <createorder orderno="55_6542AB23542" barcode="67567#115" error="0" errormsg="successSuccess" orderprice="6000"></createorder> <createorder orderno="AB23542AB23543" barcode="67567#116" error="0" errormsg="successSuccess" orderprice="0"></createorder>
</neworder>
</source>
'''The example of a response with an errorError'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<neworder>
<createorder orderno="AB23541" barcode="67567#114" error="1767" errormsg="Such number Order barcode already existsin the database."></createorder> <createorder orderno="AB23542" barcode="67567#115" error="1317" errormsg="empty companyOrder number already exists in the database."></createorder> <createorder orderno="AB23543" barcode="67567#116" error="1467" errormsg="empty personOrder barcode already exists in the database."></createorder>
</neworder>
</source>
'''The example of a response in case of the authorization errorAuthorization Error'''
<source lang="xml">
</source>
'''The example of a response in case of a syntax error'''Syntax Error'''
<source lang="xml">
</source>
=== Error codes in case of ordering =Order Status ==
<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>
<conditions>
<namecontains>1234</namecontains>
<namestarts>1234</namestarts>
</conditions>
</statusreq>
</source>
=== The description of status query fields Fields Description === '''statusreq''' is a root container. It is a mandatory elementRequired. *'''auth''' is — authorization. It is a mandatory elementRequired. *'''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, CLIENT — the default value .:* AGENT is an attribute of an agentAGENT — 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_NOT_DONE - for ONLY_DONE — delivered only. Success stauses like '''Delivered''', '''Partially delivered'''.:* ONLY_NOT_DONE — 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]] .* '''conditions''' — specify search conditions. The nested elements are joined by the logical AND operator.:* '''namecontains''' — search order numbers (external codes) that contain the specified text.:* '''namestarts''' — search order numbers (external codes) that start with the specified text.
<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 — two months to the date '''"to"'''. # In case both dates are not specified — '''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 — it is accepted equal </code> defaults to '''<code>datefrom''' </code> plus two months. # In case '''Omitting <code>datefrom''' date is not specified — it is accepted equal </code> defaults to <code>dateto</code> minus two months.# You can search using '''datetoconditions''' minus two monthsonly by order numbers (external codes). 4 characters is the minimum search length.
</div>
=== 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>
<deliveryPIN>1234</deliveryPIN>
</receiver>
<pickup>NO</pickup>
<weight>5.1</weight>
<return_weight>5.1</return_weight>
<quantity>2</quantity>
<paytypecode="1">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>
<partner>Western Branch</partner>
<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:
* 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.* '''''deliveryPIN''''' in '''receiver''' container — PIN.* '''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. * '''deliverypricecourier''' — information on the courier who carries the order. If the order is the price of not out for delivery in the customer`s settlement currency, plan courier data is shown.* '''waittime''' — courier waiting time. * '''statusdeliveryprice''' is a — cost of delivery status (see denominated in the list of statuses below)customer`s currency. It has the following attributes (they are filled in starting from version 2008.0.0.670 of the system)::* '''''eventstoretotal''''' is a branch which the following status is related to— total delivery cost.:* '''''eventtimedelivery''''' is the time of status change (time of status change depends on the location of a branch)— one-way trip cost.:* '''''createtimegmtreturn'''''— return trip cost (if ' ''order''' > '''return=YES''').The '''deliveryprice''' tag includes value-added services. The option is available for the time of the actual status change (GMT)Premium and Maximum courier service account plans::* '''''messageadvprice''''' is the — value-added service name of a receiving branch in case of a transfer between branches.:* '''''code''''' — value-added service code.:* '''''titleprice''''' is the name of a status in Russian — value-added service amount.
* '''statushistorystatus''' is — delivery status. See the history list of delivery statusesbelow. It contains has the list of following attributes::* '''''eventstore''status''' containers. It is filled in only for Premium and Maximum plan starting from version 2008.0.0.670 of — courier service branch which set the systemcurrent status. :* '''customstatecode''eventtime''''' is an internal — time of latest status code of a delivery service. Please, check with the delivery service for its values. They are assigned by the delivery service change as in “Guides” - “Statuses” - “15 Correspondence statuses” section. The guide is not transferred to the client via API due to a possible presence of delivery service technological statuses in itcurrent branch timezone. :* '''clientstatecode''' is a customer`s status code. It is used in case a customer is transferring his codes of delivery/reasons for non-delivery statuses. * 'createtimegmt''deliveredto''' is — status change entry created in the information on delivery or a reason for non-deliverydatatbase, GMT. Used to arrange the entries in chronological order.:* '''delivereddate''message' is the date of delivery. * '''deliveredtime''' is the time — name of deliverya recipient branch. It can be left empty Used in case of non-deliveryorder transfer between branches. :* '''outstrbarcode''title' is a contractor`s code ('''' — name of the order code within an external system). It is used status in integrations with external systemsRussian.
* '''statushistory''' — history of delivery statuses. It contains the list of '''status''' containers. It is filled in only for Premium and Maximum plans. * '''customstatecode''' — internal status code of a courier service. Please, check with the courier service for its values. They are assigned by the courier service in '''References''' > '''Statuses''' > '''15 Shipment statuses'''. The reference is not transferred to the client via API due to possible presence of delivery service internal statuses in it.* '''clientstatecode''' — client status code. It is used if client submits their own codes of delivery statuses and reasons for non-delivery. * '''deliveredto''' — actual information on delivery or a reason for non-delivery.* '''delivereddate''' — actual delivery date.* '''deliveredtime''' — actual delivery date. It can be empty in case of non-delivery.* '''arrival''' — scheduled delivery date formatted as YYYY-MM-DD HH:MM:SS.* '''outstrbarcode''' — service partner system code (in an external system). It is used for integration with external systems.* '''partner''' — current branch or service partner.* '''return_message''' — return information.* '''department''' — the order creator's department. The '''status''' container can have the following values:
: AWAITING_SYNC — Awaiting for sync. Order is not in the courier company database yet.
: '''NEW''' — Created successfully, transfered submitted to the courier company.: NEWPICKUP — The pickup task is Pickup created.: PICKUP — The order is picked Picked up from the sender.: WMSASSEMBLED — The order Order is assembled picked at the fulfillment warehousecenter.: WMSDISASSEMBLED — The order Order is disassembled to unpicked at the fulfillment warehousecenter.: '''ACCEPTED''' — Received by the warehouse.: CUSTOMSPROCESS — Customs control pendingclearance.: CUSTOMSFINISHED — Customs control passedclearance complete.: CONFIRM — Dispatch Delivery is confirmedscheduled.: UNCONFIRM — Dispatch has not been confirmedFailed to arrange for delivery time.: DEPARTURING — Dispatch from one warehouse to another is pendingWarehouse transfer planned.: DEPARTURE — Dispatched from one warehouse to anotherWarehouse transfer shipped.: INVENTORY — Inventory. Made sure the order shipment is in the warehouse.: PICKUPREADY — Ready Available for pick up pickup at the pickup point of issue.: '''DELIVERY''' — Given to the courier to be deliveredOut for delivery.: COURIERCANCELED COURIERDELIVERED — Not delivered Delivered (to be confirmed, the COURIERRETURN state as reported by courier). Confirmation by manager is expected)to change status to COMPLETE.: COURIERDELIVERED COURIERPARTIALLY — Delivered Partially delivered (to be confirmed, the COMPLETE state as reported by courier). Confirmation by manager is expected)to change status to PARTIALLY.: COURIERPARTIALLY COURIERCANCELED — Partially delivered Refused (to be confirmed, the PARTIALLY state as reported by courier). Confirmation by manager is expected)to change status to COURIERRETURN.: COURIERRETURN — Returned to warehouse by the courier. The courier couldn`t failed to deliver the order to the receiver recepient and returned it back to the warehouse. This is an intermediate status after which , the manager is checking to check whether the order is to be delivered again (the DATECHANGE/DELIVERY states) or this is a final non-delivery (CANCELED).: DATECHANGE — PostponementRescheduled.
: '''COMPLETE''' — Delivered.
: '''PARTIALLY''' — Partially delivered.
: '''CANCELED''' — Not delivered (ReturnReturned/CancellationCanceled). After this state the The order must be returned tho the to sender, and will have the RETURNING and RETURNED states.
: RETURNING — Return to the sender is planned (after CANCELED).: RETURNED — Returned to the sender.
: LOST — Lost.
''Note:'' The set of currently used statuses may be expanded and changed in the future.
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
# '''statushistory''' and '''deliveryprice''' are filled in for [[Courier Service Account#Personal Account Functions|Premium and Maximum]] courier service account plans only.
# The sequence of statuses is not fixed. For example, you can get the COMPLETE status and then NEW because an operator marked the order completed by mistake and then corrected it.
</div>
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<auth extra="8" login="login" pass="pass"></auth>
<changes>ONLY_LAST</changes>
<quickstatusstreamid>NO1234</quickstatusstreamid> </statusreq>
</source>
The system will display all orders that have at least one of the fields changed since the time of the last query in this mode:
Returns all the orders with at least one of the following fields changed since the last status request sent in this mode:
orderno
status
price
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<commitlaststatus>
<auth extra="8" login="login" pass="pass"></auth>
<client>CLIENT</client>
<streamid>1234</streamid>
</commitlaststatus>
</source>
'''Query Fields''' * '''auth''' — Authorization. Required.* '''streamid''' - stream ID. If you get order statuses for multiple integrations, pass this parameter to divide getting statuses and sending confirmation. The value must be from 100 up to 10000. It is an optional element.*'''client''' — indicates whether it is a client or a delivery service partner. It is an optional element. Possible values::*'''CLIENT''' — the default value.:*'''AGENT''' — delivery service partner. Response contains information on the orders tendered for delivery. If successful you will get the following response:
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<commitlaststatus> <error error="0" errormsg=">OK"></error></commitlaststatus>
</source>
This way of status transfer ensures a complete and correct status transfer even in case if the status has changed in the time period between statuses` query the request and receipt confirmation of their receipt. If the system hasn`t received the confirmation of a you do not confirm successful status transferreceipt, it the information will consider this information to be not delivered and will display it in case of a requeryreturned again on the next request.
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
'''A query example:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</source>
'''A response exampleResponse Example:'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<sender>
<town code="1" country="RU">Moscow city</town>
<date>2021-03-22</date> <time_min>09:00</time_min> <time_max>14:00</time_max>
</sender>
<receiver>
<town code="1" country="RU">Moscow city</town>
</receiver>
<AWBprice>BarCode387.5</AWBprice> <inshprice>387.5</inshprice> <paytype>CASH</paytype> <weight>05.1</weight> <quantity>12</quantity> <service>2</service> <type>3</type> <return>NO</return> <return_service>2</service> <return_date></return_date> <return_time></return_time> <return_message></return_message> <waittime>12</waittime> <enclosure>Kids toys</enclosure> <instruction>Check in the presence of the buyer, sign acceptance certificate</instruction> <deliveryprice total="158.6" delivery="100.00" return="58.6" /> <courier> <code>26</code> <name>Katie Summerhill</name> <phone>+79161234567</phone> </courier> <currcoords lat="55.680327" lon="37.604456" accuracy="50" RequestDateTime="2021-04-21 18:07:45" /> <status eventstore="Saint-Petersburg branchBranch office" eventtime="20162021-06-02 17:22:00" createtimegmt="20162021-06-03 16:14:44" message="" title="Delivered" country="RU">COMPLETE</status> <statushistory> <status eventstore="Moscow office" eventtime="20162021-05-30 10:20:00" createtimegmt="20162021-06-03 16:14:44" message="" title="New" country="RU">NEW</status> <status eventstore="Moscow office" eventtime="20162021-06-01 17:38:00" createtimegmt="20162021-06-03 16:14:44" message="Saint-Petersburg branch" title="Dispatch is planned" country="RUBranch office">DEPARTURING</status> <status eventstore="Moscow office" eventtime="20162021-06-01 19:53:00" createtimegmt="20162021-06-03 16:14:44" message="Saint-Petersburg branch" title="Dispatched from the warehouse" country="RUBranch office">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" country="RU">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" country="RU">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)" country="RU">COURIERDELIVERED</status> <status eventstore="Saint-Petersburg branchBranch office" eventtime="20162021-06-02 17:22:00" createtimegmt="20162021-06-03 16:14:44" message="" title>COMPLETE</status> </statushistory> <deliveredto>Mary Smith, secretary</deliveredto> <delivereddate>2021-06-02</delivereddate> <deliveredtime>17:22</deliveredtime> <outstrbarcode>EXT123456</outstrbarcode> <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="Delivered0.00" countrygovernmentCode="RU11223311" suppcompany="Miller and Company" suppINN="1112223334" suppphone="79161234567">COMPLETEPrincess house</item> <item code="34456" extcode="abc124" quantity="2" mass="2" retprice="100" VATrate="10" barcode="4645625213138" article="2" returns="0" governmentCode="">Sword</item> <item code="34421" extcode="abc125" quantity="3" mass="0.3" retprice="50" VATrate="18" barcode="2345625213126" article="3" returns="0" governmentCode="">Jedi lightsaber</statusitem> </statushistoryitems>
</order>
</tracking>
</source>
The function searches for the latest order among the orders of all clients by its number. It provides anonymized information on the current state of the order. Response containers are similar to the [[#Order Status|Order Status Request]]. == Changing Order ==The request is intended to edit the orders that are not in process yet — there was no changes of shipment or delivery status or delivery time, etc. You can only update edit orders if the courier company service uses tariffs «Premium» the Premium or «Maximum»Maximum [[Courier Service Account#Personal Account Functions|personal account plan]]. In To enable order editing, in the courier service account go to allow this option they must turn it on at '''Settings''' > '''Parameters''' > '''AdvansedAdvanced''' and set select the '''Allow cancelling ordercanceling and editing orders''' flagcheck box.
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
</div>
=== Order update answer fields description Edit Request Fields ===All the request fields are correspond to the same as [[#Creating Order|order creating request structure]], except for "Neworder" request but :* specify the <code>editorder</code> instead of the <code>neworder</code> root tag: .* do not specify the '''editorder''' <code>barcode</code> tag as it is returned instead of '''neworder'''assigned when creating an order.* for <code>item</code> items, specify the item internal code in the <code>code</code> attribute. To receive the internal code, use the [[#Order Status|order status]] request.
=== Edit Response Fields ===All response fields correspond to the [[#Creating Order change status query allows finding out |order creating response structure]], except for:*the final status <code>editorder</code> tag is returned instead of the order - "Delivered" or "Not delivered (Return<code>neworder</Cancellation)code>."
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<setorderinfocancelorder> <auth extra="8" login="login" pass="pass" /> <order orderno="" ordercode="123456" /> <order orderno="123aaa" ordercode="" /></cancelorder></source> '''Order Cancelation Fields''' '''cancelorder''' — root container. Required.* '''auth''' — authorization. Required.* '''order''' — container of the order being canceled. Required. The request can contain more than one '''order'''. It has the following attributes::* '''''orderno''''' — external order code. :* '''''ordercode''''' — internal order code.Either '''''orderno''''' or '''''ordercode''''' is required. '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><cancelorder> <order orderno="123test" ordercode="123456" error="0" errormsg="OK" /> <order orderno="123aaa" ordercode="" error="52" errormsg="order not found" /></cancelorder></source> == Adding Files to Order == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><addattachments>
<auth extra="8" login="login" pass="pass" />
<order ordercode="123456" date="2018-03-01" time="10:00" message="The customer has refused from the purchase"orderno>1234567</orderno> <order ordercode="234567" date="2018-03-01" time="10:00" messageattachments> <item name="photo1.jpg">JVBERi0xLjMN1wb25lbnQgMQ JUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA U3VidHlwZSAvSW1hZ2UNL1d pZHRoIDE4MDgNL0hlaWdodCA ggNCAwIFINL0JpdHNQZXJDb 21wb25lbnQgMQ0vRGVjb2RlU ENL0NvbHVtbnMgMTgwOA0+P g0vSW1hZ2VNYXNrIHRydWUNL XhEZWNvZGUNPj4Nc3RyZWFt DQ</item> <image filenameitem name="filename1photo2.jpg">/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyVBERi0xLjMNAwIG9iag0HRoJ JUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA vWE9iamVjdA0vU3VidHlwZS AvSW1hZ2UNL1dpZHRoIDEzNj gNL0hlaWdodCAxMzMzDS9MZ W5ndGggNCAwIFINL0JpdHNQZ ccHhcgLikxMC4pLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09PT09PXJDb21wb25lbnQgMQ0vRGVj b2RlUGFybXMgPDwNL0sgLTEN T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAYACAADASIAL0NvbHVtbnMgMTM2OA0+Pg0 vSW</imageitem> </orderattachments></setorderinfoaddattachments>
</source>
'''The description of status response fields:Fields Description''' '''addattachments''' — root container. Required.*'''auth''' — authorization. Required.*'''orderno''' — order number. Required. You can use tag <code>ordercode</code> to specify order internal code.*'''attachments''' — file data. Required.**'''item''' — base64 encoded binary file data. Required.***'''name''' — an '''item''' attribute that contains the file name. Required.
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<setorderinfoaddattachments> <order ordercodeattachments> <item name="123456photo1.jpg" error="0" errormsg="OK" errormsgru="Successfully" /> <order ordercodeitem name="234567photo2.jpg" error="590" errormsg="value [date_put] is already set" errormsgru="The value [Date of delivery] is already setOK" /> </attachments></setorderinfoaddattachments>
</source>
== Obtaining the pdf waybill Getting Order Files ==
'''Request example:Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<waybillattachments>
<auth extra="8" login="login" pass="pass" />
<orderno>1234567</orderno>
</source>
'''The fields description:Fileds Description'''
'''waybillattachments''' - is a root — Root container. It is a mandatory elementRequired. *'''auth''' - is — authorization. It is a mandatory elementRequired. *'''orderno''' - Order — order numberor code. It is a mandatory elementRequired. *'''form''' - Form type. Is not mandatory. Can be::* 1 - A detailed waybill:* 2 - Sticker (Zebra)
'''Response example:Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<waybillattachments> <contentitem name="doc1.docx" size="35654">EODIcaI8KSBlwQ 4MnEOR7Px8U8EBAyGICBnwpw JVBERi0xLjMN IZhQgz0ZxuPs8EBMJUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA U3VidHlwZSAvSW1hZ2UNL1d pZHRoIDE4MDgNL0hlaWdodCA ggNCAwIFINL0JpdHNQZXJDb 21wb25lbnQgMQ0vRGVjb2RlU ENL0NvbHVtbnMgMTgwOA0+P g0vSW1hZ2VNYXNrIHRydWUNL XhEZWNvZGUNPj4Nc3RyZWFt DQ</GcbjzB AwhBl8hwQYIO00GmEwg1CeEG item> <item name="photo2.jpg" size="74861">VBERi0xLjMN mqYTChNU0wqf8l8nz4zgc+K fCno+zwU5GjOZmzXGcbEQYIM JUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA vWE9iamVjdA0vU3VidHlwZS AvSW1hZ2UNL1dpZHRoIDEzNj 4zkegRE40zWzONyoNNMIOIa cWnp6aDCGEGE9NQmoQd2mg00 gNL0hlaWdodCAxMzMzDS9MZ W5ndGggNCAwIFINL0JpdHNQZ 79U4f3hPTwnfp6Sdrafeqpa JDpFw/1aYT077VNNNdO00G3q XJDb21wb25lbnQgMQ0vRGVj b2RlUGFybXMgPDwNL0sgLTEN mqqvp9p2E7T0/wiFemv8uG6 OML0NvbHVtbnMgMTM2OA0+Pg0 vSW</contentitem></waybillattachments>
</source>
The <code>item</code> tag contains base 64 encoded binary data (files).
'''The example of a query for order cancellationRequest Example:'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<cancelordersetorderinfo>
<auth extra="8" login="login" pass="pass" />
<order ordernoordercode="123456" > <message>Accepted by Tailor</message> <outstrbarcode>7654312</outstrbarcode> </order> <order ordercode="123456234567" > <status>PICKUPREADY</status> <eventtime>2021-05-30 10:20:00</eventtime> <message>Client refused the order orderno</message> <paytype>CASH</paytype> <items> <item code="34533" quantity="1" reason="123aaa0" /> <item code=" ordercode34456" quantity="0" reason="0" /> <item code="34421" quantity="2" reason="0" /> </items> <image filename="filename1.jpg" > /9j/4AAQSkZJRgA BAQAAAQABAAD/2wBDAA0JCg sKCA0LCgsODg0PEyAVExISEy ccHhcgLikxMC4pLSwzOko+M zZGNywtQFdBRkxOUlNSMj5aY VpQYEpRUk//2wBDAQ4ODhMR EyYVFSZPNS01T09PT09PT09P T09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09 PT09PT0//wAARCAYACAADAS IA</image> </order></cancelordersetorderinfo>
</source>
'''The description of status query fields:Fields Description'''
'''cancelordersetorderinfo''' is a — root container. It is a mandatory elementRequired. *'''auth''' is — authorization. It is a mandatory elementRequired.*'''order''' is a cancelled — order container. It is a mandatory elementRequired. A query may request can contain more than one '''order''' container. It has the following attributesattribute::* '''''ordernoordercode''''' — an internal order code.*'''status''' — new order status. It can be any [[#Response Fields|status]] excepting AWAITING_SYNC and NEW.*'''eventtime''' — status change date and time. Required if status is specified. *'''message'''— delivery info text. *'''outstrbarcode' '' — code in service partner system (order code in external system). It is used in integrations with external systems.*'''paytype''' — order`s cipherpayment type. Possible values are '''CASH''' and '''CARD'''.*'''items''' — container that describes order items. It has the following attributes::* '''''ordercodecode''''' is an internal — item code .:* '''''quantity''''' — quantity of delivered articles.:* '''''reason''''' — reason for non-delivery. It is selected from the status list.*'''image''' — container for the image being attached. It contains base 64 encoded image file text. The '''order''' container can contain more than one '''image''' container. It has the following attribute: Please, note that at least one of :* '''''filename''orderno'' or '— file name. '''Response Example'ordercode'' attributes should be specified! <source lang="xml"><?xml version="1.0" encoding="UTF-8"?><setorderinfo> <order ordercode="123456" error="0" errormsg="OK" /> <order ordercode="234567" error="59" errormsg="value [date_put] is already set" /></setorderinfo></source>
== Getting Documents for Printing ==
'''The example of a response:Get Print Forms Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<cancelorderwaybill> <order ordernoauth extra="123test8" ordercodelogin="123456login" errorpass="0pass" errormsg/> <orders> <order orderno="OK1234567" errormsgruordercode="Successfully33331" /> <order orderno="123aaa1234568" ordercode="33332" error/> </orders> <form>1</form></waybill></source> '''Fields Description''' '''waybill''' — is a root container. Required.*'''auth''' — is authorization. Required.*'''orders''' — list of orders to get print forms for. It contains tags '''order''' with the following attributes:** '''''orderno''''' — external order code.** '''''ordercode''''' — internal order code.*: Specify either of the attributes for all the orders. The '''''ordercode''''' attribute is recommended.*'''form''' — packing slip format. Optional. Possible values::* '''1''' — detailed packing slip. Default value.:* '''2''' — Zebra label.:* '''3''' — A4 size label.:* '''4''' — delivery and acceptance certificate. '''Response Example'''<source lang="52xml" errormsg><?xml version="order not found1.0" errormsgruencoding="The order is not foundUTF-8" ?><waybill> <content>EODIcaI8KSBlwQ 4MnEOR7Px8U8EBAyGICBnwpw IZhQgz0ZxuPs8EBM/GcbjzB AwhBl8hwQYIO00GmEwg1CeEG mqYTChNU0wqf8l8nz4zgc+K fCno+zwU5GjOZmzXGcbEQYIM 4zkegRE40zWzONyoNNMIOIa cWnp6aDCGEGE9NQmoQd2mg00 79U4f3hPTwnfp6Sdrafeqpa JDpFw/1aYT077VNNNdO00G3q mqqvp9p2E7T0/wiFemv8uG6 OM</content></cancelorderwaybill>
</source>
The '''''content'''''tag contains base64 encoded binary data (PDF file). == City Names List == ''The example of the city names list query:'City List Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<name>Moscow</name>
<fullname>Moscow city</fullname>
<country>1RU</country>
</conditions>
<limit>
</source>
*'''conditions''' — specifies search criteria. All enclose nested elements simultaneously impose “AND” the AND condition. :* '''city''' is a — search by for all the localities of a region. :* '''namecontains''' is a — search of for the localities which with names contain a specified including the search text. :* '''namestarts''' is a — search of for the localities which with names start from a specified starting with the search text.:* '''name''' is a — search of for the localities which with names match a specified matching the search text.:* '''fullname''' is a — search of for the localities which with names and type match a specified matching the search text. :* '''country''' is a — search of in the country with a the specified zip codeonly.
*'''limit''' — limits result output. :* '''limitfrom''' specifies — defines the search result record number of a search result starting to start output with which a response should be given. It equals The default value is '''0 by default'''. :* '''limitcount''' specifies — defines the number quantity of search result records which should be returnedto show. It equals The default value is '''10000 by default'''.:* '''countall''' - — if '''YES indicates ''', the necessity of counting the amount total quantity of found matches foundis counted. It may might slow down the process of query request execution. In case it is If disabled, <code>totalcount </code> and <code>totalpages values won`t be indicated </code> are missing in the response.
'''The example of a response:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<city>
<code>23</code>
<name>Krasnodar TerritoryKrai</name>
</city>
<name>Sochi city</name>
</town>
<town>
<city>
<code>32</code>
<name>Bryanskaya oblastBryansk District</name>
</city>
<name>Sochilov farmsteadkhutor</name> <shortnamefiascode>c9c96c67-2cc9-4f10-afde-fd32417ea216</fiascode> <kladrcode>Sochilov3201900011100</kladrcode> <shortname/> <typename/>farmstead <coords lat="52.6407" lon="33.1724" /typename>
</town>
<town>
<city>
<code>60</code>
<name>Pskov oblastDistrict</name>
</city>
<name>Sochikhino village</name>
<shortnamefiascode>10df7588-19c1-49d1-a387-9de1cf3eb26f</fiascode> <kladrcode>Sochikhino6001900015400</kladrcode> <shortname/> <typename/>village <coords lat="56.6003" lon="29.3542" /typename>
</town>
</townlist>
</source>
In a the response , the cities and towns are sorted arranged by their popularity, importance (district centers, etc.) and only after that - alphabeticallythen by alphabet.
== Region names list Names List ==
'''The example of the region names list query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</codesearch>
<conditions>
<namecontains>TerritoryKrai</namecontains>
<namestarts>Mosc</namestarts>
<fullname>Moscow regionOblast</fullname>
<country>1</country>
</conditions>
</source>
'''The example of a response:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<ShortName2>RUS</ShortName2>
</country>
<name>Agin-Buryat Autonomous AreaOkrug</name>
</city>
<city>
</source>
== Street names guide Names List ==
'''The example of the city names list query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<streetlist>
<conditions>
<town>Moscow city</town> // MANDATORY REQUIRED FIELD!
<namecontains>Khokhlo</namecontains>
<namestarts>Academician K</namestarts>
</source>
*'''conditions''' specifies — search criteria. All enclose nested elements simultaneously impose “AND” the AND condition.:* '''town''' is a mandatory — required field. It`s is the name or the code of a locality.:* '''namecontains''' is a — search of for the localities which streets with names contain a specified including the search text.:* '''namestarts''' is a — search of for the localities which streets with names start from a specified starting with the search text.:* '''name''' is a — search of for the localities which streets with names match a specified matching the search text.:* '''fullname''' is a — search of for the localities which streets with names and type match a specified matching the search text.
*'''limit''' limits result output.
:* '''limitfrom''' specifies — defines the search result record number of a search result starting to start output with which a response should be given. It equals The default value is '''0 by default'''. :* '''limitcount''' specifies — defines the number quantity of search result records which should be returnedto show. It equals The default value is '''10000 by default'''.:* '''countall''' - — if '''YES indicates ''', the necessity of counting the amount total quantity of found matches foundis counted. It may might slow down the process of query request execution. In case it is If disabled, <code>totalcount </code> and <code>totalpages values won`t be indicated </code> are missing in the response.
'''The example of a response:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</source>
In a the response , the street names of the streets are sorted in alphabetical orderarranged alphabetically.
== Nomenclature list List of Goods ==
'''The example of the nomenclature list query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<namecontains>TV set</namecontains>
<namestarts>sony</namestarts>
<name>Sony KDL-55W905 LCD televisionTV</name>
<quantity>EXISTING_ONLY</quantity>
</conditions>
<except>
<code>123478</code>
</except>
<limit>
<limitfrom>30</limitfrom>
</source>
*'''conditions''' — specifies search criteria. All enclose nested elements simultaneously impose “AND” the AND condition.:* '''namecontains''' is a — search of for the goods which with names contain a specified containing the search text.:* '''namestarts''' is a — search of for the goods which with names start starting from a specified the search text.:* '''name''' is a — search of for the goods which with names match a specified matching the search text.:* '''quantity''' is the — availability of goods at in the warehouse. It can have Sometimes, the following field may be unavailable. Possible values: *** '''EXISTING_ONLY - ''' — only in stock, .*** '''NOT_EXISTING_ONLY - ''' — only out of stock out, .*** '''ALL - ''' — all. :* '''store'In some setups this field may be unavailable.''— search by the specified warehouse.
*'''limitexcept''' limits result output.:* '''limitfrom''' specifies the record number — exception description for correct counting of a search result starting with which a response should be givenreserved items.:* '''limitcountcode''' specifies the number of search result records which should be returned— order code.
*'''The example limit''' — limits result output.:* '''limitfrom''' — defines the search result record number to start output with.:* '''limitcount''' — defines the quantity of a response:search result records to show. '''Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<article>FD343</article>
<barcode>2345625213125</barcode>
<name>Sony KDL-55W905 LCD televisionTV</name>
<retprice>65000</retprice>
<purchprice>50000</purchprice>
<weight>5.1</weight>
<length>50</length>
<width>30</width>
<height>40</height>
<VATrate>20</VATrate>
<CountInPallet>30</CountInPallet>
<HasSerials>1</HasSerials>
<CountryOfOrigin>Malaysia</CountryOfOrigin> (not yet supported)
<Message>A good TV set</Message> <Message2>Another good TV set</Message2>
<quantity>12</quantity>
<reserved>3</reserved>
</source>
'''The description of fields:Fields Description'''*'''code''' is an — internal identifier assigned by the system. *'''article''' is an article assigned by a customer (a — supplier)SKU ID. *'''barcode''' — manufacturer barcode. *'''name''' — item name. *'''retprice''' — default retail price. When creating the order, the price specified in the order is used.*'''purchprice''' — purchase price.*'''weight''' — weight in kilograms. *'''length''' — length in centimeters. *'''width''' — width in centimeters. *'''height''' — height in centimeters.*'''VATrate''' — value-added tax rate, integer.*'''CountInPallet''' — number of pieces in a manufacturer`s barcodepallet. *'''HasSerials''' — indicates whether serial numbers tracking is used. Possible values: '''1''' — Yes, '''0''' — No. *'''CountryOfOrigin''' — name of the country of origin. *'''Message''' — comment. *'''Message2''' — additional comment. *'''quantity''' — quantity in stock. Goods picked up for orders are not included in this number, they are considered to be shipped. ''This field may be unavailable in some setups.''*'''reserved''' — quantity of goods reserved. It may outnumber the stock balance if customers are waiting for the next delivery. ''This field may be unavailable in some setups. ''
'''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><itemmovements> <auth extra="8" login="login" pass="pass"></auth> <code>4259</code> <datefrom>2020-10-01</datefrom> <dateto>2020-10-02</dateto></itemmovements></source> *'''code''' — internal item code in the list of goods.*'''datefrom''' — period start date.*'''dateto''' — period end date.You can specify either code or period, or both code and period. '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><itemmovements count="16"> <itemmovement> <code>151500</code> <date>2020-10-01</date> <retprice>0</retprice> <quantity>1</quantity> <delivered>0</delivered> <item> <code>4259</code> <name>Jenga Classic Game</name> </item> <status> <code>5</code> <name>Return from customer</name> </status> <store> <code>1</code> <name>Moscow office</name> </store> <order> <ordercode>3374830</ordercode> <number>123660-0</number> <date>2020-10-01</date> <orderno>14123</orderno> <barcode>0000000670</barcode> <company>All Games</company> <address>Thompson str., 88</address> <delivereddate>2020-05-29</delivereddate> <deliveredtime>12:00:00</deliveredtime> <deliveredto /> </order> <document> <code>21991</code> <number>318</number> <date>2020-05-26</date> <message></message> </document> </itemmovements></itemlist></source> '''Fields Description'''*'''code''' — goods movement internal transaction code.*'''date''' — transaction date.*'''retprice''' — item price.*'''quantity''' — item quantity in the movement transaction.*'''delivered''' — quantity of delivered items. *'''item''' — goods item container.:* '''code''' — item internal code.:* '''name''' — item name. *'''status''' — transaction status container.:* '''code''' — status code.:* '''name''' — name. *'''store''' — container for the branch that performs the transaction.:* '''code''' — branch code.:* '''name''' — branch name. *'''order''' — shipment container.:* '''ordercode''' — internal order code.:* '''number''' — order number.:* '''date''' — order date.:* '''orderno''' — external order code.:* '''barcode''' — barcode.:* '''company''' — company.:* '''address''' — address.:* '''delivereddate''' — date delivered.:* '''deliveredtime''' — time delivered.:* '''deliveredto''' — delivery info or reason for non-delivery. *'''document''' — transaction document container.:* '''code''' — internal document code.:* '''number''' — document number.:* '''extnumber''' — external document number.:* '''date''' — document date.:* '''message''' — comment. == Getting Shipping Rates for Towns and Cities == <div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">If the <code>nofederal</code> parameter is missing in the request, Moscow is processed in the following way: the response contains Moscow and Moscow region towns and distance markup.</div> '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><tariffs> <auth extra="8" login="login" pass="pass" /> <townfrom>Moscow</townfrom> <service>1</service> <mainonly>1</mainonly> </tariffs></source> *'''auth''' — the '''extra''' attribute is required, it is used to determine the courier service company.*'''townfrom''' — sender town or city. If it is not passed, the default value is '''Moscow'''.*'''service''' — delivery mode. Required.*'''mainonly''' — optional. If passed, the response contains data from the '''Inter-city''' > '''Zones''' table only.* '''nofederal''' — optional. If passed, a retail city of federal importance is processed as an ordinary city. '''Response Example'''<source lang="json">{ "townfrom": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5", "service": 1, "tariffs": [ { "towntofias": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5", "towntocode": 1, "towntoname": "Moscow city", "distance": 0, "pricedistance": 0, "pricesnew": { "before": [ { "price": "100", "every": "0", "mass": "1" }, { "price": "150", "every": "0", "mass": "5" } ], "after": [ { "price": 0, "every": 1, "mass": 38.01 }, { "price value ": 15, "every": 1, "mass": 51.01 } ] }, "deliveryPeriodMin": 1, "deliveryPeriodMax": 2 } ]}</source> '''Fields Description'''* '''townfrom''' — sender locality [[#City Names List|AOGUID]] (Federal Information Address System) code.* '''service''' — delivery mode.*'''tariffs''' — shipping rates list for the locality.:* '''towntofias''' — recipient locality AOGUID code.:* '''towntocode''' — recipient locality internal code.:* '''towntoname''' — recipient locality name.:* '''distance''' — distance in km from Moscow to Moscow Ring Road if <code>townfrom</code> is Moscow.:* '''pricedistance''' — Moscow to Moscow Ring Road distance markup if <code>townfrom</code> is Moscow..:* '''pricesnew''' — your shipping rates from the '''Inter-city''' > '''Rates by defaultZones''' table.::* '''before/after — containers.:::* '''price''' — price. When ordering If the price which response is mentioned in for the order <code>before</code> container, <code>pricedistance</code> is usedalso added to the amount.:::* '''every''' — for every specified number of pieces.:::* '''mass''' — weight.:* '''prices''' — obsolete, do not use.:* '''deliveryPeriodMin''' — minimum number of days in transit.:* '''deliveryPeriodMax''' — maximum number of days in transit. == Receipt Items == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><itemdoc> <auth extra="8" login="login" pass="pass"></auth> <code>21991</code></itemdoc></source> *'''code''' — internal receipt document code. '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><itemdoc> <code>21991</code> <number>318</number> <date>2021-05-26</date> <message></message> <items> <item code="4259" quantity="1" barcode="200300" article="123555">Jenga Classic Game</item> </items></itemdoc></source>
'''Fields Description'''* '''code''' — internal receipt code.* '''number''' — document number.*'''weightdate''' is weight in kilograms— document date. *'''lengthmessage''' is length in centimeters— comment.
*'''widthitem''' is width in centimeters— goods item container.:* '''code''' — internal item code.:* '''barcode''' — item barcode.:* '''article''' — item SKU ID.:* '''quantity''' — quantity of received items.
*'''HasSerialsauth''' requires serial numbers accounting— the '''extra''' attribute is required, it is used to determine the courier service company. It takes on the following *'''json''' — indicates whether response is in JSON format. Possible values: 1 - yesare '''YES''', 0 - no'''NO'''.*'''client_code''' — courier service client code.
*'''Message2code''' is an additional commentary— branch code. *'''name''' — branch name.
'''The example of a points of issue query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<pvzlist>
<auth extra="8" login="login" pass="pass"></auth>
<code>1234</code> <client_code>7890</client_code> <city>Sverdlovsk Oblast</city> <townregioncode="66" country="RU">Nizhniy Nizhny Tagil</town> <parentcode>6</parentcode> <acceptcash>YES</acceptcash> <acceptcard>YES</acceptcard> <acceptfitting>YES</acceptfitting> <maxweight>30</maxweight> <acceptindividuals>YES</acceptindividuals> <lt>57.924737</lt> <lg>59.940019</lg> <rt>57.905682</rt> <rg>59.984669</rg> <json>YES</json> <limit> <limitfrom>30</limitfrom> <limitcount>2</limitcount> <countall>YES</countall> </limit>
</pvzlist>
</source>
*'''auth''' — the '''extra''' attribute is required, it is used to determine the courier service company. '''login''' and '''pass''' allow to sign in as a client to apply the pickup points availability restrictions if they are set up for the client.*'''code''' — internal code.*'''client_code''' — courier service client code.*'''city''' - recipint region. You can specify a region code or a full region name from the '''Regions''' reference.*'''town''' — recipient location.:For the <code>town</code> tag, you can speify the value from the '''Regions''' reference in the <code>regioncode</code> attribute. The specified region is searched for the town.:In the <code>country</code> attribute, you can specify the recipient country according to the ISO 3166-1 standard. For example: "AT", "AUT" or "040" for Austria.*'''parentcode''' — parent [[#Branches List|branch]].*'''acceptcash''' — indicates whether cash on delivery is accepted. Possible values: '''YES''', '''NO'''.*'''acceptcard''' — indicates whether bank cards are accepted. Possible values: '''YES''', '''NO'''.*'''acceptfitting''' — indicates whether try-on is allowed. Possible values: '''YES''', '''NO'''.*'''maxweight''' — maximum weight allowed for the pickup point.*'''acceptindividuals''' — indicates whether pickup point is available for individuals. Possible values: '''YES''', '''NO'''.*'''lt''' — upper left corner latitude.*'''lg''' — upper left corner longitude.*'''rt''' — lower right corner latitude.*'''rg''' — lower right corner longitude.*'''json''' — indicates whether response is a receiver`s residencein JSON format. Possible values: '''YES''', '''NO'''.*'''limit''' — limits result output.:* '''limitfrom''' — defines the search result record number to start output with. The default value is '''0'''.:* '''limitcount''' — defines the quantity of search result records to show. The default value is '''100'''.:* '''countall''' — if '''YES''', the total quantity of found matches is counted. It might slow down the request execution. If disabled, <code>totalcount</code> is missing in the response.
'''The example of a response from the list of pick-up points:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<pvzlist count="2" totalcount="40465">
<pvz>
<code>126</code>
<clientcode>3</clientcode>
<name>Nizhniy Tagil</name>
<parentcode>6</parentcode>
<parentname>Integration</parentname>
<town code="124267" regioncode="66" regionname="Sverdlovsk Oblast">Nizhniy Tagil city</town>
<address>622036, 17 Tsiolkovsky Str., Nizhniy Tagil city</address>
<phone>+73435417709, +73435254989</phone>
<comment>New pickup point</comment> <worktime>Sun 10:00-16:00, Sat 10:00-16:00, Mon-Fri 10:00-20:00</worktime> <traveldescription>5-storeyed storey apartment building with its end wall beside the highway, the second building from Parkhomenko-Tsiolkovsky street intersection.</commenttraveldescription> <maxweight>10</maxweight> <acceptcash>YES</acceptcash> <acceptcard>YES</acceptcard> <acceptfitting>YES</acceptfitting> <acceptindividuals>YES</acceptindividuals> <latitude>57.93457</latitude> <longitude>59.95131</longitude> <uid>40606d00-9c51-11eb-b2c9-cfd6c1111392</uid>
</pvz>
<pvz>
<code>245</code>
<clientcode>NTG1</clientcode>
<name>At Krasnoarmeyskaya StreetOn Krasnoarmeiskaya</name> <parentcode>6</parentcode> <parentname>Integration</parentname> <town code="124267" regioncode="66" regionname="Sverdlovsk Oblast">>Nizhniy Tagil city</town> <address>Krasnoarmeiskaya, 79 KRASNOARMEYSKAYA STR.</address>
<phone>+7(3435)379-044</phone>
<comment>Working hoursTry-on is not allowed</comment> <worktime>Sun 10:00-16: from Monday through Friday00, from 9 a. m. till 6 p. m.Sat 10:00-16:00, on Saturday Mon- from Fri 10 a:00-20:00</worktime> <traveldescription>Next to McDonalds</traveldescription> <maxweight>20</maxweight> <acceptcash>YES</acceptcash> <acceptcard>YES</acceptcard> <acceptfitting>NO</acceptfitting> <acceptindividuals>YES</acceptindividuals> <latitude>57. m. till 2 p. m93468</latitude> <longitude>60.55476</longitude> <uid>41116853-9c51-11eb-b2c9-cfd6c1451392</commentuid>
</pvz>
</pvzlist>
</source>
*'''code''' is a — pickup point code of a point in the systemMeaSoft. It is used in an [[API#OrderingCreating Order|orderingcreating order request]] query.*'''clientcode''' is a — pickup point code of a in service partner system.*'''name''' — pickup point name.*'''parentcode''' — pickup point used by a contracting companyparent code. *'''parentname''' — pickup point parent name.*'''town' is a '' — locality with code from [[#City Names List|City Names List]] and region code and name of a point. *'''address''' is a — pickup point`s address. *'''phone''' are — pickup point phone numbersnumber. *'''comment''' — additional info.*'''worktime''' — pickup point working hours.*'''traveldescription''' — pickup point location description.*'''maxweight''' — maximum weight allowed for the pickup point.*'''acceptcash''' — indicates whether cash on delivery is accepted. Possible values: '''YES''', '''NO'''.*'''acceptcard''' — indicates whether bank cards are accepted. Possible values: '''YES''', '''NO'''.*'''acceptfitting''' — indicates whether try-on is additional informationallowed. Possible values: '''YES''', '''NO'''.*'''latitude''' — location latitude.*'''longitude''' — location longitude.*'''uid''' — pickup point unique ID in MeaSoft.*'''count''' — number of response records.*'''totalcount''' — total number of relevant records. == Getting Order Fiscal Data == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><receiptdata> <auth extra="8" login="login" pass="pass" /> <orders> <order orderno="123456" /> <order orderno="890111C" /> </orders></receiptdata></source> '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><receipts count="1"> <receipt> <orderno>123456</orderno> <fdDatetime>2020-06-07 12:14:00</fdDatetime> <fdValue>123</fdValue> <fdNum>456</fdNum> <fnSn>789</fnSn> <kktNum>100</kktNum> <inn>222</inn> <ofdUrl>gate.ofd.ru</ofdUrl> <fullUrl>https://check.ofd.ru/123</fullUrl> <price>12345</price> <lines count="1"> <line> <item>1111764</item> <name>Boots</name> <qty>1</qty> <price>1000</price> <vatRate>20</vatRate> <governmentCode>Z16513LK2</governmentCode> <itemType>1</itemType> </line> </lines> </receipt></receipts></source>
== Urgency Kinds List == '''The example of a type of priority query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
</source>
'''The example of a response from the list of types of priority:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<service>
<code>2</code>
<name>UrgentlyUrgent</name>
</service>
</services>
</source>
== Delivery cost calculation Value-Added Services List ==
'''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><advprices> <auth extra="8" login="login" pass="pass" /> <visible>NO</visible></advprices></source> '''advprices''' — root container. Required. *'''visible''' — indicates whether only the value-added services available in client account are returned. Optional. Possible values: '''Yes''', '''No'''. The example default value is '''No'''. '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><advprices> <advprice> <code>1</code> <name>Number of a delivery cost queryfloors in the building</name> <type>int</type> </advprice> <advprice> <code>2</code> <name>Markup coefficient </name> <type>float</type> </advprice> <advprice> <code>3</code> <name>Heavy lift</name> <type>bool</type> </advprice></advprices></source> Параметры:*'''code''' — internal service code.*'''name''' — service name. If in the '''Value-Added Services''' list the '''Name in client account''' column is not empty, the column value is returned.<!--*'''hine''' — value-added service hint for user.-->*'''type''' — service type. Possible values::*'''bool''' — for services with the '''Check box''' input type.:*'''float''' — for services with the '''Float''' input type.:*'''int''' — for services with the '''Integer''' input type. == Delivery Fee Calculation == '''Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<calculator>
</calculator>
</source>
Parameters:*'''townfrom''' is a sending town. *'''townto''' is a receiving townare the same as described in [[#Creating Order|Creating Order]]. *'''mass''' is weight in kilograms. *'''serviceFields Description''' is a delivery mode - a number indicating the entry in the list of [The list of types of priority|types of priority]
Cash on delivery amount, declared value amount, and CARD payment type are used in service percent calculations set up in the delivery rate card, on the '''Other''' tab.
In authorization, you can omit the '''login''' and '''pass'''. In this case, the fee is calculated using courier service standard delivery rate, without taking into account possible differences for a certain client.
Dimensional weight is calculated only if all the dimensions are provided: length, width, heigth. Sender and recipient location possible values:* location name (not recommended).* a code from the '''City Names'''The example list.* a 13-digit code of All-Russian Classifier of Addresses (Address Classifier used in Russia).* a cost 36-digit code of delivery response:the Federal Information Address System (AOGUID). '''Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<townto code="56603">Irkutsk city</townto>
<mass>3.7</mass>
<servicename="Express">1</service>
<zone>2</zone>
<price>11631113</price> <mindeliverydays>1</mindeliverydays>
<maxdeliverydays>3</maxdeliverydays>
<mindeliverydate>2020-05-13</mindeliverydate>
<deliveryprice>
<advprice code="1" price="1000">Base</advprice>
<advprice code="4" price="100">Amount percent</advprice>
<advprice code="5" price="63">Declared value percent</advprice>
<advprice code="6" price="-50">Discount on delivery</advprice>
</deliveryprice>
</calc>
</calculator>
Parameters:
*'''townfrom''' is a sending town name which has been — sender location as recognized and assigned to the list of towns cities by the system. **'''code''' attribute is — a code from the '''City Names''' list of towns in the system.*'''townto''' is a receiving town name which has been — recipient location as recognized and assigned to the list of towns cities by the system. **'''code''' attribute is — a code from the '''City Names''' list of towns in the system.*'''mass''' is — weight in kilograms. *'''service''' is a — delivery mode - a number indicating the entry in the list of [The list of types of priority|types of priority]*which is an integer specifying an '''serviceUrgency Kinds''' list record. If the parameter is not specified, all available urgency kinds are calculated, with a delivery mode - lot of the number indicating a certain entry <calc> containers in the list of types of priority (See the description on this page)response. *'''zone''' is the — number of a tariff the rate zone according to which used in the price has been calculatedcalculation. The tariff shipping rate schedule is selected depending on the tariff zone. Multiplying or decreasing coefficients Coefficients can be applied to the price of delivery in case of shipping cost if the order delivery is not delivered from/or to a regional center. *'''price''' is a calculated delivery price — shipping cost in the currency of a the courier service. We recommend that you use this parameter. *'''maxdeliverydays''' — maximum number of busines days in transit.*'''mindeliverydate''' — closest delivery service`s date considering holidays.*'''deliveryprice''' — contains shipping cost details. '''Note''': the actual server response contains the <code>price-list</code> attribute in the <code>calc</code> tag. It is recommended to be used rather than its homonymous attribute of the parent retained for backward compatibility, use nested <code>price</code> tag instead. == Getting Client Info == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><client> <auth extra="8" login="login" pass="pass" /> </client></source> '''client''' — root container. Required. *'''maxdeliverydaysauth''' — authorization. Required. '''Response Example''' is the maximum delivery period in business days<source lang="xml"><?xml version="1. 0" encoding="UTF-8" ?><client> <code>1082</code></client></source>
== List of Сash Transfer Certificates == '''The example of the query for the list of money transfer certificates:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<smalist>
<auth extra="8" login="login" pass="pass" />
<datefrom>20162021-02-10</datefrom> <dateto>20162021-03-10</dateto>
</smalist>
</source>
'''smalist''' is a — root container. It is a mandatory elementRequired. *'''auth''' is — authorization. It is a mandatory elementRequired. *'''datefrom''' is a — date “from”from. It is an optional elementOptional. *'''dateto''' is a — date “to”to. It is an optional elementOptional.
If the date range is not specified, then money cash transfer certificates for the last month are returned.
'''The example of a response to the query for the list of money transfer certificates:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<code>6278</code>
<number>3992</number>
<actdate>20162020-02-12</actdate>
<datepay></datepay>
<dateto>2020-02-12</dateto>
<promiseddatepay></promiseddatepay>
<price>637.00</price>
<pricecorr>113.00</pricecorr>
<rur>13430.00</rur>
<pricekur>570.00</pricekur>
<payno>42423</payno>
<paytype>1</paytype>
<paytypename></paytypename> /not supported yet
<signedcopyreceived>NO</signedcopyreceived>
</sma>
</smalist>
</source>
*'''code''' is a code of a money — cash transfer certificatecode. *'''number''' is the number of a money — cash transfer certificate number in the systemMeaSoft. *'''actdate''' is a — date of a money cash transfer certificatecreated.*'''datepay''' is a — date of payment on a money cash transfer certificate paid. *'''dateto''' — cash transfer certificateperiod end date.*'''promiseddatepay''' — planned payment date. *'''price''' is a price — cost of courier services. *'''pricecorr''' — adjustment amount.*'''rur''' is a price of an — orderamount. *'''pricekur''' is a price of — courier deliverycost. *'''priceag''' is agent`s commission— service partner fee. *'''payno''' is a number of a — payment ordernumber. *'''paytype''' is a — type of payment: 1 — non-cash payment, 2 — paying a courier in cash, 3 — paying cash at the office, 4 — wire payment to bank card.*'''paytypename''' — payment type as string.*'''signedcopyreceived''' — indicates whether cash transfercertificate is returned. Possible values: '''YES''', '''NO'''.
== Detailing of money transfer certificates Cash Transfer Certificate Breakdown ==
'''The examples of the query for money transfer certificates detailing:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
</source>
'''smadetail''' is a — root container. It is a mandatory elementRequired. *'''auth''' is — authorization. It is a mandatory elementRequired.*'''code''' is a code of a money — cash transfer certificate (See the query [[#List of the list of money transfer certificates)Сash Transfer Certificates|code]]. It is a mandatory elementRequired.
'''The example of a response to the query of money transfer certificates:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<smadetail count="12">
<specialsma>
<code>42494</code>
<addresscodeordercode>14424</addresscodeordercode> <orderno>11111</orderno> <orderdate>2021-01-01</orderdate> <delivereddate>2021-10-01</delivereddate> <company>Company</company>
<price>314.00</price>
<rur>8800.00</rur>
<inshprice>314.00</inshprice>
<pricekur>270.00</pricekur>
<priceag>44.00</priceag>
<pricecalc>8486.00</pricecalc>
<paytype>Cash on delivery2</paytype> <statuspaytypename>Deliveredpaying a courier in cash</status> </specialsma> <specialsma> <code>42495</code> <addresscode>14415</addresscode> <price>323.00</price> <rur>4630.00</rurpaytypename> <pricekurweight>3000.00400</pricekurweight> <priceagdistance>230.000</priceag> <pricecalc>4306.00</pricecalc> <paytype>Cash on delivery</paytypedistance>
<status>Delivered</status>
</specialsma>
</source>
*'''code''' is a — record code of the record. *'''addresscodeordercode''' is a — external order code of the .*'''orderno''' — order cipher.*'''orderdate''' — orderdate.*'''delivereddate''' — delivery date.*'''company''' — recipient. *'''price''' is a price — cost of service courier services.*'''rur''' is the — order amount of the .*'''inshprice''' — ordercost. *'''pricekur''' is a price of — courier deliverycost. *'''priceag''' is agent`s commission— service partner fee. *'''pricecalc''' is the — amount to be transferred pay to the agentservice partner. *'''paytype''' is a — type of payment: 1- — non-cash payment, 2 - — paying a courier in cash, 3 - — paying cash at the office, 4 - wire transfer— payment to bank card.*'''paytypename''' — payment type as string.*'''weight''' — order weight.*'''distance''' — order distance. *'''status''' is a — order status of the order.
== Generation of short links URL Shortener ==
'''The example of a query for short links generation:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
</source>
'''shortlink''' is a — root container. It is a mandatory elementRequired.*'''link''' is a full — long link for generation of which a code should be obtainedto shorten. It is a mandatory elementRequired. If '''short''' attribute equals value is '''1''', then a response won`t contain XML but the return contains only a hash code, no XML.
'''The example of a response to the query for short links generation:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</source>
*'''hash''' is a — URL hash code of a short link. Use it as client account URL:
'''Note'''. URL shortener is only for MeaSoft company sites. == Recipient Rating Check == The check is available only for the Maximum personal account plan. '''Request Example''' <source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><mcheck> <auth extra="8" login="login" pass="pass" /> <phones> <nowikiphone>https:89161147992</phone> </phones></mcheck></homesource> '''Response Example''' <source lang="xml"><?xml version="1.courierexe.ru0" encoding="UTF-8" ?><mcheck> <phones> <phone rate="90">89161147992</phone> </phones></35AF350Cmcheck></nowikisource>