108
правок
Изменения
→Response Examples
|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
|-
|}
== Account for Integration ==
== General Terms ==
</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>
</source>
</spoiler>
'''Fields Description'''
*'''neworder''' — root container, required.
:* '''''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:
<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>
<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>
* '''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.
# 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 ===
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 to 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.
'''Request Example'''
<code>1234</code>
<client_code>7890</client_code>
<city>Sverdlovsk Oblast</city> <townregioncode="66" country="RU">Nizhniy Nizhny Tagil</town>
<parentcode>6</parentcode>
<acceptcash>YES</acceptcash>
*'''code''' — internal code.
*'''client_code''' — courier service client code.
*'''city''' - recipint region. You can specify a region code or a full region name from the '''Regions''' reference.
*'''town''' — recipient location.
:For the <code>town</code> tag, you can speify the value from the '''Regions''' reference in the <code>regioncode</code> attribute. The specified region is searched for the town.
:In the <code>country</code> attribute, you can specify the recipient country according to the ISO 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'''.
<inshprice>387.5</inshprice>
<packages>
<package mass="1" quantity="5"></package>
<package mass="2.5" length="10" width="20" height="30"></package>
</packages>
<userid>123user123</userid> <groupid>456customer</groupid>
</order>
</calculator>
</source>
Parameters are the same as described in [[#Creating Order|Creating Order]].
'''Fields Description'''
<service name="Express">1</service>
<zone>2</zone>
<price>11631113</price>
<mindeliverydays>1</mindeliverydays>
<maxdeliverydays>3</maxdeliverydays>
<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>