PUT api/Products/{id}

Updates a product.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

The id of the product to update.

globally unique identifier

Required

Body Parameters

The product model to update with.

ProductDto
NameDescriptionTypeAdditional information
Id

globally unique identifier

None.

Name

string

Required

String length: inclusive between 0 and 250

ComplianceReference

string

String length: inclusive between 0 and 50

Description

string

None.

ProductCode

string

Required

String length: inclusive between 0 and 50

CreationDate

date

Required

ExpiryDate

date

None.

SortIndex

integer

None.

TemplateId

globally unique identifier

Required

IsRequired

boolean

Required

VatApplicable

boolean

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "335e89a1-5e97-4d3e-9bd4-a6686e6a8322",
  "Name": "sample string 2",
  "ComplianceReference": "sample string 3",
  "Description": "sample string 4",
  "ProductCode": "sample string 5",
  "CreationDate": "2025-12-11T17:30:14.7337163Z",
  "ExpiryDate": "2025-12-11T17:30:14.7337163Z",
  "SortIndex": 1,
  "TemplateId": "3e764703-7721-4fdf-893c-03cbb88185ad",
  "IsRequired": true,
  "VatApplicable": true
}

application/xml, text/xml

Sample:
<ProductDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Aardvark.Template.Models">
  <ComplianceReference>sample string 3</ComplianceReference>
  <CreationDate>2025-12-11T17:30:14.7337163+00:00</CreationDate>
  <Description>sample string 4</Description>
  <ExpiryDate>2025-12-11T17:30:14.7337163+00:00</ExpiryDate>
  <Id>335e89a1-5e97-4d3e-9bd4-a6686e6a8322</Id>
  <IsRequired>true</IsRequired>
  <Name>sample string 2</Name>
  <ProductCode>sample string 5</ProductCode>
  <SortIndex>1</SortIndex>
  <TemplateId>3e764703-7721-4fdf-893c-03cbb88185ad</TemplateId>
  <VatApplicable>true</VatApplicable>
</ProductDto>

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

Response Information

Resource Description

None.