Skip to main content

Sellers

The PostAddSeller endpoint is responsible for registering a new seller in the MIMS system and can be viewed on screen CAD054.


How to register a seller

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
SellerNoString(25)YesExternal code of the seller
CorporateNameString(40)YesSeller name
BusinessNameString(40)YesTrade name of the seller
ShortNameString(15)NoShort name of the seller
AddressAddressInfoYesObject containing the seller address information
PhoneString(15)NoPhone number
EmailString(200)NoEmail
FoundationDateDataNoBirth date
RegisterDateDataHoraNoRegistration date
FederalRegisterNoString(14)YesCNPJ (Legal Entity) or CPF (Individual)
StateRegisterNoString(20)YesState registration (Legal Entity) or ID (Individual)
PersonTypePersonTypeYesEnumerator with possible values for Person Type: ptCompany (Legal Entity) or ptPerson (Individual)
CommissionFloatNoSeller commission percentage
InternalCodeNoString(25)NoSeller Integration Code
IsInactiveBooleanNoFlag indicating that the seller is inactive
OverwriteIfExistsBooleanNoFlag indicating that data should be overwritten if the record already exists
Note
  • The requirement of the Address parameter is defined by configuration. By default, this parameter is required. To change this behavior, consult the responsible consultant.
  • The value provided in the FederalRegisterNo parameter must respect the size according to the person type specified in the PersonType parameter:
    • 14 characters when PersonType = ptCompany (corresponds to CNPJ)
    • 11 characters when PersonType = ptPerson (corresponds to CPF)

Return

ParameterTypeRequiredDescription
WebServiceReturnWebServiceReturnYesStandard WebService response information in method execution
SellerCodeIntegerYesInternal seller code generated in the MIMS system

Request Example

curl --location 'http://seuIPePorta/datasnap/rest/RESTWebServiceMethods/"PostAddSeller"' \
--header 'Content-Type: application/json' \
--data '{
"SellerNo": "VND12345",
"CorporateName": "Vendedor Exemplo LTDA",
"BusinessName": "Vendedor Exemplo",
"ShortName": "VendEx",
"Address": {
"AddressType": "Rua",
"Address": "Rua Exemplo",
"Number": "100",
"District": "Centro",
"ZIPCode": "01000000",
"City": "Cidade Exemplo",
"State": "São Paulo",
"StateInitials": "SP",
"Country": "Brasil"
},
"Phone": "11999990000",
"Email": "vendedor@example.com",
"FoundationDate": "2022-01-01",
"RegisterDate": "2022-01-15T14:30:00",
"FederalRegisterNo": "12345678000190",
"StateRegisterNo": "123456789",
"PersonType": "ptCompany",
"Commission": 5.5,
"InternalCodeNo": "INT123",
"IsInactive": false,
"OverwriteIfExists": true
}'

Response Example

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

🐞 Possible Errors

CodeMessage
ASL‑001The provided External Seller Code parameter (SellerNo) already exists!