GET api/StockBalances?branchId={branchId}

Gets all stockbalances for a branch[id] using paging.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
branchId

(Required) Branchid

integer

Required

Body Parameters

None.

Remarks

None.

Example

//Gets all stockbalances in first page.
http://localhost/api/stockbalances

//Gets all stockbalances in the fifth page for branch with id 1.
http://localhost/api/stockbalances/1?pageNumber=5&pageSize=25

//Gets all stockbalances for branch with id 1 in the fifth page with default page size of 25.
http://localhost/api/stockbalances/1?pageNumber=5

Response Information

Resource Description

All stockbalances in the current page.

PagedStockBalanceResponse
NameDescriptionTypeAdditional information
StockBalanceResponses

List of stockbalances in the requested page.

Collection of StockBalanceResponse

None.

TotalPages

Total number of pages.

integer

None.

NextPage

Link to the next page.

string

None.

PreviousPage

Link to the previous page.

string

None.

LastPage

Link to the last page.

string

None.

FirstPage

Link to the first page.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "StockBalanceResponses": [
    {
      "ArticleNo": 1,
      "StockBalance": 2.0,
      "CentralWarehouseStockBalance": 3.0,
      "TotalStockBalance": 4.0
    },
    {
      "ArticleNo": 1,
      "StockBalance": 2.0,
      "CentralWarehouseStockBalance": 3.0,
      "TotalStockBalance": 4.0
    }
  ],
  "TotalPages": 1,
  "NextPage": "sample string 2",
  "PreviousPage": "sample string 3",
  "LastPage": "sample string 4",
  "FirstPage": "sample string 5"
}

application/xml, text/xml

Sample:
<PagedStockBalanceResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Stock">
  <FirstPage xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO">sample string 5</FirstPage>
  <LastPage xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO">sample string 4</LastPage>
  <NextPage xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO">sample string 2</NextPage>
  <PreviousPage xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO">sample string 3</PreviousPage>
  <TotalPages xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO">1</TotalPages>
  <StockBalanceResponses>
    <StockBalanceResponse>
      <ArticleNo>1</ArticleNo>
      <CentralWarehouseStockBalance>3</CentralWarehouseStockBalance>
      <StockBalance>2</StockBalance>
      <TotalStockBalance>4</TotalStockBalance>
    </StockBalanceResponse>
    <StockBalanceResponse>
      <ArticleNo>1</ArticleNo>
      <CentralWarehouseStockBalance>3</CentralWarehouseStockBalance>
      <StockBalance>2</StockBalance>
      <TotalStockBalance>4</TotalStockBalance>
    </StockBalanceResponse>
  </StockBalanceResponses>
</PagedStockBalanceResponse>