Softwear Push-API

Voor webdevelopers

 

Softwear PUSH API

Softwear’s PUSH API is an extension to SWAPI, Softwear’s web API for web developers. (see https://developer.softwearconnect.com/)

It allows web developers to synchronise their databases with data from a Softwear POS in tiny increments instead of processing large batches.

The API can send updates whenever stock levels in Softwear change or article information changes.


It supports two files:

stock.<timestamp>.csv

is a csv file that lists the most recent stock updates. Whenever receive-, sale-, transit- and inventory-events happen, a new file is generated. The number of rows in the file depends on how many events were recorded since the last file. Files are generated at 1 minute intervals when applicable.


There are two file formats. The appropriate format is decided upon when the Push API is configured by Softwear.

Basic format

The basic format has 3 columns:

KEY, BARCODE, QTY

FieldnameContent
KEYKEY from articlefeed CSV.
BARCODEBarcode from articlefeed CSV
STOCKNew stock QTY for this SKU


Extended format

This format gives more details about every transaction:



FieldnameContent
BARCODEEAN Barcode
GLNGLN of warehouse or shop
QTY

The relative stock change due to this transaction (delta)

TRANTYPE

TRANSACTION SEED_STOCK = 0 

TRANSACTION RECEIVED = 1

TRANSACTION SOLD = 2

TRANSACTION TRANSIT = 3

TRANSACTION CHANGE = 4

TRANSACTION RETURN_SUPPLIER = 5

TRANSACTION RESERVED = 94

TRANSACTION RESERVED_2 = 95

TRANSACTION ORDER = 96

TRANSACTION PREORDER = 97

CUSTIDCustomer ID
DOCNRDocument ID
SUBNRSub document ID
NETTPRICENett transaction price
GROSSPRICEGross sku price
DISCOUNTTYPEDiscount % or <empty> (empty implies monetary discount)
DISCOUNTDiscount amount
VATVAT percentage
DATETransaction date
TIMETransaction time
ORDERIDPOS receipt ID
RECEIPTTOTAL

Total value of transaction

ZIPCODECustomer zipcode
CITYCustomer city
STOCKNew stock after the transaction
EMAILCustomer email address
TELEPHONECustomer telephone



articles.<timestamp>.csv

is a csv file with the most recent article database updates. The number of rows in the file depends on how many article updates were recorded since the last file. Files are generated at 5 minute intervals when applicable.


The format of the file can be specified from the shopfeed manager: www.softwear.nl/shopfeed. For existing projects, the same format can be used.

These files can be used to add new articles to the webshop database or update existing articles.


Full datafile


Daily article export, fulldata file
a file called: data.csv will be exported every night and placed in the FTP location.

FTP

FTP communication is supported by default since it is easy to configure and available on most platforms so you don’t have to create your own API. Furthermore, it allows you to process the files asynchronously to minimise impact to your infrastructure. Files are uploaded to your FTP server. To setup a PUSH API instance, you will provide the IP-Address or hostname of your ftp server, a username and password. Softwear will use these credentials to configure your PUSH API. 


The filenames that are written to the FTP server are unique through the timestamps so no file will be overwritten. 

You can delete, rename or move files after processing. Depending on the speed at which these files can be processed, you can achieve near-realtime synchronisation.