Auth1
API key validation and onboarding.
Use this reference to authenticate with your API key, manage client records, and create invoices. The page is structured in a standard API-reference format: overview first, then resources, authentication, and endpoint-by-endpoint examples.
The API is organized into clear resource groups so developers can move from setup to production use quickly.
API key validation and onboarding.
Create, update, delete, and list client records.
List invoices and create invoice variants, credit notes, and debit notes.
You can get the live API key as follows:
Use these headers for authenticated JSON requests unless an endpoint says otherwise.
5747324adfb***f8d374a37c612aapplication/json/api_doc/users/validate_user_api_key| Key | Type | Required | Description |
|---|---|---|---|
| api_key | string | yes | API key (take from website or Fatoora support) |
{"api_key":"5747324adfb82***fbf8d374a37c612a"}{
"response": "Validated successfully",
"api_key": "5747324adfb8***08efbf8d374a37c612a",
"status": true
}{
"message": "Invalid API key",
"status": false
}/api_doc/client/get_all| Key | Type | Required | Description |
|---|---|---|---|
| page | int | no | Used for Pagination |
| client_type | int | no | Used for Filtering |
| search_key | string | no | Search by name/mobile/email |
{
"page": 1,
"search_key": "IMC"
}{
"response": {
"pagination_meta": {
"current_page": 1,
"pages": 1,
"per_page": 10,
"total": 1
},
"users": [
{
"client_type": 1,
"client_send_mail": 1
"address": "abc,xyz",
"building_number": "1234",
"city": "Riyadh",
"district": "Riyadh",
"street_name": "Riyadh",
"postal_code": "12345",
"category_title": "Technology",
"company_vat_number": "3213213213213213",
"country_code": "+966",
"email_id": "imc@gmail.com",
"full_name": "IMC Compay",
"id": 225,
"mobile_number": "555999120"
}
]
},
"status": true
}/api_doc/client/create| Key | Type | Required | Description |
|---|---|---|---|
| first_name | string | Yes | Client's first name or Company name |
| last_name | string | No | Client's last name |
| email_id | string | Yes | Email address (must be unique) |
| country_code | string | Yes | Phone country code (e.g., +966) |
| mobile_number | string | Yes | Mobile number (no spaces or dashes) |
| company_registration_number | string | Conditional(Yes for Business) | Business registration number |
| company_vat_number | string | Conditional(Yes for Business) | VAT number for the company |
| category_id | string | No | Comma-separated list of category IDs |
| client_type | integer (1 or 2) | Yes | 1 = Business, 2 = Individual |
| address | string | Conditional(Yes for Business) | Client address |
| latitude | string | Conditional(Yes for Business) | Latitude for geolocation |
| longitude | string | Conditional(Yes for Business) | Longitude for geolocation |
| client_send_mail | integer (1 or 2) | Yes | 1 = Yes, 0 = No |
| building_number | string | Conditional(Yes for Business) | Building Number |
| postal_code | string | Conditional(Yes for Business) | Postal code |
| district | string | Conditional(Yes for Business) | District Name |
| city | string | Conditional(Yes for Business) | city |
| street_name | string | Conditional(Yes for Business) | Street Name |
{
"first_name": "imc",
"last_name": "company",
"email_id": "imc@gmail.com",
"country_code": "+966",
"mobile_number": "555999120",
"company_registration_number": "3213213213213213",
"company_vat_number":"3213213213213213",
"category_id": "1,2",
"client_type": 1,
"client_send_mail": 1,
"address": "abc,xyz",
"building_number": "1234",
"city": "Riyadh",
"district": "Riyadh",
"street_name": "Riyadh",
"postal_code": "12345",
"latitude": "1.1",
"longitude": "1.1"
}{
"response": {
"message": "User created successfully",
"user_id": 274
},
"status": true
}/api_doc/client/update| Key | Type | Required | Description |
|---|---|---|---|
| id | int | Yes | Client's unique id(given in listing api) |
| first_name | string | Yes | Client's first name |
| last_name | string | Yes | Client's last name |
| email_id | string | Yes | Email address (must be unique) |
| country_code | string | Yes | Phone country code (e.g., +966) |
| mobile_number | string | Yes | Mobile number (no spaces or dashes) |
| company_registration_number | string | Conditional(Yes for Business) | Business registration number |
| company_vat_number | string | Conditional(Yes for Business) | VAT number for the company |
| category_id | string | No | Comma-separated list of category IDs |
| client_type | string (1 or 2) | Yes | 1 = Business, 2 = Individual |
| address | string | Conditional(Yes for Business) | Client address |
| latitude | string | Conditional(Yes for Business) | Latitude for geolocation |
| longitude | string | Conditional(Yes for Business) | Longitude for geolocation |
| client_send_mail | integer (1 or 2) | Yes | 1 = Yes, 0 = No |
| building_number | string | Conditional(Yes for Business) | Building Number |
| postal_code | string | Conditional(Yes for Business) | Postal code |
| district | string | Conditional(Yes for Business) | District Name |
| city | string | Conditional(Yes for Business) | city |
| street_name | string | Conditional(Yes for Business) | Street Name |
{
"id": "85",
"first_name": "imc",
"last_name": "company",
"mobile_number": "555999120",
"email_id": "imc@gmail.com",
"country_code": "+966",
"company_registration_number": "3213213213213213",
"company_vat_number":"3213213213213213",
"client_type": 1,
"category_id": "1,2",
"client_send_mail": 1,
"address": "abc,xyz",
"building_number": "1234",
"city": "Riyadh",
"district": "Riyadh",
"street_name": "Riyadh",
"postal_code": "12345",
"latitude": "1.1",
"longitude": "1.1"
}{
"response": {
"message": "User updated successfully",
"user_id": 85
},
"status": true
}/api_doc/client/delete/85{
"response": {
"message": "User deleted successfully"
},
"status": true
}/api_doc/invoice/get_all| Key | Type | Required | Description |
|---|---|---|---|
| page | int | no | Used for Pagination |
| search_key | string | no | search by name/reference number/invoice number |
{
"page": 1,
"search_key":"HTG"
}{
"response": {
"invoices": [
{
"company_name": "I - M - C",
"country_code": "+966",
"created_on": "2025-02-21 08:10:55",
"date_time": "2025-02-21 13:40:47",
"email_id": "imc2@imc.imc",
"first_name": "imc",
"id": 449,
"invoice": "http://43.205.18.14:8085/download/U86-13.pdf",
"invoice_number": "U86-13",
"invoice_type": 1,
"last_name": "tech",
"mobile_number": "555999120",
"reference_number": "HTGRDFDSCHTFC",
"total": 3.9984,
"user_id": 86,
"user_invoice_number": "13"
}
],
"pagination_meta": {
"current_page": 1,
"pages": 2,
"per_page": 10,
"total": 1
}
},
"status": true
}/api_doc/invoice/get_byid/732{
"response": {
"buyer_address": null,
"buyer_client_type": null,
"buyer_contact_number": null,
"buyer_country_code": null,
"buyer_cr_number": null,
"buyer_email_id": "girish@gmail.com",
"buyer_name": null,
"buyer_vat_number": null,
"client_id": 0,
"created_from": 2,
"created_on": "2025-06-11 06:07:43",
"created_type": "",
"date_time": "2025-06-11 12:14:39",
"discount": 500.0,
"footer_text": "sssss",
"id": 732,
"invoice": "https://simplefatoora.oss-me-central-1.aliyuncs.com/invoice/U316-197-5696819b.pdf",
"invoice_details": [
{
"description": "Item 2a ",
"discount": 500.0,
"discount_percent": 5.0,
"id": 866,
"invoice_id": 732,
"net_amount": 5000.0,
"product_id": "#34rfgb",
"quantity": 10,
"total": 10925.0,
"unit_price": 1000.0,
"vat": 1425.0,
"vat_percent": 15.0
}
],
"invoice_number": "#128888",
"invoice_type": 0,
"logo": "http://35.154.4.154/images/uploads/ondeen//0992a1fc-1465-487e-9a5a-edd8ee02d299.png",
"notes": "dddddddd",
"parent_date_time": null,
"parent_invoice_number": null,
"qrcode": "https://simplefatoora.oss-me-central-1.aliyuncs.com/invoice/fed308b3-a8e1-4919-b7b7-084c1625251a.png",
"reference_number": "#128888",
"seller_address": "Imcrinox Technologies Pvt Ltd, Electronics City Phase 1, Electronic City, Bengaluru, Karnataka, India",
"seller_client_type": null,
"seller_contact_number": "555999120",
"seller_country_code": "+966",
"seller_cr_number": "300000432310003",
"seller_email_id": "bhshrinidhi@gmail.com",
"seller_name": "SBH Company",
"seller_vat_number": "300000432310003",
"status": 1,
"sub_total": 10000.0,
"total": 10925.0,
"user_id": 316,
"user_invoice_number": "197",
"vat": 1425.0,
"vat_percent": 15.0
},
"status": true
}/api_doc/invoice/create| Key | Type | Required | Description |
|---|---|---|---|
| client_id | int | Conditional | Unique ID of the client(get from Get All Client api with client_type=2) |
| client_type | int | Yes | 2 |
| client_name | string | Conditional | Client's full name or business name |
| client_contact_number | string | Conditional | Client’s phone number (without country code) |
| client_country_code | string | Conditional | Phone country code (e.g., +966) |
| client_email_id | string | Conditional | Email address of the client |
| invoice_type | int | Yes | 0 |
| date_time | string (YYYY-MM-DD HH:MM:SS) | Yes | Date and time of invoice generation |
| reference_number | string | No | External reference number for the invoice |
| logo | string (URL) | No | Optional logo for the invoice(will be taken from profile if not provieded) |
| notes | string | No | Additional notes for the invoice(will be taken from profile if not provieded) |
| footer_text | string | No | Custom footer/Terms text to appear on invoice(will be taken from profile if not provieded) |
| invoice_detail | array of objects | Yes | List of invoice line items |
| ↳ description | string | Yes | Item description |
| ↳ product_id | string | Yes | Unique product identifier |
| ↳ unit_price | float | Yes | Price per unit |
| ↳ quantity | integer | Yes | Number of units |
| ↳ discount_percent | float | No | Discount applied in percentage |
| ↳ vat_percent | float | Yes | VAT rate applied in percentage |
{
"client_id": 76,
"client_type": 2,
"invoice_type": 0,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#124",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"client_name": "ABC",
"client_contact_number": "555999120",
"client_country_code": "+966",
"client_email_id": "imc@gmail.com",
"client_type": 2,
"invoice_type": 0,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"response": {
"date_time": "19 Dec 2024, 12:14PM",
"invoice": "https://imc…2bed.pdf",
"invoice_number": "12332",
"message": "Invoice created successfully",
"qrcode": "https://imcr…c-ae85-174078703bb5.png",
"seller_address": "Riyadh…adh Saudi Arabia",
"seller_name": "IMC",
"seller_vat_number": "1234567890",
"total": 605.0,
"vat": 55.0
},
"status": true
}/api_doc/invoice/create| Key | Type | Required | Description |
|---|---|---|---|
| client_id | int | Conditional | Unique ID of the client(get from Get All Client api with client_type=1) |
| client_type | int | Yes | 1 |
| client_name | string | Conditional | Client's full name or business name |
| client_address | string | Conditional | Full address of the client |
| client_contact_number | string | Conditional | Client’s phone number (without country code) |
| client_country_code | string | Conditional | Phone country code (e.g., +966) |
| client_email_id | string | Conditional | Email address of the client |
| client_cr_number | string | Conditional | Client’s Commercial Registration number |
| client_vat_number | string | Conditional | Client’s VAT registration number |
| building_number | string | Conditional | Building Number |
| postal_code | string | Conditional | Postal code |
| district | string | Conditional | District Name |
| city | string | Conditional | city |
| street_name | string | Conditional | Street Name |
| invoice_type | int | Yes | 1 |
| date_time | string (YYYY-MM-DD HH:MM:SS) | Yes | Date and time of invoice generation |
| reference_number | string | No | External reference number for the invoice |
| logo | string (URL) | No | Optional logo for the invoice(will be taken from profile if not provieded) |
| notes | string | No | Additional notes for the invoice(will be taken from profile if not provieded) |
| footer_text | string | No | Custom footer/Terms text to appear on invoice(will be taken from profile if not provieded) |
| invoice_detail | array of objects | Yes | List of invoice line items |
| ↳ description | string | Yes | Item description |
| ↳ product_id | string | Yes | Unique product identifier |
| ↳ unit_price | float | Yes | Price per unit |
| ↳ quantity | integer | Yes | Number of units |
| ↳ discount_percent | float | No | Discount applied in percentage |
| ↳ vat_percent | float | Yes | VAT rate applied in percentage |
{
"client_id": 76,
"client_type": 1,
"invoice_type": 1,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#124",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"client_name": "ABC",
"client_address": "xyz,wnop, Riyadh",
"client_contact_number": "555999120",
"client_country_code": "+966",
"client_email_id": "imc@gmail.com",
"client_cr_number": "3213213213213213",
"client_vat_number": "3213213213213213",
"building_number": "1234",
"city": "Riyadh",
"district": "Riyadh",
"street_name": "Riyadh",
"postal_code": "12345",
"client_type": 1,
"invoice_type": 1,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"response": {
"date_time": "19 Dec 2024, 12:14PM",
"invoice": "https://imc…2bed.pdf",
"invoice_number": "12332",
"message": "Invoice created successfully",
"qrcode": "https://imcr…c-ae85-174078703bb5.png",
"seller_address": "Riyadh…adh Saudi Arabia",
"seller_name": "IMC",
"seller_vat_number": "1234567890",
"total": 605.0,
"vat": 55.0
},
"status": true
}/api_doc/invoice/create| Key | Type | Required | Description |
|---|---|---|---|
| client_id | int | Conditional | Unique ID of the client(get from Get All Client api with client_type=2) |
| client_type | int | Yes | 2 |
| client_name | string | Conditional | Client's full name or business name |
| client_contact_number | string | Conditional | Client’s phone number (without country code) |
| client_country_code | string | Conditional | Phone country code (e.g., +966) |
| client_email_id | string | Conditional | Email address of the client |
| invoice_type | int | Yes | 2 |
| date_time | string (YYYY-MM-DD HH:MM:SS) | Yes | Date and time of invoice generation |
| reference_number | string | No | External reference number for the invoice |
| logo | string (URL) | No | Optional logo for the invoice(will be taken from profile if not provieded) |
| notes | string | No | Additional notes for the invoice(will be taken from profile if not provieded) |
| footer_text | string | No | Custom footer/Terms text to appear on invoice(will be taken from profile if not provieded) |
| invoice_detail | array of objects | Yes | List of invoice line items |
| ↳ description | string | Yes | Item description |
| ↳ product_id | string | Yes | Unique product identifier |
| ↳ unit_price | float | Yes | Price per unit |
| ↳ quantity | integer | Yes | Number of units |
| ↳ discount_percent | float | No | Discount applied in percentage |
| ↳ vat_percent | float | Yes | VAT rate applied in percentage |
{
"client_id": 76,
"client_type": 2,
"invoice_type": 2,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#124",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"client_name": "ABC",
"client_contact_number": "555999120",
"client_country_code": "+966",
"client_email_id": "imc@gmail.com",
"client_type": 2,
"invoice_type": 2,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"response": {
"date_time": "19 Dec 2024, 12:14PM",
"invoice": "https://imc…2bed.pdf",
"invoice_number": "12332",
"message": "Invoice created successfully",
"qrcode": "https://imcr…c-ae85-174078703bb5.png",
"seller_address": "Riyadh…adh Saudi Arabia",
"seller_name": "IMC",
"seller_vat_number": "1234567890",
"total": 605.0,
"vat": 55.0
},
"status": true
}/api_doc/invoice/create| Key | Type | Required | Description |
|---|---|---|---|
| client_id | int | Conditional | Unique ID of the client(get from Get All Client api with client_type=1) |
| client_type | int | Yes | 1 |
| client_name | string | Conditional | Client's full name or business name |
| client_address | string | Conditional | Full address of the client |
| client_contact_number | string | Conditional | Client’s phone number (without country code) |
| client_country_code | string | Conditional | Phone country code (e.g., +966) |
| client_email_id | string | Conditional | Email address of the client |
| client_cr_number | string | Conditional | Client’s Commercial Registration number |
| client_vat_number | string | Conditional | Client’s VAT registration number |
| building_number | string | Conditional | Building Number |
| postal_code | string | Conditional | Postal code |
| district | string | Conditional | District Name |
| city | string | Conditional | city |
| street_name | string | Conditional | Street Name |
| invoice_type | int | Yes | 2 |
| date_time | string (YYYY-MM-DD HH:MM:SS) | Yes | Date and time of invoice generation |
| reference_number | string | No | External reference number for the invoice |
| logo | string (URL) | No | Optional logo for the invoice(will be taken from profile if not provieded) |
| notes | string | No | Additional notes for the invoice(will be taken from profile if not provieded) |
| footer_text | string | No | Custom footer/Terms text to appear on invoice(will be taken from profile if not provieded) |
| invoice_detail | array of objects | Yes | List of invoice line items |
| ↳ description | string | Yes | Item description |
| ↳ product_id | string | Yes | Unique product identifier |
| ↳ unit_price | float | Yes | Price per unit |
| ↳ quantity | integer | Yes | Number of units |
| ↳ discount_percent | float | No | Discount applied in percentage |
| ↳ vat_percent | float | Yes | VAT rate applied in percentage |
{
"client_id": 76,
"client_type": 1,
"invoice_type": 2,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#124",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"client_name": "ABC",
"client_address": "xyz,wnop, Riyadh",
"client_contact_number": "555999120",
"client_country_code": "+966",
"client_email_id": "imc@gmail.com",
"client_cr_number": "3213213213213213",
"client_vat_number": "3213213213213213",
"building_number": "1234",
"city": "Riyadh",
"district": "Riyadh",
"street_name": "Riyadh",
"postal_code": "12345",
"client_type": 1,
"invoice_type": 2,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"response": {
"date_time": "19 Dec 2024, 12:14PM",
"invoice": "https://imc…2bed.pdf",
"invoice_number": "12332",
"message": "Invoice created successfully",
"qrcode": "https://imcr…c-ae85-174078703bb5.png",
"seller_address": "Riyadh…adh Saudi Arabia",
"seller_name": "IMC",
"seller_vat_number": "1234567890",
"total": 605.0,
"vat": 55.0
},
"status": true
}/api_doc/invoice/create| Key | Type | Required | Description |
|---|---|---|---|
| invoice_type | int | Yes | 3 |
| parent_type | int | Yes | 0 or 1 or 2(invoice_type of selected parent invoice) |
| date_time | string (YYYY-MM-DD HH:MM:SS) | Yes | Date and time of invoice generation |
| reference_number | string | No | External reference number for the invoice |
| parent_invoice_number | string | Yes | refers to original invoice |
| logo | string (URL) | No | Optional logo for the invoice(will be taken from profile if not provieded) |
| notes | string | No | Additional notes for the invoice(will be taken from profile if not provieded) |
| footer_text | string | No | Custom footer/Terms text to appear on invoice(will be taken from profile if not provieded) |
| invoice_detail | array of objects | Yes | List of invoice line items |
| ↳ description | string | Yes | Item description |
| ↳ product_id | string | Yes | Unique product identifier |
| ↳ unit_price | float | Yes | Price per unit |
| ↳ quantity | integer | Yes | Number of units |
| ↳ discount_percent | float | No | Discount applied in percentage |
| ↳ vat_percent | float | Yes | VAT rate applied in percentage |
{
"parent_type": 1,
"invoice_type": 3,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#124",
"parent_invoice_number":"#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"parent_type": 1,
"invoice_type": 3,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#123",
"parent_invoice_number":"#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"response": {
"date_time": "19 Dec 2024, 12:14PM",
"invoice": "https://imc…2bed.pdf",
"invoice_number": "12332",
"message": "Invoice created successfully",
"qrcode": "https://imcr…c-ae85-174078703bb5.png",
"seller_address": "Riyadh…adh Saudi Arabia",
"seller_name": "IMC",
"seller_vat_number": "1234567890",
"total": 605.0,
"vat": 55.0
},
"status": true
}/api_doc/invoice/create| Key | Type | Required | Description |
|---|---|---|---|
| invoice_type | int | Yes | 4 |
| parent_type | int | Yes | 0 or 1 or 2(invoice_type of selected parent invoice) |
| date_time | string (YYYY-MM-DD HH:MM:SS) | Yes | Date and time of invoice generation |
| reference_number | string | No | External reference number for the invoice |
| parent_invoice_number | string | Yes | refers to original invoice |
| logo | string (URL) | No | Optional logo for the invoice(will be taken from profile if not provieded) |
| notes | string | No | Additional notes for the invoice(will be taken from profile if not provieded) |
| footer_text | string | No | Custom footer/Terms text to appear on invoice(will be taken from profile if not provieded) |
| invoice_detail | array of objects | Yes | List of invoice line items |
| ↳ description | string | Yes | Item description |
| ↳ product_id | string | Yes | Unique product identifier |
| ↳ unit_price | float | Yes | Price per unit |
| ↳ quantity | integer | Yes | Number of units |
| ↳ discount_percent | float | No | Discount applied in percentage |
| ↳ vat_percent | float | Yes | VAT rate applied in percentage |
{
"parent_type": 1,
"invoice_type": 4,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#124",
"parent_invoice_number":"#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"parent_type": 1,
"invoice_type": 4,
"date_time": "2024-12-19 12:14:39",
"reference_number": "#123",
"parent_invoice_number":"#123",
"logo": "",
"notes": "",
"footer_text": "",
"invoice_detail": [
{
"description": "Item 2 ",
"product_id": "#34rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
},
{
"description": "Item 1 ",
"product_id": "#23rfgb",
"unit_price": 100,
"quantity": 2,
"discount_percent": 5,
"vat_percent": 15
}
]
}{
"response": {
"date_time": "19 Dec 2024, 12:14PM",
"invoice": "https://imc…2bed.pdf",
"invoice_number": "12332",
"message": "Invoice created successfully",
"qrcode": "https://imcr…c-ae85-174078703bb5.png",
"seller_address": "Riyadh…adh Saudi Arabia",
"seller_name": "IMC",
"seller_vat_number": "1234567890",
"total": 605.0,
"vat": 55.0
},
"status": true
}