---
updatedAt: 2026-10-12T15:05:31.000Z
agentTools:
  projectIndex: https://wafeq.readme.io/llms.txt
---

# Convert quote to invoice

This endpoint can be used to convert a quote to an 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. Sending this field replaces the whole set, and entries left out are unapplied. To apply, change or remove a single credit note, use /v1/invoice-credit-notes/.",
            "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_exemption_reason": {
            "description": "The tax exemption reason of the discount, when its tax rate takes one: a code that rate offers, or, on the KSA out-of-scope rate, the reason written out. `null` or `\"\"` clears the reason. Left out, a new discount, or one moved to another tax rate, takes the default of its tax rate, and any other discount keeps its reason.",
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "discount_tax_rate": {
            "description": "The tax rate applied to the discount, if applicable: the ID of the tax rate (`tax_…`). List the tax rates of the organization with GET /v1/tax-rates/.",
            "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"
          },
          "journal": {
            "description": "The public ID of the current journal entry for this document, or null when no journal exists. Pass expand=journal to return the journal object instead of its ID. Use GET /v1/journal-line-items/?journal={journal_id} to retrieve the accounting entries. Related payments, note applications and deferral events have their own journals.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/api-v1-journal"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true
          },
          "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",
          "journal",
          "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"
          },
          "id": {
            "description": "The ID of the application. Use it with /v1/invoice-credit-notes/ to change or remove this one application.",
            "readOnly": true,
            "type": "string"
          },
          "journal": {
            "description": "The public ID of the current journal entry for this application, or null when no journal exists. Use GET /v1/journal-line-items/?journal={journal_id} to retrieve the accounting entries. Related payments, note applications and deferral events have their own journals.",
            "readOnly": true,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "amount",
          "credit_note",
          "id",
          "journal"
        ],
        "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_exemption_reason": {
            "description": "The tax exemption reason of the line, as reporting to the tax authority needs it on a zero-rated or exempt line: a code the tax rate of the line offers (the TaxExemptionReasonCodes page lists them), or, on the KSA out-of-scope rate, the reason written out. On a rate that takes no reason, a reason sent is kept but not reported. `null` or `\"\"` clears the reason. Left out, a new line takes the default of its item, else the default of the contact (when the line is on the default revenue tax rate of the contact), else the default of its tax rate, else none. So does a line whose tax rate or item changes. Any other line keeps its reason, also when an update sends the lines again: each line is matched with the stored line that has its tax rate, item and description. On a finalized, partly paid, paid or voided invoice, a PATCH of the line that sends only this field changes it, until the invoice is reported (then 403 `frozen_state_locked`); report it again with POST /v1/invoices/<id>/tax-authority/report/.",
            "maxLength": 1000,
            "type": [
              "string",
              "null"
            ]
          },
          "tax_rate": {
            "description": "The tax rate applied to this line item: the ID of the tax rate (`tax_…`). List the tax rates of the organization with GET /v1/tax-rates/. Add `expand=line_items.tax_rate` to get the full tax rate in the response.",
            "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-journal": {
        "description": "A journal entry in the general ledger.",
        "properties": {
          "created_ts": {
            "description": "The timestamp in UTC when the journal was created",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "currency": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CurrencyEnum"
              }
            ],
            "description": "The currency used in the journal.\n\n[View the enum reference](currencyenum)"
          },
          "date": {
            "description": "The date of the journal entry.",
            "format": "date",
            "type": "string"
          },
          "id": {
            "description": "The unique identifier of the journal.",
            "readOnly": true,
            "type": "string"
          },
          "legacy_id": {
            "description": "[Deprecated] The legacy identifier of the journal.",
            "readOnly": true,
            "type": "string"
          },
          "modified_ts": {
            "description": "The timestamp in UTC when the journal was last modified",
            "format": "date-time",
            "readOnly": true,
            "type": "string"
          },
          "notes": {
            "description": "Additional notes about the journal entry.",
            "type": "string"
          },
          "reference": {
            "description": "Reference number or code for the journal.",
            "type": "string"
          }
        },
        "required": [
          "created_ts",
          "currency",
          "date",
          "id",
          "legacy_id",
          "modified_ts"
        ],
        "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": {
    "/quotes/{id}/invoice/": {
      "post": {
        "description": "This endpoint can be used to convert a quote to an invoice.",
        "operationId": "quotes_invoice_create",
        "parameters": [
          {
            "description": "Comma-separated related objects to return in full instead of as IDs. Accepted values: `attachments`, `branch`, `contact`, `contact.persons`, `journal`, `line_items`, `line_items.account`, `line_items.item`, `line_items.tax_rate`, `line_items.cost_center`, `project`, `warehouse`, `discount_cost_center`. Nested relations are joined with a dot. Pass `journal` to replace the journal ID with its object (ID, date, currency, reference, notes and timestamps). Documents without a journal still return null. Journal line items are retrieved separately with GET /v1/journal-line-items/?journal={journal_id}.",
            "in": "query",
            "name": "expand",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api-v1-invoice"
                }
              }
            },
            "description": ""
          }
        },
        "security": [
          {
            "APIKeyAuth": []
          }
        ],
        "summary": "Convert quote to invoice",
        "tags": [
          "Quotes"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Wafeq API Base URL",
      "url": "https://api.wafeq.com/v1"
    }
  ],
  "x-readme": {
    "proxy-enabled": false,
    "samples-languages": [
      "shell",
      "http"
    ]
  }
}
```