Skip to main content
POST
/
connections
/
{connection_id}
/
invoices
Create Invoice
curl --request POST \
  --url https://qubesync.com/api/v1/connections/{connection_id}/invoices \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_list_id": "80000001-1234567890",
  "transaction_date": "2026-06-02",
  "ref_number": "INV-1001",
  "bill_address": {
    "addr1": "123 Main St",
    "city": "Austin",
    "state": "TX",
    "postal_code": "78701"
  },
  "ship_address": {
    "addr1": "500 Warehouse Rd",
    "country": "US",
    "note": "Receiving dock"
  },
  "item_sales_tax_list_id": "80000006-1234567890",
  "customer_sales_tax_code_list_id": "80000007-1234567890",
  "memo": "Created via pre-built endpoint",
  "lines": [
    {
      "item_list_id": "80000002-1234567890",
      "description": "Implementation services",
      "quantity": 2,
      "rate": "150.00"
    }
  ]
}
'
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "request_xml": "<QBXML><QBXMLMsgsRq onError='stopOnError'><CustomerQueryRq requestID='1'><MaxReturned>100</MaxReturned></CustomerQueryRq></QBXMLMsgsRq></QBXML>",
    "connection_id": "123e4567-e89b-12d3-a456-426614174000",
    "request_json": {
      "version": "13.0",
      "request": {
        "name": "CustomerQueryRq",
        "attributes": {
          "request_id": "1"
        },
        "children": [
          {
            "name": "MaxReturned",
            "text": "100"
          }
        ]
      }
    },
    "response_xml": "<QBXML><QBXMLMsgsRs statusCode='0' statusSeverity='Info' statusMessage='Status OK'><CustomerQueryRs requestID='1' statusCode='0' statusSeverity='Info' statusMessage='Status OK'><CustomerRet><ListID>80000001-1234567890</ListID><Name>Sample Customer</Name></CustomerRet></CustomerQueryRs></QBXMLMsgsRs></QBXML>",
    "response_json": [
      {}
    ],
    "webhook_url": "https://example.com/webhook",
    "webhook_attempts": [
      {
        "attempted_at": "2023-11-07T05:31:56Z",
        "response": "<string>"
      }
    ],
    "webhook_error": "<string>",
    "error": {
      "message": "<string>",
      "code": "<string>",
      "details": {}
    },
    "links": {
      "self": "/api/v1/connections/123e4567-e89b-12d3-a456-426614174000/queued_requests/550e8400-e29b-41d4-a716-446655440000",
      "ui": "/app/queued_requests/550e8400-e29b-41d4-a716-446655440000",
      "connection_ui": "/app/connections/123e4567-e89b-12d3-a456-426614174000"
    },
    "inserted_at": "2023-01-01T12:00:00Z",
    "updated_at": "2023-01-01T12:00:01Z"
  }
}

Authorizations

Authorization
string
header
required

Use your app's API_KEY as the username, and leave the password blank

Path Parameters

connection_id
string<uuid>
required

ID of the connection to use for invoice creation

Query Parameters

request_id
string

A custom ID that can be used to identify the request and response. This could be your local ID for the request.

Example:

"1"

webhook_url
string<uri>

Optional URL to receive a webhook when the request is completed

Body

application/json
customer_list_id
string
required

Customer ListID for the invoice

transaction_date
string<date>
required

Invoice transaction date (YYYY-MM-DD)

lines
object[]
required

Invoice line items

Minimum array length: 1
class_list_id
string

Optional class ListID applied to the invoice (and line items unless overridden)

receivables_account_list_id
string

Optional accounts receivable account ListID

template_list_id
string

Optional invoice template ListID

ref_number
string

Optional user-defined reference number

bill_address
object

Optional bill-to address

ship_address
object

Optional ship-to address

purchase_order_number
string

Optional customer PO number

terms_list_id
string

Optional payment terms ListID

due_date
string<date>

Optional due date (YYYY-MM-DD)

memo
string

Optional memo for reports

customer_message_list_id
string

Optional customer message ListID

item_sales_tax_list_id
string

Optional tax item or tax group ListID applied to the entire invoice

customer_sales_tax_code_list_id
string

Optional customer sales tax code ListID applied to the invoice

is_pending
boolean

Whether the invoice is pending/draft

is_to_be_printed
boolean

Whether the invoice should be queued for print

is_to_be_emailed
boolean

Whether the invoice should be queued for email

Response

Invoice create request accepted and queued for processing. Returns a queued request object.

data
object