POST api/Inventory/Create

Creates a inventory basis based on the request parameter.

Request Information

URI Parameters

None.

Body Parameters

These are all the parameters needed for creating the inventory basis.

CreateInventoryBasisRequest
NameDescriptionTypeAdditional information
Description

A description for the inventory basis.

string

Required

Max length: 80

BranchId

The id of the branch for which the inventory basis is being created for.

integer

Required

SortingOrder

In what order should the inventory basis be sorted.
The following are available when creating a inventory basis.
Description
ArticleNumber
SupplierArticleNumber
Dimension

StockSortingOrder

Required

Stock

The id for a specific stock used in the inventory basis.
Leave as null if all stocks should be included.

globally unique identifier

None.

ArticleNumberStart

The start article number for a sequence of articles

integer

None.

ArticleNumberEnd

The end article number for a sequence of articles.

integer

None.

MaingroupIdStart

The start Id for a sequence of main groups.

integer

None.

MaingroupIdEnd

The end Id for a sequence of main groups.

integer

None.

SubgroupIdStart

The start Id for a sequence of sub groups.

integer

None.

SubgroupIdEnd

The end Id for a sequence of sub groups.

integer

None.

LeaveArticlesInventoriedStartDate

Use this for excluding article that has been inventoried between to dates.
This is the start date.

date

None.

LeaveArticlesInventoriedEndDate

Use this for excluding article that has been inventoried between to dates.
This is the end date.

date

None.

GroupByMaingroup

Group the inventory basis on main group

boolean

None.

GroupBySubgroup

Group the inventory basis on sub group

boolean

None.

ShowQuantity

Show the quantity for a article.

boolean

None.

ShowReservations

Show the quantity of reservations made for a article

boolean

None.

UseOnlyArticlesInStock

Use only articles in stock.

boolean

None.

ShowPalletPlace

Show pallet place for the articles.

boolean

None.

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "Description": "sample string 1",
  "BranchId": 2,
  "SortingOrder": 0,
  "Stock": "9dfb1f2d-3764-4b28-b48e-f205d4a69c8f",
  "ArticleNumberStart": 1,
  "ArticleNumberEnd": 1,
  "MaingroupIdStart": 1,
  "MaingroupIdEnd": 1,
  "SubgroupIdStart": 1,
  "SubgroupIdEnd": 1,
  "LeaveArticlesInventoriedStartDate": "12/21/2025 1:03:05 PM",
  "LeaveArticlesInventoriedEndDate": "12/21/2025 1:03:05 PM",
  "GroupByMaingroup": true,
  "GroupBySubgroup": true,
  "ShowQuantity": true,
  "ShowReservations": true,
  "UseOnlyArticlesInStock": true,
  "ShowPalletPlace": true
}

application/xml, text/xml

Sample:
<CreateInventoryBasisRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Stock">
  <ArticleNumberEnd>1</ArticleNumberEnd>
  <ArticleNumberStart>1</ArticleNumberStart>
  <BranchId>2</BranchId>
  <Description>sample string 1</Description>
  <GroupByMaingroup>true</GroupByMaingroup>
  <GroupBySubgroup>true</GroupBySubgroup>
  <LeaveArticlesInventoriedEndDate>2025-12-21T13:03:05.9021442+00:00</LeaveArticlesInventoriedEndDate>
  <LeaveArticlesInventoriedStartDate>2025-12-21T13:03:05.9021442+00:00</LeaveArticlesInventoriedStartDate>
  <MaingroupIdEnd>1</MaingroupIdEnd>
  <MaingroupIdStart>1</MaingroupIdStart>
  <ShowPalletPlace>true</ShowPalletPlace>
  <ShowQuantity>true</ShowQuantity>
  <ShowReservations>true</ShowReservations>
  <SortingOrder>Description</SortingOrder>
  <Stock>9dfb1f2d-3764-4b28-b48e-f205d4a69c8f</Stock>
  <SubgroupIdEnd>1</SubgroupIdEnd>
  <SubgroupIdStart>1</SubgroupIdStart>
  <UseOnlyArticlesInStock>true</UseOnlyArticlesInStock>
</CreateInventoryBasisRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'CreateInventoryBasisRequest'.

Response Information

Resource Description

If all goes well the id of the inventory basis is return and the success property is set to true.

CreateInventoryBasisResponse
NameDescriptionTypeAdditional information
Id

The id of the newly created inventory basis.

globally unique identifier

None.

Success

Indicates if the inventory basis where created correctly.
True if all went well, false otherwise.

boolean

None.

Messages

Is Success is false, then there are error codes and messages in this list
indicating what went wrong.

Collection of InventoryBasisMessage

None.

Response Formats

application/json, text/json

Sample:

Sample not available.