Invoices

Updates an invoice.

patch/invoices/{id}

Path parameters

idstring required

Unique identifier for the invoice.

Example:inv_1234567890

Request body

current_invoice_versionnumber required

Current version of the invoice. Must match the stored version.

Example request

{
  "current_invoice_version": 3,
  "tags": {
    "set": [
      {
        "key": "department",
        "value": "engineering"
      }
    ]
  },
  "line_items": {
    "update": [
      {
        "id": "li_1234567890",
        "price": {
          "amount": "2000"
        }
      }
    ]
  }
}

Response

Success

Example response

{
  "data": {
    "id": "inv_1234567890",
    "workspace_id": "ws_1234567890",
    "status": "active",
    "line_items": [
      {
        "id": "item_1234567890",
        "type": "payout",
        "product_id": "prod_1234567890",
        "amount": "1000",
        "price": {
          "amount": "1000",
          "unit_price": "1000",
          "quantity": 1
        },
        "currency_code": "USD",
        "description": "Professional services for January 2026",
        "user_id": "user_ext_456",
        "tags": [
          {
            "key": "department",
            "value": "engineering"
          }
        ]
      }
    ],
    "created": "2024-01-13T00:00:00Z",
    "modified": "2024-01-13T00:00:00Z",
    "version": 1,
    "tags": [
      {
        "key": "department",
        "value": "engineering"
      }
    ]
  }
}

Changes

Changed in 3 of the 38 revisions of this API.15

  • 8472a9bd15ea13See the full diff
    • removed subschema #1 subschema #2 from the line_items/create/items/user request property anyOf list

      request-property-any-of-removed

    • added the new optional request property line_items/update/items/tags/set

      new-optional-request-property

    • added the new optional request property tags/set

      new-optional-request-property

    • added subschema #1 subschema #2 to the line_items/create/items/user request property anyOf list

      request-property-any-of-added

    This revision also has 18 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • response property data/status deprecated

      response-property-deprecated

    • endpoint added

      endpoint-added

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog