API

Product APIs

GET product/products/{productId}/stock-by-period?groupBy={groupBy}&locationId={locationId}

Stock by period specified in the groupBy parameter. Default period is week.

HTTP method GET
URI https://api.rambase.net/product/products/{productId}/stock-by-period?groupBy={groupBy}&locationId={locationId}
Supported formats Xml, Html, Json (ex. $format=json)
- URI parameter {productId} Product identifier
Integer, minimum 10000
Successful HTTP status code 200
API resource identifier 4879, version 3

The following body must be added to the request. Mouse over fieldnames for description and other useful information about the fields. Note that fields in bold are required/mandatory.

Format:
1
1

The query string is placed after the resource URL, seperated with a questionmark (?). The query string is composed of a series of query parameters with values. See the page about query parameters on how to use these parameters.

groupBy String, optional Can be day, week or month.

Default: WEEK
locationId Integer, optional Location identifier

Minimum: 10000
$lang String, optional Specifies the language used in the response, following the 3-letter ISO-639-1 [lll]
$access_token String, optional After successful login you get an access token which needs to be provided in all API requests. Even though it is possible to pass this token as query parameter, we recommended passing it using the HTTP request header as described in Authorization. Note that all access tokens have an expiration time.
$db String, optional Set the database/company for the request
$expand String, optional Use to include output fields that are not returned by default in the response. Accepts a comma-separated list of expandable field names. See the Expand and Select page for more information.
$select String, optional Use to define the fields to return in the response. Accepts a comma-separated list of field names. See the Expand and select page for more information.
$useMinimumVersion Integer, optional Used to run a new version of an API resource when your API client is running a deprecated API resource. See the Breaking changes page for more information.
$format String, optional Set the format of the response to use for the request. Accepted values are "xml", "html", "jsonstream", "json"
$top String, optional Specifies number of rows to return in each page. Maximum limit is specific for each API resource. Default value is 10.
$pageKey String, optional Use to navigate to first, previous, next or last page in list. Add $expand=PagingDetails to add the different keys to the response.
$filter String, optional Use to filter the result list, see the Filtering and sorting page for more information.
$orderby String, optional Use to order the result list, see the Filtering and sorting page for more information.
$inlinecount String, optional Set to "allpages" to include total number of rows in the response. Possible values are: "allpages", "none"

Read more about filters and sorting on how to use filter parameters and named filters.

Read more about filters and sorting on how to use sortable parameters

Requesting this resource will yield the following response. Mouse over fieldnames (or fieldgroups) for descriptions and other useful information about the fields. Fields colored in grey is expandable fields.

Please note that some fields may be removed from the response, based on user roles/duties/permissions.

Format:
1
<StockByPeriod>
2
     <StockPeriod>
3
          <Period
Period

What the stock forecast is grouped by. Can be date, week or month. The forecasts is by default grouped by week.

>
{String}</Period>
4
          <AvailableStockQuantity
AvailableStockQuantity

Available stock quantity at the end of the period. Calculated by subtracting total supply quantity from total demand quantity. This quantity might be negative, which indicates that you have more demands than supplies.

>
{Decimal}</AvailableStockQuantity>
5
          <Demand>
6
               <SalesOrderQuantity
SalesOrderQuantity

Quantity demanded from sales order items in status 2 to 8

>
{Decimal}</SalesOrderQuantity>
7
               <ServiceOrderQuantity
ServiceOrderQuantity

Quantity demanded by service orders in status 2 to 8

>
{Decimal}</ServiceOrderQuantity>
8
               <GoodsTransferQuantity
GoodsTransferQuantity

Quantity demanded for sending (or sent) goods transfers (status less than 9)

>
{Decimal}</GoodsTransferQuantity>
9
               <ShippingAdviceQuantity
ShippingAdviceQuantity

Quantity demanded for unsent shipping advices (status 3 or lower)

>
{Decimal}</ShippingAdviceQuantity>
10
               <SupplierReturnQuantity
SupplierReturnQuantity

Quantity demanded for unsent supplier returns (status 3 or lower)

>
{Decimal}</SupplierReturnQuantity>
11
               <StockAdjustmentQuantity
StockAdjustmentQuantity

Quantity demanded for unregistered stock adjustments reducing the stock (status less than 9)

>
{Decimal}</StockAdjustmentQuantity>
12
               <SalesQuoteBufferStockQuantity
SalesQuoteBufferStockQuantity

Quantity demanded as buffer stock quantity in sales quotes

>
{Decimal}</SalesQuoteBufferStockQuantity>
13
               <ProductionWorkOrder>
14
                    <UnpickedQuantity
UnpickedQuantity

Unpicked quantity demanded for production work orders

>
{Decimal}</UnpickedQuantity>
15
                    <PickedQuantity
PickedQuantity

Picked quantity demanded for production work orders

>
{Decimal}</PickedQuantity>
16
               </ProductionWorkOrder>
17
               <ReservedQuantity
ReservedQuantity

Quantity demanded by reserving quantity in purchase orders, purchase order responses or goods receptions.

>
{Decimal}</ReservedQuantity>
18
               <BlockedStockQuantity
BlockedStockQuantity

Quantity demanded by blocking stock quantity in stock locations (blocked for assignments)

>
{Decimal}</BlockedStockQuantity>
19
               <TotalDemandQuantity
TotalDemandQuantity

Sum of demanded quantities for this period.

>
{Decimal}</TotalDemandQuantity>
20
          </Demand>
21
          <Supply>
22
               <StockQuantity
StockQuantity

Quantity supplied from stock. Calculated stock balance at the start of the period. This calculation initially reads stock quantity from goods receptions and then adds available quantity from earlier stock periods.

>
{Decimal}</StockQuantity>
23
               <PurchaseOrder>
24
                    <UnregisteredQuantity
UnregisteredQuantity

Quantity supplied by purchase orders pending registration

>
{Decimal}</UnregisteredQuantity>
25
                    <RegisteredQuantity
RegisteredQuantity

Quantity supplied by registered purchase orders (status 3 or higher)

>
{Decimal}</RegisteredQuantity>
26
               </PurchaseOrder>
27
               <PurchaseOrderResponse>
28
                    <UnconfirmedQuantity
UnconfirmedQuantity

Quantity supplied by purchase order responses without confirmed delivery date

>
{Decimal}</UnconfirmedQuantity>
29
                    <ConfirmedQuantity
ConfirmedQuantity

Quantity supplier by purchase order responses with confirmed delivery date

>
{Decimal}</ConfirmedQuantity>
30
               </PurchaseOrderResponse>
31
               <ProductionWorkOrder>
32
                    <UnconfirmedQuantity
UnconfirmedQuantity

Quantity supplier by production work orders without confirmed delivery date

>
{Decimal}</UnconfirmedQuantity>
33
                    <ConfirmedQuantity
ConfirmedQuantity

Quantity supplier by production work orders with confirmed delivery date

>
{Decimal}</ConfirmedQuantity>
34
               </ProductionWorkOrder>
35
               <TotalSupplyQuantity
TotalSupplyQuantity

Sum of supplied quantities for this period.

>
{Decimal}</TotalSupplyQuantity>
36
          </Supply>
37
          <Purchase
Purchase

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

>
38
               <PendingQuantity
PendingQuantity

Quantities from sales orders, service orders and production work orders which are not assigned to stock or supplier backlog. This quantity is pending purchase.

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

>
{Decimal}</PendingQuantity>
39
               <ReOrderPointQuantity
ReOrderPointQuantity

Quantity which needs to be purchased to keep the re-order point level

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

>
{Decimal}</ReOrderPointQuantity>
40
               <PendingQuantityBlockedByProductionWorkOrders
PendingQuantityBlockedByProductionWorkOrders

Quantity pending purchase, but blocked for purchase in production work orders.

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

>
{Decimal}</PendingQuantityBlockedByProductionWorkOrders>
41
          </Purchase>
