Supplier Data Model

Data Model

Overview

The "Supplier Data Model" is a Data model type used in your webhook endpoint. This model provides information about any SupplierStatusChanged event.

Your webhook endpoint will receive a POST request from MyFatooah that contains an EventType parameter with a value of "4". It is used to notify your system of the supplier account status (approved, rejected). Detailed functionality of how to implement your webhook endpoint is explained in the Webhook section.

Now, we are going to declare the Transaction Data Model properties of your endpoint and its models along with each accepted parameter and possible value.


Request Model

Input ParameterTypeDescription
SupplierCodenumber
SupplierNamestring
SupplierMobilestring
SupplierEmailstring
SupplierStatusstringAPPROVED
REJECTED
KycFeedbackKycFeedback ModelThe admin feedback in case of rejection

KycFeedbackModel

Input ParameterTypeDescription
Commentsstring
RejectReasonsstringthe Rejection Reasons Ids for rejection in a comma-separated string

Sample Message

The below sample JSON message is sent by MyFatoorah to your endpoint.

{
   "EventType":4,
   "Event":"SupplierStatusChanged",
   "DateTime":"04032021212759",
   "CountryIsoCode":"KWT",
   "Data":{
      "SupplierCode":11,
      "SupplierName":"test webhok 10",
      "SupplierMobile":"123456",
      "SupplierEmail":"[email protected]",
      "SupplierStatus":"REJECTED",
      "KycFeedback":{
         "Comments":"missing documents",
         "RejectReasons":"1,5,15"
      }
   }

👍

Signature

To generate the signature of this model, you should order only the above parameters alphabetic with its values then encrypt it by the secret key.

The KycFeedback parameter should not be included in the signature properties.

The following will be a sample string used in generating the signature.

SupplierCode=11,[email protected],SupplierMobile=123456,SupplierName=test webhok 10,SupplierStatus=APPROVED