Endpoints
GET /v1/simplified-invoices/
GET /v1/simplified-invoices/:id/
POST /v1/simplified-invoices/
PATCH /v1/simplified-invoices/:id/
DELETE /v1/simplified-invoices/:id/
GET /v1/simplified-invoices/:id/download/
GET /v1/simplified-invoices/:id/line-items/
POST /v1/simplified-invoices/:id/line-items/:line_item_id/
PATCH /v1/simplified-invoices/:id/line-items/:line_item_id/
DELETE /v1/simplified-invoices/:id/line-items/:line_item_id/
Invoice object
Attributes | Type | Description |
---|
id | string | The id of the object. |
amount | number | The invoice amount. |
contact | string | The id of the contact. |
currency | string | The currency used in the invoice. |
invoice_number | string | The invoice number. |
invoice_date | string | The date of the invoice. |
language | string | The language used in the invoice. |
line_items | array | The line items of the invoice. |
paid_through_account | string | The id of the account used to pay for the invoice |
place_of_supply | string | Only required if your organization is in the UAE: one of ABU_DHABI , AJMAN , DUBAI , FUJAIRAH , RAS_AL_KHAIMAH , SHARJAH , UMM_AL_QUWAIN or OUTSIDE_UAE |
reference | string | The reference of the invoice. |
status | string | The status of the invoice. Either DRAFT or PAID |
tax_amount | number | The tax amount. |
tax_amount_type | string | Either TAX_INCLUSIVE or TAX_EXCLUSIVE . |
Example
{
"amount": 115.0,
"contact": "co_HS9cspuVZJUHdqVsS9CFfY",
"currency": "AED",
"id": "sinv_YEdmVKecVi45RYWcrt2rJe",
"invoice_date": "2022-10-05",
"invoice_number": "SINV-000100",
"language": "en",
"line_items": [{
"account": "acc_7jpGSFEGGF9cK39vwoDPBt",
"description": "Line item",
"id": "sinvli_Zhf8cUxzjiRRs8Ga7MCgWE",
"line_amount": 115.0,
"quantity": 1.0,
"tax_amount": 15.0,
"tax_rate": "tax_c8TkJLeXZYJmWuSjqGzGzj",
"unit_amount": 100.0
}],
"paid_through_account": "acc_Xjwoy4VSKtVm6gEYcC9ZKR",
"place_of_supply": "DUBAI",
"reference": "",
"status": "DRAFT",
"tax_amount": 15.0,
"tax_amount_type": "TAX_EXCLUSIVE"
}
Get invoice
Endpoint
GET /v1/simplified-invoices/:id/
Response sample
{
"amount": 115.0,
"contact": "co_HS9cspuVZJUHdqVsS9CFfY",
"currency": "AED",
"id": "sinv_YEdmVKecVi45RYWcrt2rJe",
"invoice_date": "2022-10-05",
"invoice_number": "SINV-000100",
"language": "en",
"line_items": [{
"account": "acc_7jpGSFEGGF9cK39vwoDPBt",
"description": "Line item",
"id": "sinvli_Zhf8cUxzjiRRs8Ga7MCgWE",
"line_amount": 115.0,
"quantity": 1.0,
"tax_amount": 15.0,
"tax_rate": "tax_c8TkJLeXZYJmWuSjqGzGzj",
"unit_amount": 100.0
}],
"paid_through_account": "acc_Xjwoy4VSKtVm6gEYcC9ZKR",
"place_of_supply": "ABU_DHABI",
"reference": "",
"status": "DRAFT",
"tax_amount": 15.0,
"tax_amount_type": "TAX_EXCLUSIVE"
}
List simplified invoices
Endpoint
GET /v1/simplified-invoices/
Filters
Query param | Type | Description |
---|
contact | string | The id of the contact. |
invoice_date | string | The invoice date in YYYY-MM-DD e.g. 2021-01-01 . |
Request
curl --location \
--request GET 'https://api.wafeq.com/v1/simplified-invoices/' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json'
Create invoice
Endpoint
POST /v1/simplified-invoices/
Request body
Attributes | Type | Description |
---|
amount | number | The invoice amount. (Required) |
contact | string | The id of the contact. (Required) |
currency | string | The currency used in the invoice. (Required) |
invoice_number | string | The invoice number. (Required) |
invoice_date | string | The date of the invoice. (Required) |
language | string | The language used in the invoice. |
line_items | array | The line items of the invoice. (Required) |
paid_through_account | string | The id of the account used to pay for the invoice. (Required) |
place_of_supply | string | The place of supply in the UAE (Required if and only if the organization is in the UAE) |
reference | string | The reference of the invoice. |
status | string | The status of the invoice. Either DRAFT or PAID |
tax_amount | number | The tax amount. |
tax_amount_type | string | Either TAX_INCLUSIVE or TAX_EXCLUSIVE . |
Request
curl --location \
--request POST 'https://api.wafeq.com/v1/simplified-invoices/' \
--header 'Authorization: Api-Key <api_key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"contact": "<contact>",
"currency": "SAR",
"invoice_number": "SINV-0001",
"invoice_date": "2022-07-19",
"language": "en",
"line_items": [
{
"account": "<account>",
"description": "Line Item",
"quantity": 1,
"tax_rate": "<tax_rate>",
"unit_amount": 100
}
],
"reference": "A reference to be reused",
"tax_amount_type": "TAX_EXCLUSIVE"
}'
Update invoice
PATCH /v1/simplified-invoices/:id/
Request body
Attributes | Type | Description |
---|
id | string | The id of the object. |
amount | number | The invoice amount. |
contact | string | The id of the contact. |
currency | string | The currency used in the invoice. |
invoice_number | string | The invoice number. |
invoice_date | string | The date of the invoice. |
language | string | The language used in the invoice. |
paid_through_account | string | The id of the account used to pay for the invoice. |
place_of_supply | string | The place of supply in the UAE |
reference | string | The reference of the invoice. |
status | string | The status of the invoice. Either DRAFT or PAID |
tax_amount_type | string | Either TAX_INCLUSIVE or TAX_EXCLUSIVE . |
To update the line items, you need to use the simplified invoices line items endpoints. | | |
Delete invoice
DELETE /v1/simplified-invoices/:id/
Download invoice
GET /v1/simplified-invoices/:id/download/
Invoice line item object
Attribute | Type | Description |
---|
account | string | The id of the account. |
description | string | The description of the line item. |
id | string | The id of the object. |
line_amount | number | The line amount. |
quantity | number | The quantity. |
tax_amount | number | The tax amount. |
tax_rate | string | The id of the tax rate. |
unit_amount | number | The unit amount. |
Example
{
"account": "acc_7jpGSFEGGF9cK39vwoDPBt",
"description": "Line item",
"id": "sinvli_Zhf8cUxzjiRRs8Ga7MCgWE",
"line_amount": 115.0,
"quantity": 1.0,
"tax_amount": 15.0,
"tax_rate": "tax_c8TkJLeXZYJmWuSjqGzGzj",
"unit_amount": 100.0
}
Get invoice line item
Endpoint
POST /v1/simplified-invoices/:id/line-item/
Response sample
{
"account": "acc_7jpGSFEGGF9cK39vwoDPBt",
"description": "Line item",
"id": "sinvli_Zhf8cUxzjiRRs8Ga7MCgWE",
"line_amount": 115.0,
"quantity": 1.0,
"tax_amount": 15.0,
"tax_rate": "tax_c8TkJLeXZYJmWuSjqGzGzj",
"unit_amount": 100.0
}
List invoice line items
Endpoint
GET /v1/simplified-invoices/:id/line-items/
Filters
Query param | Type | Description |
---|
account | string | The id of the account. |
Create invoice line item
Endpoint
POST /v1/simplified-invoices/:id/line-items/
Request body
Attributes | Type | Description |
---|
account | string | The id of the account. |
description | string | The description of the line item. |
quantity | number | The quantity. |
tax_rate | string | The id of the tax rate. |
unit_amount | number | The unit amount. |
Update invoice line item
PATCH /v1/simplified-invoices/:id/line-items/:line_item_id/
Request body
Attributes | Type | Description |
---|
account | string | The id of the account. |
description | string | The description of the line item. |
quantity | number | The quantity. |
tax_rate | string | The id of the tax rate. |
unit_amount | number | The unit amount. |
Delete invoice line item
DELETE /v1/simplified-invoices/:id/line-items/:line_item_id/