POST api/Products/AddProductItemToProduct

Adds a product item to product.

Request Information

URI Parameters

None.

Body Parameters

AddProductItemToProductPost
NameDescriptionTypeAdditional information
ProductId

Product Id

integer

None.

Description

Description

string

None.

UserProviderKey

User provider key must be filled or customer id

string

None.

CustomerId

Customer id must be filled or user provider key

integer

None.

IsDisabled

True if product item is disabled

boolean

None.

ProductItemFieldData

The custom product item fields

Collection of ProductItemFieldData

None.

Request Formats

application/json, text/json

Sample:
{
  "ProductId": 1,
  "Description": null,
  "UserProviderKey": null,
  "CustomerId": 1,
  "IsDisabled": false,
  "ProductItemFieldData": [
    {
      "ProductFieldId": 1,
      "StringValue": null,
      "LongValue": null,
      "BoolValue": true,
      "DateValue": null,
      "SelectedItem": null,
      "DoubleValue": null
    }
  ]
}

application/xml, text/xml

Sample:
<AddProductItemToProductPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <CustomerId>1</CustomerId>
  <Description i:nil="true" />
  <IsDisabled>false</IsDisabled>
  <ProductId>1</ProductId>
  <ProductItemFieldData xmlns:d2p1="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.DataStructures">
    <d2p1:ProductItemFieldData>
      <d2p1:BoolValue>true</d2p1:BoolValue>
      <d2p1:DateValue i:nil="true" />
      <d2p1:DoubleValue i:nil="true" />
      <d2p1:LongValue i:nil="true" />
      <d2p1:ProductFieldId>1</d2p1:ProductFieldId>
      <d2p1:SelectedItem i:nil="true" />
      <d2p1:StringValue i:nil="true" />
    </d2p1:ProductItemFieldData>
  </ProductItemFieldData>
  <UserProviderKey i:nil="true" />
</AddProductItemToProductPost>

Response Information

Resource Description

IHttpActionResult

None.