API Documentation

Материал из Меасофт
Версия от 10:11, 28 июля 2021; Olga (обсуждение | вклад) (Obtaining the pdf waybill)
Перейти к: навигация, поиск

MeaSoft has an option of integration by means of XML API under HTTP POST protocol.

The API is designed for integrating customers (online shops and other companies ordering delivery) with courier services working under MeaSoft.

If you are an aggregator who transfers customer data and a courier service keeps separate accounts for settlements with each client, you will probably have to log in using different user accounts.

If you are a service partner and orders will be transferred to you from a delivery service, you can take the orders using clients=AGENTS in the statusreq query. For that purpose we have a platform for external integration but service partners can be added only on our side. Please, send us your commercial purpose, description of your service and we will gladly consider them.

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 support@courierexe.ru. In your e-mail message you should 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

You can download the modules presented in the table to integrate with popular CMS.

The given modules are shared for free without any guarantee on the part of the developer. The online store bears full responsibility for correct data transfer. They modules are not intended for complete automation of your interaction with the courier service. They help online shop developers build integration with courier services. However, we will appreciate if you inform us about your needs or discrepancies found in our modules – this allows us to consider your demands when developing new versions of our modules.

Content Management System (CMS) Download Comment
Bitrix.png
Install Supports version 14.5 and higher.
Prestashop.png
Download Supports version 1.5.2.0 and higher (including 2.x)
OpencartOCStore.png
For version 1.5.5.1
For version 2.0
For version 2.3
For version 3.0
Supports version 1.5.5.1 and higher.
Select a module for your OpenCart version.
Alternative third-party module
Webasyst-shopscript.png
Install module
Install plugin
The module is designed for sending orders to delivery service, while the plugin calculates delivery cost on creating an order.
Advantshop.png
PROMO company site The PROMO company has developed the module. Contact PROMO to set up integration between MeaSoft and ADVANTSHOP.
Insales.png
Configure using MeaSoft client account Guide
Leadvertex.png
Leadvertex-howto.png
Configure using Leadvertex account
Retailcrm.png
RetailCRM Configure using MeaSoft client account
1C.jpg
- Alternative third-party module
Joomla2.jpg
Download Integration with Virtuemart is available only.
Amocrm.png
Download
MoySclad.jpg
Integrate with MeaSoft
Alternative third-party module Alternative third-party module
Wordpress.jpg
Download
Cscart.png
Download Supports versions 4.10 and higher.

Test Account

For debugging you can access your test client account at

https://home.courierexe.ru/8
login test
password testm

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 the example of addressing the service using PHP.

Account for Integration

