Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

SWAPI


Table of Contents
minLevel2
separatorpipe
 

...

  • nieuwe url voor https
  • verbeterde getstatus-functionaliteit

...


25 april 2017

  • Simpelste sendorder uitgelegd

...

Info
titleLet op!

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://api2.softwear.nl/swapi

...

http://www.softwear.nl/ism/1660-8920-F99A-11E0-BE50-0800-200C-9A66/a.csv

The customerfeed for the example database, the one with token=1660-8920-F99A-11E0-BE50-0800-200C-9A66 can be downloaded from:

http://www.softwear.nl/ism/1660-8920-F99A-11E0-BE50-0800-200C-9A66/cu.csv

 

 

   but is mostly via FTP

The customerfeed is only available via FTP

...


function getStock.

This method is used to recieve the actual stock of an article.
If a customer visits the webshop and views an article, the function getstock can be used to check the stock: which sizes and colors are available for the customer?
The respons can be viewed to the customer.
 

Info
titleAttention!

It is not allowed to use the function getstock to check the stock of the whole article database at once! Use the datafeed for that purpose.

 


Syntax 1:
http://testapi.softwear.nl/scripts/foxisapi.dll/sww1.wreq1.mpx?[function=]getstock&[token=]<shopid>[&articlecode=<articlecode>][&barcode=<barcode> ][&format=<xml/html>][&switches=<logical|detail|perShop>]
Syntax 2: http://testapi.softwear.nl/getstock/<shopid>/articlecode__<articlecode> /barcode__<barcode> [/format__<xml/html>][/switches__<logical|detail|perShop>]
elements in [ ] are optional
elements in <> should be replaced by literalsby literals

Example: http://testapi.softwear.nl/scripts/foxisapi.dll/sww1.wreq1.mpx?getstock&token=1660-8920-F99A-11E0-BE50-0800-200C-9A66&articlecode=00000002&format=xml&switches=logical

Example:httphttps://testapiapi2.softwear.nl/scripts/foxisapi.dll/sww1.wreq1.mpxswapi?getstock&token=1660-8920-F99A-11E0-BE50-0800-200C-9A66&articlecode=00000002&format=xml&switches=logical


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: 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.

...

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.

...

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: 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.

...

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.

 

 



...


Using coupons in webshop

The function addCoupon has some additions when using a webshop

...

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 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.

...

only wholesale:
parameter: banknr:string 
returns the bank account number of the customer, if available. 

 

 


...


function setClient.


This method is used to add or update a client order in a Softwear backoffice.

...

parameter: telephone:string
Customers telephone

parameter: born:date<dd-mm-yyyy>
Customers birth date

parameter (wholesale): legalname:string
Company name

...

parameter currency:string
Company currency

 

...


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.

...

"agent":"WEBSHOP","currency":"EURO" }

 

 


...


function getOrderProgress.

...

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 SendRmaOrder.


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.

...

Results are returned in HTML.
On success, OK is returned, otherwise a human readable error message is returned.