CreateSupplier

Endpoint

Overview

The "CreateSupplier" endpoint is a POST request. It is used to add a new supplier to your Myfatoorah account. Detailed functionality of how to use this endpoint is explained in the Multiple Suppliers section.

The endpoint on Swagger is Supplier_CreateSupplier.

Now, we are going to declare the endpoint and its models along with each accepted parameter and possible value.

📘

Request Header

Add "Authorization": "Bearer {Token}" to request header. Token of demo configuration can be found here.


Request Model

The request is a POST request with the following parameters:

Input ParameterTypeDescription
SupplierNamestring
Mobilestring
Emailstring
CommissionValuenumber, optionalA fixed value that will be deducted from each transaction.
CommissionPercentagenumber, optionalA percentage value that will be deducted from each transaction.
DepositTermsstring, optionalDaily for daily deposits
Weekly for weekly deposits
Monthly for monthly deposits
OnDemand for OnDemand, i.e. on hold deposits
BankIdinteger, optionalIt must be from the bank list API.
BankAccountHolderNamestring, optionalIt should be string without any special characters or numbers
BankAccountstring, optionalonly numbers
Ibanstring, optionalIt should be valid IBAN.
IsActive boolean, optional

Response Model

After viewing the Response Model that you will get as a result of your request, here, you will find full details about the Data Model of this API endpoint. Let's check it and its contents.

Response FieldTypeDescription
SupplierCode integer
SupplierEmail string
Date string

Sample Message

{
  "SupplierName": "name",
  "Mobile": "123456",
  "Email": "[email protected]",
  "CommissionValue": 0,
  "CommissionPercentage": 0,
  "DepositTerms": "Daily",
  "BankId": 1,
  "BankAccountHolderName": "",
  "BankAccount": "",
  "Iban": "",
  "IsActive": true
}
{
    "IsSuccess": true,
    "Message": "The Supplier Created Successfully!",
    "FieldsErrors": null,
    "Data": {
        "SupplierCode": 126,
        "SupplierEmail": "[email protected]",
        "Date": "2020-11-24T10:52:23.4591999+03:00"
    }
}