Use the following credentials:

  • Extra client code. This is a digital code, company`s unique identifier. Request this parameter from the courier service you are integrating with. You can see this code in MeaSoft desktop interface by using its main menu Reference > Additional Options. Extra code is given in the second hyperlink (it is marked with an asterisk on the screenshot below):
    Extra1.png
  • Login. It is a user name for client account and API. Courier service creates login in the client card on the Other tab in the User name field. You will probably have to create a new client card (shown on the screenshot below) in MeaSoft software.
  • Password. It is a password for client account and API. Courier service creates password in the client card on the Other tab in the Password field. (shown on the screenshot below).
33 client.png

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: test
password: testm
extra client code: 8

Note that the test platform is open for everyone. Do not submit orders containing confidential information as any authorized user can see them.

To set up a working integration, request credentials from the courier service you are integrating with.

In the client account, use the Integration menu item for debugging purposes and see sent requests.

A client sends requests to the service by using HTTP POST, the service processes these requests and sends the execution result back. All requests and responses are submitted in the XML format. The encoding used is UTF-8. Dot sign is used as a decimal symbol. Dates are formatted as YYYY-MM-DD, and time is formatted as HH:MM.

Due to some XML features, the following characters in the text should be replaced:

  • &lt; represents "<"
  • &gt; represents ">"
  • &amp; represents "&"
  • &quot; represents ".

Our API uses only HTTPS because it is a secure way to send sensible data.

However, in some systems it may lead to a failure. If your system cannot process encryption correctly, we recommend that you deploy a local HTTP server and set up a PHP proxy. How to use

The features described below are available according to your personal account plan.

Fair Usage Policy

To protect our service from improper use and DDoS attacks, we have defined fair usage levels:

  • 30 tracking queries from a single IP address per 1 minute (use statusreq).
  • 150 queries from a single IP address per 1 minute.
  • 1500 queries from a single IP address per 20 minutes.
  • 3000 queries from a single account per 1 hour.
  • 200 MB text data downloaded per 3 hours.

If a limit is exceeded, the IP address is blocked for up to 3 hours.

Actions that result in blocking your IP address or account:

  • Attacking our API with status queries with numbers of all you orders. Mind that the tracking queries are not intended for that, see 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.

Correct actions:

  • To check order statuses, use statusreq queries with parameter changes=ONLY_LAST.
  • When requesting for changed statuses, you must confirm that the statuses were sucessfully received by query commitlaststatus.

Creating Order

Example of New Order

<?xml version="1.0" encoding="UTF-8"?>
<neworder newfolder="NO">
 <auth extra="8" login="login" pass="pass"></auth>
 <order orderno="111111">
   <barcode>111111</barcode>
   <sender>
     <company>Ministry of Internal Affairs</company>
     <person>I. I. Ivanov</person>
     <phone>123-45-67</phone>
     <town>Saint-Petersburg</town>
     <address>Petrovka Str., 38, room 35</address>
     <date>2021-03-22</date>
     <time_min>09:00</time_min>
     <time_max>14:00</time_max>
   </sender>
   <receiver>
     <company>Ministry of Internal Affairs</company>
     <person>Tom Wale</person>
     <phone>123-45-67</phone>
     <zipcode>125480</zipcode>
     <town regioncode="78" country="RU">Saint-Petersburg</town>
     <address>Petrovka Str., 38, room 35</address>
     <pvz>124</pvz>
     <inn>1112223335</inn>
     <date>2021-03-22</date>
     <time_min>09:00</time_min>
     <time_max>14:00</time_max>
     <deliveryPIN>1234</deliveryPIN>
     <coords lat="55.680327" lon="37.604456"></coords>
   </receiver>
   <return>NO</return>
   <weight>5.1</weight>
   <return_weight>5.1</return_weight>
   <quantity>2</quantity>
   <paytype>CASH</paytype>
   <service>2</service>
   <return_service>1</return_service>
   <type>3</type>
   <return_type>3</return_type>
   <courier>22</courier>
   <price>387.5</price>
   <deliveryprice VATrate="20">150</deliveryprice>
   <inshprice>387.5</inshprice>
   <receiverpays>NO</receiverpays>
   <discount>120</discount>
   <enclosure>Kids toys</enclosure>
   <instruction>Check in the presence of the buyer, sign acceptance certificate</instruction>
   <department>Accounting</department>
   <pickup>NO</pickup>
   <acceptpartially>NO</acceptpartially>
   <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="ООО &quot;Miller and Partners&quot;" 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>
 </order>
</neworder>

Order Elements

  • neworder is a root container, required.
  • 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 element.
  • order is a 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 is an order number. It should be entered here 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 is an 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.
   <sender>
     <company>Name of sender company</company>
     <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>
     <time_min>Desired pickup time in the "HH:MM" format</time_min>
     <time_max>Desired pickup time in the "HH:MM" format</time_max>
   </sender>
  • receiver is the information about the recipient. Required.
   <receiver>
     <company>Name of the recipient company</company>
     <person>Recipient company contact person</person>
     <phone>Recipient phone number, email</phone>
     <town regioncode="Region code"> Recipient location in the "[name] city" format</town>
     <address>Recipient address</address>
     <date>Delivery date in the "YYYY-MM-DD" format</date>
     <time_min>Desired delivery time in the "HH:MM" format</time_min>
     <time_max>Desired delivery time in the "HH:MM" format</time_max>
   </receiver>
  • company is a recipient company.
  • person is a contact person's name. At least one field should be filled in – either company or person.
  • phone is a phone number. You can specify several phone numbers and emails.
  • town is the name of the town.

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 ISO 3166-1 standard. For example: "AT", "AUT" or "040" for Austria.

Besides, the zipcode attribute value is considered when searching for a town.

You can use one of the following ways to fill in the Town field of the sender and receiver containers:

  • location code
  • 13-digit code from All-Russian Classifier of Addresses (Address Classifier used in Russia)
  • 36-digit code from the address system Federal Information Address System
    (AOID)
  • the name of the town (not recommended)
  • coords — recipient coordinates. If not specified, they are determined automatically.
  • paytype is a type of order payment. Possible values:
  • CASH — cash on delivery (by default).
  • CARD — by card on delivery.
  • NO — no payment expected, the order is already paid. API adds an advance payment item with negative price value to the list of items, so that the order total is 0. The order receipt lists all items, their prices and the advance payment amount accourding to the Federal Law.
  • OTHER means other types of payment. It is designed for making payments directly to the delivery service by using other types of payment: Webmoney, Yandex Money, online payment by card, other payment systems.
  • OPTION — recepient selects the payment type. This type of payment is not transferred in the order. It is set automatically client settings.
  • zipcode — postal code.
  • weight — total order weight in kilograms.
  • return_weight — total order return weight in kilograms.
  • quantity — number of packages.
  • 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.
  • VATrate — value-added tax rate, integer.
  • return — indicates whether return trip is required.
  • return_service — return mode (type of service). It is transferred as a code from the Urgency Kinds reference.
  • discount — order discount amount. The discount amount distributes between the order item prices, the cash on delivery amount decreases by the the discount amount. The "Discount" item is not created. Note that using this tag might lead to discrepancies in order total due to rounding errors. Avoid using this tag, specify the item prices already decreased by the discount amount.
  • enclosure — task description.
  • inshprice — declared value. If not specified explicitly, the value is calcuated automatically as order items prices total.
  • instruction — instruction text for courier.
  • courier — planned courier. It is transferred as a MeaSoft courier code.
  • 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.
  • 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.
  • quantity — number of articles.
  • mass — item weight in kg.
  • volume — dimensional weight of an item in kilograms. If specified, the value substitutes the mass value.
  • length — item length in cm.
  • width — item width in cm.
  • retprice — price of an article. Rounds to the hundredths. It must include all markups and discounts. It cannot be negative for item types 1, 2, 3.
  • 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.
  • 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 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 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 ISO 3166-1.
  • GTD — GTD number.
  • excise — excise tax amount.
  • suppcompany — supplier name if it is different from the sender.
  • suppphone — supplier phone number if it is different from the sender.
  • suppINN — supplier taxpayer ID if supplier is not the sender.
  • governmentCodeChestnyi ZNAK code. It is used to digitally mark goods. Specify all characters of the QR code excepting ASCII 29 character. If the code is unknown, specify "?". The courier will scan it when giving the item to recepient. Some processes may require using "!". In this case, the courier scans the item serial number, but it is not considered to be the digital mark code. If the field is filled in, quantity must be "1", otherwise an error returns.
  • packages — a container describing order packages. It is an optional container. It has the following attributes:
  • package — package name.
  • code — internal line code.
  • strbarcode — package barcode.
  • mass — package weight in kg.
  • message — message line.
  • length — package length in cm.
  • width — package width in cm.
  • height — package height in cm.
  • deliveryset — custom delivery rate setup. It has the following attributes:
  • above_price — delivery fee if all order items are accepted by the recipient. It is "amount from" for the limit set in the below_sum tag.
  • return_price — delivery fee if the order is returned.
  • VATrate — value-added tax rate, integer.
  • below — amount limit of the settings.
  • below_sum — purchase amount limit.
  • price — purchase amount within the limit.
  • advprices — a container describing additional services. It is an optional container. It has the following attributes: To use it in the API, in the client account settings, enable the Additional services field for new order and pickup request.
  • code — service code.
  • value — service value. If service type is Boolean, set the value to True.

If you want to apply additional 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.
When submitting orders with scheduled delivery or pickup date earlier than the nearest possible date, the delivery or pickup date changes automatically to the nearest possible date.

Response Examples

If a request is executed successfully and an order is created, the 0 error returns. Otherwise, an error number and its description in the errormsgru attribute returns.

Success

<?xml version="1.0" encoding="UTF-8"?>
<neworder>
   <createorder orderno="AB23541" error="0" errormsg="success"></createorder>
   <createorder orderno="55_6542" error="0" errormsg="success"></createorder>
   <createorder orderno="AB23542" error="0" errormsg="success"></createorder>
</neworder>

Error

<?xml version="1.0" encoding="UTF-8"?>
<neworder>
   <createorder orderno="AB23541" error="17" errormsg="Such number exists"></createorder>
   <createorder orderno="AB23542" error="13" errormsg="empty company"></createorder>
   <createorder orderno="AB23543" error="14" errormsg="empty person"></createorder>
</neworder>

Authorization Error

<?xml version="1.0" encoding="utf-8"?>
<request>
<error error="1" errormsg="authorization error"></error>
</request>

Syntax Error

<?xml version="1.0" encoding="UTF-8"?>
<request>
   <error>column:1 line:11 message:expected '>'</error>
</request>

Order Status

Request Example

<?xml version="1.0" encoding="UTF-8" ?>
<statusreq>
  <auth extra="8" login="login" pass="pass"></auth>
  <client>CLIENT</client>
  <orderno>1234</orderno>
  <orderno2>5678</orderno2>
  <ordercode>34234</ordercode>
  <givencode>234534</givencode>
  <datefrom>2021-06-21</datefrom>
  <dateto>2021-06-21</dateto>
  <target>Company</target>
  <done>ONLY_NOT_DONE</done>
  <changes>ONLY_LAST</changes>
</statusreq>

Fields Description

statusreq is a root container. Required.

  • auth — authorization. Required.
  • 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.
  • orderno — order number. It is an optional element.
  • ordercode — internal order code. It is an optional element.
  • orderno2 — urgent order number. It is an optional element.
  • datefrom — order creation date "from". It is an optional element.
  • dateto — order creation date "to". It is an optional element.
  • target — a search text. You can specify a part of recipient company name or recipient address.
  • done — possible values:
  • ONLY_DONE — delivered only. Success stauses like Delivered, Partially delivered.
  • ONLY_NOT_DONE — undelivered only. Statuses like Not delivered, Lost.
  • ONLY_NEW — new only.
  • ONLY_DELIVERY — orders in process only. These are orders in any status except for final statuses Delivered, Not delivered, Canceled and the like.
  • Empty — for all shipments.
  • changes — can take only ONLY_LAST value. If this parameter is specified, all other parameters are ignored. For more information, see Get Latest Changed Statuses.
  1. You can request statuses of orders created no earlier than 2 months before the to date (datefrom and dateto containers).
  2. If no date is provided, dateto equals the current date.
  3. Omitting dateto defaults to datefrom plus two months.
  4. Omitting datefrom defaults to dateto minus two months.

Response Examples

Success

<?xml version="1.0" encoding="UTF-8"?>
<statusreq count="23">
 <order orderno="111111" awb="qwerty" orderno2="123123" ordercode="34534234" givencode="2345334">
   <barcode>111111</barcode>
   <sender>
     <company>Ministry of Internal Affairs</company>
     <person>Sam Goe</person>
     <phone>123-45-67</phone>
     <contacts>
       <phone>+74951234567</phone>
     </contacts>
     <town code="23432">Saint-Petersburg city</town>
     <address>Petrovka Str., 38, Room 35</address>
     <date>2021-03-22</date>
     <time_min>09:00</time_min>
     <time_max>14:00</time_max>
   </sender>
   <receiver>
     <company>Ministry of Internal Affairs</company>
     <person>Tom Well</person>
     <phone>123-45-67 - Tom, (916)234.45.21 Sam, mia@gmail.com</phone>
     <contacts>
       <phone>+74951234567</phone>
       <phone>+79162344521</phone>
       <email>mia@gmail.com</email>
     </contacts>
     <inn>1112223335</inn>
     <zipcode>125480</zipcode>
     <town code="153361" regioncode="78" regionname="Saint-Petersburg city">Saint-Petersburg city</town>
     <address>Petrovka Str., 38, Room 35</address>
     <pvz>
       <code>126</code>
       <clientcode>QWERTY</clientcode>
     </pvz>
     <date>2021-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>Kids toys</enclosure>
   <instruction>Check in the buyer's presence, sign acceptance certificate</instruction>
   <currcoords lat="55.680327" lon="37.604456" accuracy="50" RequestDateTime="2021-04-21 18:07:45"></currcoords>
   <courier>
	<code>26</code>
	<name>Katie 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="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="Branch office" eventtime="2021-06-02 17:22:00" createtimegmt="2021-06-03 16:14:44" message="" title="Delivered">COMPLETE</status>
   <statushistory>
     <status eventstore="Moscow office" eventtime="2021-05-30 10:20:00" createtimegmt="2021-06-03 16:14:44" message="" title="New">NEW</status
     <status eventstore="Moscow office" eventtime="2021-06-01 17:38:00" createtimegmt="2021-06-03 16:14:44" message="Branch office" title="Shipment planned">DEPARTURING</status>
     <status eventstore="Moscow office" eventtime="2021-06-01 19:53:00" createtimegmt="2021-06-03 16:14:44" message="Branch office" title="Shipped">DEPARTURE</status>
     <status eventstore="Branch office" eventtime="2021-06-02 07:41:00" createtimegmt="2021-06-03 16:14:44" message="" title="Received by warehouse">ACCEPTED</status>
     <status eventstore="Branch office" eventtime="2021-06-02 09:17:00" createtimegmt="2021-06-03 16:14:44" message="" title="Out for delivery">DELIVERY</status>
     <status eventstore="Branch office" eventtime="2021-06-02 17:22:00" createtimegmt="2021-06-03 16:14:44" message="" title="Delivered as reported by courier">COURIERDELIVERED</status>
     <status eventstore="Branch office" eventtime="2021-06-02 17:22:00" createtimegmt="2021-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>Mary Smith, secretary</deliveredto>
   <delivereddate>2021-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">Princess 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" itemcode="44123" article="3" returns="0" governmentCode="">Jedi 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>

No Orders

<?xml version="1.0" encoding="utf-8"?>
<statusreq count="0">
</statusreq>

Authorization Error

<?xml version="1.0" encoding="utf-8"?>
<request>
<error error="1" errormsg="authorization error"></error>
</request>

Syntax Error

<?xml version="1.0" encoding="UTF-8"?>
<request>
   <error>column:1 line:11 message:expected '>'</error>
</request>

Response Fields

All responce fields correspond to the order creating request structure, with the following additions:

  • The order container attributes:
  • awb — number of the courier company packing slip.
  • orderno2 — number of the packing slip in the courier service urgent delivery subsystem.
  • ordercode — order internal code, for internal use.
  • givencode — 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 whether 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 — current order location cordinates. Its attributes are:
  • lat — latitude
  • lon — longitude
  • accuracy — location accuracy in meters
  • RequestDateTime — date and time of the latest 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 — cost of delivery denominated in the customer`s currency. It has the following attributes:
  • total — total delivery cost.
  • delivery — one-way trip cost.
  • return — return trip cost (if order > return=YES).

