SWAPI
Table of Contents | ||||
---|---|---|---|---|
|
Info | ||
---|---|---|
| ||
SWAPI |
Version history
30 oktober 2015
- getStatus aanpassen: toevoegen REFID documentatie
19 jun 2015
- Toevoegen documentatie SendOrderSpecs
...
23 maart 2015
- oude logo verwijderd uit het document (in header)
- function SetClient: ook voorbeeld wholesale toegevoegd
- parameter clientnr:string added
...
Info | ||
---|---|---|
| ||
If the testapi is used, return values will be the same as the production api however, no changes are made in the database. Please note that the testapi is significantly slower than the production api. |
...
HTTPS
Encrypted services are available.
For testing, use https://www.softwear.nl/testapi
For production purposes, use https://www.softwear.nl/api
Be aware that encrypted services run slower than unencrypted services.
We advice to run non-sensitive api’s like getStock on unencrypted services to keep them as fast as possible. Sensitive api’s, specifically those that deal with customer data like getclient and sendorder are better run on encrypted services.
DATAFEEDS
In addition to the api, several datafeeds can be downloaded upon request. Datafeeds are available for article information and client information. Datafeeds are refreshed automatically every 24 hrs. All datafeeds are in CSV format.
The content of the datafeeds can vary per project, for more information contact us at info@softwear.nl or 075-7630650.
TOKEN
The API uses a token for identification. If an API has been setup for a Softwear instance, a token will be provided. Throughout this documentation, a sample token will be used. This UUID token, 1660-8920-F99A-11E0-BE50-0800-200C-9A66, gives access to an example database.
...
http://www.softwear.nl/ism/1660-8920-F99A-11E0-BE50-0800-200C-9A66/cu.csv
...
function getStock.
This method is used to recieve the actual stock of an article.
...
parameter: token:string
UUID shopid
parameter: articlecode:string
Articlecode of article for which stock should be returned.
Articlecode is case-sensitive.
Articlecode can be either a single artilecode or a comma separated list of articlecodes.
parameter: barcode:string
Barcode of article for which stock should be returned.
Barcode is case-sensitive.
Barcode can be either a single barcode or a comma separated list of barcodes.
Can be any barcode of article, stock for all variations of article will be returned.
parameter: switches:string
comma separated string of switches.
logical returns result as 1 or 0. 1 Means that there is at least one piece of that article in stock, regardless of size and color. The logical option can only be used when stock is retrieved for a single articlecode.
detail returns result per SKU (default)
perShop returns results per shop (implies detail)
...
function sendOrderSpec.
This method is used to set order specifications to a leading order in a Softwear backoffice.
...
Example:
http://testapi.softwear.nl/scripts/foxisapi.dll/sww1.wreq1.mpx?sendorderspecs&token=1660-8920-F99A-11E0-BE50-0800-200C-9A66&nettterm=30&discperc1=2.00&discterm1=10&fixdate=30-10-2015&reservationdate=19-06-2015&remarks=Telefonische order.¬es=&signature=&carrier=&custnum=1234&refid=50-32-1234
parameter: token token:string
UUID shopid
parameter: nettterm:number
Term of payment in days
parameter: discperc1:number
Discount percentage (1)
parameter: discterm1:number
Term of discount (1) in days
parameter: discperc2:number
Discount percentage (2)
parameter: discterm1:number
Term of discount (2) in days
parameter: reservationdate:date
Date of order issue from
parameter: fixdate:date
Date of order issue till
parameter: carrier:string
Name of carrier / expediter
parameter: custnum:string
Customer number of client
parameter: refid:string
Reference order number. This number uniquely identifies the leading order. If this number is supplied with this function, the same number must be used to send in the actual order.
...
function sendOrder.
This method is used to place an order in a Softwear backoffice.
...
parameter: token:string
UUID shopid
parameter: custnum:string
Customer number of client. Returning customers should be addressed by their existing emailadres, not necessarily their customernumber. Otherwise, a new customers will be created in Softwear.
parameter: email:string
email address of customer
parameter: title:string
Title of customer. Usually something like Mr/Mrs/Ms etc…
parameter: firstname:string
Customers firstname or initials
parameter: middlename:string
Customers middlename
parameter: lastname:string
Customers last- or familyname
parameter: street:string
Deliveryaddress streetname
parameter: housenum:string
Deliveryaddress house number
parameter: houseadd:string
Deliveryaddress housenumber addition
parameter: zipcode:string
Deliveryaddress zip or postal code
parameter: city:string
Deliveryaddress city
parameter: countrycode:string
Deliveryaddress countrycode.
Coded against ISO 3166: http://www.iso.org/iso/english_country_names_and_code_elements
parameter: remarks:string
Remarks
parameter: shipping:number
Shipping fee in eurocents or the actual fee times 100
Eg. € 4,95 would be represented as 495.
Shipping includes VAT
parameter:discount:number
Discount amount in eurocents or the actual amount times 100.
Eg. € 6,25 would be represented as 625.
This discount applies to the whole order, not to the individual articles listed below. Discount includes VAT. Use this parameter for coupons, sales, loyalty discount,etc.
Discounts for specific articles should be specified per article be changing the price parameter in the articlelist described below.
parameter:refid:string(10)
Reference order number.
This number uniquely identifies the order. If this number is supplied with this function, the same number can be used with the cancelorder function to cancel an order in the backoffice.
...
Remarks:
Optionally, the sendOrder API can be configured to accept amounts excluding VAT.
...
function cancelOrder.
This method is used to cancel an existing order in a Softwear backoffice.
...
parameter: token:string
UUID shopid
parameter: refid:string(10)
Reference order number.
This number uniquely identifies the order. It is the same number originally supplied as refid when the order was created with the sendorder function.
...
function getStatus.
This method is used to recieve the historical transactions of a customer or a specific transaction.
Syntax 1:
http://testapi.softwear.nl/scripts/foxisapi.dll/sww1.wreq1.mpx?[function=]getstatus&[token=]<shopid>&email=<email>&custnum=<customernumber>[&format=<xml/html>]
Syntax 2: http://testapi.softwear.nl/getstatus/<shopid>/email__<email>[/format__<xml/html>]
...
parameter: token:string
UUID shopid
Historical transactions of a customer:
parameter: custnum or email :string (choose custnum OR email)
Emailaddress of
...
clientnr
A specific transaction
parameter: refid: string(10)
Reference order number.
This number uniquely identifies the order. It is the same number originally supplied as refid when the order was created with the sendorder function.
...
function getCoupons.
This method is used to recieve the coupons status of a customer.
...
parameter: email:string
Emailaddress of client.
...
function redeemCoupon.
This method is used to redeem (part of) an existing coupon.
...
parameter: value:string
Value to substract from coupon in eurocents.
Of value is omitted, the entire coupon is redeemed.
Value can only be specified for monetary coupons, not for percentage coupons. Percentage coupons can only be redeemed entirely.
...
function addCoupon.
This method is used to create a new coupon for an existing customer.
...
parameter: value:string
Coupon value in eurocents or a percentage.
To create a percentage discount coupon, add a percent sign (%) to the value e.g. value=10%.
...
function checkCoupon.
This method is used to check the status of an existing anonymous coupon, i.e. a coupon that is not bound to a particular customer.
...
parameter: coupon:string
unique id of existing coupon.
...
function sendTransit.
This method is used to create a transit order in a Softwear backoffice.
...
Return values
Results are returned in HTML.
On success, OK is returned, otherwise a human readable error message is returned.
...
function getClient.
This method is used to recieve the address information of a customer.
...
parameter: switches:string
comma separated string of switches.
list returns a list emailaddresses for all active clients
detail returns details for client specified by email address parameter (default).
...
function setClient.
This method is used to add or update a client order in a Softwear backoffice.
...
parameter: telephone:string
Customers telephone
parameter (wholesale): name:string
Company name
parameter (wholesale): deliveryaddress:string
Delivery address
parameter (wholesale): deliverycountrycode:string
Delivery countrycode
parameter (wholesale): deliverycity:string
Delivery city
parameter (wholesale): deliverytelephone:string
Delivery telephone
parameter (wholesale): deliveryzipcode:string
Delivery zipcode
parameter (wholesale): vatnr:string
VAT nr
parameter: street:string
Deliveryaddress streetname
...
parameter: countrycode:string
Deliveryaddress countrycode.
Coded against ISO 3166: http://www.iso.org/iso/english_country_names_and_code_elements
...
function getInvoice.
This method is used to recieve invoice data for a particular day from Softwear.
...
parameter: day:number
Day to query.
...
function blockClient.
This method is used to block/unblock a client in a Softwear backoffice.
...
parameter: custnum:string
Customernumber of client.
parameter: blocked:string
true to block a client, false to unblock.
...
function getBasicOrderInfo.
This method is used to get order-information out of a retail Softwear Back-office. Can be used to check if an sendorder has worked properly.
...
"agent":"WEBSHOP","currency":"EURO" }
...
function getOrderProgress.
This method is used to retrieve the status of an order.
...
Server-Response:
O = preorder
ON = order
P = packinglist for preorder
PN = packinglist
F = invoice for preorder
FN = invoice backorder
...
function raptorSKU.
This method is used to fetch article properties from a barcode. Can be used to implement cash registers.
...
parameter: barcode:string
max. 13 digit barcode.
...
function sendrma.
This method is used to place a returnorder in a Softwear backoffice. RMA’s should only be created for goods that have been invoiced to the customer. This information can be found in the getStatus api.
...