Skip to content

Cannot Create Invoice: endpoint expecting invoice data in body #166

@palunel

Description

@palunel

Using Python SDK v6.3.0

I make a call to the create_invoices method of the AccountingAPi:

response = self._accounting_api.create_invoices(self._tenant_id, [invoice], summarise_errors, unit_dp, idempotency_key)

where invoice is a valid Invoice object as per the SDK constructed using this method:

def invoice_request_model_dto(invoice: InvoiceIssueRequest) -> Invoice:

    line_items = [(LineItem(**item.model_dump())) for item in invoice.line_items]
    contact = Contact(
        name=invoice.company_name,
        addresses=[Address(**address_dto([invoice.company_address]))]
    )
    return Invoice(
        date=invoice.invoice_date,
        due_date=invoice.invoice_due_date,
        line_items=line_items,
        contact=contact
    )

I receive the following error:

"No data has been processed for this endpoint. This endpoint is expecting Invoice data to be specifed in the request body."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions