Изменения

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

API Documentation

5841 байт добавлено, 15:08, 1 июля 2021
м
Ordering
* When requesting for changed statuses, you must confirm that the statuses were sucessfully received by query <code>commitlaststatus</code>.
== Ordering Creating Order ===== Example of ordering New Order ===
<source lang=xml>
<phone>123-45-67</phone>
<town>Saint-Petersburg</town>
<address>Room 35, 38 Petrovka Str., 38, room 35</address> <date>20142021-03-22</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
<receiver>
<company>Ministry of Internal Affairs</company>
<person>Cheap &amp; DaleTom Wale</person>
<phone>123-45-67</phone>
<zipcode>125480</zipcode>
<townregioncode="78" country="RU">Saint-Petersburg</town> <address>Room 35, 38 Petrovka Str., 38, room 35</address> <pvz>124</pvz> <inn>1112223335</inn> <date>20142021-03-22</date>
<time_min>09:00</time_min>
<time_max>14:00</time_max>
<deliveryPIN>1234</deliveryPIN>
<coords lat="55.680327" lon="37.604456"></coords>
</receiver>
<return>NO</return>
<return_service>1</return_service>
<weight>5.1</weight>
<return_weight>5.1</return_weight>
<quantity>2</quantity>
<paytype>CASH</paytype>
<service>2</service>
<return_service>1</return_service>
<type>3</type>
<return_type>3</return_type>
<courier>22</courier>
<price>387.5</price>
<deliverypriceVATrate="20">150</deliveryprice> <discountinshprice>387.5</inshprice> <receiverpays>0NO</discountreceiverpays> <inshpricediscount>387.5120</inshpricediscount> <enclosure>Children`s Kids toys</enclosure> <instruction>Check in the presence of the buyer, sign acceptance actcertificate</instruction> <pvz>124</pvz> <department>DepartmentAccounting</department>
<pickup>NO</pickup>
<acceptpartially>NO</acceptpartially>
<costcode>cc12345</costcode>
<items>
<item extcode="abc123" quantity="1" mass="0.2" retprice="37.5" VATrate="0" barcode="2345625213125" textArticle="1" article="1" volume="3" origincountry="AUT" GTD="321546654" excise="15.20" suppcompany="ООО &quot;Miller and Partners&quot;" suppphone="79161234567" suppINN="1112223334" governmentCode="11223311">BallRace 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">Hula hoopPrincess castle</item> <item extcode="abc125" quantity="3" mass="0.3" retprice="50" inshprice="50" barcode="2345625213126" itemcode="44123" article="3" type="1">Yellow rattleClay mass</item>
</items>
</order>
</source>
=== Order elements description Elements ===
*'''neworder''' is a root container, the a mandatory element. :* '''''newfolder''''' is an attribute of a new order , possible values: '''YES/''', '''NO'''. If there is '''YES''', then a new order will be is created for the given correspondence specified shipment in the delivery courier service system. It is an optional element.
*'''order''' is a container used for the description of one order, the a mandatory element. There may be A single '''neworder''' container can have a number of '''order''' containers in to create several orders by using one query.:*'''''orderno''neworder''' container for is an order number. It should be entered here if it is assigned by the client. In case it is not assigned, this field can be left empty. The system will generate its own number and send it back in the response. The system checks whether the specified number has been used within the current calendar year. If it already exists in the system, the creation of several orders by using one queryorder is not created, error 17 "Such number exists" returns.
:* '''''orderno''barcode''' is an order number. It should be entered here if it is assigned by the customerbarcode. In case it is not assigned, this field can be left empty; the system will generate its own number customer uses barcodes for his dispatches and send it back in the response. The system checks barcode is different from the presence of orders with order number, the barcode is entered number within the current calendar year into this field. In case there are several packages and in case they already exist in the systemare individually marked, the order won`t underscore character can be created and error 17 "Such used as a mask to indicate barcoded item number exists" will be send back in the responsevarying for different packages within one order.
*'''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 items in order noNo. 123 packed in 3 pieces packages. The customer has to prepare client generates 3 barcodes for each piecepackage: CLNT0012301, CLNT0012302, CLNT0012303, where CLNT is a customer`s client prefix, 00123 is an order number, 01-03 is the number for each piece package in the order. In this case CLNT00123__ should be entered into the “barcode” '''barcode''' field (. Thus, MeaSoft knows the system will understand that there may last 2 characters can be any last 2 symbols in the field 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>
<company>Name of the sender company</company>
<person>Sender company contact person</person>
<phone>Sender`s phone number, E-mailemail</phone> <town>Sender`s location in “Moscow city” the "<name> city" format</town> <address>Sender`s address</address> <date>Pick-up Pickup date in the "YYYY-MM-DD" format</date> <time_min>Desired pick-up pickup time in the "HH:MM" format</time_min> <time_max>Desired pick-up pickup time in the "HH:MM" format</time_max>
</sender>
</source>
*'''receiver''' is the information about the receiverrecipient. It is a mandatory container.
<source lang="xml">
<receiver>
<company>Name of the receiving recipient company</company> <person>Receiving Recipient company contact person</person> <phone>Receiver`s Recipient phone number, E-mailemail</phone> <townregioncode="Region code">Receiver`s Recipient location in “Moscow the "<name> city” format</town> <address>Receiver`s Recipient address</address> <date>Delivery date in the "YYYY-MM-DD" format</date> <time_min>Desired delivery time in the "HH:MM" format</time_min> <time_max>Desired delivery time in the "HH:MM" format</time_max>
</receiver>
</source>
*'''company''' is a receiving recipient company. *'''person''' is a contact person's name. ''At least one field should be filled in – either company or person!.''*'''phone''' is a phone number. Several You can specify several phone numbers and emails can be entered into this field.
*'''town''' is the name of the town.
For the '''town''' tag, you can speify the value from the Regions reference in the '''regioncode''' attribute. The town is searched for in the specified region. In the '''country''' attribute, you can specify the recipient country according to the [https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes ISO 3166-1] standard. For example: "AT", "AUT" or "040" for Austria. Besides, the '''zipcode''' attribute value is considered when searching for a town. You can use one of the following ways to fill in the '''Town''' field of the '''sender''' and '''receiver''' containers can be filled in by using: :* locality dialing code [[#Dialing codes guide|dialing codes guidelocation code]]
:* 13-digit code from All-Russian Classifier of Addresses (Address Classifier used in Russia)
:* 36-digit code from the address system <rspoiler text="Federal Information Address System">Federal Information Address System (Address system used in Russia)</rspoiler> (AOID)
:* the name of the town (not recommended)  * '''coords''' — recipient coordinates. If not specified, they are determined automatically.*'''paytype''' is a type of order payment. Possible values: :* CASH — cash on delivery (by default).:* CARD — by card on delivery.:* NO — no payment expected, the order is already paid. API adds an advance payment item with negative price value to the list of items, so that the order total is 0. The order receipt lists all items, their prices and the advance payment amount accourding to the Federal Law.:* OTHER means other types of payment. It is designed for making payments directly to the delivery service by using other types of payment: Webmoney, Yandex Money, online payment by card, other payment systems. :* OPTION — recepient selects the payment type. This type of payment is not transferred in the order. It is set automatically client settings.  *'''zipcode''' — postal code. *'''weight''' — total order weight in kilograms.*'''return_weight''' — total order return weight in kilograms.*'''quantity''' — number of packages. *'''service''' — delivery mode (service type). It is transferred as a code from the '''Urgency Kinds''' reference. *'''type''' – shipment type. It is transferred as a code from the '''Shipment Types''' reference.*'''return_type - return shipment type. It is transferred as a code from the '''Shipment Types''' reference.*'''price''' — order amount. If the '''items''' container is present, this parameter is ignored and calculated automatically. *'''deliveryprice'''— delivery fee. If the '''items''' container is present, the "Delivery" item is added to it.:*'''VATrate''' — value-added tax rate, integer.*'''return''' — indicates whether return trip is required. *'''return_service''' — return mode (type of service). It is transferred as a code from the '''Urgency Kinds''' reference. *'''discount''' — order discount amount. The discount amount distributes between the order item prices, the cash on delivery amount decreases by the the discount amount. The "Discount" item is not created. Note that using this tag might lead to discrepancies in order total due to rounding errors. Avoid using this tag, specify the item prices already decreased by the discount amount.*'''enclosure''' — task description.*'''inshprice''' — declared value. If not specified explicitly, the value is calcuated automatically as order items prices total. *'''instruction''' — instruction text for courier.*'''courier''' — planned courier. It is transferred as a MeaSoft courier code.*'''receiverpays''' — indicates whether recipient pays the delivery fee. If '''YES''', the recipient pays, if '''NO''', the sender pays.*'''department''' — the order creator's department.*'''pickup''' — indicates whether it is a pickup order. If '''YES''', the entire order is considered to be the assignment for pickup, not for delivery. It is used for calling a courier to the sender's place to pick up shipments. * '''acceptpartially''' — indicates whether the recepient can partially accept order items. *'''items''' — a container describing order items. It is an optional container. It has the following attributes: :* '''''item''''' — item name.:* '''''quantity''''' — number of articles. :* '''''mass''''' — item weight in kg.:* '''''volume''''' — dimensional weight of an item in kilograms. If specified, the value substitutes the '''mass''' value.:* '''''length''''' — item length in cm.:* '''''width''''' — item width in cm.:* '''''retprice''''' — price of an article. Rounds to the hundredths. It must include all markups and discounts. It cannot be negative for item types 1, 2, 3.:*'''''inshprice''''' — declareed value of an article. Rounds to the hundredths. If not specified, considered equal to '''retprice'''.:* '''''VATrate''''' — VAT rate which is specified as integer percentage. If a value is not indicated, then “18” value is entered. :* '''''barcode''''' — item barcode. [[File:Article.png|thumb|100px|right]]:* '''''article''''' — supplier SKU ID. ''Attention!) '' Supplier SKU ID is required only for the items stored at the courier service warehouse and if cross-docking is required for them. In this case the system tries to associate the item with a corresponding item in [[API#Nomenclature list|nomenclature list]]. If the item is not found in the nomenclature list, the error message is displayed. If several items are found with the same supplier SKU ID, one of the IDs is selected randomly. It might result in incorrect cross-docking.:*'''''itemcode''''' — internal SKU ID/ You can use instead of supplier SKU ID. ''Attention!'' SKU ID is required only for the items stored at the courier service warehouse and if cross-docking is required for them. The system uses SKU ID to associate the item with a corresponding item in [[API#Nomenclature list|nomenclature list]]. If the item is not found, the error message is displayed.:*'''''type''''' — item type. Possible values::1 — Goods. The default value.:2 — Delivery. The item is added automatically if '''order''' > '''deliveryprice''' is specified.:3 — Service:4 — Advance payment. The amount is specified. '''quantity''' is ignored, always "1". The amount in the order is displayed with the negative sign irrespective of the sign in the request. The item is added automatically if '''order''' > '''paytype=NO''' is specified.:6 - Credit payment. The amount is specified. '''quantity''' is ignored, always "1". The amount in the order is displayed with the negative sign irrespective of the sign in the request.:7 - Pickup. Use it if you have to pick up the items from the recipient. The amount in the order is displayed with the negative sign irrespective of the sign in the request.:* '''''extcode''''' — external line code. It is used to identify the order lines when obtaining statuses. It is an optional field.:* '''''origincountry''''' - origin country code according to [https://en.wikipedia.org/wiki/ISO_3166-1#Current_codes ISO 3166-1].:* '''''GTD''''' — GTD number.:* '''''excise''''' — excise tax amount.:* '''''suppcompany''''' — supplier name if it is different from the sender.:* '''''suppphone''''' — supplier phone number if it is different from the sender.:* '''''suppINN''''' — supplier taxpayer ID if supplier is not the sender.:* '''''governmentCode''''' — [https://chestnyznak.ru/en/ Chestnyi ZNAK code]. It is used to digitally mark goods. Specify all characters of the QR code excepting ASCII 29 character. If the code is unknown, specify "?". The courier will scan it when giving the item to recepient. Some processes may require using "!". In this case, the courier scans the item serial number, but it is not considered to be the digital mark code. If the field is filled in, '''quantity''' must be "1", otherwise an error returns.  *'''packages''' — a container describing order packages. It is an optional container. It has the following attributes::* '''''package''''' — package name.:* '''''code''''' — internal line code.:* '''''strbarcode''''' — package barcode.:* '''''mass''''' — package weight in kg.:* '''''message''''' — message line.:* '''''length''''' — package length in cm.:* '''''width''''' — package width in cm.:* '''''height''''' — package height in cm. * '''deliveryset''' — custom delivery rate setup. It has the following attributes::* '''''above_price''''' — delivery fee if all order items are accepted by the recipient. It is "amount from" for the limit set in the '''below_sum''' tag.:* '''''return_price''''' — delivery fee if the order is returned.:* '''''VATrate''''' — value-added tax rate, integer. * '''below''' — amount limit of the settings.:* '''''below_sum''''' — purchase amount limit.:* '''''price''''' — purchase amount within the limit.
* '''advprices''' — a container describing additional services. It is an optional container. It has the following attributes: <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 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'''.
*'''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 you want to transfer order total cost, it can be done by using <inshprice> field, indicating order items` declared value):* OTHER means other types of payment apply additional services (It is designated for making payments directly to the example, delivery service by using other types of payment as: “Webmoney”, “Yandex Money”cross-docking, online payment with a credit card other payment systemslifting upstairs, etc.) :* OPTION means choosing type of payment by , specify them in the receiver. This type of payment can’t be transferred with the order. It is automatically set depending on customer`s data setupsame '''items''' container as items without a SKU ID.
*'''zipcodecostcode''' 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 — employee 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 [[#The list of order points of issue|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.
*'''itemsoverall_volume''' is a container used for the description of goods enclosed— total volume, m3. It is an An optional containervirtual field. It has the following attributes: :* '''''item''''' is used to calculate the name of a productpackage dimensions. :* '''''quantity''''' is the amount The calculation works only if every package contains zero values 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. [[File:Article.png|thumb|100px|right]]:* '''''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 [[API#Nomenclature list|nomenclature list]]. If the product unit is not found in the nomenclature listlength, the appropriate error message will be displayed by the system. If there are several product units found within one article numberheigth, 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 YETor width.
In case it is necessary to specify them besides product units, additional services (for example<div style="color: #a94442; background-color: #f2dede; border: 1px solid #ebccd1; padding: 3px 10px 10px;">When submitting orders with scheduled delivery or pickup date earlier than the nearest possible date, DELIVERY, order batching, lifting the order up delivery or pickup date changes automatically to the floor, etc.) – they should be specified in [[Courier Service Account#Calculating the same “items” container as product units but without article numbersNearest Possible Delivery Date|nearest possible date]].</div>
=== Examples of responses ===
16 - Sender`s address is not filled in.
17 - Order with this number already exists.
== Order status query ==

Навигация