Versions Compared

Key

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

SWAPI


Table of Contents
minLevel2
separatorpipe
 

Info
titleabout

SWAPI
(Softwear Web-API) 
Version: 1.15
Date: 23-3-2016
Author: Jeroen de Vries 

Version history

23 maart 2016

  • new coupon type: U = gift certificate.

...

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

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

...

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

...