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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostAddPriceTable |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddPriceTable" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PriceTableNo | String(15) | Yes | External code of the price table |
| DescriptionTable | String(40) | Yes | Price table description |
| IsInactiveValidity | Boolean | No | Flag indicating that the price table validity is inactive |
| ValidityStartDate | DataHora | No | Validity start date |
| ValidityEndDate | DataHora | No | Validity end date |
| ConversionCurrencyNo | String(25) | No | Conversion currency code |
| ItemList | AddPriceTableItemList | No | List of price table items |
| OverwriteIfExists | Boolean | No | Flag 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
Parameter Type Required Description ProductNo String(25) Yes Product code IsInactiveItem Boolean No Flag indicating that the price table item is inactive IsFixedCommission Boolean No Flag indicating if commission is fixed LimitCommission Boolean No Flag indicating if commission is limited PayCommission Boolean No Flag indicating if commission is paid ResetCommission Boolean No Flag indicating if commission is reset SalePrice Float Yes Item sale price
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard WebService response information in method execution |
| PriceTableCode | Integer | Yes | Internal 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
| Code | Message |
|---|---|
| APT‑001 | The provided External Price Table Code parameter (PriceTableNo) already exists! |
| APT‑002 | The provided Validity End Date (ValidityEndDate) parameter is less than the provided Validity Start Date (ValidityStartDate) parameter! |
| APT‑003 | The 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 Type | Example URL |
|---|---|
| POST | {{url_base}}/PostDeletePriceTable |
| Example | http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostDeletePriceTable" |
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| PriceTableNo | String(15) | Yes | External code of the price table |
| ErrorIfNotFound | Boolean | No | Returns error if the informed price table does not exist in the database |
Return
| Parameter | Type | Required | Description |
|---|---|---|---|
| WebServiceReturn | WebServiceReturn | Yes | Standard 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
| Code | Message |
|---|---|
| DPT‑001 | The provided External Price Table Code parameter (PriceTableNo) was not found! |
| DPT‑002 | The informed price table belongs to a customer, therefore it cannot be deleted! |