curl --location --request POST '/companies//invoices/import' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"invoices": [
{
"clientId": "string",
"date": "string",
"dueDate": "string",
"currency": "USD",
"prefix": "string",
"invoiceNumber": 0,
"lineItems": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "GOODS",
"description": "Premium Widget",
"price": 100,
"quantity": 2,
"unit": "pieces",
"sortOrder": 1,
"taxId": "string"
}
]
}
]
}'{
"invoices": [
{
"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"
}
}
]
}
]
}