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 CreateSupplier.
Now, we are going to declare the endpoint and its models along with each accepted parameter and possible value.
Request HeaderAdd "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 Parameter | Type | Description |
|---|---|---|
SupplierName | string | |
Mobile | string | |
string | ||
CommissionValue | number, optional | A fixed value which will be deducted from each transaction. |
CommissionPercentage | number, optional | A percentage value which will be deducted from each transaction. |
IsPercentageOfNetValue | boolean, optional |
|
DepositTerms | string, optional |
|
DepositDay | string, optional | You specify on which day you want the deposit to take place. It is effective only weekly and monthly.
|
BankId | integer, optional | It must be from the bank list received from GetBanks |
BankAccountHolderName | string, optional | It should be string without any special characters or numbers |
BankAccount | string, optional | only numbers |
Iban | string, optional | It should be valid IBAN. |
IsActive | boolean, optional | |
LogoFile | HttpFile Model, optional | |
DisplaySupplierDetails | boolean, optional |
|
BusinessName | string, optional | The name of the business that will be displayed on the invoice. |
BusinessType | number, optional | 1: Home Business |
HttpFile
| Input Parameter | Type | Description |
|---|---|---|
| FileName | string, optional | |
| MediaType | string, optional | |
| Buffer | string, 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 Field | Type | Description |
|---|---|---|
| SupplierCode | integer | |
| SupplierEmail | string | |
| Date | string |
Sample Message
{
"SupplierName": "Lonny Williamson",
"Mobile": "374-415-4939",
"Email": "[email protected]",
"CommissionValue": 0.5,
"IsPercentageOfNetValue": "true",
"CommissionPercentage": 2,
"DepositTerms": "Daily",
"BankId": "1",
"BankAccountHolderName": "Margarita Beer",
"BankAccount": "12345",
"Iban": "KW76KSFM1197681842334764641317",
"IsActive": "false",
"BusinessType": 1
}{
"IsSuccess": true,
"Message": "The Supplier Created Successfully!",
"FieldsErrors": null,
"Data": {
"SupplierCode": 175,
"SupplierEmail": "[email protected]",
"Date": "2024-03-20T12:04:49.3812998+03:00"
}
}Updated 21 days ago