The deliveryprice tag includes additional services. Option available for the Premium and Maximum courier service account plans:

  • advprice — additional service name.
  • code — additional service code.
  • price — additional service amount.
  • status — delivery status. See the list of statuses below. It has the following attributes:
  • eventstore — courier service branch which set the current status.
  • eventtime — time of latest status change as in the current branch timezone.
  • createtimegmt — status change entry created in the datatbase, GMT. Used to arrange the entries in chronological order.
  • message — name of a recipient branch. Used in case of order transfer between branches.
  • title — name of the status in Russian.
  • 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.
  • 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, submitted to the courier company.
NEWPICKUP — Pickup created.
PICKUP — Picked up from sender.
WMSASSEMBLED — Order is picked at the fulfillment center.
WMSDISASSEMBLED — Order is unpicked at the fulfillment center.
ACCEPTED — Received by warehouse.
CUSTOMSPROCESS — Customs clearance.
CUSTOMSFINISHED — Customs clearance complete.
CONFIRM — Delivery is scheduled.
UNCONFIRM — Failed to arrange for delivery time.
DEPARTURING — Warehouse transfer planned.
DEPARTURE — Warehouse transfer shipped.
INVENTORY — Inventory. Made sure the shipment is in the warehouse.
PICKUPREADY — Available for pickup at the pickup point.
DELIVERY — Out for delivery.
COURIERDELIVERED — Delivered (as reported by courier). Confirmation by manager is expected to change status to COMPLETE.
COURIERPARTIALLY — Partially delivered (as reported by courier). Confirmation by manager is expected to change status to PARTIALLY.
COURIERCANCELED — Refused (as reported by courier). Confirmation by manager is expected to change status to COURIERRETURN.
COURIERRETURN — Returned to warehouse by courier. The courier failed to deliver the order to recepient and returned it to the warehouse. This is an intermediate status, the manager is to check whether the order is to be delivered again (DATECHANGE/DELIVERY) or this is a final non-delivery (CANCELED).
DATECHANGE — Rescheduled.
COMPLETE — Delivered.
PARTIALLY — Partially delivered.
CANCELED — Not delivered (Returned/Canceled). The order must be returned to sender.
RETURNING — Return to sender planned (after CANCELED).
RETURNED — Returned to sender.
LOST — Lost.

