POST api/Discount/Upsert

Request Information

URI Parameters

None.

Body Parameters

Collection of DiscountViewModel
NameDescriptionTypeAdditional information
DiscountID

integer

None.

CompanyDetailID

integer

None.

CustomerID

integer

None.

TransactionType

string

None.

InventoryType

string

None.

ItemID

integer

None.

StartDate

date

None.

EndDate

date

None.

MarketPlaceContribution

decimal number

None.

StoreContribution

decimal number

None.

OtherContribution

decimal number

None.

TotalDiscountPer

decimal number

None.

DeactivateDate

date

None.

LoginId

integer

None.

CustomerName

string

None.

ItemCode

string

None.

ItemIDs

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
[
  {
    "DiscountID": 1,
    "CompanyDetailID": 2,
    "CustomerID": 3,
    "TransactionType": "sample string 4",
    "InventoryType": "sample string 5",
    "ItemID": 6,
    "StartDate": "2025-12-16T11:03:58.6436241+00:00",
    "EndDate": "2025-12-16T11:03:58.6436241+00:00",
    "MarketPlaceContribution": 9.0,
    "StoreContribution": 10.0,
    "OtherContribution": 11.0,
    "TotalDiscountPer": 12.0,
    "DeactivateDate": "2025-12-16T11:03:58.644617+00:00",
    "LoginId": 14,
    "CustomerName": "sample string 15",
    "ItemCode": "sample string 16",
    "ItemIDs": [
      1,
      2
    ]
  },
  {
    "DiscountID": 1,
    "CompanyDetailID": 2,
    "CustomerID": 3,
    "TransactionType": "sample string 4",
    "InventoryType": "sample string 5",
    "ItemID": 6,
    "StartDate": "2025-12-16T11:03:58.6436241+00:00",
    "EndDate": "2025-12-16T11:03:58.6436241+00:00",
    "MarketPlaceContribution": 9.0,
    "StoreContribution": 10.0,
    "OtherContribution": 11.0,
    "TotalDiscountPer": 12.0,
    "DeactivateDate": "2025-12-16T11:03:58.644617+00:00",
    "LoginId": 14,
    "CustomerName": "sample string 15",
    "ItemCode": "sample string 16",
    "ItemIDs": [
      1,
      2
    ]
  }
]

application/xml, text/xml

Sample:
<ArrayOfDiscountViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BAL.ViewModel">
  <DiscountViewModel>
    <CompanyDetailID>2</CompanyDetailID>
    <CustomerID>3</CustomerID>
    <CustomerName>sample string 15</CustomerName>
    <DeactivateDate>2025-12-16T11:03:58.644617+00:00</DeactivateDate>
    <DiscountID>1</DiscountID>
    <EndDate>2025-12-16T11:03:58.6436241+00:00</EndDate>
    <InventoryType>sample string 5</InventoryType>
    <ItemCode>sample string 16</ItemCode>
    <ItemID>6</ItemID>
    <ItemIDs xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:long>1</d3p1:long>
      <d3p1:long>2</d3p1:long>
    </ItemIDs>
    <LoginId>14</LoginId>
    <MarketPlaceContribution>9</MarketPlaceContribution>
    <OtherContribution>11</OtherContribution>
    <StartDate>2025-12-16T11:03:58.6436241+00:00</StartDate>
    <StoreContribution>10</StoreContribution>
    <TotalDiscountPer>12</TotalDiscountPer>
    <TransactionType>sample string 4</TransactionType>
  </DiscountViewModel>
  <DiscountViewModel>
    <CompanyDetailID>2</CompanyDetailID>
    <CustomerID>3</CustomerID>
    <CustomerName>sample string 15</CustomerName>
    <DeactivateDate>2025-12-16T11:03:58.644617+00:00</DeactivateDate>
    <DiscountID>1</DiscountID>
    <EndDate>2025-12-16T11:03:58.6436241+00:00</EndDate>
    <InventoryType>sample string 5</InventoryType>
    <ItemCode>sample string 16</ItemCode>
    <ItemID>6</ItemID>
    <ItemIDs xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:long>1</d3p1:long>
      <d3p1:long>2</d3p1:long>
    </ItemIDs>
    <LoginId>14</LoginId>
    <MarketPlaceContribution>9</MarketPlaceContribution>
    <OtherContribution>11</OtherContribution>
    <StartDate>2025-12-16T11:03:58.6436241+00:00</StartDate>
    <StoreContribution>10</StoreContribution>
    <TotalDiscountPer>12</TotalDiscountPer>
    <TransactionType>sample string 4</TransactionType>
  </DiscountViewModel>
</ArrayOfDiscountViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.