Skip to main content

Customer Financial

The PostAddCustomerFinancial endpoint is responsible for registering customer financial information in the MIMS system.


How to register customer financial information

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
CustomerNoString(25)YesExternal code of the customer
CustomerAuxiliaryNoString(25)NoAuxiliary external code of the customer
BranchNoString(25)NoExternal code of the branch
CreditTotalFloatNoTotal credit value of the customer
CreditUsageFloatNoCredit value used by the customer (must be greater than or equal to zero)
CreditEspecialFloatNoSpecial credit value of the customer
CreditEspecialUsageFloatNoSpecial credit value used by the customer
CreditDisponibleFloatNoAvailable credit value of the customer (must be greater than or equal to zero)
OpenDocumentsIntegerNoQuantity of open documents
OverdueDocumentsIntegerNoQuantity of overdue documents
OverdueDocumentsTotalFloatNoTotal value of overdue documents
LastDocumentPaymentDateDataHoraNoLast document payment date
LastDocumentPaymentNoString(40)NoLast paid document number
NextDocumentPaymentDateDataHoraNoNext document payment date
NextDocumentPaymentNoString(40)NoNext document to pay number
CustomerSinceDataHoraNoDate since when the customer is a customer
CheckBlocksActiveCheckBlocksActiveNoActive block type: ckNotAssigned (Not Assigned), ckDelay (Block by Delay), ckInsufficientCredit (Block by Insufficient Credit) or ckBoth (Block by Delay and Insufficient Credit)
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
CustomerFinancialCodeIntegerYesInternal customer financial code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddCustomerFinancial"' \
--header 'Content-Type: application/json' \
--data '{
"CustomerNo": "CUST001",
"CustomerAuxiliaryNo": "",
"BranchNo": "FIL001",
"CreditTotal": 10000.00,
"CreditUsage": 2500.00,
"CreditEspecial": 5000.00,
"CreditEspecialUsage": 0.00,
"CreditDisponible": 7500.00,
"OpenDocuments": 5,
"OverdueDocuments": 2,
"OverdueDocumentsTotal": 1500.00,
"LastDocumentPaymentDate": "2024-01-10T00:00:00",
"LastDocumentPaymentNo": "DOC001",
"NextDocumentPaymentDate": "2024-02-15T00:00:00",
"NextDocumentPaymentNo": "DOC002",
"CustomerSince": "2020-01-01T00:00:00",
"CheckBlocksActive": "ckNotAssigned",
"OverwriteIfExists": true
}'

Response Example

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

🐞 Possible Errors

CodeMessage
ACT‑004The provided "CustomerFinancial" parameter already exists for this "CustomerNo"!