Invoice Desk
  1. Invoice
Invoice Desk
  • Getting Started
  • Static Data
    • List currencies
      GET
    • List countries
      GET
    • List states
      GET
    • List cities
      GET
    • StaticDataController_testError
      GET
  • Company
    • List companies
      GET
    • Add Company
      POST
    • Update Company
      PATCH
    • Fetch details of a company by ID
      GET
    • Delete a company
      DELETE
    • Get all payments for a company
      GET
  • Client
    • List clients
      GET
    • Add client
      POST
    • Update a client
      PATCH
    • Remove client
      DELETE
    • Get client details
      GET
  • Invoice
    • List invoices
      GET
    • Create invoice
      POST
    • Get invoice by ID
      GET
    • Update invoice
      PATCH
    • Delete a specific invoice
      DELETE
    • Import invoices
      POST
    • Export invoice
      GET
    • Send invoice
      POST
  • Invoice Payments
    • Record payment for invoice
    • Get payments for invoice
  • Product
    • List products
    • Add product
    • Update a product
    • Remove a product
  • Account
    • Get account details
    • Update account details
  • Project
    • List projects
    • Create a project
    • Get project by ID
    • Update a project
    • Remove a project
  • Company Settings
    • Create a new tax
    • Get company invoice settings
  • Timesheet
    • Get time entries for a project
    • Create a timesheet
    • Update
    • Delete
  • Role
    • List roles
  • User Profile
    • Fetch auth user profile
    • Update user profile
  1. Invoice

Create invoice

POST
/companies/{companyId}/invoices
Maintainer:Not configured
Raise an invoice for a company

Request

Authorization
Add parameter in header
Example:
X-Token: ********************
Path Params

Body Params application/json

Examples

Responses

🟢200OK
application/json
Body

🟠403Forbidden
🟠404Record Not Found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/companies//invoices' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "clientId": "string",
    "date": "string",
    "dueDate": "string",
    "currency": "USD",
    "prefix": "string",
    "lineItems": [
        {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "type": "GOODS",
            "description": "Premium Widget",
            "price": 100,
            "quantity": 2,
            "unit": "pieces",
            "sortOrder": 1,
            "taxId": "string"
        }
    ],
    "status": "string",
    "discountType": "percentage",
    "discountValue": 0,
    "deliveryOptions": {
        "email": {
            "send": true,
            "subject": "string",
            "recipients": [
                "string"
            ],
            "body": "string"
        }
    }
}'
Response Response Example
{
    "success": true,
    "data": {
        "id": "string",
        "companyId": "string",
        "clientId": "string",
        "number": 0,
        "prefix": "string",
        "financialYear": "string",
        "date": "string",
        "dueDate": "string",
        "status": "string",
        "currency": "string",
        "createdAt": "string",
        "lineItems": [
            {
                "id": "string",
                "invoiceId": "string",
                "itemId": "string",
                "type": "GOODS",
                "description": "string",
                "price": 0,
                "quantity": 0,
                "unit": "string",
                "sortOrder": 0,
                "createdAt": "string",
                "taxId": "string"
            }
        ],
        "client": {},
        "company": {},
        "discountType": "percentage",
        "discountValue": 0,
        "paymentStatus": "paid",
        "payments": [
            {
                "id": "inv_pay_123",
                "amount": 1000,
                "currencyCode": "USD",
                "paymentDate": "2024-03-15",
                "notes": "Payment for March services",
                "referenceNumber": "REF123",
                "createdAt": "2024-03-15T10:30:00Z",
                "invoice": {
                    "id": "inv_123",
                    "number": 1001,
                    "prefix": "INV",
                    "date": "2024-03-10"
                }
            }
        ]
    },
    "errors": [
        "string"
    ]
}
Modified at 2025-05-14 11:50:50
Previous
List invoices
Next
Get invoice by ID
Built with