Изменения

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

API Documentation

183 байта убрано, 08:06, 18 июня 2021
м
Нет описания правки
“Delivery Service 2008” system MeaSoft 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” systemMeaSoft. 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 [mailto:support@courierexe.ru 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.
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 MeaSoft desktop 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):
[[File:extra1.png|750px|none]]
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” MeaSoft 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).
*'''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. <br />
''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.
</source>
*'''receiver''' is the information about the receiver. It is a mandatory container.
<source lang="xml">
<receiver>
:* '''''awb''''' is a courier company related waybill number.
:* '''''orderno2''''' is an order number from the urgent delivery subsystem.
:* '''''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.
* '''''code''''' attribute of '''item''' container is an internal code of order string 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.
* '''''coords''''' in '''receiver''' container indicates receiver position.
:* '''''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” Premium and Maximum 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.
'''status''' container can have the following values:
: NEW - New
: ACCEPTED - Received by the warehouse
: INVENTORY - Inventory
: 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.
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
# 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.
</div>
<br />
== 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:'''
*'''maxdeliverydays''' is the maximum delivery period in business days.
== The list of money transference transfer certificates ==
'''The example of the query for the list of money transference transfer certificates:'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
*'''dateto''' is a date “to”. It is an optional element.
If the date range is not specified, then money transference transfer certificates for the last month are returned.
'''The example of a response to the query for the list of money transference transfer certificates:'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</source>
*'''code''' is a code of a money transference transfer certificate. *'''number''' is the number of a money transference transfer certificate in the system. *'''actdate''' is a date of a money transference transfer certificate.*'''datepay''' is a date of payment on a money transference transfer certificate.
*'''price''' is a price of services.
*'''rur''' is a price of an order.
*'''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 transfer certificates ==
'''The examples of the query for money transference transfer certificates detailing:'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
'''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 transfer certificate (See the query of the list of money transference transfer certificates). It is a mandatory element.
'''The example of a response to the query of money transference transfer certificates:'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</source>
'''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.

Навигация