Skip to main content

Price Table


Price Table Registration

The PostAddPriceTable endpoint is responsible for registering a new price table in the MIMS system and can be viewed on screen CAD084.


How to register a price table

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostAddPriceTable
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddPriceTable"

Input Parameters

ParameterTypeRequiredDescription
PriceTableNoString(15)YesExternal code of the price table
DescriptionTableString(40)YesPrice table description
IsInactiveValidityBooleanNoFlag indicating that the price table validity is inactive
ValidityStartDateDataHoraNoValidity start date
ValidityEndDateDataHoraNoValidity end date
ConversionCurrencyNoString(25)NoConversion currency code
ItemListAddPriceTableItemListNoList of price table items
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

📝 AddPriceTableItemList Object

The AddPriceTableItemList object represents a list with price table items.

Input Parameters

ParameterTypeRequiredDescription
ProductNoString(25)YesProduct code
IsInactiveItemBooleanNoFlag indicating that the price table item is inactive
IsFixedCommissionBooleanNoFlag indicating if commission is fixed
LimitCommissionBooleanNoFlag indicating if commission is limited
PayCommissionBooleanNoFlag indicating if commission is paid
ResetCommissionBooleanNoFlag indicating if commission is reset
SalePriceFloatYesItem sale price

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
PriceTableCodeIntegerYesInternal price table code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddPriceTable"' \
--header 'Content-Type: application/json' \
--data '{
"PriceTableNo": "TAB001",
"DescriptionTable": "Tabela de preço Base 2025",
"IsInactiveValidity": false,
"ValidityStartDate": "2025-02-01T00:00:00Z",
"ValidityEndDate": "2025-12-31T23:59:59Z",
"ConversionCurrencyNo": "BRL",
"OverwriteIfExists": true,
"ItemList":[
{
"ProductNo": "PROD001",
"IsInactiveItem": false,
"IsFixedCommission": true,
"LimitCommission": true,
"PayCommission": true,
"ResetCommission": true,
"SalePrice": 15
}
]
}'

Exemplo de Response

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
},
"PriceTableCode": 789
}

🐞 Possible Errors

CodeMessage
APT‑001The provided External Price Table Code parameter (PriceTableNo) already exists!
APT‑002The provided Validity End Date (ValidityEndDate) parameter is less than the provided Validity Start Date (ValidityStartDate) parameter!
APT‑003The provided External Conversion Currency Code parameter (ConversionCurrencyNo) was not found!


Price Table Deletion

The PostDeletePriceTable endpoint is responsible for executing the deletion of a price table and its items in MIMS.


How to delete a price table

HTTP POST Request

Request TypeExample URL
POST{{url_base}}/PostDeletePriceTable
Examplehttp://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeletePriceTable"

Input Parameters

ParameterTypeRequiredDescription
PriceTableNoString(15)YesExternal code of the price table
ErrorIfNotFoundBooleanNoReturns error if the informed price table does not exist in the database

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution

Request Example

curl --location --request POST '{{url_base}}/PostDeletePriceTable' \
--header 'Content-Type: application/json;charset=UTF-8' \
--data-raw '{
"PriceTableNo": "TP001",
"ErrorIfNotFound": true
}'

Response Example

{
"WebServiceReturn": {
"Status": "wrsSuccess",
"ErrorCode": "",
"Message": "",
"Actor": "",
"ReturnQuestion": null
}
}

🐞 Possible Errors

CodeMessage
DPT‑001The provided External Price Table Code parameter (PriceTableNo) was not found!
DPT‑002The informed price table belongs to a customer, therefore it cannot be deleted!