Technical documentation - WebViewer APIs to upload price lists and availability

AssertWeb has an api which may be used to upload price lists and availability.

Version 5.1 and later.

Overview

The APIs can be accessed by the following URLs.

http://<server>/AssertWeb/api/v1/<operation>/<parameter>

Operations

The following operations exist.

Operation

Parameter

Target

Comment

Operation

Parameter

Target

Comment

PartsPrice/Save

 

WebViewer

Upload prices on parts to Server database with prices as json content

PartsBalance/Save

 

WebViewer

Upload availability on parts to Server database with availability as json content

Authentication

See separate article on authentication:

Price and availability upload to web viewer

Price and availabiltiy can be uploaded with json content.

Json for price

[{ "<Id>k__BackingField": 0, "<PartNumber>k__BackingField": "10301544", "<PartPrice>k__BackingField": 81.57, "<PartDiscount>k__BackingField": null, "<TaxCode>k__BackingField": null, "<GroupName>k__BackingField": null, "<PartsPriceGroupId>k__BackingField": null, "<PartsPriceGroup>k__BackingField": { "Id": 0, "Name": "F1", "CurrencyList": [], "IsAvailable": false, "IsDefaultPartsPriceGroup": false, "IsAvailablePublicly": null, "Sites": null, "DisplaySequence": 0, "CreatedOn": null, "UpdatedOn": null, "PartsPriceGroupCountryList": [] }, "<CurrencyId>k__BackingField": 0, "<Currency>k__BackingField": { "<Id>k__BackingField": 0, "<CurrencyName>k__BackingField": null, "<Code>k__BackingField": "EUR", "<CultureCode>k__BackingField": null, "<Available>k__BackingField": false, "<IsDefault>k__BackingField": null, "<SequenceNumber>k__BackingField": null, "<ConversionRate>k__BackingField": null } } ]

Json for availability

[{ "Id": 0, "PartNumber": "10301544", "PartStock": 4.0, "StockLevel": 56, "NextStockReplenishment": null, "NextStockReplenishmentDate": null, "Warehouse": { "Id": 0, "Name": "124", "IsDefaultWarehouse": false, "StockReplenishmentLeadTime": null }, "Message": null, "HtmlMessage": null } ]

Testing part price and availability upload

Part price and availability upload can be tested by a browser rest api testing plugin. Turn off API authentication temporarily and use the plugin to upload the below dumps with prices and availability.