POST api/Products

Method to add a new product to the system

Request Information

URI Parameters

None.

URI Example

api/Products

Body Parameters

The product data

Oresto.API.Models.POST.Products.Product
NameDescriptionTypeAdditional information
Active

Active or not

boolean

Required

BrandId

Brand id used by the webshop

integer

Foreign key field

Required

CategoryId

Category id used by the webshop

integer

Foreign key field

Required

ContentType

Type of content ex. G, L, Kg, ML

string

Required

Max length: 25

EanCode

EAN-code of the product

string

EAN code

Max length: 250

Localizations

Localizations for the product

Collection of Oresto.API.Models.POST.Products.Product+Localization

None.

MultiplierAbbreviation

Information about the multiplier content type ex. L, Kg

string

Max length: 25

MultiplierAmount

Multiplier of the products multiplier content type, for instance a product can be 1 piece (content-type) consisting of 5 KG (multiplier content-type).

decimal number

Range: inclusive between 0.0001 and 100000000000000

OnOrder

Product is only available on order

boolean

Required

OrderQuantity

Step size of order. All orders must be a multiple of this. Only available for products with units that support partial amounts (eg: kg). 0 means all amounts are allowed. Defaults to 1.

decimal number

Range: inclusive between 0 and 1E+15

ProducerId

Producer id used by the webshop

integer

Foreign key field

PromoValidFrom

Starting date when a promo becomes active (TimeZone BE), if not provided UTC will be used

date

Date range: between 1753-01-01 and 9999-12-31 (ISO 8601 format)

PromoValidFromUtc

Starting date when a promo becomes active (TimeZone UTC/GMT)

date

Date range: between 1753-01-01 and 9999-12-31 (ISO 8601 format)

PromoValidUntil

Date when the promo should be void (TimeZone BE), if not provided UTC will be used

date

Date range: between 1753-01-01 and 9999-12-31 (ISO 8601 format)

PromoValidUntilUtc

Date when the promo should be void (TimeZone UTC/GMT)

date

Date range: between 1753-01-01 and 9999-12-31 (ISO 8601 format)

SalesPriceList

The list sales price

decimal number

Range: inclusive between 0 and 1E+16

SalesPriceListPromo

The list sales price during a promotion

decimal number

Range: inclusive between 0 and 1E+16

StorageConditionId

The ID of the storage condition

integer

Foreign key field

Leave blank for 'other'

Supplier

Supplier information

Oresto.API.Models.POST.Products.Supplier

None.

TemporarilyUnavailable

Whether or not the product is temporarily unavailable. If you wish to provide more information about this unavailability, use the field in the property.

boolean

None.

TemporaryReplacementArticleCode

Article code of the optional replacement product for a temporarily unavailable product.

string

None.

TotalContent

Total content ex. 100 G, 1 KG, 100 ml

decimal number

Range: inclusive between 0 and 100000000000000

UnitArticleCode

In case of a package: the article code of the unit product

string

Max length: 50

UnitSalesPriceAbbreviation

The ID for the unit sales price. ex. kg, L, pc

string

Primary key field

Required

Max length: 25

UnitsPerPackage

In case of a package: how many units / package

integer

None.

VatPercentage

VAT percentage

integer

Required

WholesalerArticleNumber

Article code for the product defined by the wholesaler

string

Primary key field

Required

Max length: 50

WholesalerProductLocalizations

Localizations for the product provided by the wholesaler

Collection of Oresto.API.Models.POST.Products.Product+WholesalerProductLocalization

None.

Request Formats

application/json, text/json

