Skip to main content

Suppliers

The PostAddSupplier endpoint is responsible for registering new suppliers.

In the Edata system, we consider three types of suppliers, which can be registered and consulted:

  1. Transporters: Suppliers that perform transportation of products and goods and can be managed by routine CAD056 - Transporter Registration.
  2. Input Suppliers: Those that supply materials and inputs used in production and can be managed by routine CAD053 - Supplier Registration.
  3. Integrated: Suppliers that directly participate in the integrated production chain and can be managed by routine CAD085 - Integrated Registration.

How to register a supplier

HTTP POST Request

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

Input Parameters

ParameterTypeRequiredDescription
SupplierNoString(25)YesExternal code of the Supplier
CorporateNameString(40)YesSupplier name
BusinessNameString(40)YesTrade name of the supplier
ShortNameString(15)NoShort name of the supplier
PhoneString(15)NoPhone number
EmailString(200)NoEmail
RegisterDateDataHoraNoRegistration date
FederalRegisterNoString(14)YesCNPJ (Legal Entity) or CPF (Individual)
StateRegisterNoString(20)YesState registration (Legal Entity) or ID (Individual)
AddressAddressInfoYesObject containing the Supplier address information
SupplierTypeSupplierTypeYesEnumerator with possible values for supplier type: stIntegrator (Integrated), stTransporter (Transporter) or stSupplier (Supplier)
PersonTypePersonTypeYesEnumerator with possible values for Person Type: ptCompany (Legal Entity) or ptPerson (Individual)
IsSelfEmployedBooleanNoFlag indicating that the supplier is Self-Employed
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
SupplierCodeIntegerYesInternal supplier code generated in the MIMS system

Request Example

curl --location 'http://localhost:8080/datasnap/rest/RESTWebServiceMethods/"PostAddSupplier"' \
--header 'Content-Type: application/json' \
--data-raw '{
"SupplierNo": "F12345",
"CorporateName": "Example Supplier",
"BusinessName": "Example Supplier",
"ShortName": "Fornecedor",
"Address": {
"AddressType": "Rua",
"Address": "Antônio Alves",
"Number": "35",
"District": "Vila Universitaria",
"ZIPCode": "17012431",
"City": "BAURU",
"State": "SAO PAULO",
"StateInitials": "SP",
"Country": "BRASIL",
"SubLogisticRegionNo": "001",
"PersonAdressNo": "98765"
},
"SupplierType": "stTransporter",
"Phone": "01431618500",
"Email": "exemplo@edata.com.br",
"RegisterDate": "2025-01-21T00:00:00",
"FederalRegisterNo": "12345678000195",
"StateRegisterNo": "123456789",
"PersonType": "ptCompany",
"IsSelfEmployed": false,
"OverwriteIfExists": true
}'

Response Example

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

🐞 Possible Errors

CodeMessage
ASP‑001The provided External Supplier Code parameter (SupplierNo) already exists!
ASP‑002It is not possible to modify the Supplier Type (SupplierType) of an already registered Supplier!
ASP‑003The "PersonType" parameter was entered as "ptPerson", but the value entered in the "FederalRegisterNo" parameter ([value sent in request]) has more than 11 digits.