API Documentation — различия между версиями
Johny (обсуждение | вклад) (→Order elements description) |
Johny (обсуждение | вклад) м (→Examples of responses) |
||
Строка 370: | Строка 370: | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<statusreq count="23"> | <statusreq count="23"> | ||
− | <order orderno="111111" orderno2="123123" ordercode="34534234" givencode="2345334"> | + | <order orderno="111111" awb="qwerty" orderno2="123123" ordercode="34534234" givencode="2345334"> |
<barcode>111111</barcode> | <barcode>111111</barcode> | ||
<sender> | <sender> |
Версия 11:33, 5 апреля 2019
“Delivery Service 2008” system has an option of integration by means of XML API under HTTP POST protocol. The given API is designed for integrating customers (online shops and other companies ordering delivery) with delivery services working under the control of “Delivery Service 2008” system. If you are an aggregator transferring customer data, you will probably have to log in using different user accounts in case a delivery service has to keep separate accounts for reciprocal payments for each customer. If you are a “contractor”, the integration should be done in the opposite direction – orders will be transferred to you from a delivery service. For that purpose we have a platform for external integration but contractors can be added to it only on our side. Please, send us your quote, the description of your service and we will gladly consider them. When writing the given documentation we`ve been assuming that a person reading it has the required level of expertise in programming sufficient for the understanding of the contents of this documentation, has a knowledge of XML and development environment which he is integrating. If you are not qualified as a programmer you will have to hire a professional programmer for the implementation of 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.
Содержание
- 1 Complete integrations
- 2 Test account
- 3 Work account for the connection to your customer`s platform
- 4 General terms
- 5 Limitations
- 6 Ordering
- 7 Order status query
- 8 Order tracking by number
- 9 Status change by agent
- 10 Obtaining the pdf waybill
- 11 Cancellation of order
- 12 City names list
- 13 Region names list
- 14 Street names guide
- 15 Nomenclature list
- 16 The list of order points of issue
- 17 The list of types of priority
- 18 Delivery cost calculation
- 19 The list of money transference certificates
- 20 Detailing of money transference certificates
- 21 Generation of short links
Complete integrations
You can download integration modules to integrate with popular CMS
Content Management System (CMS) | Module version | Link | Note |
---|---|---|---|
1.5.8 от 13.11.2017 | Download Unicode Download ANSI |
Supports version 14.5 and newer ones | |
1.4.2 dated from September 6, 2017 | Download | Supports version 1.5.2.0 and newer ones (including 2.x!) | |
1.7.2 от 06.09.2017 | Download | Supports versions from 1.5.5.1 till 2.2. | |
1.3.2 от 15.08.2017 | Install | ||
1.2.1 от 06.09.2017 | Install | is set up in user area in the system | |
1.0 dated from November 15, 2016 | is set up in user area in the system Leadvertex | ||
1.0 dated from January 1, 2018 | RetailCRM | is set up in user area in the system |
The given modules are shared for free without any guarantee on the part of the developer. Their availability should be considered not as a means of complete automation of your interaction with the delivery service but more as an aid for online shop developers in building integration with delivery services. However, we will appreciate if you inform us about your needs and/or discrepancies found in our modules – this allows us to consider your demands when developing new versions of our modules.
Test account
For debugging you can access your test personal account following the link: https://home.courierexe.ru/8, your login will be: test, your password will be: testm. There you will be able to see all your requests with the “eyes” of our system by using “Automation” tab. You will also find a query execution interface there. You will see all created orders on “Tracking” tab.
In order to simplify the process of integration, you can download the example of addressing the service using PHP.
Work account for the connection to your customer`s platform
It is necessary to have 3 parameters in order to connect to your customer`s platform: 1. Parameter extra (this is a digital code, company`s unique identifier. Request this parameter from a company that you are integrating with.) You can look this code up in “Delivery Service 2008” software interface by using its main menu "Reference – Additional Options". Digital value will be given at the second hyperlink (it is marked with an “asterisk” in the screenshot below):
2. Login is a user account parameter for customer`s member area and API that is entered in user card on "Miscellaneous" in "User Name" field. You will probably have to create a new user card (shown in the screenshot below) in “Delivery Service 2008” software.
3. Password is a user account parameter for customer`s member area and API that is entered in user card on "Miscellaneous" in " Password" field (shown in the screenshot below).
General terms
There is a web service on the side of the delivery service located at the following URL: https://home.courierexe.ru/api/. Test authorization data are: user login: test, user password: testm, “extra” parameter value: 8. Please, note that the test platform is common for everyone. You shouldn`t pass on orders containing confidential data through it as they might be seen by other users of the service. Ask the company that you are integrating with for user “login”, “password” and “extra” parameter value in order to use the integration in the work mode. You can send test queries to our service in the member area using “Automation” tab. You can also check the history of all queries sent by you in the member area.
A customer is sending queries to the service by using HTTP POST, the service is processing these queries and sending the execution result back. All queries and responses are transferred in XML format. The encoding used is UTF-8. Dot sign is used as a decimal symbol. Dates are presented in YYYY-MM-DD format and time is presented in HH:MM format. Due to the peculiarities of XML extensible markup language, some symbols in the text should be replaced: & from & < to < > from > " to "
Limitations
With the aim of protecting service from its improper use query limitation equal to 1500 queries from one IP-address for 20-minute period has been introduced since May 29, 2017. In case the above-mentioned limit is reached, the IP-address will be blocked; unblocking of the IP-address is possible by addressing the technical support service with the subsequent discussion of your algorithms and their correction.
The best option for checking your orders` status is using "statusreq" queries with changes=ONLY_LAST parameter. You shouldn`t try to “attack” our API with queries containing numbers of all your orders, especially, with "tracking" queries – they are not intended to be used for this (see their description).
Ordering
Example of ordering
<?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>Room 35, 38 Petrovka Str.</address>
<date>March 22, 2014</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
</sender>
<receiver>
<company>Ministry of Internal Affairs</company>
<person>Cheap & Dale</person>
<phone>123-45-67</phone>
<zipcode>125480</zipcode>
<town>Saint-Petersburg</town>
<address>Room 35, 38 Petrovka Str.</address>
<date>2014-03-22</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
</receiver>
<return>NO</return>
<return_service>1</return_service>
<weight>5.1</weight>
<quantity>2</quantity>
<paytype>CASH</paytype>
<service>2</service>
<type>3</type>
<price>387.5</price>
<deliveryprice>150</deliveryprice>
<discount>0</discount>
<inshprice>387.5</inshprice>
<enclosure>Children`s toys</enclosure>
<instruction>Check in the presence of the buyer, sign acceptance act</instruction>
<pvz>124</pvz>
<department>Department</department>
<pickup>NO</pickup>
<items>
<item extcode="abc123" quantity="1" mass="0.2" retprice="37.5" VATrate="0" barcode="2345625213125" article="1">Ball</item>
<item extcode="abc124" quantity="2" mass="2" retprice="100" VATrate="10" barcode="4645625213138" article="2">Hula hoop</item>
<item extcode="abc125" quantity="3" mass="0.3" retprice="50" barcode="2345625213126" article="3">Yellow rattle</item>
</items>
</order>
</neworder>
Order elements description
- neworder is a root container, the mandatory element.
- newfolder is an attribute of a new order – YES/NO. If there is YES, then a new order will be created for the given correspondence in the delivery service system. It is an optional element.
- order is a container used for the description of one order, the mandatory element. There may be a number of order containers in one neworder container for the creation of several orders by using one query.
- orderno is an order number. It should be entered here if it is assigned by the customer. 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 the presence of orders with the entered number within the current calendar year and in case they already exist in the system, the order won`t be created and error 17 "Such number exists" will be send back in the response.
- 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 pieces packages present that are individually marked, masks in the form of underscore characters indicating barcode items, varying for different pieces packages within one order can be used.
For example: There are 20 product units in order no. 123 packed in 3 pieces packages. The customer has to prepare 3 barcodes for each piece: CLNT0012301, CLNT0012302, CLNT0012303, where CLNT – is a customer`s prefix, 00123 is an order number, 01-03 is the number for each piece package in the order. CLNT00123__ should be entered into the “barcode” field (the system will understand that there may be any last 2 symbols in the field and will display barcodes for the same order).
- sender presents the information about order sender. It is an optional container.
<sender>
<company>Name of the sender company</company>
<person>Sender company contact person</person>
<phone>Sender`s phone number, E-mail</phone>
<town>Sender`s location in “Moscow city” format</town>
<address>Sender`s address</address>
<date>Pick-up date in "YYYY-MM-DD" format</date>
<time_min>Desired pick-up time in "HH:MM" format</time_min>
<time_max>Desired pick-up time in "HH:MM" format</time_max>
</sender>
- receiver is the information about the receiver. It is a mandatory container.
<receiver>
<company>Name of the receiving company</company>
<person>Receiving company contact person</person>
<phone>Receiver`s phone number, E-mail</phone>
<town>Receiver`s location in “Moscow city” format</town>
<address>Receiver`s address</address>
<date>Delivery date in "YYYY-MM-DD" format</date>
<time_min>Desired delivery time in "HH:MM" format</time_min>
<time_max>Desired delivery time in "HH:MM" format</time_max>
</receiver>
- company is a receiving company.
- person is a contact person. At least one field should be filled in – either company or person!
- phone is a phone number. Several phone numbers and emails can be entered into this field.
- town is the name of the town.
Town' field of sender and receiver containers can be filled in by using:
- locality dialing code dialing codes guide
- 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!)
- paytype is a type of payment used for checking out the order by the receiver. It can take on the following values:
- CASH is paying with cash on delivery (by default)
- CARD is paying with a credit card on delivery
- NO which means that there won`t be any payment. “Price” field value will be ignored. (This type of payment is transferred in case the order has already been paid for and doesn`t require cash collection; API will add goods from the order with a null price to the system. If it is necessary to transfer order total cost, it can be done by using <inshprice> field, indicating order items` declared value)
- OTHER means other types of payment (It is designated for making payments directly to the delivery service by using other types of payment as: “Webmoney”, “Yandex Money”, online payment with a credit card other payment systems, etc.)
- OPTION means choosing type of payment by the receiver. This type of payment can’t be transferred with the order. It is automatically set depending on customer`s data setup.
- zipcode is a zip code.
- weight is a total weight of the order in kilograms.
- quantity is the number of pieces packages.
- service - delivery mode (service type) is transferred in the form of a code from “Delivery priority types” guide.
- type – correspondence (dispatch) type is transferred in the form of a code from “Types of correspondence” guide.
- price is an order amount. In case “items” container is present, the value of the given parameter will be ignored and calculated automatically.
- deliveryprice is the cost of delivery. In case “items” container is present, “Delivery” enclosure will be added to it.
- discount is a discount for the order amount. As a result the order amount will be decreased by the discount amount.
- return is an attribute indicating the necessity of return.
- return_service is a return mode (type of service) which is transferred in the form of a code from “Delivery priority types” guide.
- enclosure is an enclosure.
- inshprice is a declared value.
- instruction is an instruction – a note.
- pvz is an order points of issue code. You can find out the codes by the API requset or in user`s member area on “pvz” tab.
- department is the name of the department which the order is raised in.
- pickup is YES/NO attribute of pickup arrangement. If there is YES, then the entire order will be considered to be the assignment for cargo pickup but not for cargo delivery! It is applied for calling a courier to the receiver for the pickup of other packaging units.
- items is a container used for the description of goods enclosed. It is an optional container. It has the following attributes:
- item is the name of a product.
- quantity is the amount of product units.
- mass is the weight of a product unit in kilograms.
- retprice is the price of a product unit.
- VATrate is a VAT rate which is specified as integer percentage. If a value is not indicated, then “18” value is entered.
- barcode is a product unit barcode.
- article is product unit article number. Attention! Product unit article is displayed only in case when a product unit is stored at the delivery service in safe custody and order batching is required. In this case the system will try to assign a product unit to a corresponding item in nomenclature list. If the product unit is not found in the nomenclature list, the appropriate error message will be displayed by the system. If there are several product units found within one article number, the system will randomly select one of them what can result in incorrect order batching! If a product unit is NOT in safe custody – you DON`T have to specify its article number. Product item will be entered into the system by a plain text.
- extcode is an external code of a string. It is used for the identification of strings of orders when obtaining statuses. It is an optional field. IT IS NOT SUPPORTED YET.
In case it is necessary to specify them besides product units, additional services (for example, DELIVERY, order batching, lifting the order up to the floor, etc.) – they should be specified in the same “items” container as product units but without article numbers.
Examples of responses
The example of a successful response
<?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>
The example of a response with an 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>
The example of a response in case of the authorization error
<?xml version="1.0" encoding="utf-8"?>
<request>
<error error="1" errormsg="authorization error"></error>
</request>
The example of a response in case of a syntax error'
<?xml version="1.0" encoding="UTF-8"?>
<request>
<error>column:1 line:11 message:expected '>'</error>
</request>
Error codes in case of ordering
0 – No errors.
1 - Authorization error. (<auth login="" pass=""></auth> tags are missing, incorrect login or password).
2 - Empty response is sent (<neworder></neworder> container is missing in a XML document).
3 - Order amount is set incorrectly.
4 - Order weight is set incorrectly.
5 - Receiver`s town is not found.
6 - Sender`s town is not found.
7 - Receiver`s address is not filled in.
8 - Receiver`s phone number is not filled in.
9 - Receiver`s contact name is not filled in.
10 - Receiver`s company name is not filled in.
11 - The amount of declared value is incorrect.
12 - Article number is not found.
13 - Sender`s company name is not filled in.
14 - Sender`s contact name is not filled in.
15 - Sender`s phone number is not filled in.
16 - Sender`s address is not filled in.
17 - Order with this number already exists.
Order status query
The example of order status query
<?xml version="1.0" encoding="UTF-8" ?>
<statusreq>
<auth extra="8" login="login" pass="pass"></auth>
<client>CLIENT</client>
<orderno>1234</orderno>
<ordercode>34234</ordercode>
<givencode>234534</givencode>
<datefrom>2016-07-21</datefrom>
<dateto>2016-07-21</dateto>
<target>Car-making factory</target>
<done>ONLY_NOT_DONE</done>
<changes>ONLY_LAST</changes>
<quickstatus>NO</quickstatus>
</statusreq>
The description of status query fields
statusreq is a root container. It is a mandatory element.
- auth is authorization. It is a mandatory element.
- client is an attribute of a customer or an agent. It is an optional element.
- CLIENT is an attribute of a customer, the default value
- AGENT is an attribute of an agent. In response the information on orders passed on to the agent for their delivery is returned
- orderno is an order number. It is an optional element.
- orderno2 is an order number from the list of urgent orders. It is an optional element.
- datefrom is a date “from”. It is a mandatory element.
- dateto is a date “to”. It is a mandatory element.
- target is a find string. It allows indicating the text that company name or receiver`s address contains.
- done can have the following values:
- ONLY_NOT_DONE - for undelivered only
- ONLY_DONE - for delivered only
- ONLY_NEW - for new only
- Empty - for all correspondence
- changes can have only one value - ONLY_LAST. If this parameter is set, all other parameters, except quickstatus, will be ignored. The description of this mode is given here: Newly changed statuses transfer
- quickstatus indicates the “depth” of transferred statuses: "YES" value (by default) - statuses are transferred starting from the information provided by a courier. Such statuses are quick (as a rule, they are provided by a courier immediately after delivery) but not always accurate. "NO" value prohibits status transfer according to oral information provided by the courier and provides only those statuses that have been entered by an operator manually, as a rule. It takes more time however the level of accuracy is much higher in this case. It is not recommended to combine (interleave) these two types of status transfer in case of newly changed statuses demand as in this case the system will consider that statuses of dispatches are changing.
Please, note!
- Period of status query (datefrom and dateto containers) is limited to two months — two months to the date "to".
- In case both dates are not specified — dateto is accepted equal to the current date.
- In case dateto date is not specified — it is accepted equal to datefrom plus two months.
- In case datefrom date is not specified — it is accepted equal to dateto minus two months.
Examples of responses
The example of a successful response
<?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>I. I. Ivanov</person>
<phone>123-45-67</phone>
<contacts>
<phone>+74951234567</phone>
</contacts>
<town code="23432">Saint-Petersburg</town>
<address>Room 35, 38 Petrovka Str.</address>
<date>2014-03-22</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
</sender>
<receiver>
<company>Ministry of Internal Affairs</company>
<person>I. I. Ivanov</person>
<phone>123-45-67 - Ivan, (916)234.45.21 Pyotr, mvd@mail.ru</phone>
<contacts>
<phone>+74951234567</phone>
<phone>+79162344521</phone>
<email>mvd@mail.ru</email>
</contacts>
<zipcode>125480</zipcode>
<town code="23432">Saint-Petersburg</town>
<address>Room 35, 38 Petrovka Str.</address>
<date>2014-03-22</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
<coords lat="55.680327" lon="37.604456"></coords>
</receiver>
<weight>5.1</weight>
<quantity>2</quantity>
<paytype>CASH</paytype>
<service>2</service>
<price>387.5</price>
<print_check>YES</print_check>
<inshprice>387.5</inshprice>
<enclosure>Children`s toys</enclosure>
<instruction>Check in the presence of the buyer, sign acceptance act</instruction>
<currcoords lat="55.680327" lon="37.604456" accuracy="50" RequestDateTime="2014-04-21 18:07:45"></currcoords>
<courier>
<code>26</code>
<name>Vladimir Petrovich Ivanov</name>
<phone>+79161234567</phone>
</courier>
<deliveryprice total="158.6">
<>..</> (price details are not yet supported)
..
</deliveryprice>
<receiverpays>NO</receiverpays>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 17:22:00" createtimegmt="2016-06-03 16:14:44" message="" title="Delivered">COMPLETE</status>
<statushistory>
<status eventstore="Moscow branch" eventtime="2016-05-30 10:20:00" createtimegmt="2016-06-03 16:14:44" message="" title="New">NEW</status>
<status eventstore="Moscow branch" eventtime="2016-06-01 17:38:00" createtimegmt="2016-06-03 16:14:44" message="Saint-Petersburg branch" title="Dispatch is planned">DEPARTURING</status>
<status eventstore="Moscow branch" eventtime="2016-06-01 19:53:00" createtimegmt="2016-06-03 16:14:44" message="Saint-Petersburg branch" title="Dispatched from the warehouse">DEPARTURE</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 07:41:00" createtimegmt="2016-06-03 16:14:44" message="" title="Received by the warehouse">ACCEPTED</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 09:17:00" createtimegmt="2016-06-03 16:14:44" message="" title="Given to the courier to be delivered ">DELIVERY</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 17:22:00" createtimegmt="2016-06-03 16:14:44" message="" title="Delivered (to be confirmed)">COURIERDELIVERED</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 17:22:00" createtimegmt="2016-06-03 16:14:44" message="" title="Delivered">COMPLETE</status>
</statushistory>
<customstatecode>2<customstatecode>
<deliveredto>Ivanova, sec.</deliveredto>
<delivereddate>2016-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">Ball</item>
<item code="34456" extcode="abc124" quantity="2" mass="2" retprice="100" VATrate="10" barcode="4645625213138" article="2" returns="0">Hula hoop</item>
<item code="34421" extcode="abc125" quantity="3" mass="0.3" retprice="50" VATrate="18" barcode="2345625213126" article="3" returns="0">Yellow rattler</item>
</items>
</order>
</statusreq>
A response example in the absence of orders
<?xml version="1.0" encoding="utf-8"?>
<statusreq count="0">
</statusreq>
A response example in case of the authorization error
<?xml version="1.0" encoding="utf-8"?>
<request>
<error error="1" errormsg="authorization error"></error>
</request>
A response example in case of the syntax error
<?xml version="1.0" encoding="UTF-8"?>
<request>
<error>column:1 line:11 message:expected '>'</error>
</request>
Status response fields description
All the fields of response correspond with order structure when creating an order, with some additions:
- order container attributes:
- ordercode is an internal code of the order in the system which is applied for some internal operations.
- givencode is an internal code of the order in the system which is applied for some internal operations.
- returns 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.
- code attribute of item container is an internal code of order string in the system which is applied for some internal operations.
- coords in receiver container indicates receiver position.
- currcoords indicates current order position. Its attributes are:
- lat is latitude
- lon is longitude
- accuracy indicates the degree of accuracy in meters
- RequestDateTime is date/time of the latest position update.
- deliveryprice is the price of delivery in the customer`s settlement currency.
- status is a delivery status (see the list of statuses below). It has the following attributes (they are filled in starting from version 2008.0.0.670 of the system):
- eventstore is a branch which the following status is related to
- eventtime is the time of status change (time of status change depends on the location of a branch)
- createtimegmt is the time of the actual status change (GMT)
- message is the name of a receiving branch in case of a transfer between branches
- title is the name of a status in Russian
- statushistory is the history of delivery statuses. It contains the list of status containers. It is filled in only for “Premium” plan starting from version 2008.0.0.670 of the system.
- customstatecode is an internal status code of a delivery service. Please, check with the delivery service for its values. They are assigned by the delivery service 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 it.
- 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.
- deliveredto is the information on delivery or a reason for non-delivery.
- delivereddate is the date of delivery.
- deliveredtime is the time of delivery. It can be left empty in case of non-delivery.
- outstrbarcode is a contractor`s code (the order code within an external system). It is used in integrations with external systems.
status container can have the following values:
- NEW - New
- ACCEPTED - Received by the warehouse
- INVENTORY - Inventory
- DEPARTURING - Dispatch is planned
- DEPARTURE - Dispatched from the warehouse
- DELIVERY - Given to the courier to be delivered
- COURIERDELIVERED - Delivered (to be confirmed)
- COMPLETE - Delivered
- PARTIALLY - Partially delivered
- COURIERRETURN - Returned by the courier. The courier couldn`t deliver the order to the receiver and returned it back to the warehouse. This is an intermediate status after which the manager is checking whether the courier has to make another attempt to deliver the order or this is a final non-delivery.
- CANCELED - Not delivered (Return/Cancellation)
- RETURNING - Return is planned
- RETURNED - Returned
- CONFIRM - Dispatch is confirmed
- DATECHANGE - Postponement
- NEWPICKUP - Pickup is created
- UNCONFIRM - Dispatch has not been confirmed
- PICKUPREADY - Ready for pickup
Note: The set of currently used statuses may be expanded and charged in the future.
Please, note!
- status container attributes should be specified for system version 2008.0.0.670 and newer ones.
- statushistory is filled in for tariff. "Premium" as well as for system version 2008.0.0.670 and newer ones.
Newly changed statuses transfer
Send a query for getting newly changed statuses
<?xml version="1.0" encoding="UTF-8" ?>
<statusreq>
<auth extra="8" login="login" pass="pass"></auth>
<changes>ONLY_LAST</changes>
<quickstatus>NO</quickstatus>
</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:
orderno status delivereddate deliveredtime deliveredto receiver->date receiver->address price
After successful response processing it is necessary to mark received statuses as successfully received ones sending the following query
<?xml version="1.0" encoding="UTF-8" ?>
<commitlaststatus>
<auth extra="8" login="login" pass="pass"></auth>
</commitlaststatus>
If successful you will get the following response
<?xml version="1.0" encoding="UTF-8" ?>
<commitlaststatus>
<error error="0" errormsg="OK"></error>
</commitlaststatus>
This way of status transfer ensures a complete and correct status transfer even in case the status has changed in the time period between statuses` query and confirmation of their receipt. If the system hasn`t received the confirmation of a successful status transfer, it will consider this information to be not delivered and will display it in case of a requery.
Please, note!
- When this way of data transfer is used (<changes>ONLY_LAST</changes>), the system is reviewing those orders that have been checked out for the last 3 months. In case there is an order that has been checked out before this period, then status change for this order won`t get into the list of results of this query execution.
- The system always returns a current status, i. e., you can get "NEW" status for your first query and "COMPLETE" status - for your second query. A dispatch could have gone through several intermediate statuses in between queries.
- The system can never guarantee the order going through a set of statuses successively, i. e., you can get "COMPLETE" status after your first query and "NEW" status after your second query - such things can happen in case when, for example, the operator has mistakenly marked an order as a completed one and then corrected his mistake.
Order tracking by number
Query for order tracking by number is intended to provide minimal anonymized information about a certain order to a non-authorized user. Our system has its own interface for this which is available at the following URL: "home.courierexe.ru/{extra code}/tracking". You can either create a link to such page at your web-site or put as an iframe there or create your own page and use our API. This interface is specially designed to issue information to a human web-site user. You need to use "statusreq" query, desirably with changes=ONLY_LAST parameter in order to obtain statuses of orders into your information system!
A query example:
<?xml version="1.0" encoding="UTF-8"?>
<tracking>
<extra>8</extra>
<orderno>1234</orderno>
</tracking>
A response example:
<?xml version="1.0" encoding="UTF-8"?>
<tracking>
<order orderno="1234">
<sender>
<town code="1" country="RU">Moscow city</town>
<date></date>
</sender>
<receiver>
<town code="1" country="RU">Moscow city</town>
<date>2015-04-18</date>
</receiver>
<AWB>BarCode</AWB>
<weight>0</weight>
<quantity>1</quantity>
<currcoords lat="" lon="" accuracy="" RequestDateTime="" />
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 17:22:00" createtimegmt="2016-06-03 16:14:44" message="" title="Delivered" country="RU">COMPLETE</status>
<statushistory>
<status eventstore="Moscow office" eventtime="2016-05-30 10:20:00" createtimegmt="2016-06-03 16:14:44" message="" title="New" country="RU">NEW</status>
<status eventstore="Moscow office" eventtime="2016-06-01 17:38:00" createtimegmt="2016-06-03 16:14:44" message="Saint-Petersburg branch" title="Dispatch is planned" country="RU">DEPARTURING</status>
<status eventstore="Moscow office" eventtime="2016-06-01 19:53:00" createtimegmt="2016-06-03 16:14:44" message="Saint-Petersburg branch" title="Dispatched from the warehouse" country="RU">DEPARTURE</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 07:41:00" createtimegmt="2016-06-03 16:14:44" message="" title="Received by the warehouse" country="RU">ACCEPTED</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 09:17:00" createtimegmt="2016-06-03 16:14:44" message="" title="Given to the courier to be delivered" country="RU">DELIVERY</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 17:22:00" createtimegmt="2016-06-03 16:14:44" message="" title="Delivered (to be confirmed)" country="RU">COURIERDELIVERED</status>
<status eventstore="Saint-Petersburg branch" eventtime="2016-06-02 17:22:00" createtimegmt="2016-06-03 16:14:44" message="" title="Delivered" country="RU">COMPLETE</status>
</statushistory>
</order>
</tracking>
The function searches for the last order among the orders of all customers by its number (AWB or orderno). It provides anonymized information on a current state of the order.
The description of response containers is similar to the description of Order status query.
Status change by agent
Order change status query allows finding out the final status of the order - "Delivered" or "Not delivered (Return/Cancellation)."
Besides that, date and time (in necessary) of status change as well as a type of message in "Information on delivery" field are set.
If necessary, images can be attached to the order information.
The example of a status change request:
<?xml version="1.0" encoding="UTF-8" ?>
<setorderinfo>
<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"/>
<order ordercode="234567" date="2018-03-01" time="10:00" message="">
<image filename="filename1.jpg">/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEy
ccHhcgLikxMC4pLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk//2wBDAQ4ODhMREyYVFSZPNS01T09PT09PT09P
T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0//wAARCAYACAADASIA</image>
</order>
</setorderinfo>
The description of status response fields:
setorderinfo is a root container. It is a mandatory element.
- auth is authorization. It is a mandatory element.
- order is order container. It is a mandatory element. A query may contain more than one order container. It has the following attributes:
- ordercode is an internal code of an order.
- date is status change date.
- time is status change time.
- message is message text.
- image is an attached image container. It contains image file text coded according to base64 standard. order container may contain more than one image container. It has the following attribute:
- filename is a file name.
The example of a response:
<?xml version="1.0" encoding="UTF-8"?>
<setorderinfo>
<order ordercode="123456" error="0" errormsg="OK" errormsgru="Successfully" />
<order ordercode="234567" error="59" errormsg="value [date_put] is already set" errormsgru="The value [Date of delivery] is already set" />
</setorderinfo>
Obtaining the pdf waybill
Request example:
<?xml version="1.0" encoding="UTF-8" ?>
<waybill>
<auth extra="8" login="login" pass="pass" />
<orderno>1234567</orderno>
<form>1</form>
</waybill>
The fields description:
waybill - is a root container. It is a mandatory element.
- auth - is authorization. It is a mandatory element.
- orderno - Order number. It is a mandatory element.
- form - Form type. Is not mandatory. Can be:
- 1 - A detailed waybill
- 2 - Sticker (Zebra)
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>
The content tag contains pdf binary, base64 encoded.
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. It is a mandatory element.
- auth is authorization. It is a mandatory element.
- order is a cancelled order container. It is a mandatory element. 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 transference certificates
The example of the query for the list of money transference 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. It is a mandatory element.
- auth is authorization. It is a mandatory element.
- datefrom is a date “from”. It is an optional element.
- dateto is a date “to”. It is an optional element.
If the date range is not specified, then money transference certificates for the last month are returned.
The example of a response to the query for the list of money transference 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 transference certificate.
- number is the number of a money transference certificate in the system.
- actdate is a date of a money transference certificate.
- datepay is a date of payment on a money transference 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 transference certificates
The examples of the query for money transference 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. It is a mandatory element.
- auth is authorization. It is a mandatory element.
- code is a code of a money transference certificate (See the query of the list of money transference certificates). It is a mandatory element.
The example of a response to the query of money transference 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. It is a mandatory element.
- link is a full link for generation of which a code should be obtained. It is a mandatory element. 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