Note: The set of currently used statuses may be expanded and changed in the future.

  1. statushistory and deliveryprice are filled in for Premium and Maximum courier service account plans only.
  2. 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.

Get Latest Changed Statuses

To see only latest changed statuses, once in a while send the request (see the example below). API returns all the orders with recently changed statuses and some other attributes. You save the status information for each order in your system and confirm the receipt by sending the commitlaststatus request. MeaSoft marks these statuses as received by you and does not return them again. Thus, no matter how many orders is in process, you can get their actual statuses by using only 2 requests.

Getting latest changed statuses

<?xml version="1.0" encoding="UTF-8" ?>
<statusreq>
  <auth extra="8" login="login" pass="pass"></auth>
  <changes>ONLY_LAST</changes>
 </statusreq>

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
delivereddate
deliveredtime
deliveredto
receiver->date
receiver->address
price

If the response is processed successfully, use the following request to mark the returned statuses as successfully received ones:

<?xml version="1.0" encoding="UTF-8" ?>
<commitlaststatus>
  <auth extra="8" login="login" pass="pass"></auth>
  <client>CLIENT</client>
</commitlaststatus>

Query Fields

  • auth — Authorization. Required.
  • 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:

<?xml version="1.0" encoding="UTF-8" ?>
<commitlaststatus error="0">OK</commitlaststatus>

This way ensures a complete and correct status transfer even if the status has changed in the time period between the request and receipt confirmation.

If you do not confirm successful status receipt, the information will be returned again on the next request.

  1. When this way of data transfer is used (<changes>ONLY_LAST</changes>), the system reviews the orders created for the last 3 months. No information on the orders created earlier returns.
  2. The system always returns the current status. It means you can get the NEW status returned for the first request, and the COMPLETE status for your second request. A shipment could have gone through several intermediate statuses in between the request.
  3. 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.

Tracking Order by Number

Request for tracking order by number is intended to provide minimal anonymized information about a certain order to a non-authorized user.

MeaSoft allows unauthorized access to tracking at htttp://home.courierexe.ru/{client extra code}/tracking. This interface is designed to show information to a human user.

You can create a link to such page at your web site, or place an iFrame, or create your own page and use our API. To receive order statuses in your information system, use statusreq request, the changes=ONLY_LAST parameter is recommended.

Request Example

<?xml version="1.0" encoding="UTF-8"?>
<tracking>
  <extra>8</extra>
  <orderno>1234</orderno>
</tracking>

Response Example:

<?xml version="1.0" encoding="UTF-8"?>
<tracking>
  <order orderno="1234">
    <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>
     <zipcode>125480</zipcode>
     <date>2021-03-22</date>
     <time_min>09:00</time_min>
     <time_max>14:00</time_max>
    </receiver>
    <price>387.5</price>
    <inshprice>387.5</inshprice>
    <paytype>CASH</paytype>
    <weight>5.1</weight>
    <quantity>2</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="Branch office" eventtime="2021-06-02 17:22:00" createtimegmt="2021-06-03 16:14:44" message="">COMPLETE</status>
   <statushistory>
     <status eventstore="Moscow office" eventtime="2021-05-30 10:20:00" createtimegmt="2021-06-03 16:14:44" message="">NEW</status
     <status eventstore="Moscow office" eventtime="2021-06-01 17:38:00" createtimegmt="2021-06-03 16:14:44" message="Branch office">DEPARTURING</status>
     <status eventstore="Moscow office" eventtime="2021-06-01 19:53:00" createtimegmt="2021-06-03 16:14:44" message="Branch office">DEPARTURE</status>
     <status eventstore="Branch office" eventtime="2021-06-02 07:41:00" createtimegmt="2021-06-03 16:14:44" message="">ACCEPTED</status>
     <status eventstore="Branch office" eventtime="2021-06-02 09:17:00" createtimegmt="2021-06-03 16:14:44" message="">DELIVERY</status>
     <status eventstore="Branch office" eventtime="2021-06-02 17:22:00" createtimegmt="2021-06-03 16:14:44" message="">COURIERDELIVERED</status>
     <status eventstore="Branch office" eventtime="2021-06-02 17:22:00" createtimegmt="2021-06-03 16:14:44" message="">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="0.00" governmentCode="11223311" suppcompany="Miller and Company" suppINN="1112223334" suppphone="79161234567">Princess 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</item>
   </items>
  </order>
</tracking>

Get Info in 17 TRACK Format

Request Example

<?xml version="1.0" encoding="UTF-8"?> <tracking17>

 <extra>8</extra>
 <orderno>1234</orderno>

</tracking17>

