POST api/Product/AssignProductCategories

Request Information

URI Parameters

None.

Body Parameters

ProductAssociationRequest
NameDescriptionTypeAdditional information
ProductAssociations

Collection of ProductAssociationModel

None.

Request Formats

application/json, text/json

Sample:
{
  "ProductAssociations": [
    {
      "ProductID": 1,
      "CategoryIDs": [
        1,
        2
      ]
    },
    {
      "ProductID": 1,
      "CategoryIDs": [
        1,
        2
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<ProductAssociationRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/POS.DTO.Request">
  <ProductAssociations>
    <ProductAssociationModel>
      <CategoryIDs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:long>1</d4p1:long>
        <d4p1:long>2</d4p1:long>
      </CategoryIDs>
      <ProductID>1</ProductID>
    </ProductAssociationModel>
    <ProductAssociationModel>
      <CategoryIDs xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:long>1</d4p1:long>
        <d4p1:long>2</d4p1:long>
      </CategoryIDs>
      <ProductID>1</ProductID>
    </ProductAssociationModel>
  </ProductAssociations>
</ProductAssociationRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

ResponseDetail
NameDescriptionTypeAdditional information
ResponseCode

integer

None.

ResponseText

string

None.

Response Formats

application/json, text/json

Sample:
{
  "ResponseCode": 1,
  "ResponseText": "sample string 2"
}

application/xml, text/xml

Sample:
<ResponseDetail xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/POS.DTO.DataModel">
  <ResponseCode>1</ResponseCode>
  <ResponseText>sample string 2</ResponseText>
</ResponseDetail>