|
This is an option for vendors that don't have their own electronic order API (or for other reasons prefer to use this way to communicate order messages with our clients).
FTP contains three root directories.
/ORDERS -
Contains XML files with ORDERS documents. One file per order. File name format is wmxorder_<internal-webmercs-id>.xml
/ORDRSP -
Contains unprocessed order response (ORDRSP) documents. Each file should only contain information about one order, but multiple files for the same order is ok./DESADV -
Contains unprocessed dispatch advice (DESADV) documents. Each file should only contain information about one order, but multiple files for the same order is ok.ORDERS
directory.ORDERS
directory and process new files. Processed files may be removed from this directory (doesn't matter for us).ORDRSP
and DESADV
and process new files. Successfully processed files are removed from these folders (but we store them in archive on our servers). In case of processing error, file is moved to sub-directory ERROR
.To enable FTP ordering send request to support. You can specify which FTP should be used:
In case of Your own FTP you should also create three root directories |
Base URL | https://secure.webmercs.com/vis/vendorOrdering/v1 |
---|---|
WSDL | https://secure.webmercs.com/vis/vendorOrdering/v1?singleWsdl |
GetOrders | Returns a list of new orders. Order is considered new until one of three possible responses (listed below) is received. Class |
---|---|
SendOrderAcknowledgment | Send an acknowledgment message to inform that order is succesfully received. Method is used just to remove received order from list of new orders which are returned by Class |
SendOrderResponse | Send an order response message. Class |
SendOrderDespatchAdvice | Send an order despatch advice message. Class |
Code | Description |
---|---|
1001 | Authentication failed. Check login \ password. |
1002 | Internal error. |
1003 | Some required properties are not provided or empty. See details in the exception message. |
1004 | Order not found. Check properties. |
1005 | Invalid order response status. Check property Status of OrderResponse class. Possible values "Accepted" (1) and "Rejected" (2). |
1006 | Invalid order status. < add examples > |
1007 | Invalid XML structure. |
1008 | Invalid property format |
To enable Web Service ordering send request to support. We will provide login/password to access it. |
For each placed order we immediately send email to you with ORDERS document as an attachment. No way to send responses by email, please use FTP or Web Service for that.
To enable Email notifications send request to support. You should specify email address(es) to which you will receive ORDERS documents. |
Type | Direction | Description | Web Service | FTP | |
---|---|---|---|---|---|
ORDERS | outgoing | Order request. | |||
ORDRSP | incoming | Order response. | |||
DESADV | incoming | Order despatch advice. | |||
ORDACK | incoming | Order acknowledgment. |
<?xml version="1.0" encoding="utf-8"?> <OrderRequest xmlns="http://webmercs.com/vis/public"> <OrderHeader> <CustomerID></CustomerID> <CustomerPO></CustomerPO> <OrderDateTime></DateTime> <SplitOrder></SplitOrder> <ShippingMethod></ShippingMethod> <RequestedDeliveryDate></RequestedDeliveryDate> <Comment></Comment> <BillTo> <Name></Name> <Company></Company> <Department></Department> <Street></Street> <City></City> <StateProvince></StateProvince> <Zip></Zip> <Country></Country> <Phone></Phone> <Email></Email> </BillTo> <ShipTo> <Name></Name> <Company></Company> <Department></Department> <Street></Street> <City></City> <StateProvince></StateProvince> <Zip></Zip> <Country></Country> <Phone></Phone> <Email></Email> <EndUserPO></EndUserPO> </ShipTo> </OrderHeader> <OrderLines> <OrderLine> <LineNumber></LineNumber> <VendorSKU></VendorSKU> <WmxSKU></WmxSKU> <Description></Description> <Qty></Qty> <ExpectedPrice></ExpectedPrice> <Bid> <ClaimNo></ClaimNo> <Price></Price> </Bid> <Comment></Comment> </OrderLine> </OrderLines> </OrderRequest> |
<OrderHeader>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
| yes | string | Customer identifier in a vendor system which is provided on setup step. | "CID-898800" |
| yes | string | Unique order request identifier in Webmercs system. | "3445FHY-2" |
| yes | dateTime | Date and time when Webmercs received order request from customer. | 2012-10-25T12:50:12+01:00 |
| yes | string | Possible values: "Yes", "No". | "Yes" |
| no | string | ||
| no | dateTime | Customer may ask for a particular delivery date. | 2012-10-30 |
Comment | no | string | Customer's comment. | "Test order, do not ship!" |
ShipTo | yes | Shipping address, see <ShipTo> segment. | ||
| no | Billing address. Same fields as |
<ShipTo>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
| yes | string | Contact person name. | "Mike Petrov" |
Company | no | string | Company name. | "Horns and Hooves" |
Department | no | string | Department name. | "Accounting" |
Street | yes | string | Address line. | "Rådhusplassen 99" |
City | yes | string | City name. | "Oslo" |
StateProvince | no | string | State or province name or code. | |
Zip | yes | string | Postcode. | "0160" |
Country | yes | string | Two letter country code (ISO 3166-1 alpha-2). | "NO" |
Phone | no | string | Contact person phone. | "11100999" |
Email | no | string | Contact person email. | "mike@hh.com" |
EndUserPO | no | string | Contact person PO. | "HH-0289" |
<OrderLine>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
| yes | int | Sequential number of order line, starting from 1. | 1 |
| yes | string | Product identifier in a vendor system. | "SMT3000RMI2U" |
| yes | string | Product identifier in Webmercs system. | "3931244" |
| yes | string | Product description from Webmercs catalog. | "APC Smart UPS 3000VA" |
| yes | int | Quantity. | 10 |
| no | decimal | Vendor price from customer's catalog. | 8700.0 |
| no | |||
| no | string | ||
| no | decimal | ||
| no | string | Customer's comment. | "Cancel if real price is higher." |
Example.
<?xml version="1.0" encoding="utf-8"?> <OrderResponse xmlns="http://webmercs.com/vis/public"> <CustomerID></CustomerID> <CustomerPO></CustomerPO> <Status></Status> <Message></Message> <VendorOrderID></VendorOrderID> </OrderResponse> |
<OrderResponse>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
| yes | string | Customer identifier in a vendor system, the same value as in ORDERS document. | "CID-898800" |
| yes | string | Order identifier in Webmercs system, the same value as in ORDERS document. | "3445FHY-2" |
| yes | string | Possible values: "Accepted", "Rejected". | "Accepted" |
| no | string | Vendor's comment. | "Estimated delivery date is 21/10/2012" |
| yes, when "Accepted" | string | Order identifier in a vendor system. | "VND-O888" |
<?xml version="1.0" encoding="utf-8"?> <DespatchAdvice xmlns="http://webmercs.com/vis/public"> <CustomerID></CustomerID> <CustomerPO></CustomerPO> <VendorOrderID></VendorOrderID> <OrderLines> <OrderLine> <LineNumber></LineNumber> <VendorSKU></VendorSKU> <Qty></Qty> <Price></Price> <SerialNumbers> <SerialNo></SerialNo> </SerialNumbers> </OrderLine> </OrderLines> <TrackingLines> <TrackingLine> <TrackingNo></TrackingNo> <ShipMethod></ShipMethod> <TrackingURL></TrackingURL> </TrackingLine> </TrackingLines> </DespatchAdvice> |
<DespatchAdvice>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
| yes | string | Customer identifier in a vendor system, the same value as in ORDERS document | "CID-898800" |
CustomerPO | yes | string | Order identifier in Webmercs system, the same value as in ORDERS document. | "3445FHY-2" |
VendorOrderID | yes | string | Order identifier in a vendor system. | "VND-O888" |
| yes | Contains list of <OrderLine> segments. | ||
| no | Contains list of <TrackingLine> segments. |
<OrderLine>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
LineNumber | yes | int | Number of order line from ORDERS document. | 1 |
VendorSKU | yes | string | Product identifier in a vendor system, the same value as in ORDERS document. | |
| yes | int | Quantity. | |
| yes | decimal | Price. | |
| no | List of serial numbers. | ||
| yes | string | Serial number. |
<TrackingLine>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
TrackingNo | yes | string | Package\tracking number. | |
ShipMethod | no | string | Shipping service (company) and method. | |
TrackingURL | no | string | URL to check package status. |
Web Service ordering only.
The Order Acknowledgment document is used to inform that the Order Request document is received.
<?xml version="1.0" encoding="utf-8"?> <OrderAcknowledgment xmlns="http://webmercs.com/vis/public"> <CustomerID></CustomerID> <CustomerPO></CustomerPO> <OrderAcknowledgment> |
<OrderAcknowledgment>
segmentField | Required | Data Type | Description | Sample |
---|---|---|---|---|
CustomerID | yes | string | Customer identifier in a vendor system, the same value as in ORDERS document | "CID-898800" |
CustomerPO | yes | string | Order identifier in Webmercs system, the same value as in ORDERS document. | "3445FHY-2" |