How to add multiple items in invoiceCreate?

opc123opc123 Member Posts: 1

Hello,
We are able to create invoice with single item via API. For single item, we are using
items { product { id } quantity unitPrice } and in variable "items": { "productId": "test", "quantity": "1", "unitPrice": "80" }.
How can we add multiple items in this?
Thanks!

Comments

  • RobVGRobVG Member Posts: 53 admin

    Hi @opc123,

    You should be able to provide items as an array of objects, instead of a single object (example).

    Based on your example, it would look like:

    "items": [
      { "productId": "id1", "quantity": "1", "unitPrice": "80" },
      { "productId": "id2", "quantity": "1", "unitPrice": "80" }
    ]
    
Sign In or Register to comment.