Request Example

{
	"number":"ExtNumber",
	"oriNumber":"1234",
	"oriCountry":"RU",
	"destCountry":"RU",
	"status":"Complete",
	"events":[
		{
			"time":"2021-06-02 17:22:00",
			"location":"RU",
			"content":"Complete"
		},
		{
			"time":"2021-06-02 17:22:00",
			"location":"RU",
			"content":"Courierdelivered"
		},
		{
			"time":"2021-06-02 09:17:00",
			"location":"RU",
			"content":"Delivery"
		},
		{
			"time":"2021-06-02 07:41:00",
			"location":"RU",
			"content":"Accepted"
		},
		{
			"time":"2021-06-01 19:53:00",
			"location":"RU",
			"content":"Departure"
		},
		{
			"time":"2021-06-01 17:38:00",
			"location":"RU",
			"content":"Departuring"
		},
		{
			"time":"2021-05-30 10:20:00",
			"location":"RU",
			"content":"New"
		}
	]
}

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 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 edit orders if the courier service uses the Premium or Maximum personal account plan. To enable order editing, in the courier service account go to Settings > Parameters > Advanced and select the Allow canceling and editing orders check box.

  1. The edit request must contain all order data as if the order is being created for the first time.
  2. If the edit request is missing an item, the item is not removed from the order, but its quantity becomes 0.
  3. If an order is being edited via API and in MeaSoft desktop application at the same time, only the changes made in the desktop applications are applied.

Edit Request Fields

All request fields correspond to the order creating request structure, except for:

  • specify the editorder instead of the neworder root tag.
  • do not specify the barcode tag as it is assigned when creating an order.
  • for item items, specify the item internal code in the code attribute. To receive the internal code, use the order status request.

Edit Response Fields

All response fields correspond to the order creating responce structure, except for:

  • the editorder tag is returned instead of neworder.

Canceling Order

The request is intended to cancel the orders that are not in process yet — there was no changes of shipment or delivery status or delivery time, etc.

You can only cancel orders if the courier service uses the Premium or Maximum personal account plan. To enable order canceling, in the courier service account go to Settings > Parameters > Advanced and select the Allow canceling and editing orders check box.

Once an order is canceled, the Delivery info field is filled in with Canceled by client, the Delivery date is filed in with the current date, the Delivered by is filled in with system entry CANCEL.

Order Cancelation Example

<?xml version="1.0" encoding="UTF-8" ?>
<cancelorder>
  <auth extra="8" login="login" pass="pass" />
  <order orderno="" ordercode="123456" />
  <order orderno="123aaa" ordercode="" />
</cancelorder>

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 — order code.
  • ordercode — internal order code.

Either orderno or ordercode is required.

Response Example

<?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>

Adding Files to Order

Request Example

<?xml version="1.0" encoding="UTF-8" ?>
<addattachments>
  <auth extra="8" login="login" pass="pass" />
  <orderno>1234567</orderno>
  <attachments>
    <item name="photo1.jpg">JVBERi0xLjMN1wb25lbnQgMQ
    JUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA
    U3VidHlwZSAvSW1hZ2UNL1d pZHRoIDE4MDgNL0hlaWdodCA
    ggNCAwIFINL0JpdHNQZXJDb 21wb25lbnQgMQ0vRGVjb2RlU
    ENL0NvbHVtbnMgMTgwOA0+P g0vSW1hZ2VNYXNrIHRydWUNL
    XhEZWNvZGUNPj4Nc3RyZWFt DQ</item>
    <item name="photo2.jpg">VBERi0xLjMNAwIG9iag0HRoJ
    JUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA
    vWE9iamVjdA0vU3VidHlwZS AvSW1hZ2UNL1dpZHRoIDEzNj 
    gNL0hlaWdodCAxMzMzDS9MZ W5ndGggNCAwIFINL0JpdHNQZ 
    XJDb21wb25lbnQgMQ0vRGVj b2RlUGFybXMgPDwNL0sgLTEN 
    L0NvbHVtbnMgMTM2OA0+Pg0 vSW</item>
  </attachments>
</addattachments>


Fields Description

addattachments — root container. Required.

  • auth — authorization. Required.
  • orderno — order number. Required. You can use tag ordercode 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.


Response Example

<?xml version="1.0" encoding="UTF-8"?>
<addattachments>
  <attachments>
    <item name="photo1.jpg" error="0" errormsg="OK" />
    <item name="photo2.jpg" error="0" errormsg="OK" />
  </attachments>
</addattachments>

Getting Order Files

Request Example

<?xml version="1.0" encoding="UTF-8" ?>
<attachments>
  <auth extra="8" login="login" pass="pass" />
  <orderno>1234567</orderno>
</attachments>

Fileds Description

attachments — Root container. Required.

  • auth — authorization. Required.
  • orderno — order number or code. Required.


Response Example

<?xml version="1.0" encoding="UTF-8"?>
<attachments>
  <item name="doc1.docx" size="35654">JVBERi0xLjMN
  JUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA
  U3VidHlwZSAvSW1hZ2UNL1d pZHRoIDE4MDgNL0hlaWdodCA
  ggNCAwIFINL0JpdHNQZXJDb 21wb25lbnQgMQ0vRGVjb2RlU
  ENL0NvbHVtbnMgMTgwOA0+P g0vSW1hZ2VNYXNrIHRydWUNL
  XhEZWNvZGUNPj4Nc3RyZWFt DQ</item>
  <item name="photo2.jpg" size="74861">VBERi0xLjMN 
  JUBQREYwMTIzNDU2Nzg5IDI NMyAwIG9iag08PA0vVHlwZSA
  vWE9iamVjdA0vU3VidHlwZS AvSW1hZ2UNL1dpZHRoIDEzNj 
  gNL0hlaWdodCAxMzMzDS9MZ W5ndGggNCAwIFINL0JpdHNQZ 
  XJDb21wb25lbnQgMQ0vRGVj b2RlUGFybXMgPDwNL0sgLTEN 
  L0NvbHVtbnMgMTM2OA0+Pg0 vSW</item>
</attachments>

The item tag contains base 64 encoded binary data (files).

Changing Status by Service Partner

Order status change request allows to get the final status of the order — either Delivered or Not delivered (Returned/Canceled).

Besides, the request gets date and time of status change, if necessary, and the Delivery info field message.

You can attach images to the order.

Request Example:

