POST api/V3/Distributor/UpdateStock/{DistributorERPId}

Upload the stock of a distributor

Request Information

URI Parameters

NameDescriptionTypeAdditional information
DistributorERPId

Guid or ERP id of the distributor

string

Required

Body Parameters

Stock of this distributor

Collection of V3.StockItem
NameDescriptionTypeAdditional information
ProductERPId

SAP or ERP code of the product

string

Required

String length: inclusive between 0 and 50

Batch

Production Batch number for the Product in the Stock

string

String length: inclusive between 0 and 50

Quantity

Quantity in units

integer

None.

Unit

Stock Item Unit

string

String length: inclusive between 0 and 20

ExpiryDate

Expiry Date

date

None.

IsQuantityInStdUnit

Default Value: False

boolean

None.

QuantityStdUnit

Quantity in Std Unit

decimal number

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "ProductERPId": "sample string 1",
    "Batch": "sample string 2",
    "Quantity": 3,
    "Unit": "sample string 4",
    "ExpiryDate": "2025-04-04T05:36:16.3425278+00:00",
    "IsQuantityInStdUnit": true,
    "QuantityStdUnit": 6.1
  },
  {
    "ProductERPId": "sample string 1",
    "Batch": "sample string 2",
    "Quantity": 3,
    "Unit": "sample string 4",
    "ExpiryDate": "2025-04-04T05:36:16.3425278+00:00",
    "IsQuantityInStdUnit": true,
    "QuantityStdUnit": 6.1
  }
]

application/xml, text/xml

Sample:
<ArrayOfStockItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.V3.Models">
  <StockItem>
    <Batch>sample string 2</Batch>
    <ExpiryDate>2025-04-04T05:36:16.3425278+00:00</ExpiryDate>
    <IsQuantityInStdUnit>true</IsQuantityInStdUnit>
    <ProductERPId>sample string 1</ProductERPId>
    <Quantity>3</Quantity>
    <QuantityStdUnit>6.1</QuantityStdUnit>
    <Unit>sample string 4</Unit>
  </StockItem>
  <StockItem>
    <Batch>sample string 2</Batch>
    <ExpiryDate>2025-04-04T05:36:16.3425278+00:00</ExpiryDate>
    <IsQuantityInStdUnit>true</IsQuantityInStdUnit>
    <ProductERPId>sample string 1</ProductERPId>
    <Quantity>3</Quantity>
    <QuantityStdUnit>6.1</QuantityStdUnit>
    <Unit>sample string 4</Unit>
  </StockItem>
</ArrayOfStockItem>

Response Information

Resource Description

ApiResponse
NameDescriptionTypeAdditional information
Message

Message Indicating the Overall Response Summary of the Requested API

string

None.

ResponseList

List of Errors

Collection of ApiResponseMessage

None.

Response

Enum Indicating the Response status

ResponseStatus

None.

ResponseStatusCount

Summary containing Number of SuccessFull And Failed Tasks

ResponseStatusCount

None.

Response Formats

application/json, text/json

Sample:
{
  "Message": "sample string 1",
  "ResponseList": [
    {
      "ERPId": "sample string 1",
      "Message": "sample string 2",
      "ResponseStatus": "Failure",
      "GUID": "sample string 3"
    },
    {
      "ERPId": "sample string 1",
      "Message": "sample string 2",
      "ResponseStatus": "Failure",
      "GUID": "sample string 3"
    }
  ],
  "Response": "Failure",
  "ResponseStatusCount": {
    "Updated": 1,
    "Failed": 2,
    "Ignored": 3,
    "Name": "sample string 1",
    "Total": 6,
    "StatusMessage": "sample string 1: Total-6, Updated-1, Failed-2, Ignored-3",
    "ResponseStatus": "PartialSuccess"
  }
}

application/xml, text/xml

Sample:
<ApiResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ExternalApis.Models.Common">
  <Message>sample string 1</Message>
  <Response>Failure</Response>
  <ResponseList>
    <ApiResponseMessage>
      <ERPId>sample string 1</ERPId>
      <GUID>sample string 3</GUID>
      <Message>sample string 2</Message>
      <ResponseStatus>Failure</ResponseStatus>
    </ApiResponseMessage>
    <ApiResponseMessage>
      <ERPId>sample string 1</ERPId>
      <GUID>sample string 3</GUID>
      <Message>sample string 2</Message>
      <ResponseStatus>Failure</ResponseStatus>
    </ApiResponseMessage>
  </ResponseList>
  <ResponseStatusCount>
    <Failed>2</Failed>
    <Ignored>3</Ignored>
    <Name>sample string 1</Name>
    <Updated>1</Updated>
  </ResponseStatusCount>
</ApiResponse>