Sample:
{
  "WholesalerArticleNumber": "sample string 1",
  "EanCode": "sample string 2",
  "CategoryId": 3,
  "StorageConditionId": 1,
  "BrandId": 4,
  "ProducerId": 1,
  "TotalContent": 1.0,
  "ContentType": "sample string 5",
  "MultiplierAmount": 1.0,
  "MultiplierAbbreviation": "sample string 6",
  "SalesPriceList": 1.0,
  "SalesPriceListPromo": 1.0,
  "UnitSalesPriceAbbreviation": "sample string 7",
  "OnOrder": true,
  "PromoValidFrom": "2025-12-05T06:52:19.266452+01:00",
  "PromoValidFromUtc": "2025-12-05T06:52:19.266452+01:00",
  "PromoValidUntil": "2025-12-05T06:52:19.266452+01:00",
  "PromoValidUntilUtc": "2025-12-05T06:52:19.266452+01:00",
  "VatPercentage": 9,
  "UnitsPerPackage": 1,
  "UnitArticleCode": "sample string 10",
  "Supplier": {
    "Id": 1,
    "ArticleCode": "sample string 2",
    "Active": true
  },
  "Active": true,
  "TemporarilyUnavailable": true,
  "TemporaryReplacementArticleCode": "sample string 13",
  "Localizations": [
    {
      "LanguageCode": "sample string 1",
      "Description": "sample string 2",
      "DescriptionLong": "sample string 3",
      "DescriptionShort": "sample string 4",
      "Remarks": "sample string 5",
      "Packaging": "sample string 6"
    },
    {
      "LanguageCode": "sample string 1",
      "Description": "sample string 2",
      "DescriptionLong": "sample string 3",
      "DescriptionShort": "sample string 4",
      "Remarks": "sample string 5",
      "Packaging": "sample string 6"
    }
  ],
  "WholesalerProductLocalizations": [
    {
      "LanguageCode": "sample string 1",
      "PromoDescription": "sample string 2",
      "Information": "sample string 3"
    },
    {
      "LanguageCode": "sample string 1",
      "PromoDescription": "sample string 2",
      "Information": "sample string 3"
    }
  ],
  "OrderQuantity": 14.0
}

application/xml, text/xml

Sample:
<Product xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.POST.Products">
  <Active>true</Active>
  <BrandId>4</BrandId>
  <CategoryId>3</CategoryId>
  <ContentType>sample string 5</ContentType>
  <EanCode>sample string 2</EanCode>
  <Localizations>
    <Product.Localization>
      <Description>sample string 2</Description>
      <DescriptionLong>sample string 3</DescriptionLong>
      <DescriptionShort>sample string 4</DescriptionShort>
      <LanguageCode>sample string 1</LanguageCode>
      <Packaging>sample string 6</Packaging>
      <Remarks>sample string 5</Remarks>
    </Product.Localization>
    <Product.Localization>
      <Description>sample string 2</Description>
      <DescriptionLong>sample string 3</DescriptionLong>
      <DescriptionShort>sample string 4</DescriptionShort>
      <LanguageCode>sample string 1</LanguageCode>
      <Packaging>sample string 6</Packaging>
      <Remarks>sample string 5</Remarks>
    </Product.Localization>
  </Localizations>
  <MultiplierAbbreviation>sample string 6</MultiplierAbbreviation>
  <MultiplierAmount>1</MultiplierAmount>
  <OnOrder>true</OnOrder>
  <OrderQuantity>14</OrderQuantity>
  <ProducerId>1</ProducerId>
  <PromoValidFrom>2025-12-05T06:52:19.266452+01:00</PromoValidFrom>
  <PromoValidFromUtc>2025-12-05T06:52:19.266452+01:00</PromoValidFromUtc>
  <PromoValidUntil>2025-12-05T06:52:19.266452+01:00</PromoValidUntil>
  <PromoValidUntilUtc>2025-12-05T06:52:19.266452+01:00</PromoValidUntilUtc>
  <SalesPriceList>1</SalesPriceList>
  <SalesPriceListPromo>1</SalesPriceListPromo>
  <StorageConditionId>1</StorageConditionId>
  <Supplier>
    <Active>true</Active>
    <ArticleCode>sample string 2</ArticleCode>
    <Id>1</Id>
  </Supplier>
  <TemporarilyUnavailable>true</TemporarilyUnavailable>
  <TemporaryReplacementArticleCode>sample string 13</TemporaryReplacementArticleCode>
  <TotalContent>1</TotalContent>
  <UnitArticleCode>sample string 10</UnitArticleCode>
  <UnitSalesPriceAbbreviation>sample string 7</UnitSalesPriceAbbreviation>
  <UnitsPerPackage>1</UnitsPerPackage>
  <VatPercentage>9</VatPercentage>
  <WholesalerArticleNumber>sample string 1</WholesalerArticleNumber>
  <WholesalerProductLocalizations>
    <Product.WholesalerProductLocalization>
      <Information>sample string 3</Information>
      <LanguageCode>sample string 1</LanguageCode>
      <PromoDescription>sample string 2</PromoDescription>
    </Product.WholesalerProductLocalization>
    <Product.WholesalerProductLocalization>
      <Information>sample string 3</Information>
      <LanguageCode>sample string 1</LanguageCode>
      <PromoDescription>sample string 2</PromoDescription>
    </Product.WholesalerProductLocalization>
  </WholesalerProductLocalizations>