<?xml version="1.0" encoding="UTF-8" ?>
<setorderinfo>
  <auth extra="8" login="login" pass="pass" />
  <order ordercode="123456">
    <message>Accepted by Tailor</message>
    <outstrbarcode>7654312</outstrbarcode>
  </order>
  <order ordercode="234567">
    <status>PICKUPREADY</status>
    <eventtime>2021-05-30 10:20:00</eventtime>
    <message>Client refused the order</message>
    <paytype>CASH</paytype>
    <items>
       <item code="34533" quantity="1" reason="0" />
       <item code="34456" 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>
</setorderinfo>


Fields Description

setorderinfo — root container. Required.

  • auth — authorization. Required.
  • order — order container. Required. A request can contain more than one order container. It has the following attribute:
  • ordercode — an internal order code.
  • status — new order status. It can be any 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 payment type. Possible values are CASH and CARD.
  • items — container that describes order items. It has the following attributes:
  • code — 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:
  • filename — file name.

Response Example

<?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>

Getting Documents for Printing

Get Print Forms Request Example

<?xml version="1.0" encoding="UTF-8" ?>
<waybill>
  <auth extra="8" login="login" pass="pass" />
  <orders>
    <order orderno="1234567" ordercode="33331" />
    <order orderno="1234568" ordercode="33332" />
  </orders>
  <form>1</form>
</waybill>

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 — 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

<?xml version="1.0" encoding="UTF-8"?>
<waybill>
  <content>EODIcaI8KSBlwQ 4MnEOR7Px8U8EBAyGICBnwpw 
  IZhQgz0ZxuPs8EBM/GcbjzB AwhBl8hwQYIO00GmEwg1CeEG 
  mqYTChNU0wqf8l8nz4zgc+K fCno+zwU5GjOZmzXGcbEQYIM 
  4zkegRE40zWzONyoNNMIOIa cWnp6aDCGEGE9NQmoQd2mg00 
  79U4f3hPTwnfp6Sdrafeqpa JDpFw/1aYT077VNNNdO00G3q 
  mqqvp9p2E7T0/wiFemv8uG6 OM</content>
</waybill>

Note that print forms are not created for pickups.

The content tag contains base64 encoded binary data (PDF file).

Cancellation of order

Cancel request is intended to be used for cancellation of those orders about which no changes have been made - like delivery status, correspondence status and delivery time - in other words, those orders which are not being processed.

In case of order cancellation “Delivery information” field gets the value “Cancelled by the customer” and “Delivery date” field gets a current date.


The example of a query for order cancellation:

<?xml version="1.0" encoding="UTF-8" ?>
<cancelorder>
  <auth extra="8" login="login" pass="pass" />
  <order orderno="" ordercode="123456" />
  <order orderno="123aaa" ordercode="" />
</cancelorder>


The description of status query fields:

cancelorder is a root container. Required.

  • auth is authorization. Required.
  • order is a cancelled order container. Required. A query may contain more than one order container. It has the following attributes:
  • orderno is order`s cipher.
  • ordercode is an internal code of the order.

Please, note that at least one of orderno or ordercode attributes should be specified!


The example of a response:

<?xml version="1.0" encoding="UTF-8" ?>
<cancelorder>
  <order orderno="123test" ordercode="123456" error="0" errormsg="OK" errormsgru="Successfully" />
  <order orderno="123aaa" ordercode="" error="52" errormsg="order not found" errormsgru="The order is not found" />
</cancelorder>

City names list

The example of the city names list query:

<?xml version="1.0" encoding="UTF-8"?>
<townlist>
  <codesearch>
    <zipcode>110000</zipcode>
    <kladrcode>0100000100800</kladrcode>
    <fiascode>bd21979d-46f8-49d0-9105-e8d65172a983</fiascode>
    <code>123</code>
  </codesearch>
  <conditions>
    <city>Krasnodar Territory</city>
    <namecontains>Novgorod</namecontains>
    <namestarts>Mosc</namestarts>
    <name>Moscow</name>
    <fullname>Moscow city</fullname>
    <country>1</country>
  </conditions>
  <limit>
    <limitfrom>30</limitfrom>
    <limitcount>10</limitcount>
    <countall>YES</countall>
  </limit>
</townlist>

All elements inside townlist container can either be absent or combine. The search is not case-sensitive.

  • codesearch is a search by codes. In case when it is used, conditions and limit containers will be ignored.
  • zipcode is a search by zip codes. Please, note that one zip code can be applicable to several localities. In this case the system will return several records.
  • kladrcode is a search by 13-digit codes of All-Russian Classifier of Addresses.
  • fiascode is a search by codes of Federal Information Address System (Address system used in Russia) (AOID).
  • code is a search by codes of the system.
  • conditions specifies search criteria. All enclose elements simultaneously impose “AND” condition.
  • city is a search by all the localities of a region.
  • namecontains is a search of the localities which names contain a specified text.
  • namestarts is a search of the localities which names start from a specified text.
  • name is a search of the localities which names match a specified text.
  • fullname is a search of the localities which names and type match a specified text.
  • country is a search of the country with a specified zip code.
  • limit limits result output.
  • limitfrom specifies the record number of a search result starting with which a response should be given. It equals 0 by default.
  • limitcount specifies the number of search result records which should be returned. It equals 10000 by default.
  • countall - YES indicates the necessity of counting the amount of matches found. It may slow down the process of query execution. In case it is disabled, totalcount and totalpages values won`t be indicated in the response.

The example of a response:

<?xml version="1.0" encoding="UTF-8"?>
<townlist count="3" page="1" totalcount="3" totalpages="1">
  <town>
     <code>26379</code>
     <city>
       <code>23</code>
       <name>Krasnodar Territory</name>
     </city>
     <name>Sochi city</name>
     <shortname>Sochi</shortname>  (not yet supported)
     <typename>city</typename>  (not yet supported)
  </town>
  <town>
     <code>40331</code>
     <city>
       <code>32</code>
       <name>Bryanskaya oblast</name>
     </city>
     <name>Sochilov farmstead</name>
     <shortname>Sochilov</shortname>
     <typename>farmstead</typename>
  </town>
  <town>
     <code>114016</code>
     <city>
       <code>60</code>
       <name>Pskov oblast</name>
     </city>
     <name>Sochikhino village</name>
     <shortname>Sochikhino</shortname>
     <typename>village</typename>
  </town>
</townlist>

In a response cities and towns are sorted by their popularity, importance (district centers, etc.) and only after that - alphabetically.

Region names list

The example of the region names list query:

<?xml version="1.0" encoding="UTF-8"?>
<regionlist>
  <codesearch>
    <code>77</code>
  </codesearch>
  <conditions>
    <namecontains>Territory</namecontains>
    <namestarts>Mosc</namestarts>
    <fullname>Moscow region</fullname>
    <country>1</country>
  </conditions>