42
     </StockPeriod>
43
     <Paging
Paging

Detailed paging information for this list.

>
44
          <PageSize
PageSize

Number of elements in the list, as defined in $top. Default is 10.

>
{Integer}</PageSize>
45
          <Position
Position

Position of the first element in the list

>
{Integer}</Position>
46
          <Page
Page

Page index

>
{Integer}</Page>
47
          <FirstPageKey
FirstPageKey

Page key to use for navigating to the first page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

>
{String}</FirstPageKey>
48
          <FirstPage
FirstPage

Link to the first page in the list. $pageKey is set to FirstPageKey.

>
{String}</FirstPage>
49
          <PreviousPageKey
PreviousPageKey

Page key to use for navigating to previous page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

>
{String}</PreviousPageKey>
50
          <PreviousPage
PreviousPage

Link to the previous page in the list. $pageKey is set to PreviousPageKey.

>
{String}</PreviousPage>
51
          <NextPageKey
NextPageKey

Page key to use for navigating to next page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

>
{String}</NextPageKey>
52
          <NextPage
NextPage

Link to the next page in the list. $pageKey is set to NextPageKey.

>
{String}</NextPage>
53
          <LastPageKey
LastPageKey

Page key to use for navigating to last page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

>
{String}</LastPageKey>
54
          <LastPage
LastPage

Link to the last page in the list. $pageKey is set to LastPageKey.

>
{String}</LastPage>
55
          <Size
Size

Total number of records in the list. Use $inlinecount=allpages in the request uri to include this

>
{Integer}</Size>
56
     </Paging>
