Raw Material API: Overview
Authentication
Section titled “Authentication”Authentication must be done by sending headers containing a key and a secret. Those are provided by Caspeco and should be placed in the following headers:
Caspeco-Storage-Auth-Id: <id>Caspeco-Storage-Auth-Secret: <secret>Endpoint
Section titled “Endpoint”https://salesapi.caspeco.net/api/Article/UpdateArticleCosts
Format
Section titled “Format”Uploaded data should be in json an follow the format:
{ "Articles":[ { "SystemName":"string", "Vendor":"string", "UnitRule":"string", "DivisionId":"string", "MainGroupId":"string", "ArticleGroupId":"string", "ArticleId":"string", "ArticleName":"string", "RawMaterialCost":"number" } ]}The endpoint will accept 1 single object containing a key named “Articles” whose value is an array of articles.
ArticleImportEntry
Section titled “ArticleImportEntry”All keys in the article objects (besides RawMaterialCost) have a direct connection to the corresponding field in the sales data stored within Caspeco and accessible through our sales export API. The field RawMaterialCostshould be set by you and represent the raw material cost for the current article. All other fields should be populated with the values from the corresponding sales article.
Response
Section titled “Response”A successful request will receive the response 202 Accepted