</regionlist>

The example of a response:

<?xml version="1.0" encoding="UTF-8"?>
<regionlist count="2">
  <city>
    <code>80</code>
    <country>
      <code>1</code>
      <name>Russia</name>
      <id>643</id>
      <ShortName1>RU</ShortName1>
      <ShortName2>RUS</ShortName2>
    </country>
    <name>Agin-Buryat Autonomous Area</name>
  </city>
  <city>
    <code>1</code>
    <country>
      <code>1</code>
      <name>Russia</name>
      <id>643</id>
      <ShortName1>RU</ShortName1>
      <ShortName2>RUS</ShortName2>
    </country>
    <name>Republic of Adygea</name>
  </city>
</regionlist>

Street names guide

The example of the city names list query:

<?xml version="1.0" encoding="UTF-8"?>
<streetlist>
  <conditions>
    <town>Moscow city</town>   // MANDATORY FIELD!
    <namecontains>Khokhlo</namecontains>
    <namestarts>Academician K</namestarts>
    <name>Academician Khokhlov</name>
    <fullname>Academician Khokhlov Str.</fullname>
  </conditions>
  <limit>
    <limitfrom>30</limitfrom>
    <limitcount>10</limitcount>
    <countall>YES</countall>
  </limit>
</streetlist >
  • conditions specifies search criteria. All enclose elements simultaneously impose “AND” condition.
  • town is a mandatory field. It`s the name or the code of a locality.
  • namecontains is a search of the localities which names contain a specified text.
  • namestarts is a search of the localities which names start from a specified text.
  • name is a search of the localities which names match a specified text.
  • fullname is a search of the localities which names and type match a specified text.
  • limit limits result output.
  • limitfrom specifies the record number of a search result starting with which a response should be given. It equals 0 by default.
  • limitcount specifies the number of search result records which should be returned. It equals 10000 by default.
  • countall - YES indicates the necessity of counting the amount of matches found. It may slow down the process of query execution. In case it is disabled, totalcount and totalpages values won`t be indicated in the response.

The example of a response:

<?xml version="1.0" encoding="UTF-8"?>
<streetlist count="1" page="1" totalcount="3" totalpages="1">
  <street>
     <name>Academician Khokhlov Str.</name>
     <shortname>Academician Khokhlov</shortname>
     <typename>Str.</typename>
  </street>
</streetlist>

In a response names of the streets are sorted in alphabetical order.

Nomenclature list

The example of the nomenclature list query:

<?xml version="1.0" encoding="UTF-8" ?>
<itemlist>
  <auth extra="8" login="login" pass="pass"></auth>
    <codesearch>
      <code>123456</code>
      <article>FD343</article>
      <barcode>2345625213125</barcode>
    </codesearch>
    <conditions>
      <namecontains>TV set</namecontains>
      <namestarts>sony</namestarts>
      <name>Sony KDL-55W905 LCD television</name>
      <quantity>EXISTING_ONLY</quantity>
    </conditions>
    <limit>
      <limitfrom>30</limitfrom>
      <limitcount>10</limitcount>
      <countall>YES</countall>
    </limit>
</itemlist>

All elements inside itemlist container can either be absent or combine. The search is not case-sensitive.

  • codesearch is a search by codes. In case when it is used, conditions and limit containers will be ignored.
  • code is a search by codes of the system.
  • article is a search by article numbers.
  • barcode is a search by barcodes.
  • conditions specifies search criteria. All enclose elements simultaneously impose “AND” condition.
  • namecontains is a search of the goods which names contain a specified text.
  • namestarts is a search of the goods which names start from a specified text.
  • name is a search of the goods which names match a specified text.
  • quantity is the availability of goods at the warehouse. It can have the following values: EXISTING_ONLY - only in stock, NOT_EXISTING_ONLY - only stock out, ALL - all. In some setups this field may be unavailable.
  • limit limits result output.
  • limitfrom specifies the record number of a search result starting with which a response should be given.
  • limitcount specifies the number of search result records which should be returned.

The example of a response:

<?xml version="1.0" encoding="UTF-8"?>
<itemlist count="3" totalcount="3" page="1" totalpages="1">
  <item>
    <code>123456</code>
    <article>FD343</article>
    <barcode>2345625213125</barcode>
    <name>Sony KDL-55W905 LCD television</name>
    <retprice>65000</retprice>
    <weight>5.1</weight>
    <length>50</length>
    <width>30</width>
    <height>40</height>
    <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>
  <item>
  ...
</itemlist>

The description of fields:

  • code is an internal identifier assigned by the system.
  • article is an article assigned by a customer (a supplier).
  • barcode is a manufacturer`s barcode.
  • name is an item name.
  • retprice is a retail price value by default. When ordering the price which is mentioned in the order is used.
  • weight is weight in kilograms.
  • length is length in centimeters.
  • width is width in centimeters.
  • height is height in centimeters.
  • CountInPallet is the number of pieces in a pallet.
  • HasSerials requires serial numbers accounting. It takes on the following values: 1 - yes, 0 - no.
  • CountryOfOrigin is the name of a country of origin in Russian.
  • Message is a commentary.
  • Message2 is an additional commentary.
  • quantity is the number of goods in stock. Those goods that have already been batched into orders are not included in this number and considered to depart the depository for goods. This field may be unavailable in some setups.
  • reserved is the number of goods reserved. It may outnumber stock balance if customers are waiting for the next delivery. This field may be unavailable in some setups.

The list of order points of issue

The example of a points of issue query:

<?xml version="1.0" encoding="UTF-8" ?>
<pvzlist>
 <auth extra="8" login="login" pass="pass"></auth>
 <town>Nizhniy Tagil</town>
</pvzlist>
  • town is a receiver`s residence.


The example of a response from the list of pick-up points:

<?xml version="1.0" encoding="UTF-8" ?>
<pvzlist count="2">
  <pvz>
    <code>126</code>
    <clientcode>3</clientcode>
    <name>Nizhniy Tagil</name>
    <address>622036, 17 Tsiolkovsky Str., Nizhniy Tagil city</address>
    <phone>+73435417709, +73435254989</phone>
    <comment>5-storeyed apartment building with its end wall beside the highway, the second building from Parkhomenko-Tsiolkovsky street intersection.</comment>
  </pvz>
  <pvz>
    <code>245</code>
    <clientcode>NTG1</clientcode>
    <name>At Krasnoarmeyskaya Street</name>
    <address>79 KRASNOARMEYSKAYA STR.</address>
    <phone>+7(3435)379-044</phone>
    <comment>Working hours: from Monday through Friday, from 9 a. m. till 6 p. m., on Saturday - from 10 a. m. till 2 p. m.</comment>
  </pvz>
