Invoices

Execute invoice modification

Changed on

Execute a modification on a draft or finalized invoice. Supports line item changes: add (bulk), update (one line item per call; the edit is versioned, so the line item id changes), and remove (bulk, soft delete). Totals are recalculated from the remaining line items; a manual edit marks the invoice as manually edited, which disables recompute. Modifying a FINALIZED invoice voids it and recreates it as a draft copy carrying all current data (description, billing period, due date, metadata, line items); the modification lands on the copy and the response returns the new draft — chain subsequent calls to the returned invoice id; a call that still targets the voided original is rejected with an error naming the replacement.

post/invoices/{id}/modify/execute

Request

  • Base URL
    https://us.api.flexprice.io/v1
  • URL
    https://us.api.flexprice.io/v1/invoices/{id}/modify/execute
  • Auth
    API key in header x-api-key

Path parameters

idstring required

Invoice ID

Request body

type'line_item' required

Response

OK

Changes

    • info

      added the optional property / to the response with the status

    • warning

      added the new END_OF_MONTH enum value to the // response property for the response status

    • warning

      added the new END_OF_NEXT_MONTH enum value to the // response property for the response status

    • warning

      added the new credit_note enum value to the /// response property for the response status

    • warning

      added the new not_collecting enum value to the / response property for the response status

    • warning

      added the new not_collecting enum value to the /// response property for the response status

    • warning

      added the new not_subject_to_tax enum value to the / response property for the response status

    • warning

      added the new not_subject_to_tax enum value to the /// response property for the response status

    • warning

      added the new not_supported enum value to the / response property for the response status

    • warning

      added the new not_supported enum value to the /// response property for the response status

    • warning

      added the new reverse_charge enum value to the / response property for the response status

    • warning

      added the new reverse_charge enum value to the /// response property for the response status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status