API

Audience

This information is intended for developers and others working with integrating applications with e-lager.dk. The purpose is to provide an overview of the data strucures contained in the API of e-lager.dk and how to perform operations and manipulating them.

Authentication

The API requires HTTPS for all communication and you must provide a valid apikey and authkey. Furthermore they have be included in all requests to the server. Contact api@e-lagerstyring.dk to get an apikey.

Protocol

The e-lager.dk API consists of a set of REST based callable methods. To perform an action using the e-lager.dk API, you need to send a request to its endpoint specifying a method and some arguments, and will receive a formatted response. All request formats take a list of named parameters. Responses are always formatted as JSON.

Response

JSON response format:


[
   {
      "success":"string",
      "message":"string",
      "entities":[
         "entityobjects"
      ]
   }
]

			

Versioning

The API is versioned allowing entiy and method signatures to change over time. Old API versions will be deprecated and upgrading to the most recent API version is recommended. API release date is 01-05-2020.
The current version is: 1.0

Operation package

The following packages are accessible through the API:

Description: Returns materials with a specific number or id. Or include all for getting all the materials in stock.

Name Type Multiple Description
number string true The number(s) of the material in stock
id guid true The id(s) of the material in stock
all boolean false Returns all the materials in stock

Return values:

Name Type Description
id guid The id of the material in stock
number string The number(s) of the material in stock
alternative number string The alternative number of the material in stock
description string The description of the material in stock
quantity float The quantity of the material in stock
costprice float The cost of the material in stock
groud id guid The groud id of the material in stock
location id guid The location id of the material in stock
supplier id guid The supplier id of the material in stock
notes text The notes on material in stock

Description: Creates new material in stock with the specific number.

Name Required Type Multiple Description
number true string false The number of the material.
altNumber false string false The alternative number of the material.
description true string false The description of the material.
quantity true float false The quantity of the material.
costprice true float false The cost of the material.
group false guid false The group id of the material.
location false guid false The location id of of the material.

Return value:

Name Type Description
id guid The id of the new material in stock

Description: Updates a material in stock with the specific number

Name Type Multiple Description
id string false The id of the material.