</pvzlist>
  • code is a code of a point in the system. It is used in an ordering query.
  • clientcode is a code of a point used by a contracting company.
  • name is a name of a point.
  • address is a point`s address.
  • phone are point phone numbers.
  • comment is additional information.

The list of types of priority

The example of a type of priority query:

<?xml version="1.0" encoding="UTF-8" ?>
<services>
<auth extra="8"/>
</services>

The example of a response from the list of types of priority:

<?xml version="1.0" encoding="UTF-8" ?>
<services count="2">
  <service>
     <code>1</code>
     <name>Economy</name>
  </service>
  <service>
     <code>2</code>
     <name>Urgently</name>
  </service>
</services>

Delivery cost calculation

The example of a delivery cost query:

<?xml version="1.0" encoding="UTF-8" ?>
<calculator>
  <auth extra="8" login="login" pass="pass" />
  <calc townfrom="Moscow" townto="3800000300000" mass="3.7" service="1" />
</calculator>

Parameters:

  • townfrom is a sending town.
  • townto is a receiving town.
  • 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]

In authorization login and pass parameters can be omitted, then calculation will be made according to a standard tariff rate of a delivery service with no account of possible differences for a certain customer.
The name of a town (not recommended!), or its code from our list, or its 13-digit code of All-Russian Classifier of Addresses (Address Classifier used in Russia), or its 36-digit code of the Federal Information Address System (AOID) can be entered into the fields for a sending town and a receiving town.


The example of a cost of delivery response:

<?xml version="1.0" encoding="UTF-8"?>
<calculator>
  <calc>
    <townfrom code="1">Moscow city</townfrom>
    <townto code="56603">Irkutsk city</townto>
    <mass>3.7</mass>
    <service>1</service>
    <zone>2</zone>
    <price>1163</price>
    <maxdeliverydays>3</maxdeliverydays>
  </calc>
</calculator>

Parameters:

  • townfrom is a sending town name which has been recognized and assigned to the list of towns by the system. code attribute is a code from the list of towns in the system.
  • townto is a receiving town name which has been recognized and assigned to the list of towns by the system. code attribute is a code from the 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]
  • service is a delivery mode - the number indicating a certain entry in the list of types of priority (See the description on this page).
  • zone is the number of a tariff zone according to which the price has been calculated. The tariff schedule is selected depending on the tariff zone. Multiplying or decreasing coefficients can be applied to the price of delivery in case of order delivery not from/to a regional center.
  • price is a calculated delivery price in the currency of a delivery service`s price-list. It is recommended to be used rather than its homonymous attribute of the parent container.
  • maxdeliverydays is the maximum delivery period in business days.

The list of money transfer certificates

The example of the query for the list of money transfer certificates:

<?xml version="1.0" encoding="UTF-8" ?>
<smalist>
  <auth extra="8" login="login" pass="pass" />
  <datefrom>2016-02-10</datefrom>
  <dateto>2016-03-10</dateto>
</smalist>

smalist is a root container. Required.

  • auth is authorization. Required.
  • datefrom is a date “from”. Optional.
  • dateto is a date “to”. Optional.

If the date range is not specified, then money transfer certificates for the last month are returned.

The example of a response to the query for the list of money transfer certificates:

<?xml version="1.0" encoding="UTF-8"?>
<smalist count="1">
  <sma>
    <code>6278</code>
    <number>3992</number>
    <actdate>2016-02-12</actdate>
    <datepay></datepay>
    <price>637.00</price>
    <rur>13430.00</rur>
    <pricekur>570.00</pricekur>
    <priceag>67.00</priceag>
    <payno>42423</payno>
    <paytype>1</paytype>
  </sma>
</smalist>
  • code is a code of a money transfer certificate.
  • number is the number of a money transfer certificate in the system.
  • actdate is a date of a money transfer certificate.
  • datepay is a date of payment on a money transfer certificate.
  • price is a price of services.
  • rur is a price of an order.
  • pricekur is a price of courier delivery.
  • priceag is agent`s commission.
  • payno is a number of a payment order.
  • 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.

Detailing of money transfer certificates

The examples of the query for money transfer certificates detailing:

<?xml version="1.0" encoding="UTF-8" ?>
<smadetail>
  <auth extra="8" login="login" pass="pass" />
  <code>6278</code>
</smadetail>

smadetail is a root container. Required.

  • auth is authorization. Required.
  • code is a code of a money transfer certificate (See the query of the list of money transfer certificates). Required.

The example of a response to the query of money transfer certificates:

<?xml version="1.0" encoding="UTF-8"?>
<smadetail count="1">
  <specialsma>
    <code>42494</code>
    <addresscode>14424</addresscode>
    <price>314.00</price>
    <rur>8800.00</rur>
    <pricekur>270.00</pricekur>
    <priceag>44.00</priceag>
    <pricecalc>8486.00</pricecalc>
    <paytype>Cash on delivery</paytype>
    <status>Delivered</status>
  </specialsma>
  <specialsma>
    <code>42495</code>
    <addresscode>14415</addresscode>
    <price>323.00</price>
    <rur>4630.00</rur>
    <pricekur>300.00</pricekur>
    <priceag>23.00</priceag>
    <pricecalc>4306.00</pricecalc>
    <paytype>Cash on delivery</paytype>
    <status>Delivered</status>
  </specialsma>
</smadetail>
  • code is a code of the record.
  • addresscode is a code of the order.
  • price is a price of service
  • rur is the amount of the order.
  • pricekur is a price of courier delivery.
  • priceag is agent`s commission.
  • pricecalc is the amount to be transferred to the agent.
  • 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.
  • status is a status of the order.

Generation of short links

In some cases, for instance, when using them in SMS, the use of short links to member area may be required.

For doing that it is necessary to send a query containing a full link to which a response containing a hash code for a short link will be sent.

The example of a query for short links generation:

<?xml version="1.0" encoding="UTF-8" ?>
<shortlink>
  <link short="0">https://home.courierexe.ru/8/site/orders</link>
</shortlink>

shortlink is a root container. Required.

  • link is a full link for generation of which a code should be obtained. Required. If short attribute equals 1, then a response won`t contain XML but only a hash code.

The example of a response to the query for short links generation:

<?xml version="1.0" encoding="UTF-8"?>
<shortlink>
  <hash>35AF350C</hash>
</shortlink>
  • hash is a hash code of a short link.

Further on the following link to member area can be used:

https://home.courierexe.ru/35AF350C