Update Invoice

Make as-needed changes to invoices that have been posted. Changes to invoices have limited implementation. Financial changes are done through reversals or re-issuing the invoice.

Request Parameters

PropertyTypeDescriptionRequired
idIntegerThis is the Fusebill generated ID of the draft invoice you wish to modify.Yes
notesStringBilling agents can write notes on draft invoices. Once posted, the note is final. [Max Length: 500 characters]Optional
netTermsSetBooleanThis primes Fusebill to change the invoice's net terms to something different than the default. Pair this with netTerms to define which value to set.Optional
netTermsEnum:{Net0, Net5, Net7, Net10, Net15, Net21, Net30, Net45, Net60, Net75, Net90, MFI1, DayOfMonth1, DayOfMonth2, DayOfMonth3, ... DayOfMonth29, DayOfMonth30, DayOfMonth31}Set non-default net terms on the invoice. Requires netTermsSet to be trueOptional
hideOnSSPBooleanHide invoice from appearing on Customer Portal when True and hideOnSSP set to True.Optional
hideOnSSPSetBooleanWhen set to True, it will update to the value set on hideOnSSP.Required to set the value of hideOnSSP.
curl -X PATCH "https://secure.fusebill.com/v1/Invoices/" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}" \
	-d "{id:{InvoiceId},notes:'I patched this note onto the  invoice.'}"
//Json Payload
string jsonData =
  "{id:{InvoiceId},notes:'I patched this note onto the invoice.'}";
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/Invoices/");
//Add Content type
request.ContentType = "application/json";
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic " + apiKey);
//Set request method
request.Method = "PATCH";
//Add the json data to request
using (var streamWriter = new StreamWriter(request.GetRequestStream()))
{
  streamWriter.Write(jsonData);
  streamWriter.Flush();
  streamWriter.Close();
}
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library JSON
import json
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in a dictionary to the Payload parameter
payload = {"id":{id},"notes":'I patched this note onto the invoice.'}
#Pass in your URI, Payload and Headers
r = requests.patch('https://secure.fusebill.com/v1/Invoices', data=json.dumps(payload), headers=headers)
print(r.content)
{
  "id": 123456
  "netTerms": "Net30",
  "netTermsSet": true,
  "hideOnSSP": true,
  "hideOnSSPSet": true,
}
Response
{
  "invoiceNumber": 283,
  "invoiceSignature": "<p><img src=\"https://fbhostedpagesdev.blob.core.windows.net/local/logo-636308250883322560.png\" alt=\"{user}\">  <strong>mattLtest</strong>  \n</p>\n<p><em>{user} |  | [][1]</em></p>\n<p>[1]: </p>\n",
  "poNumber": null,
  "effectiveTimestamp": "2017-06-09T13:16:43",
  "postedTimestamp": "2017-06-09T13:16:43",
  "charges": [
    {
      "quantity": 1,
      "unitPrice": 22,
      "amount": 22,
      "name": "Tiered product 2",
      "description": null,
      "glCode": "",
      "effectiveTimestamp": "2017-06-09T13:16:43",
      "proratedUnitPrice": null,
      "startServiceDate": "2017-06-09T13:16:43",
      "endServiceDate": "2017-06-25T04:00:00",
      "rangeQuantity": null,
      "isReversable": true,
      "discount": null,
      "discounts": [],
      "subscriptionProduct": {
        "id": 123456,
        "uri": "https://secure.fusebill.com/v1/subscriptionProducts/{ID}"
      },
      "purchase": null,
      "chargeTiers": [
        {
          "label": "0-2",
          "quantity": 1,
          "unitPrice": 22,
          "amount": 22
        }
      ],
      "id": 123456,
      "uri": null
    }
  ],
  "subtotal": 22,
  "invoiceAmount": 22,
  "totalPayments": 0,
  "outstandingBalance": 22,
  "terms": "Net10",
  "customerId": 123456,
  "invoiceCustomer": {
    "firstName": "John",
    "middleName": null,
    "lastName": "Smith",
    "companyName": null,
    "suffix": null,
    "primaryEmail": null,
    "primaryPhone": null,
    "secondaryEmail": null,
    "secondaryPhone": null,
    "title": "",
    "reference": null,
    "status": null,
    "customerAccountStatus": null,
    "currency": "USD",
    "customerReference": null,
    "customerAcquisition": null,
    "monthlyRecurringRevenue": 0,
    "netMonthlyRecurringRevenue": 0,
    "salesforceId": null,
    "salesforceAccountType": null,
    "salesforceSynchStatus": null,
    "netsuiteId": null,
    "netsuiteCustomerType": null,
    "portalUserName": null,
    "parentId": null,
    "quickBooksLatchType": null,
    "quickBooksId": null,
    "quickBooksSyncToken": null,
    "id": 0,
    "uri": null
  },
  "invoiceCustomerAddressPreference": {
    "contactName": null,
    "shippingInstructions": null,
    "useBillingAddressAsShippingAddress": false,
    "billingAddress": null,
    "shippingAddress": null,
    "id": 0,
    "uri": null
  },
  "sumOfCreditNotes": 0,
  "totalWriteoffs": 0,
  "taxes": [],
  "totalDiscount": 0,
  "paymentSchedules": [
    {
      "dueDateTimestamp": "2017-06-19T13:16:43",
      "status": "Due",
      "amount": 22,
      "outstandingBalance": 22,
      "daysDueAfterTerm": 0
    }
  ],
  "notes": "api test",
  "customerReferenceValue": "",
  "openingArBalance": 0,
  "closingArBalance": 22,
  "invoiceInMemoryOnly": false,
  "invoiceRevisions":[],
  "id": 162281,
  "uri": "https://secure.fusebill.com/v1/Invoices/{ID}"
}
Body Params
boolean

Toggle whether you're changing the Net Terms of the invoice.

string

Can only be set to an available value for net terms. Will change the due date of the invoice, and in some limited cases, may change the first due date of the payment schedule.

boolean

Toggle whether you're going to set the hide on SSP value in this payload.

boolean

Toggle visibility of the invoice to an end customer in the SSP. Typically used for voided invoices.

boolean

Toggle whether this payload will update the PO number of an invoice.

string

Update the PO number of the invoice. Will require a reason for being updated.
Note: This will also attempt to update the PO number in other systems, such as any connected tax calculation software. This may incur fees from those other platforms if they are charging per interaction.

string
required

Reason for changes being made to an invoice. Leave a note for a potential audit in the future.

string

Invoice ID. id value on a posted invoice.

Response
200
Language
Credentials
Header
LoadingLoading…