Imports new and existing sale articles to Restolution. If several Restolution clients share the same API Key, the same articles will be imported identically to all clients. The optional property clientUUID will import the article only to the corresponding client.
Note 1: All prices are given as cents.
Note 2: If a property is missing, it will not be changed or set at all. If a property is given with the value null, it will be set if possible. Sums cannot be null.
Note 3: Only sale articles can be imported. Thise corresponds to the SALE_ARTICLE in Article Main Type.
The sale articles to be imported are given as a list of Extended Article (import), used also in getArticles method. Importing supports only a subset of the properties in Extended Article. The main reason is that many of the properties in Extended Article belong to other entities of Restolution and are managed separately. For example, importing an article with "priceListID": "1" requires that the price list with number "1" exists in Restolution. Refering to incorrect codes and IDs will raise errors and import will not succeed.
A "savedArticles" object that contains the following fields:
articles - nr of articles in request
added - nr of new articles added
updated - nr of existing articles updated
clients - nr of clients affected
Extended Article (import)
The articles imported by the importArticles method are objects of ExtendedArticle with a subset of supported properties as specified below. The article in Restolution is identified by the saleArticleID for sale article properties and `storageArticleID for storage article properties. Imported articles must have at least either of these properties and can also have both.
articleName[string, max 50 chars, required] - article name
articleGroupID[string, numeric, required] - article group ID of this article, the article group's number in Restolution
saleArticleID[string, numeric, required] - sale article ID of this article if it is a sale article, sale article number in Restolution
clientUUID[string, optional] - globally unique identifier of the Restolution client that this article belongs to (a type 4 UUID as specified by RFC 4122). If set, the article will be imported only to this client.
prices[array, optional] - An array of price list objects that are active for this article. See getArticles method for details. Note: only "prices", "priceListID", "priceID" and "priceWithTax" are supported. Other properties will be ignored.
importArticles
Imports new and existing sale articles to Restolution. If several Restolution clients share the same API Key, the same articles will be imported identically to all clients. The optional property
clientUUID
will import the article only to the corresponding client.Note 1: All prices are given as cents.
Note 2: If a property is missing, it will not be changed or set at all. If a property is given with the value null, it will be set if possible. Sums cannot be null.
Note 3: Only sale articles can be imported. Thise corresponds to the
SALE_ARTICLE
in Article Main Type.The sale articles to be imported are given as a list of Extended Article (import), used also in getArticles method. Importing supports only a subset of the properties in Extended Article. The main reason is that many of the properties in Extended Article belong to other entities of Restolution and are managed separately. For example, importing an article with "priceListID": "1" requires that the price list with number "1" exists in Restolution. Refering to incorrect codes and IDs will raise errors and import will not succeed.
parameters:
articles
- array of Extended Article (import) objectsresponse:
A "savedArticles" object that contains the following fields:
articles
- nr of articles in requestadded
- nr of new articles addedupdated
- nr of existing articles updatedclients
- nr of clients affectedExtended Article (import)
The articles imported by the
importArticles
method are objects ofExtendedArticle
with a subset of supported properties as specified below. The article in Restolution is identified by thesaleArticleID
for sale article properties and`storageArticleID
for storage article properties. Imported articles must have at least either of these properties and can also have both.articleName
[string, max 50 chars, required] - article namearticleGroupID
[string, numeric, required] - article group ID of this article, the article group's number in RestolutionsaleArticleID
[string, numeric, required] - sale article ID of this article if it is a sale article, sale article number in RestolutionclientUUID
[string, optional] - globally unique identifier of the Restolution client that this article belongs to (a type 4 UUID as specified by RFC 4122). If set, the article will be imported only to this client.prices
[array, optional] - An array of price list objects that are active for this article. See getArticles method for details. Note: only "prices", "priceListID", "priceID" and "priceWithTax" are supported. Other properties will be ignored.sample request:
sample response: