---
updatedAt: 2026-05-27T00:55:13.000Z
agentTools:
  projectIndex: https://developer.wafeq.com/llms.txt
---

# Create invoice

Endpoint for creating a new invoice.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "CurrencyEnum": {
        "description": "An ISO 4217 currency code.\n\n[View the enum reference](currencyenum)",
        "enum": [
          "AED",
          "SAR",
          "USD",
          "EUR",
          "CAD",
          "AFN",
          "ALL",
          "AMD",
          "ARS",
          "AUD",
          "AZN",
          "BAM",
          "BDT",
          "BGN",
          "BHD",
          "BIF",
          "BND",
          "BOB",
          "BRL",
          "BWP",
          "BYN",
          "BZD",
          "CDF",
          "CHF",
          "CLP",
          "CNY",
          "COP",
          "CRC",
          "CVE",
          "CZK",
          "DJF",
          "DKK",
          "DOP",
          "DZD",
          "EGP",
          "ERN",
          "ETB",
          "GBP",
          "GEL",
          "GHS",
          "GNF",
          "GTQ",
          "HKD",
          "HNL",
          "HRK",
          "HUF",
          "IDR",
          "ILS",
          "INR",
          "IQD",
          "IRR",
          "ISK",
          "JMD",
          "JOD",
          "JPY",
          "KES",
          "KHR",
          "KMF",
          "KRW",
          "KWD",
          "KZT",
          "LBP",
          "LKR",
          "LYD",
          "MAD",
          "MDL",
          "MGA",
          "MKD",
          "MMK",
          "MOP",
          "MUR",
          "MXN",
          "MYR",
          "MZN",
          "NAD",
          "NGN",
          "NIO",
          "NOK",
          "NPR",
          "NZD",
          "OMR",
          "PAB",
          "PEN",
          "PHP",
          "PKR",
          "PLN",
          "PYG",
          "QAR",
          "RON",
          "RSD",
          "RUB",
          "RWF",
          "SDG",
          "SEK",
          "SGD",
          "SOS",
          "SYP",
          "THB",
          "TND",
          "TOP",
          "TRY",
          "TTD",
          "TWD",
          "TZS",
          "UAH",
          "UGX",
          "UYU",
          "UZS",
          "VES",
          "VND",
          "XAF",
          "XOF",
          "YER",
          "ZAR",
          "ZMW"
        ],
        "type": "string"
      },
      "DurationEnum": {
        "description": "Duration over which an amount is recognized or amortized.\n\n[View the enum reference](durationenum)",
        "enum": [
          "3_MONTHS",
          "4_MONTHS",
          "6_MONTHS",
          "12_MONTHS",
          "24_MONTHS",
          "CUSTOM"
        ],
        "type": "string"
      },
      "LanguageEnum": {
        "description": "The language of a document or response.\n\n[View the enum reference](languageenum)",
        "enum": [
          "en",
          "ar"
        ],
        "type": "string"
      },
      "PublicSalesDocumentStatusEnum": {
        "description": "The processing status of a sales document.\n\n[View the enum reference](publicsalesdocumentstatusenum)",
        "enum": [
          "DRAFT",
          "SENT",
          "FINALIZED"
        ],
        "type": "string"
      },
      "RecognitionTypeEnum": {
        "description": "Schedule used to recognize deferred amounts.\n\n[View the enum reference](recognitiontypeenum)",
        "enum": [
          "DAILY",
          "MONTHLY"
        ],
        "type": "string"
      },
      "TaxAmountTypeEnum": {
        "description": "Whether amounts include or exclude tax.\n\n[View the enum reference](taxamounttypeenum)",
        "enum": [
          "TAX_INCLUSIVE",
          "TAX_EXCLUSIVE"
        ],
        "type": "string"
      },
      "api-v1-invoice": {
        "description": "An invoice issued to a customer.",
        "properties": {
          "amount": {
            "description": "The total amount of the invoice, including taxes.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "attachments": {
            "description": "Any files or documents attached to this invoice.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "balance": {
            "description": "The remaining balance of the invoice.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "branch": {
            "description": "The branch associated with this invoice.",
            "type": [
              "string",
              "null"
            ]
          },
          "contact": {
            "description": "The contact (customer) associated with this invoice.",
            "type": "string"
          },
          "created_ts": {
            "description": "The timestamp in UTC when the invoice was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "credit_notes": {
            "description": "The credit notes applied to this invoice.",
            "items": {
              "$ref": "#/components/schemas/api-v1-invoice-credit-note"
            },
            "type": "array"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "description": "The currency code for the invoice.\n\n[View the enum reference](currencyenum)"
          },
          "custom_fields": {
            "additionalProperties": {},
            "description": "A mapping of custom field IDs to their values.",
            "type": "object"
          },
          "discount_account": {
            "description": "The account to which the discount will be booked, if applicable.",
            "type": "string"
          },
          "discount_amount": {
            "description": "The discount amount to apply to the invoice.",
            "exclusiveMaximum": 10000000000000000,
            "format": "double",
            "minimum": 0,
            "type": "number"
          },
          "discount_cost_center": {
            "description": "The cost center associated with the discount, if applicable.",
            "type": "string"
          },
          "discount_tax_rate": {
            "description": "The tax rate applied to the discount, if applicable.",
            "type": "string"
          },
          "exchange_rate": {
            "description": "The exchange rate to the organization base currency at the time of the document.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "external_id": {
            "default": "",
            "description": "External identifier for the invoice.",
            "maxLength": 255,
            "type": "string"
          },
          "id": {
            "description": "The unique identifier of the invoice.",
            "readOnly": true,
            "type": "string"
          },
          "invoice_date": {
            "description": "The date when the invoice was issued.",
            "format": "date",
            "type": "string"
          },
          "invoice_due_date": {
            "description": "The date by which the invoice should be paid.",
            "format": "date",
            "type": "string"
          },
          "invoice_number": {
            "description": "The unique number assigned to this invoice.",
            "type": "string"
          },
          "is_summary": {
            "description": "Whether this invoice summarizes transactions over a period.",
            "type": "boolean"
          },
          "language": {
            "allOf": [
              {
                "$ref": "#/components/schemas/LanguageEnum"
              }
            ],
            "default": "en",
            "description": "The language in which the invoice is written.\n\n[View the enum reference](languageenum)"
          },
          "legacy_id": {
            "description": "[Deprecated] The legacy identifier of the invoice.",
            "readOnly": true,
            "type": "string"
          },
          "line_items": {
            "description": "The individual line items included in this invoice.",
            "items": {
              "$ref": "#/components/schemas/api-v1-invoice-line-item"
            },
            "type": "array"
          },
          "modified_ts": {
            "description": "The timestamp in UTC when the invoice was last modified.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "notes": {
            "description": "Additional notes or comments about the invoice.",
            "type": "string"
          },
          "place_of_supply": {
            "description": "The place of supply for UAE organizations. Must be one of: ABU_DHABI, AJMAN, DUBAI, FUJAIRAH, RAS_AL_KHAIMAH, SHARJAH, UMM_AL_QUWAIN or OUTSIDE_UAE.",
            "type": "string"
          },
          "project": {
            "description": "The project associated with this invoice, if applicable.",
            "type": [
              "string",
              "null"
            ]
          },
          "purchase_order": {
            "description": "An optional purchase order number or code for this invoice.",
            "type": "string"
          },
          "reference": {
            "description": "An optional reference number or code for this invoice.",
            "type": "string"
          },
          "rounding_amount": {
            "description": "The payable rounding amount for tax inclusive documents.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "status": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PublicSalesDocumentStatusEnum"
              }
            ],
            "default": "DRAFT",
            "description": "The current status of the invoice (draft, sent, or finalized).\n\n[View the enum reference](publicsalesdocumentstatusenum)"
          },
          "summary_period_end": {
            "description": "The end date of the period covered by this summary invoice. Required when is_summary is true.",
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "summary_period_start": {
            "description": "The start date of the period covered by this summary invoice. Required when is_summary is true.",
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "description": "The total tax amount applied to this invoice.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "tax_amount_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TaxAmountTypeEnum"
              }
            ],
            "description": "Specifies whether the tax amount is inclusive or exclusive.\n\n[View the enum reference](taxamounttypeenum)"
          },
          "warehouse": {
            "description": "The warehouse associated with this invoice, if applicable.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "balance",
          "contact",
          "created_ts",
          "currency",
          "id",
          "invoice_date",
          "invoice_due_date",
          "invoice_number",
          "legacy_id",
          "line_items",
          "modified_ts",
          "rounding_amount",
          "tax_amount"
        ],
        "type": "object"
      },
      "api-v1-invoice-credit-note": {
        "description": "A credit note applied to an invoice.",
        "properties": {
          "amount": {
            "description": "The amount of the credit note applied to the invoice.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "type": "number"
          },
          "credit_note": {
            "description": "The unique identifier of the credit note applied to the invoice.",
            "type": "string"
          },
          "date": {
            "description": "The date when the credit note was applied to the invoice.",
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "amount",
          "credit_note"
        ],
        "type": "object"
      },
      "api-v1-invoice-line-item": {
        "description": "A line item of an invoice.",
        "properties": {
          "account": {
            "description": "The account associated with this line item.",
            "type": "string"
          },
          "cost_center": {
            "description": "The cost center associated with this line item.",
            "type": "string"
          },
          "created_ts": {
            "description": "The timestamp in UTC when the line item was created.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "custom_fields": {
            "additionalProperties": {},
            "description": "A mapping of custom field IDs to their values.",
            "type": "object"
          },
          "description": {
            "description": "The detailed description of the line item.",
            "type": "string"
          },
          "discount": {
            "description": "The discount as the percentage.",
            "exclusiveMaximum": 10000000000000000,
            "format": "double",
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "id": {
            "description": "The unique identifier of the line item.",
            "readOnly": true,
            "type": "string"
          },
          "item": {
            "description": "The item associated with this line item.",
            "type": "string"
          },
          "item_unit_of_measure": {
            "description": "The item unit of measure for this line item.",
            "type": [
              "string",
              "null"
            ]
          },
          "legacy_id": {
            "description": "[Deprecated] The legacy identifier of the line item.",
            "readOnly": true,
            "type": "string"
          },
          "line_amount": {
            "description": "The total amount for this line item (quantity * unit_amount).",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "modified_ts": {
            "description": "The timestamp in UTC when the line item was last modified.",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "order": {
            "description": "The position of the line item within the document.",
            "type": "integer",
            "writeOnly": true
          },
          "quantity": {
            "description": "The quantity of the item or service.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "type": "number"
          },
          "revenue_recognition": {
            "description": "Optional revenue recognition configuration. When provided, a revenue recognition is created for this line item.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/api-v1-revenue-recognition-input"
              },
              {
                "type": "null"
              }
            ],
            "writeOnly": true
          },
          "revenue_recognition_id": {
            "description": "The unique identifier of the revenue recognition linked to this line item, if any.",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          },
          "tax_amount": {
            "description": "The total tax amount for this line item.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "readOnly": true,
            "type": "number"
          },
          "tax_rate": {
            "description": "The tax rate applied to this line item.",
            "type": "string"
          },
          "unit_amount": {
            "description": "The price per unit of the item or service.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "account",
          "created_ts",
          "description",
          "id",
          "legacy_id",
          "line_amount",
          "modified_ts",
          "quantity",
          "revenue_recognition_id",
          "tax_amount",
          "unit_amount"
        ],
        "type": "object"
      },
      "api-v1-revenue-recognition-input": {
        "description": "The payload to create a revenue recognition schedule for an invoice line item.",
        "properties": {
          "account": {
            "description": "The revenue account used for revenue recognition.",
            "type": "string"
          },
          "amount": {
            "description": "The total amount to recognize.",
            "exclusiveMaximum": 10000000000000000,
            "exclusiveMinimum": -10000000000000000,
            "format": "double",
            "type": "number"
          },
          "description": {
            "description": "The description of the revenue recognition.",
            "type": "string"
          },
          "duration": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DurationEnum"
              }
            ],
            "description": "The recognition duration.\n\n[View the enum reference](durationenum)"
          },
          "end_date": {
            "description": "The end date of the revenue recognition schedule.",
            "format": "date",
            "type": "string"
          },
          "recognition_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/RecognitionTypeEnum"
              }
            ],
            "description": "How the revenue recognition is recognized (DAILY or MONTHLY).\n\n[View the enum reference](recognitiontypeenum)"
          },
          "start_date": {
            "description": "The start date of the revenue recognition schedule.",
            "format": "date",
            "type": "string"
          },
          "use_entity_date": {
            "description": "Whether the revenue recognition start date follows the invoice date.",
            "type": "boolean"
          }
        },
        "required": [
          "account",
          "amount",
          "description",
          "duration",
          "end_date",
          "recognition_type",
          "start_date",
          "use_entity_date"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "APIKeyAuth": {
        "description": "__An API key that will be supplied in  `Authorization` header.__\n\nExample:\n`Api-Key vVLOU1BB.aKz8GWaAGz0w1fO997aCMskNfS0ZpwjS`",
        "in": "header",
        "name": "Authorization",
        "type": "apiKey",
        "x-default": "Api-Key replace_with_your_api_key"
      }
    }
  },
  "info": {
    "title": "Wafeq Public API",
    "version": "v1"
  },
  "openapi": "3.1.1",
  "paths": {
    "/invoices/": {
      "post": {
        "description": "Endpoint for creating a new invoice.",
        "operationId": "invoices_create",
        "parameters": [
          {
            "description": "Client-provided UUID to uniquely identify a request",
            "in": "header",
            "name": "X-Wafeq-Idempotency-Key",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/api-v1-invoice"
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/api-v1-invoice"
              }
            },
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/api-v1-invoice"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api-v1-invoice"
                }
              }
            },
            "description": "",
            "headers": {
              "X-Wafeq-Idempotent-Replayed": {
                "description": "Indicates whether response was served from cache",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyAuth": []
          }
        ],
        "summary": "Create invoice",
        "tags": [
          "Invoices"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Wafeq API Base URL",
      "url": "https://api.wafeq.com/v1"
    }
  ],
  "x-readme": {
    "proxy-enabled": false,
    "samples-languages": [
      "shell",
      "http"
    ]
  }
}
```