PUT
/
invoices
/
{invoiceId}
curl --request PUT \
  --url https://connect.withvayu.com/invoices/{invoiceId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customerId": "<string>",
  "contractId": "<string>",
  "name": "<string>",
  "billingCycle": {
    "startTime": "2023-11-07T05:31:56Z",
    "endTime": "2023-11-07T05:31:56Z"
  },
  "lineItems": [
    {
      "invoiceId": "<string>",
      "revenueBreakdown": {
        "total": 123,
        "subtotal": 123,
        "overage": 123,
        "discount": 123,
        "creditsUsed": 123,
        "tax": 1
      }
    }
  ],
  "amount": 123
}'
{
  "invoice": {
    "customerId": "<string>",
    "contractId": "<string>",
    "name": "<string>",
    "billingCycle": {
      "startTime": "2023-11-07T05:31:56Z",
      "endTime": "2023-11-07T05:31:56Z"
    },
    "lineItems": [
      {
        "invoiceId": "<string>",
        "revenueBreakdown": {
          "total": 123,
          "subtotal": 123,
          "overage": 123,
          "discount": 123,
          "creditsUsed": 123,
          "tax": 1
        }
      }
    ],
    "amount": 123,
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

invoiceId
string
required

Body

application/json
customerId
string

The id of the customer that the invoice is associated with

contractId
string

The id of the contract that the invoice is associated with

name
string

The name of the invoice, usually a description of the billing period

Minimum length: 1
billingCycle
object

The billing cycle of the invoice, consists of a start and end date

lineItems
object[]
amount
number

The total amount of the invoice

Response

200
application/json
RequestSuccess
invoice
object
required