57
</StockByPeriod>
1
{
2
     "stockByPeriod": [
3
          {
4
               "period
Period

What the stock forecast is grouped by. Can be date, week or month. The forecasts is by default grouped by week.

":
"{String}",
5
               "availableStockQuantity
AvailableStockQuantity

Available stock quantity at the end of the period. Calculated by subtracting total supply quantity from total demand quantity. This quantity might be negative, which indicates that you have more demands than supplies.

":
"{Decimal}",
6
               "demand": {
7
                    "salesOrderQuantity
SalesOrderQuantity

Quantity demanded from sales order items in status 2 to 8

":
"{Decimal}",
8
                    "serviceOrderQuantity
ServiceOrderQuantity

Quantity demanded by service orders in status 2 to 8

":
"{Decimal}",
9
                    "goodsTransferQuantity
GoodsTransferQuantity

Quantity demanded for sending (or sent) goods transfers (status less than 9)

":
"{Decimal}",
10
                    "shippingAdviceQuantity
ShippingAdviceQuantity

Quantity demanded for unsent shipping advices (status 3 or lower)

":
"{Decimal}",
11
                    "supplierReturnQuantity
SupplierReturnQuantity

Quantity demanded for unsent supplier returns (status 3 or lower)

":
"{Decimal}",
12
                    "stockAdjustmentQuantity
StockAdjustmentQuantity

Quantity demanded for unregistered stock adjustments reducing the stock (status less than 9)

":
"{Decimal}",
13
                    "salesQuoteBufferStockQuantity
SalesQuoteBufferStockQuantity

Quantity demanded as buffer stock quantity in sales quotes

":
"{Decimal}",
14
                    "productionWorkOrder": {
15
                         "unpickedQuantity
UnpickedQuantity

Unpicked quantity demanded for production work orders

":
"{Decimal}",
16
                         "pickedQuantity
PickedQuantity

Picked quantity demanded for production work orders

":
"{Decimal}"
17
                    },
18
                    "reservedQuantity
ReservedQuantity

Quantity demanded by reserving quantity in purchase orders, purchase order responses or goods receptions.

":
"{Decimal}",
19
                    "blockedStockQuantity
BlockedStockQuantity

Quantity demanded by blocking stock quantity in stock locations (blocked for assignments)

":
"{Decimal}",
20
                    "totalDemandQuantity
TotalDemandQuantity

Sum of demanded quantities for this period.

":
"{Decimal}"
21
               },
22
               "supply": {
23
                    "stockQuantity
StockQuantity

Quantity supplied from stock. Calculated stock balance at the start of the period. This calculation initially reads stock quantity from goods receptions and then adds available quantity from earlier stock periods.

":
"{Decimal}",
24
                    "purchaseOrder": {
25
                         "unregisteredQuantity
UnregisteredQuantity

Quantity supplied by purchase orders pending registration

":
"{Decimal}",
26
                         "registeredQuantity
RegisteredQuantity

Quantity supplied by registered purchase orders (status 3 or higher)

":
"{Decimal}"
27
                    },
28
                    "purchaseOrderResponse": {
29
                         "unconfirmedQuantity
UnconfirmedQuantity

Quantity supplied by purchase order responses without confirmed delivery date

":
"{Decimal}",
30
                         "confirmedQuantity
ConfirmedQuantity

Quantity supplier by purchase order responses with confirmed delivery date

":
"{Decimal}"
31
                    },
32
                    "productionWorkOrder": {
33
                         "unconfirmedQuantity
UnconfirmedQuantity

Quantity supplier by production work orders without confirmed delivery date

":
"{Decimal}",
34
                         "confirmedQuantity
ConfirmedQuantity

Quantity supplier by production work orders with confirmed delivery date

":
"{Decimal}"
35
                    },
36
                    "totalSupplyQuantity
TotalSupplyQuantity

Sum of supplied quantities for this period.

":
"{Decimal}"
37
               },
38
               "purchase
Purchase

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

":
{
39
                    "pendingQuantity
PendingQuantity

Quantities from sales orders, service orders and production work orders which are not assigned to stock or supplier backlog. This quantity is pending purchase.

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

":
"{Decimal}",
40
                    "reOrderPointQuantity
ReOrderPointQuantity

Quantity which needs to be purchased to keep the re-order point level

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

":
"{Decimal}",
41
                    "pendingQuantityBlockedByProductionWorkOrders
PendingQuantityBlockedByProductionWorkOrders

Quantity pending purchase, but blocked for purchase in production work orders.

This field is greyed out because it is an expandable field. You have to add $expand=StockPeriod.Purchase in your request URI to get this field

":
"{Decimal}"
42
               }
43
          }
44
     ],
45
     "paging
Paging

Detailed paging information for this list.

":
{
46
          "pageSize
PageSize

Number of elements in the list, as defined in $top. Default is 10.

":
"{Integer}",
47
          "position
Position

Position of the first element in the list

":
"{Integer}",
48
          "page
Page

Page index

":
"{Integer}",
49
          "firstPageKey
FirstPageKey

Page key to use for navigating to the first page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

":
"{String}",
50
          "firstPage
FirstPage

Link to the first page in the list. $pageKey is set to FirstPageKey.

":
"{String}",
51
          "previousPageKey
PreviousPageKey

Page key to use for navigating to previous page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

":
"{String}",
52
          "previousPage
PreviousPage

Link to the previous page in the list. $pageKey is set to PreviousPageKey.

":
"{String}",
53
          "nextPageKey
NextPageKey

Page key to use for navigating to next page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

":
"{String}",
54
          "nextPage
NextPage

Link to the next page in the list. $pageKey is set to NextPageKey.

":
"{String}",
55
          "lastPageKey
LastPageKey

Page key to use for navigating to last page in the list

This field is greyed out because it is an expandable field. You have to add $expand=PagingDetails in your request URI to get this field

":
"{String}",
56
          "lastPage
LastPage

Link to the last page in the list. $pageKey is set to LastPageKey.

":
"{String}",
57
          "size
Size

Total number of records in the list. Use $inlinecount=allpages in the request uri to include this

":
"{Integer}"
58
     }
59
}

List of available operations/actions for this resource.
See the operations documentation for more information about API operations.

Possible error codes the response might return:

Error 100089 HTTP 404 Product not found
Error 100199 HTTP 404 Location not found