Изменения

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

API Documentation

25 610 байт добавлено, 23 апрель
Response Examples
MeaSoft has an option of integration by means of XML API under through HTTP POST protocol.
The API is designed for integrating customers (online shops and other companies ordering delivery) with courier services working under MeaSoft.
When writing the given documentation we assume that a person reading it has the level of expertise in coding sufficient for understanding the contents of this documentation, has a knowledge of XML and integration development environment. If you are not qualified as a developer you will have to hire a professional developer to implement your project.
If you still have questions after reading the given documentation, feel free to ask them via e-mail [mailto:support@courierexe.ru support@courierexe.ru]. In your e-mail email message you should , please introduce yourself, leave your contact information (your phone number, Skype login) and the name of the company that you want to integrate with.
== CMS Integrations ==
|-
|[[Файл:bitrix.png|center|x44px]]
|style="text-align: center;"|[httphttps://marketplace.1c-bitrix.ru/solutions/measoft.courier/ Install]
|Supports version 14.5 and higher.
|-
|[[Файл:prestashop.png|center|x60px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/prestashop.zip Download]
|Supports version 1.5.2.0 and higher (including 2.x)
|-
|[[Файл:OpencartOCStore.png|center|x60px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/opencart.zip For version 1.5.5.1]<br>[httphttps://courierexe.ru/download/api/measoft_oc2.ocmod.zip For version 2.0]<br>[httphttps://courierexe.ru/download/api/measoft_oc2.3.ocmod.zip For version 2.3]<br>[httphttps://courierexe.ru/download/api/measoft_ос3.ocmod.zip For version 3.0]
|Supports version 1.5.5.1 and higher.<br>Select a module for your OpenCart version.<br>[https://opencartforum.com/files/file/2906-avtomatizaciya-otpravki-i-otslezhivanie-dostavok-courierexe-dlya-opencart-15x/ Alternative third-party module]
|-
|The module is designed for sending orders to delivery service, while the plugin calculates delivery cost on creating an order.
|-
<!--|[[Файл:advantshop.png|center|x44px]]
|style="text-align: center;"|[https://promo-z.ru/ PROMO company site]
|The PROMO company has developed the module. Contact PROMO to set up integration between MeaSoft and ADVANTSHOP.
|--->
|[[Файл:insales.png|center|x80px]]
|style="text-align: center;"|Configure using MeaSoft [[Личный кабинет клиента|client account]]
|-
|[[Файл:Joomla2.jpg|center|x60px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/com_measoft.zip Download]
|Integration with Virtuemart is available only.
|-
|-
|[[Файл:wordpress.jpg|center|x80px]]
|style="text-align: center;"|[httphttps://courierexe.ru/download/api/wordpress.zip Download]
|
|-
|style="text-align: center;"|[https://marketplace.cs-cart.com/measoft-en.html Download]
|Supports versions 4.10 and higher.
|-
|style="height:100px; text-align: center;"|'''Webhook'''
|style="text-align: center;"|See [[Webhook|here]]
|Transfer of status and order info to your system
|-
|}
== Test Account ==
For debugging , you can access your test client account at
https://home.courierexe.ru/8
login testlogin password testmpass
In the '''Integration''' > '''Debug''', you can execute API requests for debugging purposes and see sent requests. You will see all created orders on the '''Placed Orders''' tab.
To simplify the process of integration, you can download [httphttps://courierexe.ru/download/api/php_sample.zip the example of addressing the service using PHP].
== Account for Integration ==
Use the following credentialsYou can access your client account at: <source lang=xml><auth extra="8" login="login" pass="pass"></auth></source> Description:* Extra client '''extra''' — extra code. This is , a digital code, company`s unique identifier. Request this parameter from of the courier service you are integrating with. You can see this code in MeaSoft desktop interface by using its main menu * '''Referencelogin''' > — user name for the client account and API.* '''Additional Optionspass'''— password for the client account and API. Extra code is given in  Request the credentials from the second hyperlink (it is marked courier service you are integrating with an asterisk on the screenshot below): [[File:extra1.png|750px|none]]* LoginThe courier service gives you a temporary password. It is a user name for For security purposes, change it using your client account and API.  == Courier Service Access == To access API with courier service creates credentials, use the following connection string: <source lang=xml><auth extra="8" login="login in the client card on the " pass="pass" clientcode="123"></auth></source> Description: * '''Otherextra''' tab in — extra code, a unique identifier of the courier service. * '''login'''User — couerier service user name.* '''pass' field. You will probably have to create a new client card (shown on the screenshot below) in MeaSoft software'' — couerier service password.* Password. It is a password for '''clientcode''' — internal client account and API. Courier service creates password in code (see the client card on office application, the '''OtherClients''' tab , the "Internal code" column). To see the extra code, login and password, in the office application go to the '''PasswordAdditional Features''' fieldreference. (shown on the screenshot below). For more information, see [[File:33_client.pngCourier_Service_Account#Registering Courier Service Account|500px|noneRegistering Courier Service Account]].
== General Terms ==
Courier service provides access to a web service at https://home.courierexe.ru/api/. "/" (slash) on the end of the link is required. Use the following credentials for test access:
login: testlogin password: testmpass
extra client code: 8
* 3000 queries from a single account per 1 hour.
* 200 MB text data downloaded per 3 hours.
* Number of non-existing order status queries must not exceed the number of queries of existing order statuses.
If a limit is exceeded, the IP address is blocked for up to 3 hours.
* Attacking our API with status queries with numbers of all you orders. Mind that the <code>tracking</code> queries are not intended for that, see [[API documentation#Order tracking by number|description]]. These queries are especially bad at the top of the hour.
* Sending queries like "Show statuses of all orders for the last 3 months" every 5 minutes.
* Sending a large amount of order numbers trying to guess which one is valid.
Correct actions:
* Queries are created for existing orders only.
* To check order statuses, use <code>statusreq</code> queries with parameter <code>changes=ONLY_LAST</code>.
* When requesting for changed statuses, you must confirm that the statuses were sucessfully received by query <code>commitlaststatus</code>.
<costcode>cc12345</costcode>
<items>
<item extcode="abc123" quantity="1" mass="0.2" retprice="37.5" VATrate="0" barcode="2345625213125" textArticle="1" article="1" volume="3" origincountry="AUT" GTD="321546654" excise="15.20" suppcompany="ООО LLC &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>
<packages>
<package strbarcode="ORD0000001" mass="1" message="" quantity="3"></package>
<package strbarcode="ORD0000002" mass="2.5" message="" length="10" width="20" height="30"></package>
</packages>
<deliveryset above_price="100" return_price="1000" VATrate="10">
<below below_sum="500" price="500" />
<below below_sum="2000" price="300" />
</deliveryset>
<advprices>
<advprice>
<code>1</code>
<value>123</value>
</advprice>
<advprice>
<code>2</code>
<value>10.5</value>
</advprice>
<advprice>
<code>3</code>
<value>true</value>
</advprice>
</advprices>
<overall_volume>81</overall_volume>
<userid>user123</userid>
<groupid>customer</groupid>
</order>
</neworder>
=== Order Elements ===
'''Required Elements'''
*'''neworder''' is a root containerFor MeaSoft, only three fields are required. :* either receiver->company or receiver->person* receiver->address :*'''''newfolder''''' is an attribute of a new order, possible values: '''YES''', '''NO'''. If '''YES''', a new order is created for the specified shipment in the courier service system. It is an optional elementreceiver->phone.
*'''order''' is a container used for description of one order, Courier service company can add 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 fields in the response. The system checks whether the specified number has been used within the current calendar yearsettings. If it already exists in you do not specify the system, the order is not createdrequired field values, an error 17 "Such number exists" message returns.
<spoiler text="Example of order with minimum data"><source lang="xml"><?xml version="1.0" encoding="UTF-8"?><neworder> <auth extra="8" login="login" pass="pass" /> <order> <receiver> <company>Company</company> <phone>(495)123-45-67</phone> <address>Petrovka, 38</address> </receiver> </order></neworder></source></spoiler>'''Fields Description'''*'''barcodeneworder''' is an order barcode— root container, required. In case the customer uses barcodes for his dispatches and the barcode is different from the :*'''''newfolder''''' — attribute of a new order number, the barcode is entered into this fieldpossible values: '''YES''', '''NO'''. In case there are several packages and they are individually markedIf '''YES''', underscore character can be used as a mask to indicate barcoded item number varying new order is created for different packages within one orderthe specified shipment in the courier service system. It is an optional element.
*''For example'order''': There are 20 items in — container used for description of one order No, required. 123 packed in 3 packages. The client generates 3 barcodes for each package: CLNT0012301, CLNT0012302, CLNT0012303, where CLNT is A single '''neworder''' container can have a client prefix, 00123 is an order number, 01-03 is the number for each package in the of '''order''' containers to create several orders by using one query. In this case CLNT00123__ should be entered into the :*'''''orderno''barcode''' field— order number. Specify it if it is assigned by the client. ThusIn case it is not assigned, MeaSoft knows the last 2 characters this field can be any values left empty. The system will generate its own number and will display barcodes for send it back in the response. The system checks whether the specified number has been used within the same ordercurrent calendar year. If it is not you who will print packing slips with already exists in the specified barcodesystem, the barcode must order is not exceed 25 characterscreated, otherwise it cannot be fully seen on the standard printing formserror 17 "Such number exists" returns.
*'''barcode''' — order barcode. In case the customer uses barcodes for his dispatches and the barcode is different from the order number, the barcode is entered into this field. In case there are several packages and they are individually marked, underscore character can be used as a mask to indicate barcoded item number varying for different packages within one order. ''For example'': There are 20 items in order No. 123 packed in 3 packages. The client generates 3 barcodes for each package: CLNT0012301, CLNT0012302, CLNT0012303, where CLNT is a client prefix, 00123 is an order number, 01-03 is the number for each package in the order. In this case CLNT00123__ should be entered into the '''barcode''' field. Thus, MeaSoft knows the last 2 characters can be any values and will display barcodes for the same order. If it is not you who will print packing slips with the specified barcode, the barcode must not exceed 25 characters, otherwise it cannot be fully seen on the standard printing forms. *'''sender''' presents the information about order sender. It is an optional container.
<source lang="xml">
<sender>
*'''phone''' is a phone number. You can specify several phone numbers and emails.
*'''town''' is the name of the town.
*'''pvz''' is the pickup point code from the '''Branches''' reference. Besides, you can specify the pickup point in the <code>address</code> parameter by one of the following:
** Pickup point code in our system.
** Pickup point code in service partner's system.
For the '''town''' tag, you can speify the value from the '''Regions ''' reference in the '''regioncode''' attribute. The town is searched for in the specified region.
In the '''country''' attribute, you can specify the recipient country according to the [https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes ISO 3166-1] standard. For example: "AT", "AUT" or "040" for Austria.
*'''service''' — delivery mode (service type). It is transferred as a code from the '''Urgency Kinds''' reference.
*'''type''' – shipment type. It is transferred as a code from the '''Shipment Types''' reference.
*'''return_type ''' - return shipment type. It is transferred as a code from the '''Shipment Types''' reference.
*'''price''' — order amount. If the '''items''' container is present, this parameter is ignored and calculated automatically.
*'''deliveryprice'''— delivery fee. If the '''items''' container is present, the "Delivery" item is added to it.
*'''receiverpays''' — indicates whether recipient pays the delivery fee. If '''YES''', the recipient pays, if '''NO''', the sender pays.
*'''department''' — the order creator's department.
*'''pickup''' — indicates whether it is a pickup order. If '''YES''', the entire order is considered to be the assignment for pickup, not for delivery. It is used for calling a courier to the sender's place to pick up shipments. '''Note'''. If warehouse goods are added to the order, their type must be '''[7]Goods pickup'''. Any other type is automatically changed to type 7 on submitting the order.
* '''acceptpartially''' — indicates whether the recepient can partially accept order items.
 
*'''items''' — a container describing order items. It is an optional container. It has the following attributes:
:* '''''item''''' — item name.
:*'''''itemcode''''' — internal SKU ID/ You can use instead of supplier SKU ID. ''Attention!'' SKU ID is required only for the items stored at the courier service warehouse and if cross-docking is required for them. The system uses SKU ID to associate the item with a corresponding item in [[API#Nomenclature list|nomenclature list]]. If the item is not found, the error message is displayed.
:*'''''type''''' — item type. Possible values:
::1 — Goods. The default value.::2 — Delivery. The item is added automatically if '''order''' > '''deliveryprice''' is specified.::3 — Service::4 — Advance payment. The amount is specified. '''quantity''' is ignored, always "1". The amount in the order is displayed with the negative sign irrespective of the sign in the request. The item is added automatically if '''order''' > '''paytype=NO''' is specified.::6 - Credit payment. The amount is specified. '''quantity''' is ignored, always "1". The amount in the order is displayed with the negative sign irrespective of the sign in the request.::7 - Pickup. Use it if you have to pick up the items from the recipient. The amount in the order is displayed with the negative sign irrespective of the sign in the request.
:* '''''extcode''''' — external line code. It is used to identify the order lines when obtaining statuses. It is an optional field.
:* '''''origincountry''''' - origin country code according to [https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes ISO 3166-1].
:* '''''width''''' — package width in cm.
:* '''''height''''' — package height in cm.
:* '''''quantity''''' — number of packages with the specified dimensions and mass. Total number of packages in the order cannot be more than 1000.
* '''deliveryset''' — custom delivery rate setup. It has the following attributes:
:* '''''price''''' — purchase amount within the limit.
* '''advprices''' — a container describing additional value-added services. It is an optional container. It has the following attributes: <span style="color: red;>To use it in the API, in the [[Courier Service Account#Setting Up Client Account|client account settings]], enable the '''Additional Value-added services''' field for new order and pickup request.</span>
:* '''''code''''' — service code.
:* '''''value''''' — service value. If service type is Boolean, set the value to '''True'''.
If you want to apply additional value-added services (for example, delivery, cross-docking, lifting upstairs, etc.), specify them in the same '''items''' container as items without a SKU ID.
*'''costcode''' — employee cost code.
*'''overall_volume''' — total volume, m3. An optional virtual field. It is used to calculate the package dimensions. The calculation works only if every package contains zero values of length, heigth, or width.
 
*'''userid''' — user ID, either string or integer type. Virual field, optional. The field is used in the custom delivery rate settings. It defines the rule priority. You can use the field for CMS and CRM to set delivery fee for each customer individually.
 
*'''groupid''' — user group ID, either string or integer type. Virual field, optional. The field is used in the custom delivery rate settings. It defines the rule priority. You can use the field for CMS and CRM to set delivery fee for each customer group individually.
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
=== Response Examples ===
If a request is executed successfully and an order is created, the order amount in the <code>orderprice</code> attribute and the 0 error returns. Otherwise, an error number and its description in the <code>errormsgruerrormsg</code> attribute returns. The <code>orderno</code> attribute contains order number, <code>barcode</code> — order barcode.
'''Success'''
<?xml version="1.0" encoding="UTF-8"?>
<neworder>
<createorder orderno="AB23541" barcode="67567#114" error="0" errormsg="successSuccess" orderprice="5000"></createorder> <createorder orderno="55_6542AB23542" barcode="67567#115" error="0" errormsg="successSuccess" orderprice="6000"></createorder> <createorder orderno="AB23542AB23543" barcode="67567#116" error="0" errormsg="successSuccess" orderprice="0"></createorder>
</neworder>
</source>
<?xml version="1.0" encoding="UTF-8"?>
<neworder>
<createorder orderno="AB23541" barcode="67567#114" error="1767" errormsg="Such number Order barcode already existsin the database."></createorder> <createorder orderno="AB23542" barcode="67567#115" error="1317" errormsg="empty companyOrder number already exists in the database."></createorder> <createorder orderno="AB23543" barcode="67567#116" error="1467" errormsg="empty personOrder barcode already exists in the database."></createorder>
</neworder>
</source>
<done>ONLY_NOT_DONE</done>
<changes>ONLY_LAST</changes>
<conditions>
<namecontains>1234</namecontains>
<namestarts>1234</namestarts>
</conditions>
</statusreq>
</source>
=== 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 — CLIENT — the default value.:* AGENT — 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 — ONLY_DONE — delivered only. Success stauses like '''Delivered''', '''Partially delivered'''.:* ONLY_NOT_DONE — ONLY_NOT_DONE — undelivered only. Statuses like '''Not delivered''', '''Lost'''.:* ONLY_NEW — ONLY_NEW — new only.:*ONLY_DELIVERY — 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|Get Latest Changed Statuses]].* '''conditions''' — specify search conditions. The nested elements are joined by the logical AND operator.:* '''namecontains''' — search order numbers (external codes) that contain the specified text.:* '''namestarts''' — search order numbers (external codes) that start with the specified text.
<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">
# You can request statuses of orders created no earlier than 2 months before the '''to''' date (<code>datefrom</code> and <code>dateto</code> containers). # If no date is provided, <code>dateto</code> equals the current date. # Omitting <code>dateto</code> defaults to <code>datefrom</code> plus two months.
# Omitting <code>datefrom</code> defaults to <code>dateto</code> minus two months.
# You can search using '''conditions''' only by order numbers (external codes). 4 characters is the minimum search length.
</div>
<time_max>14:00</time_max>
<coords lat="55.680327" lon="37.604456"></coords>
<deliveryPIN>1234</deliveryPIN>
</receiver>
<pickup>NO</pickup>
<return_weight>5.1</return_weight>
<quantity>2</quantity>
<paytypecode="1">CASH</paytype>
<service>2</service>
<return_service>2</service>
<arrival>2021-05-02 23:21</arrival>
<outstrbarcode>EXT123456</outstrbarcode>
<partner>Western Branch</partner>
<return_message>Delivered undamaged</return_message>
<department>Accounting</department>
=== Response Fields ===
All responce response fields correspond to the [[#Example of New Order|order creating request]] structure, with the following additions:
* The '''order''' container attributes:
:* '''''returns''''' is the amount of the article rejected by the recipient. It is not 0 only in case of partial refusal.
* '''''coords''''' in '''receiver''' container — recipient location coordinates.
* '''''deliveryPIN''''' in '''receiver''' container — PIN.* '''pickup''' — indicates 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
:* '''''delivery''''' — one-way trip cost.
:* '''''return''''' — return trip cost (if '''order''' > '''return=YES''').
The '''deliveryprice''' tag includes additional value-added services. Option The option is available for the Premium and Maximum courier service account plans::* '''''advprice''''' — additional value-added service name.:* '''''code''''' — additional value-added service code.:* '''''price''''' — additional value-added service amount.
* '''status''' — delivery status. See the list of statuses below. It has the following attributes:
* '''arrival''' — scheduled delivery date formatted as YYYY-MM-DD HH:MM:SS.
* '''outstrbarcode''' — service partner system code (in an external system). It is used for integration with external systems.
* '''partner''' — current branch or service partner.
* '''return_message''' — return information.
* '''department''' — the order creator's department.
<auth extra="8" login="login" pass="pass"></auth>
<changes>ONLY_LAST</changes>
<streamid>1234</streamid>
</statusreq>
</source>
<auth extra="8" login="login" pass="pass"></auth>
<client>CLIENT</client>
<streamid>1234</streamid>
</commitlaststatus>
</source>
* '''auth''' — Authorization. Required.
* '''streamid''' - stream ID. If you get order statuses for multiple integrations, pass this parameter to divide getting statuses and sending confirmation. The value must be from 100 up to 10000. It is an optional element.
*'''client''' — indicates whether it is a client or a delivery service partner. It is an optional element. Possible values:
:*'''CLIENT''' — the default value.
# 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.
</div>
 
Planned courier might be canceled utomatically once an order is edited. It depends on the value set in '''References''' > '''Variables''' > '''Shipments''' > '''Automatically assign courier by area''':
* '''No''' — courier is not changed on editing orders via API.
* '''Area''' — courier is canceled on changing delivery address.
* '''Area or delivery date''' — courier is canceled on changing delivery address or delivery date.
=== Edit Request Fields ===
* do not specify the <code>barcode</code> tag as it is assigned when creating an order.
* for <code>item</code> items, specify the item internal code in the <code>code</code> attribute. To receive the internal code, use the [[#Order Status|order status]] request.
 
You cannot change the '''orderno''' value using this method.
=== Edit Response Fields ===
All response fields correspond to the [[#Creating Order|order creating responce response structure]], except for:
*the <code>editorder</code> tag is returned instead of <code>neworder</code>.
* '''auth''' — authorization. Required.
* '''order''' — container of the order being canceled. Required. The request can contain more than one '''order'''. It has the following attributes:
:* '''''orderno''''' — external order code.
:* '''''ordercode''''' — internal order code.
Either '''''orderno''''' or '''''ordercode''''' is required.
*'''auth''' — is authorization. Required.
*'''orders''' — list of orders to get print forms for. It contains tags '''order''' with the following attributes:
** '''''orderno''''' — external order code.
** '''''ordercode''''' — internal order code.
*: Specify either of the attributes for all the orders. The '''''ordercode''''' attribute is recommended.
<name>Moscow</name>
<fullname>Moscow city</fullname>
<country>1RU</country>
</conditions>
<limit>
In the response, the cities and towns are arranged by their popularity, importance (district centers, etc.) and then by alphabet.
== Region names list Names List ==
'''The example of the region names list query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</codesearch>
<conditions>
<namecontains>TerritoryKrai</namecontains>
<namestarts>Mosc</namestarts>
<fullname>Moscow regionOblast</fullname>
<country>1</country>
</conditions>
</source>
'''The example of a response:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<ShortName2>RUS</ShortName2>
</country>
<name>Agin-Buryat Autonomous AreaOkrug</name>
</city>
<city>
</source>
== Street names guide Names List ==
'''The example of the city names list query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<streetlist>
<conditions>
<town>Moscow city</town> // MANDATORY REQUIRED FIELD!
<namecontains>Khokhlo</namecontains>
<namestarts>Academician K</namestarts>
</source>
*'''conditions''' specifies search criteria. All enclose nested elements simultaneously impose “AND” the AND condition.:* '''town''' is a mandatory — required field. It`s is the name or the code of a locality.:* '''namecontains''' is a search of for the localities which streets with names contain a specified including the search text.:* '''namestarts''' is a search of for the localities which streets with names start from a specified starting with the search text.:* '''name''' is a search of for the localities which streets with names match a specified matching the search text.:* '''fullname''' is a search of for the localities which streets with names and type match a specified matching the search text.
*'''limit''' limits result output.
:* '''limitfrom''' specifies — defines the search result record number of a search result starting to start output with which a response should be given. It equals The default value is '''0 by default'''. :* '''limitcount''' specifies — defines the number quantity of search result records which should be returnedto show. It equals The default value is '''10000 by default'''.:* '''countall''' - — if '''YES indicates ''', the necessity of counting the amount total quantity of found matches foundis counted. It may might slow down the process of query request execution. In case it is If disabled, <code>totalcount </code> and <code>totalpages values won`t be indicated </code> are missing in the response.
'''The example of a response:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
</source>
In a the response , the street names of the streets are sorted in alphabetical orderarranged alphabetically.
== Nomenclature list List of Goods ==
'''The example of the nomenclature list query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<namecontains>TV set</namecontains>
<namestarts>sony</namestarts>
<name>Sony KDL-55W905 LCD televisionTV</name>
<quantity>EXISTING_ONLY</quantity>
</conditions>
<except>
<code>123478</code>
</except>
<limit>
<limitfrom>30</limitfrom>
</source>
All elements inside itemlist The <code>townlist</code> container can either be absent empty or combineelements. The search is not case-sensitiveinsensitive. *'''codesearch''' is a search by codes. In case when When it is used, the <code>conditions </code> and <code>limit </code> containers will be are ignored.:* '''code''' is a search by codes of the internal systemcode.:* '''article''' is a search by article numbersSKU ID. :* '''barcode''' is a — search by barcode.  *'''conditions''' — specifies search criteria. All nested elements simultaneously impose the AND condition.:* '''namecontains''' — search for the goods with names containing the search text.:* '''namestarts''' — search for the goods with names starting from the search text.:* '''name''' — search for the goods with names matching the search text.:* '''quantity''' — availability of goods in the warehouse. Sometimes, the field may be unavailable. Possible values:*** '''EXISTING_ONLY''' — only in stock.*** '''NOT_EXISTING_ONLY''' — only out of stock.*** '''ALL''' — all. :* '''store''' — search by barcodesthe specified warehouse.
*'''conditionsexcept''' specifies search criteria. All enclose elements simultaneously impose “AND” condition.:* '''namecontains''' is a search — exception description for correct counting of the goods which names contain a specified textreserved items.:* '''namestartscode''' is a search of the goods which names start from a specified text— order code.:* '''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 — defines the search result record number of a search result starting to start output with which a response should be given.:* '''limitcount''' specifies — defines the number quantity of search result records which should be returnedto show.
'''The example of a response:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<article>FD343</article>
<barcode>2345625213125</barcode>
<name>Sony KDL-55W905 LCD televisionTV</name>
<retprice>65000</retprice>
<purchprice>50000</purchprice>
<weight>5.1</weight>
<length>50</length>
<width>30</width>
<height>40</height>
<VATrate>20</VATrate>
<CountInPallet>30</CountInPallet>
<HasSerials>1</HasSerials>
<CountryOfOrigin>Malaysia</CountryOfOrigin> (not yet supported)
<Message>A good TV set</Message> <Message2>Another good TV set</Message2>
<quantity>12</quantity>
<reserved>3</reserved>
</source>
'''The description of fields:Fields Description'''*'''code''' is an internal identifier assigned by the system. *'''article''' is an article assigned by a customer (a supplier)SKU ID. *'''barcode''' — manufacturer barcode. *'''name''' — item name. *'''retprice''' — default retail price. When creating the order, the price specified in the order is used.*'''purchprice''' — purchase price.*'''weight''' — weight in kilograms. *'''length''' — length in centimeters. *'''width''' — width in centimeters. *'''height''' — height in centimeters.*'''VATrate''' — value-added tax rate, integer.*'''CountInPallet''' — number of pieces in a manufacturer`s barcodepallet. *'''HasSerials''' — indicates whether serial numbers tracking is used. Possible values: '''1''' — Yes, '''0''' — No. *'''CountryOfOrigin''' — name of the country of origin. *'''Message''' — comment. *'''Message2''' — additional comment. *'''quantity''' — quantity in stock. Goods picked up for orders are not included in this number, they are considered to be shipped. ''This field may be unavailable in some setups.''*'''reserved''' — quantity of goods reserved. It may outnumber the stock balance if customers are waiting for the next delivery. ''This field may be unavailable in some setups. ''
*'''name''' is an item name. == Goods Movement ==
*'''retpriceRequest Example''' is a retail price value by default. When ordering the price which is mentioned in the order is used<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><itemmovements> <auth extra="8" login="login" pass="pass"></auth> <code>4259</code> <datefrom>2020-10-01</datefrom> <dateto>2020-10-02</dateto></itemmovements></source>
*'''weightcode''' is weight — internal item code in kilogramsthe list of goods. *'''lengthdatefrom''' is length in centimeters— period start date.*'''dateto''' — period end date.You can specify either code or period, or both code and period.
*'''width''' is width in centimeters.
'''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><itemmovements count="16"> <itemmovement> <code>151500</code> <date>2020-10-01</date> <retprice>0</retprice> <quantity>1</quantity> <delivered>0</delivered> <item> <code>4259</code> <name>Jenga Classic Game</name> </item> <status> <code>5</code> <name>Return from customer</name> </status> <store> <code>1</code> <name>Moscow office</name> </store> <order> <ordercode>3374830</ordercode> <number>123660-0</number> <date>2020-10-01</date> <orderno>14123</orderno> <barcode>0000000670</barcode> <company>All Games</company> <address>Thompson str., 88</address> <delivereddate>2020-05-29</delivereddate> <deliveredtime>12:00:00</deliveredtime> <deliveredto /> </order> <document> <code>21991</code> <number>318</number> <date>2020-05-26</date> <message></message> </document> </itemmovements></itemlist></source> '''Fields Description'''*'''code''' — goods movement internal transaction code.*'''date''' — transaction date.*'''retprice''' — item price.*'''heightquantity''' is height — item quantity in centimetersthe movement transaction.*'''delivered''' — quantity of delivered items.
*'''CountInPalletitem''' is the number of pieces in a pallet— goods item container.:* '''code''' — item internal code.:* '''name''' — item name.
*'''HasSerialsstatus''' requires serial numbers accounting— transaction status container. It takes on the following values: 1 - yes, 0 - no* '''code''' — status code.:* '''name''' — name.
*'''CountryOfOriginstore''' is — container for the name of a country of origin in Russianbranch that performs the transaction.:* '''code''' — branch code. :*'''Messagename''' is a commentary— branch name.
*'''Message2order''' is an additional commentary— shipment container.:* '''ordercode''' — internal order code.:* '''number''' — order number.:* '''date''' — order date.:* '''orderno''' — external order code.:* '''barcode''' — barcode.:* '''company''' — company.:* '''address''' — address.:* '''delivereddate''' — date delivered.:* '''deliveredtime''' — time delivered.:* '''deliveredto''' — delivery info or reason for non-delivery.
*'''quantitydocument''' is the — transaction document container.:* '''code''' — internal document code.:* '''number''' — document number of goods in stock. Those goods that have already been batched into orders are not included in this :* '''extnumber''' — external document number and considered to depart the depository for goods. :* '''This field may be unavailable in some setupsdate''' — document date.:* '''message''' — comment.
*'''reserved''' is the number of goods reserved. It may outnumber stock balance if customers are waiting == Getting Shipping Rates for the next delivery. ''This field may be unavailable in some setups.'' Towns and Cities ==
<div style== The list of order points of issue =="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">If the <code>nofederal</code> parameter is missing in the request, Moscow is processed in the following way: the response contains Moscow and Moscow region towns and distance markup.</div>
'''The example of a points of issue query:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?><pvzlisttariffs> <auth extra="8" login="login" pass="pass"/> <townfrom>Moscow</authtownfrom> <service>1</service> <townmainonly>1</mainonly> </tariffs>Nizhniy Tagil</source> *'''auth''' — the '''extra''' attribute is required, it is used to determine the courier service company.*'''townfrom''' — sender townor city. If it is not passed, the default value is '''Moscow'''.*'''service''' — delivery mode. Required.*'''mainonly''' — optional. If passed, the response contains data from the '''Inter-city''' >'''Zones''' table only.* '''nofederal''' — optional. If passed, a city of federal importance is processed as an ordinary city.  '''Response Example'''</pvzlistsource lang="json">{ "townfrom": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5", "service": 1, "tariffs": [ { "towntofias": "0c5b2444-70a0-4932-980c-b4dc0d3f02b5", "towntocode": 1, "towntoname": "Moscow city", "distance": 0, "pricedistance": 0, "pricesnew": { "before": [ { "price": "100", "every": "0", "mass": "1" }, { "price": "150", "every": "0", "mass": "5" } ], "after": [ { "price": 0, "every": 1, "mass": 38.01 }, { "price": 15, "every": 1, "mass": 51.01 } ] }, "deliveryPeriodMin": 1, "deliveryPeriodMax": 2 } ]}
</source>
'''Fields Description'''* '''townfrom''' — sender locality [[#City Names List|AOGUID]] (Federal Information Address System) code.* '''service''' — delivery mode.*'''tariffs''' — shipping rates list for the locality.:* '''towntofias''' — recipient locality AOGUID code.:* '''towntocode''' — recipient locality internal code.:*'''towntowntoname''' — recipient locality name.:* '''distance'' ' — distance in km from Moscow to Moscow Ring Road if <code>townfrom</code> is a receiver`s residenceMoscow.:* '''pricedistance''' — Moscow to Moscow Ring Road distance markup if <code>townfrom</code> is Moscow..:* '''pricesnew''' — your shipping rates from the '''Inter-city''' > '''Rates by Zones''' table.::* '''before/after — containers.:::* '''price''' — price. If the response is for the <code>before</code> container, <code>pricedistance</code> is also added to the amount.:::* '''every''' — for every specified number of pieces.:::* '''mass''' — weight.:* '''prices''' — obsolete, do not use.:* '''deliveryPeriodMin''' — minimum number of days in transit.:* '''deliveryPeriodMax''' — maximum number of days in transit.
== Receipt Items ==
'''The example of a response from the list of pick-up points:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<pvzlist countitemdoc> <auth extra="28" login="login" pass="pass"> <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.</commentauth> </pvz> <pvz> <code>24521991</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></pvzlistitemdoc>
</source>
*'''code''' is a — internal receipt document code of a point in the system. It is used in an [[API#Ordering|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:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<servicesitemdoc> <auth extracode>21991</code> <number>318</number> <date>2021-05-26</date> <message></message> <items> <item code="84259"quantity="1" barcode="200300" article="123555">Jenga Classic Game</item> </items></servicesitemdoc>
</source>
'''The example Fields Description'''* '''code''' — internal receipt code.* '''number''' — document number.* '''date''' — document date.* '''message''' — comment. *'''item''' — goods item container.:* '''code''' — internal item code.:* '''barcode''' — item barcode.:* '''article''' — item SKU ID.:* '''quantity''' — quantity of a response from the list of types of priority:received items. == Branches List == '''Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<services countstorelist> <auth extra="28"> <service/auth> <codejson>1YES</codejson> <nameclient_code>Economy7890</nameclient_code> </servicestorelist> <service> <code>2</codesource> <name>Urgently</name> </*'''auth''' — the '''extra''' attribute is required, it is used to determine the courier service>company.</services>*'''json''' — indicates whether response is in JSON format. Possible values are '''YES''', '''NO'''.</source>*'''client_code''' — courier service client code.
== Delivery cost calculation == '''The example of a delivery cost query:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<calculatorstorelist count="2"> <auth extra="8" login="login" pass="pass" store> <code>123</code> <name>ABC</name> </store> <store> <code>456</code> <name>Branch 2</name> <calc townfrom="Moscow" townto="3800000300000" mass="3.7" service="1" /store></calculatorstorelist>
</source>
Parameters:*'''townfrom''' is a sending town. *'''towntocode''' is a receiving town— branch code. *'''massname''' is weight in kilograms— branch name. *'''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. <br>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. == Pickup Points List ==
To show pickup points on the map, use the [https://home.courierexe.ru/js/measoft_map.js JavaScript module]. See help info in the file. See example [https://home.courierexe.ru/pvz_test.html here].
Unique pickup point requests are cached on the client account side and retained till 7 AM GMT+3 of the next day. For example, if a unique request with a mass of 2 kg was submitted today at 10 AM, tommorow at 7 AM it will be deleted. If you submit a mass of 2 kg in the same request today at 6 PM, you will get the same list of pickup points. If you submit a mass of 3 kg in the same request, you will probably get another list.
'''The example of a cost of delivery response:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?><calculatorpvzlist> <calcauth extra="8" login="login" pass="pass"></auth> <code>1234<townfrom /code="1">Moscow <client_code>7890</client_code> <city>Sverdlovsk Oblast</townfromcity> <townto codetown regioncode="66" country="56603RU">Irkutsk cityNizhny Tagil</town> <parentcode>6</parentcode> <acceptcash>YES</acceptcash> <acceptcard>YES</acceptcard> <acceptfitting>YES</acceptfitting> <maxweight>30</maxweight> <acceptindividuals>YES</acceptindividuals> <lt>57.924737</lt> <lg>59.940019</lg> <rt>57.905682</towntort> <massrg>359.7984669</massrg> <servicejson>1YES</servicejson> <limit> <zonelimitfrom>230</zonelimitfrom> <pricelimitcount>11632</pricelimitcount> <maxdeliverydayscountall>3YES</maxdeliverydayscountall> </calclimit></calculatorpvzlist></source>
Parameters: *'''townfromauth'''— the ' ''extra''' attribute is required, it is used to determine the courier service company. '''login''' and '''pass''' allow to sign in as a sending town name which has been recognized and assigned client to apply the list of towns by pickup points availability restrictions if they are set up for the systemclient. *'''code'''— internal code.*'''client_code''' attribute is — courier service client code.*'''city''' - recipint region. You can specify a region code or a full region name from the list of towns in the system'''Regions''' reference.*'''towntotown''' is a receiving — recipient location.:For the <code>town name which has been recognized and assigned to </code> tag, you can speify the list of towns by value from the system. '''codeRegions''' reference in the <code>regioncode</code> attribute . The specified region is a searched for the town.:In the <code>country</code from > attribute, you can specify the list of towns in recipient country according to the systemISO 3166-1 standard. For example: "AT", "AUT" or "040" for Austria.*'''parentcode''' — parent [[#Branches List|branch]].*'''acceptcash''' — indicates whether cash on delivery is accepted. Possible values: '''YES''', '''NO'''.*'''acceptcard''' — indicates whether bank cards are accepted. Possible values: '''YES''', '''NO'''.*'''massacceptfitting''' — indicates whether try-on is allowed. Possible values: '''YES''', '''NO'''.*'''maxweight''' — maximum weight in kilogramsallowed for the pickup point. *'''serviceacceptindividuals''' — indicates whether pickup point is a delivery mode - a number indicating the entry in the list of [The list of types of priority|types of priority]available for individuals. Possible values: '''YES''', '''NO'''.*'''lt''' — upper left corner latitude.*'''lg''' — upper left corner longitude.*'''rt''' — lower right corner latitude.*'''rg''' — lower right corner longitude.*'''servicejson''' — indicates whether response is a delivery mode - the number indicating a certain entry in the list of types of priority (See the description on this page)JSON format. Possible values: '''YES''', '''NO'''.*'''limit''' — limits result output. :*'''zonelimitfrom''' is — defines the search result record number of a tariff zone according to which the price has been calculatedstart output with. The tariff schedule default value 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'''0'''. :*'''pricelimitcount''' is a calculated delivery price in — defines the currency quantity of a delivery service`s price-listsearch result records to show. It The default value is recommended to be used rather than its homonymous attribute of the parent container'''100'''. :*'''maxdeliverydayscountall''' — if '''YES''' , the total quantity of found matches is counted. It might slow down the maximum delivery period request execution. If disabled, <code>totalcount</code> is missing in business daysthe response.
== The list of money transfer certificates ==
'''The example of the query for the list of money transfer certificates:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<smalistpvzlist count="2" totalcount="40465"> <auth extrapvz> <code>126</code> <clientcode>3</clientcode> <name>Nizhniy Tagil</name> <parentcode>6</parentcode> <parentname>Integration</parentname> <town code="8124267" loginregioncode="login66" passregionname="passSverdlovsk Oblast" >Nizhniy Tagil city</town> <address>622036, 17 Tsiolkovsky Str., Nizhniy Tagil city</address> <phone>+73435417709, +73435254989</phone> <comment>New pickup point</comment> <worktime>Sun 10:00-16:00, Sat 10:00-16:00, Mon-Fri 10:00-20:00</worktime> <datefromtraveldescription>20165-02storey apartment building, the second building from Parkhomenko-Tsiolkovsky street intersection.</traveldescription> <maxweight>10</datefrommaxweight> <acceptcash>YES</acceptcash> <acceptcard>YES</acceptcard> <acceptfitting>YES</acceptfitting> <acceptindividuals>YES</acceptindividuals> <latitude>57.93457</latitude> <longitude>59.95131</longitude> <uid>40606d00-9c51-11eb-b2c9-cfd6c1111392</uid> </pvz> <datetopvz> <code>245</code> <clientcode>NTG1</clientcode> <name>On Krasnoarmeiskaya</name> <parentcode>20166</parentcode> <parentname>Integration</parentname> <town code="124267" regioncode="66" regionname="Sverdlovsk Oblast">>Nizhniy Tagil city</town> <address>Krasnoarmeiskaya, 79</address> <phone>+7(3435)379-044</phone> <comment>Try-03on is not allowed</comment> <worktime>Sun 10:00-16:00, Sat 10:00-16:00, Mon-Fri 10:00-20:00</worktime> <traveldescription>Next to McDonalds</traveldescription> <maxweight>20</maxweight> <acceptcash>YES</acceptcash> <acceptcard>YES</acceptcard> <acceptfitting>NO</acceptfitting> <acceptindividuals>YES</acceptindividuals> <latitude>57.93468</latitude> <longitude>60.55476</longitude> <uid>41116853-9c51-11eb-b2c9-cfd6c1451392</uid> </datetopvz></smalistpvzlist>
</source>
*'''smalistcode''' — pickup point code in MeaSoft. It is a root containerused in [[#Creating Order|creating order request]].*'''clientcode''' — pickup point code in service partner system.*'''name''' — pickup point name.*'''parentcode''' — pickup point parent code.*'''parentname''' — pickup point parent name.*'''town''' — locality with code from [[#City Names List|City Names List]] and region code and name.*'''address''' — pickup point address.*'''phone''' — pickup point phone number.*'''comment''' — additional info.*'''worktime''' — pickup point working hours.*'''traveldescription''' — pickup point location description. Required*'''maxweight''' — maximum weight allowed for the pickup point. *'''authacceptcash''' — indicates whether cash on delivery is authorizationaccepted. Possible values: '''YES''', '''NO'''.*'''acceptcard''' — indicates whether bank cards are accepted. RequiredPossible values: '''YES''', '''NO'''. *'''datefromacceptfitting''' — indicates whether try-on is a date “from”allowed. OptionalPossible values: '''YES''', '''NO'''. *'''datetolatitude''' is a date “to”— location latitude.*'''longitude''' — location longitude.*'''uid''' — pickup point unique ID in MeaSoft.*'''count''' — number of response records. Optional*'''totalcount''' — total number of relevant records.
If the date range is not specified, then money transfer certificates for the last month are returned. == Getting Order Fiscal Data ==
'''The example of a response to the query for the list of money transfer certificates:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?>
<smalist countreceiptdata> <auth extra="8" login="login" pass="1pass"/> <smaorders> <order orderno="123456" /> <codeorder orderno="890111C" />6278 </codeorders> <number/receiptdata>3992</numbersource> '''Response Example'''<actdatesource lang="xml">2016<?xml version="1.0" encoding="UTF-028"?><receipts count="1"> <receipt> <orderno>123456</orderno> <fdDatetime>2020-06-07 12:14:00</fdDatetime> <fdValue>123</actdatefdValue> <datepayfdNum>456</datepayfdNum> <fnSn>789</fnSn> <kktNum>100</kktNum> <inn>222</inn> <ofdUrl>gate.ofd.ru</ofdUrl> <fullUrl>https://check.ofd.ru/123</fullUrl> <price>637.0012345</price> <lines count="1"> <rurline>13430.00 <item>1111764</item> <name>Boots</name> <qty>1</rurqty> <pricekurprice>570.001000</pricekurprice> <priceagvatRate>67.0020</priceagvatRate> <paynogovernmentCode>42423Z16513LK2</paynogovernmentCode> <paytypeitemType>1</paytypeitemType> </line> </lines> </smareceipt></smalistreceipts>
</source>
*'''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.
'''Fields Description'''*'''orderno''' — order number.*'''fdDatetime''' — fiscal receipt issued date and time.*'''fdValue''' — fiscal document tag.*'''fdNum''' — fiscal document (receipt fiscal number).*'''fnSn''' — fiscal memory device number.*'''kktNum''' — cash registers number.*'''inn''' — TIN (taxpayer individual number).*'''ofdUrl''' — fiscal data operator URL address (domain name).*'''price''' — receipt amount.*'''fullUrl''' — receipt URL for online access.*'''lines''' — receipt items.:*'''item''' — item code.:*'''name''' — item name.:*'''qty''' — item quantity.:*'''price''' — item price.:*'''governmentCode''' — CHESTNYI Znak code sequence. It is processed by the 1162 tag algorithm.:*'''vatRate''' — item VAT rate.:*'''itemType''' — item type (goods, delivery, etc.) == Detailing of money transfer certificates Urgency Kinds List ==
'''The examples of the query for money transfer certificates detailing:Request Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<smadetailservices> <auth extra="8" login="login" pass="pass" /> <code>6278</code></smadetailservices>
</source>
'''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:Response Example'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?><smadetail services count="2"> <service> <code>1</code> <name>Economy</name> </service> <service> <code>2</code> <name>Urgent</name> </service></services></source> == Value-Added Services List == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><advprices> <auth extra="8" login="login" pass="pass" /> <visible>NO</visible></advprices></source> '''advprices''' — root container. Required. *'''visible''' — indicates whether only the value-added services available in client account are returned. Optional. Possible values: '''Yes''', '''No'''. The default value is '''No'''.  '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><advprices> <advprice> <code>1</code> <name>Number of floors in the building</name> <type>int</type> </advprice> <advprice> <code>2</code> <name>Markup coefficient </name> <type>float</type> </advprice> <advprice> <code>3</code> <name>Heavy lift</name> <type>bool</type> </advprice></advprices></source> Параметры:*'''code''' — internal service code.*'''name''' — service name. If in the '''Value-Added Services''' list the '''Name in client account''' column is not empty, the column value is returned.<!--*'''hine''' — value-added service hint for user.-->*'''type''' — service type. Possible values::*'''bool''' — for services with the '''Check box''' input type.:*'''float''' — for services with the '''Float''' input type.:*'''int''' — for services with the '''Integer''' input type. == Delivery Fee Calculation == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><calculator> <auth extra="8" login="login" pass="pass" /> <order> <pricetype>CUSTOMER</pricetype> <sender> <town>Moscow</town> <address>Lenin street, 95</address> <coords lat="55.621048" lon="37.604456"></coords> </sender> <receiver> <zipcode>125480</zipcode> <town regioncode="78" country="RU">Saint Petersburg</town> <address>Petrovka 38 office 35</address> <pvz>124</pvz> <coords lat="55.680327" lon="37.604456"></coords> </receiver> <weight>5.1</weight> <service>2</service> <paytype>CASH</paytype> <price>387.5</price> <deliveryprice>150</deliveryprice> <inshprice>387.5</inshprice> <packages> <package mass="1" quantity="5"></package> <package mass="2.5" length="10" width="20" height="30"></package> </packages> <userid>user123</userid> <groupid>customer</groupid> </order></calculator></source> Parameters are the same as described in [[#Creating Order|Creating Order]]. '''Fields Description''' *'''pricetype''' — price type. Possible values:** '''CUSTOMER''' — delivery price for end customer. The default value.** '''CLIENT''' — courier service price for client.*'''townfrom''' - sender location.*'''addressfrom''' — sender address.*'''zipcode''' — recipient postal code.*'''townto''' — recipient location.*'''addressto''' — recipient address.*'''pvz''' — pickup point code in MeaSoft.*'''l''' — length in cm. Optional.*'''w''' — width in cm. Optional.*'''h''' — height in cm. Optional.*'''mass''' — weight in kg.*'''service''' — delivery mode which is an integer specifying an '''Urgency Kinds''' list record. If the parameter is not specified, all available urgency kinds are calculated, with a lot of the <calc> containers in response.*'''price''' — cash on delivery amount.*'''inshprice''' — declared value amount.*'''paytype''' — payment type.*'''userid''' — user ID, either string or integer type. Virual field, optional. The field is used in the custom delivery rate settings. It defines the rule priority. You can use the field for CMS and CRM to set delivery fee for each customer individually.*'''groupid''' — user group ID, either string or integer type. Virual field, optional. The field is used in the custom delivery rate settings. It defines the rule priority. You can use the field for CMS and CRM to set delivery fee for each customer group individually. Cash on delivery amount, declared value amount, and CARD payment type are used in service percent calculations set up in the delivery rate card, on the '''Other''' tab. In authorization, you can omit the '''login''' and '''pass'''. In this case, the fee is calculated using courier service standard delivery rate, without taking into account possible differences for a certain client. Dimensional weight is calculated only if all the dimensions are provided: length, width, heigth. Sender and recipient location possible values:* location name (not recommended).* a code from the '''City Names''' list.* a 13-digit code of All-Russian Classifier of Addresses (Address Classifier used in Russia).* a 36-digit code of the Federal Information Address System (AOGUID).   '''Response Example'''<source lang="xml"><?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 name="Express">1</service> <zone>2</zone> <price>1113</price> <mindeliverydays>1</mindeliverydays> <maxdeliverydays>3</maxdeliverydays> <mindeliverydate>2020-05-13</mindeliverydate> <deliveryprice> <advprice code="1" price="1000">Base</advprice> <advprice code="4" price="100">Amount percent</advprice> <advprice code="5" price="63">Declared value percent</advprice> <advprice code="6" price="-50">Discount on delivery</advprice> </deliveryprice> </calc></calculator></source> Parameters: *'''townfrom''' — sender location as recognized and assigned to the list of cities by the system. **'''code''' — a code from the '''City Names''' list.*'''townto''' — recipient location as recognized and assigned to the list of cities by the system. **'''code''' — a code from the '''City Names''' list.*'''mass''' — weight in kilograms. *'''service''' — delivery mode which is an integer specifying an '''Urgency Kinds''' list record. If the parameter is not specified, all available urgency kinds are calculated, with a lot of the <calc> containers in response.*'''zone''' — number of the rate zone used in the calculation. The shipping rate schedule is selected depending on the zone. Coefficients can be applied to the shipping cost if the order is not delivered from or to a regional center. *'''price''' — shipping cost in the currency of the courier service. We recommend that you use this parameter. *'''maxdeliverydays''' — maximum number of busines days in transit.*'''mindeliverydate''' — closest delivery date considering holidays.*'''deliveryprice''' — contains shipping cost details. '''Note''': the actual server response contains the <code>price</code> attribute in the <code>calc</code> tag. It is retained for backward compatibility, use nested <code>price</code> tag instead. == Getting Client Info == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><client> <auth extra="8" login="login" pass="pass" /> </client></source> '''client''' — root container. Required.*'''auth''' — authorization. Required. '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><client> <code>1082</code></client></source> *'''code''' — client code. == List of Сash Transfer Certificates == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><smalist> <auth extra="8" login="login" pass="pass" /> <datefrom>2021-02-10</datefrom> <dateto>2021-03-10</dateto></smalist></source> '''smalist''' — root container. Required. *'''auth''' — authorization. Required. *'''datefrom''' — date from. Optional. *'''dateto''' — date to. Optional.  If the date range is not specified, cash transfer certificates for the last month are returned.  '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><smalist count="1"> <specialsmasma> <code>424946278</code> <addresscodenumber>3992</number> <actdate>2020-02-12</actdate> <datepay></datepay> <dateto>2020-02-12</dateto> <promiseddatepay>14424</addresscodepromiseddatepay> <price>314637.00</price> <pricecorr>113.00</pricecorr> <rur>880013430.00</rur> <pricekur>270570.00</pricekur> <priceag>4467.00</priceag> <pricecalcpayno>8486.0042423</pricecalcpayno> <paytype>Cash on delivery1</paytype> <statuspaytypename></paytypename> /not supported yet <signedcopyreceived>NO</signedcopyreceived> </sma></smalist></source> *'''code''' — cash transfer certificate code.*'''number''' — cash transfer certificate number in MeaSoft. *'''actdate''' — date cash transfer certificate created.*'''datepay''' — date cash transfer certificate paid. *'''dateto''' — cash transfer certificate period end date.*'''promiseddatepay''' — planned payment date.*'''price''' — cost of courier services.*'''pricecorr''' — adjustment amount.*'''rur''' — order amount. *'''pricekur''' — courier delivery cost. *'''priceag''' — service partner fee. *'''payno''' — payment order number. *'''paytype''' — type of payment: 1 — non-cash payment, 2 — paying a courier in cash, 3 — paying cash at the office, 4 — payment to bank card.*'''paytypename''' — payment type as string.*'''signedcopyreceived''' — indicates whether cash transfer certificate is returned. Possible values: '''YES''', '''NO'''. == Cash Transfer Certificate Breakdown == '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><smadetail>Delivered <auth extra="8" login="login" pass="pass" /status> <code>6278</specialsmacode></smadetail></source> '''smadetail''' — root container. Required. *'''auth''' — authorization. Required.*'''code''' — cash transfer certificate [[#List of Сash Transfer Certificates|code]]. Required.  '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><smadetail count="2"> <specialsma> <code>4249542494</code> <addresscodeordercode>14424</ordercode> <orderno>11111</orderno> <orderdate>144152021-01-01</addresscodeorderdate> <delivereddate>2021-10-01</delivereddate> <company>Company</company> <price>323314.00</price> <rur>46308800.00</rur> <inshprice>314.00</inshprice> <pricekur>300270.00</pricekur> <priceag>2344.00</priceag> <pricecalc>43068486.00</pricecalc> <paytype>Cash on delivery2</paytype> <paytypename>paying a courier in cash</paytypename> <weight>0.400</weight> <distance>0.0</distance> <status>Delivered</status> </specialsma></smadetail></source> *'''code''' is a — record code of the record. *'''addresscodeordercode''' is a — external order code of the .*'''orderno''' — order cipher.*'''orderdate''' — orderdate.*'''delivereddate''' — delivery date.*'''company''' — recipient. *'''price''' is a price — cost of service courier services.*'''rur''' is the — order amount of the .*'''inshprice''' — ordercost. *'''pricekur''' is a price of courier deliverycost. *'''priceag''' is agent`s commission— service partner fee. *'''pricecalc''' is the amount to be transferred pay to the agentservice partner. *'''paytype''' is a type of payment: 1- non-cash payment, 2 - paying a courier in cash, 3 - paying cash at the office, 4 - wire transfer— payment to bank card.*'''paytypename''' — payment type as string.*'''weight''' — order weight.*'''distance''' — order distance. *'''status''' is a — order status of the order.  == Generation of short links URL Shortener == In some casesSometimes, for you might want to use short links to client account. For instance, when using them in sending an SMS, the use of short links to member area may be requiredrecipient.  For doing that it is necessary to To get a short URL, send a query containing request with a full URL. Hash value for a short link is returned.  '''Request Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?><shortlink> <link short="0">https://home.courierexe.ru/8/site/orders</link></shortlink></source> '''shortlink''' — root container. Required.*'''link''' — long link to which a response containing a shorten. Required. If '''short''' value is '''1''', the return contains only hash code, no XML.  '''Response Example'''<source lang="xml"><?xml version="1.0" encoding="UTF-8"?><shortlink> <hash>35AF350C</hash></shortlink></source> *'''hash''' — URL hash code for a short link will be sent.  Use it as client account URL: <nowiki>https://home.courierexe.ru/35AF350C or curie.ru/35AF350C</nowiki> '''Note'''. URL shortener is only for MeaSoft company sites. == Recipient Rating Check == The example of a query check is available only for short links generation:the Maximum personal account plan. '''Request Example''' 
<source lang="xml">
<?xml version="1.0" encoding="UTF-8" ?>
<shortlinkmcheck> <link shortauth extra="08" login="login" pass="pass"/> <phones> <phone>https:89161147992<//home.courierexe.ru/8/site/ordersphone> </linkphones></shortlinkmcheck>
</source>
'''shortlinkResponse Example''' 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:'''
<source lang="xml">
<?xml version="1.0" encoding="UTF-8"?><shortlinkmcheck> <hashphones>35AF350C <phone rate="90">89161147992</phone> </hashphones></shortlinkmcheck>
</source>
 
*'''hash''' is a hash code of a short link.
 
Further on the following link to member area can be used:
 
<nowiki>https://home.courierexe.ru/35AF350C</nowiki>
98
правок

Навигация