</Product>

application/x-www-form-urlencoded

Sample:
WholesalerArticleNumber=value&EanCode=value&CategoryId=value&StorageConditionId=value&BrandId=value&ProducerId=value&TotalContent=value&ContentType=value&MultiplierAmount=value&MultiplierAbbreviation=value&SalesPriceList=value&SalesPriceListPromo=value&UnitSalesPriceAbbreviation=value&OnOrder=value&PromoValidFrom=value&PromoValidFromUtc=value&PromoValidUntil=value&PromoValidUntilUtc=value&VatPercentage=value&UnitsPerPackage=value&UnitArticleCode=value&Supplier=value&Active=value&TemporarilyUnavailable=value&TemporaryReplacementArticleCode=value&Localizations=value&WholesalerProductLocalizations=value&OrderQuantity=value

Response Information

Resource Description

A wrapper class with information about the new entity

Oresto.API.Models.POST.Products.ProductData
NameDescriptionTypeAdditional information
Errors

Possible errors that were experienced when processing the request

Collection of string

None.

ModelStateErrors

Possible model errors that were experienced when validating the data

Collection of Oresto.API.Models.Shared.ModelStateError

None.

ProductId

Newly created product id

integer

None.

RequestInformation

Additional information about the request

Oresto.API.Models.Shared.RequestInformation

None.

Response Formats

application/json, text/json

Sample:
{
  "ProductId": 1,
  "RequestInformation": {
    "RequestDuration": 1,
    "WholesalerId": 2,
    "UserId": 3
  },
  "ModelStateErrors": [
    {
      "Key": "sample string 1",
      "Message": "sample string 2",
      "Exception": "sample string 3"
    },
    {
      "Key": "sample string 1",
      "Message": "sample string 2",
      "Exception": "sample string 3"
    }
  ],
  "Errors": [
    "sample string 1",
    "sample string 2"
  ]
}

application/xml, text/xml

Sample:
<ProductData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.POST.Products">
  <Errors xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Errors>
  <ModelStateErrors xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
    <ModelStateError>
      <Exception>sample string 3</Exception>
      <Key>sample string 1</Key>
      <Message>sample string 2</Message>
    </ModelStateError>
    <ModelStateError>
      <Exception>sample string 3</Exception>
      <Key>sample string 1</Key>
      <Message>sample string 2</Message>
    </ModelStateError>
  </ModelStateErrors>
  <RequestInformation xmlns="http://schemas.datacontract.org/2004/07/Oresto.API.Models.Shared">
    <RequestDuration>1</RequestDuration>
    <UserId>3</UserId>
    <WholesalerId>2</WholesalerId>
  </RequestInformation>
  <ProductId>1</ProductId>
</ProductData>