PUT ProductReplacementCost/PutProductReplacementCost

Updates replacement costs

Request Information

URI Parameters

Body Parameters

ClsProductReplacementCostUpdate
NameDescriptionTypeAdditional Information
GTIN

GTIN on the product - used to identify the product when DepartmentId and ProductId are not included in the request

string

Max length: 20

DepartmentId

Department ID of the product

string

Max length: 6

ProductId

ID of the product

string

Max length: 10

ReplacementCost

Replacement Cost - only updated if included in the request

decimal number

Max of 3 decimal places

ReplacementCost2

Replacement Cost 2 - only updated if included in the request

decimal number

Max of 3 decimal places

ReplacementCost3

Replacement Cost 3 - only updated if included in the request

decimal number

Max of 3 decimal places

ReplacementCost4

Replacement Cost 4 - only updated if included in the request

decimal number

Max of 3 decimal places

UpdateMultipleProducts

Indicates if multiple products should be updated when GTIN supplied exists on more than one product in Agvance

boolean

Must be 0, 1, True, or False

Request Formats

application/json, text/json

Sample:
{
  "GTIN": "sample string 1",
  "DepartmentId": "sample string 2",
  "ProductId": "sample string 3",
  "ReplacementCost": 1.1,
  "ReplacementCost2": 1.1,
  "ReplacementCost3": 1.1,
  "ReplacementCost4": 1.1,
  "UpdateMultipleProducts": true
}

application/xml, text/xml

Sample:
<ClsProductReplacementCost.ClsProductReplacementCostUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">
  <DepartmentId>sample string 2</DepartmentId>
  <GTIN>sample string 1</GTIN>
  <ProductId>sample string 3</ProductId>
  <ReplacementCost>1.1</ReplacementCost>
  <ReplacementCost2>1.1</ReplacementCost2>
  <ReplacementCost3>1.1</ReplacementCost3>
  <ReplacementCost4>1.1</ReplacementCost4>
  <UpdateMultipleProducts>true</UpdateMultipleProducts>
</ClsProductReplacementCost.ClsProductReplacementCostUpdate>

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 'ClsProductReplacementCostUpdate'.

Response Information

Resource Description

Updates replacement costs

AgvProductReplacementCost
NameDescriptionTypeAdditional Information
Status

0 - Success; 1 - An error occurred; 2 - An error occurred; 3 - Descriptive message, process was successful

string
Message

Informational message that corresponds to the Status returned; 0 - Message will be "OK"; 1 - Detailed message returned to give user an indication of what went wrong; 2 - Less detailed message returned that may not mean anything to the user but that the application might use to take a corrective action; 3 - Not an error but something the user might need to know

string
Count

Number of results returned

string
ProductReplacementCostList

List of properties and values returned for each product that matches the request

Collection of ClsProductReplacementCost

Response Formats

application/json, text/json

Sample:
{
  "Status": "sample string 1",
  "Message": "sample string 2",
  "Count": "2",
  "ProductReplacementCostList": [
    {
      "DepartmentId": "sample string 1",
      "ProductId": "sample string 2",
      "ReplacementCost": 1.1,
      "ReplacementCost2": 1.1,
      "ReplacementCost3": 1.1,
      "ReplacementCost4": 1.1
    },
    {
      "DepartmentId": "sample string 1",
      "ProductId": "sample string 2",
      "ReplacementCost": 1.1,
      "ReplacementCost2": 1.1,
      "ReplacementCost3": 1.1,
      "ReplacementCost4": 1.1
    }
  ]
}

application/xml, text/xml

Sample:
<AgvProductReplacementCost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AgvWebAPICSharp.Models.Product">
  <Message>sample string 2</Message>
  <ProductReplacementCostList xmlns:d2p1="http://schemas.datacontract.org/2004/07/SKY.Core.Inventory">
    <d2p1:ClsProductReplacementCost>
      <d2p1:DepartmentId>sample string 1</d2p1:DepartmentId>
      <d2p1:ProductId>sample string 2</d2p1:ProductId>
      <d2p1:ReplacementCost>1.1</d2p1:ReplacementCost>
      <d2p1:ReplacementCost2>1.1</d2p1:ReplacementCost2>
      <d2p1:ReplacementCost3>1.1</d2p1:ReplacementCost3>
      <d2p1:ReplacementCost4>1.1</d2p1:ReplacementCost4>
    </d2p1:ClsProductReplacementCost>
    <d2p1:ClsProductReplacementCost>
      <d2p1:DepartmentId>sample string 1</d2p1:DepartmentId>
      <d2p1:ProductId>sample string 2</d2p1:ProductId>
      <d2p1:ReplacementCost>1.1</d2p1:ReplacementCost>
      <d2p1:ReplacementCost2>1.1</d2p1:ReplacementCost2>
      <d2p1:ReplacementCost3>1.1</d2p1:ReplacementCost3>
      <d2p1:ReplacementCost4>1.1</d2p1:ReplacementCost4>
    </d2p1:ClsProductReplacementCost>
  </ProductReplacementCostList>
  <Status>sample string 1</Status>
</AgvProductReplacementCost>