POST api/ProductCost/CreateOrGet

Crea en la base productCost recibida si no existe, si existe devuelve el Id.

Request Information

URI Parameters

None.

Body Parameters

ViewModel de productCost a crear

ProductCostViewModel
NameDescriptionTypeAdditional information
Id

string

None.

OriginProductCostName

string

Required

Description

string

None.

Folder

string

None.

Code

integer

None.

CreationDate

date

None.

UserId

string

None.

LastModificationDate

date

None.

ArrivalDate

date

None.

OriginCostAmount

decimal number

None.

AverageOriginCostAmount

decimal number

None.

FreightInsuranceAmount

decimal number

None.

FreightInsurancePercentage

decimal number

None.

PortAndBankChargesAmount

decimal number

None.

PortAndBankChargesPercentage

decimal number

None.

MontevideoCifCostAmount

decimal number

None.

SurchargesAmount

decimal number

None.

SurchargesPercentage

decimal number

None.

InternalCostWithOutChargesAmount

decimal number

None.

InternalCostWithChargesAmount

decimal number

None.

InternalChargesAmount

decimal number

None.

InternalChargesPercentage

decimal number

None.

FinancingAmount

decimal number

None.

FinancingPercentage

decimal number

None.

DiscountForPromptPaymentAmount

decimal number

None.

DiscountForPromptPaymentPercentage

decimal number

None.

FinalProductCostAmount

decimal number

None.

MarginAmount

decimal number

None.

MarginPercentage

decimal number

None.

RoyaltyAmount

decimal number

None.

RoyaltyPercentage

decimal number

None.

PublicRetailPriceAmount

decimal number

None.

OtherCostsVNAAmount

decimal number

None.

OtherCostsVNAPercentage

decimal number

None.

Comments

Collection of ProductCostCommentViewModel

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "sample string 1",
  "OriginProductCostName": "sample string 2",
  "Description": "sample string 3",
  "Folder": "sample string 4",
  "Code": 1,
  "CreationDate": "2026-11-09T16:42:09.1702872-03:00",
  "UserId": "sample string 5",
  "LastModificationDate": "2026-11-09T16:42:09.1702872-03:00",
  "ArrivalDate": "2026-11-09T16:42:09.1702872-03:00",
  "OriginCostAmount": 6.1,
  "AverageOriginCostAmount": 7.1,
  "FreightInsuranceAmount": 8.1,
  "FreightInsurancePercentage": 9.1,
  "PortAndBankChargesAmount": 10.1,
  "PortAndBankChargesPercentage": 11.1,
  "MontevideoCifCostAmount": 12.1,
  "SurchargesAmount": 13.1,
  "SurchargesPercentage": 14.1,
  "InternalCostWithOutChargesAmount": 15.1,
  "InternalCostWithChargesAmount": 16.1,
  "InternalChargesAmount": 17.1,
  "InternalChargesPercentage": 18.1,
  "FinancingAmount": 19.1,
  "FinancingPercentage": 20.1,
  "DiscountForPromptPaymentAmount": 21.1,
  "DiscountForPromptPaymentPercentage": 22.1,
  "FinalProductCostAmount": 23.1,
  "MarginAmount": 24.1,
  "MarginPercentage": 25.1,
  "RoyaltyAmount": 26.1,
  "RoyaltyPercentage": 27.1,
  "PublicRetailPriceAmount": 28.1,
  "OtherCostsVNAAmount": 29.1,
  "OtherCostsVNAPercentage": 30.1,
  "Comments": [
    {
      "ProductCostId": "sample string 1",
      "ParentCommentId": 1,
      "UserId": "sample string 2",
      "Date": "2026-11-09T16:42:09.1702872-03:00",
      "Comment": "sample string 4"
    },
    {
      "ProductCostId": "sample string 1",
      "ParentCommentId": 1,
      "UserId": "sample string 2",
      "Date": "2026-11-09T16:42:09.1702872-03:00",
      "Comment": "sample string 4"
    }
  ]
}

application/xml, text/xml

Sample:
<ProductCostViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Tempo.Core.WebAPI.ViewModels">
  <ArrivalDate>2026-11-09T16:42:09.1702872-03:00</ArrivalDate>
  <AverageOriginCostAmount>7.1</AverageOriginCostAmount>
  <Code>1</Code>
  <Comments>
    <ProductCostCommentViewModel>
      <Comment>sample string 4</Comment>
      <Date>2026-11-09T16:42:09.1702872-03:00</Date>
      <ParentCommentId>1</ParentCommentId>
      <UserId>sample string 2</UserId>
      <ProductCostId>sample string 1</ProductCostId>
    </ProductCostCommentViewModel>
    <ProductCostCommentViewModel>
      <Comment>sample string 4</Comment>
      <Date>2026-11-09T16:42:09.1702872-03:00</Date>
      <ParentCommentId>1</ParentCommentId>
      <UserId>sample string 2</UserId>
      <ProductCostId>sample string 1</ProductCostId>
    </ProductCostCommentViewModel>
  </Comments>
  <CreationDate>2026-11-09T16:42:09.1702872-03:00</CreationDate>
  <Description>sample string 3</Description>
  <DiscountForPromptPaymentAmount>21.1</DiscountForPromptPaymentAmount>
  <DiscountForPromptPaymentPercentage>22.1</DiscountForPromptPaymentPercentage>
  <FinalProductCostAmount>23.1</FinalProductCostAmount>
  <FinancingAmount>19.1</FinancingAmount>
  <FinancingPercentage>20.1</FinancingPercentage>
  <Folder>sample string 4</Folder>
  <FreightInsuranceAmount>8.1</FreightInsuranceAmount>
  <FreightInsurancePercentage>9.1</FreightInsurancePercentage>
  <Id>sample string 1</Id>
  <InternalChargesAmount>17.1</InternalChargesAmount>
  <InternalChargesPercentage>18.1</InternalChargesPercentage>
  <InternalCostWithChargesAmount>16.1</InternalCostWithChargesAmount>
  <InternalCostWithOutChargesAmount>15.1</InternalCostWithOutChargesAmount>
  <LastModificationDate>2026-11-09T16:42:09.1702872-03:00</LastModificationDate>
  <MarginAmount>24.1</MarginAmount>
  <MarginPercentage>25.1</MarginPercentage>
  <MontevideoCifCostAmount>12.1</MontevideoCifCostAmount>
  <OriginCostAmount>6.1</OriginCostAmount>
  <OriginProductCostName>sample string 2</OriginProductCostName>
  <OtherCostsVNAAmount>29.1</OtherCostsVNAAmount>
  <OtherCostsVNAPercentage>30.1</OtherCostsVNAPercentage>
  <PortAndBankChargesAmount>10.1</PortAndBankChargesAmount>
  <PortAndBankChargesPercentage>11.1</PortAndBankChargesPercentage>
  <PublicRetailPriceAmount>28.1</PublicRetailPriceAmount>
  <RoyaltyAmount>26.1</RoyaltyAmount>
  <RoyaltyPercentage>27.1</RoyaltyPercentage>
  <SurchargesAmount>13.1</SurchargesAmount>
  <SurchargesPercentage>14.1</SurchargesPercentage>
  <UserId>sample string 5</UserId>
</ProductCostViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

De ser exitosa la creación retorna 200. De lo contrario retorna 400

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.