Update bill

Updates a bill by ID.

Path parameters

idBillintegerRequired

Payabli ID for the bill. Get this ID by querying /api/Query/bills/ for the entrypoint or the organization.

Headers

requestTokenstringRequired

Request

This endpoint expects an object.
accountingField1stringOptional
Optional custom field.
accountingField2stringOptional
Optional custom field.
AdditionalDatastringOptional

Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. Example usage:

1{
2 "additionalData": {
3 "key1": "value1",
4 "key2": "value2",
5 "key3": "value3"
6 }
7}
attachmentslist of objectsOptional

An array of bill images. Attachments aren’t required, but we strongly recommend including them. Including a bill image can make payouts smoother and prevent delays. You can include either the Base64-encoded file content, or you can include an fURL to a public file. The maximum file size for image uploads is 30 MB.

billDatedateOptional

Date of bill. Accepted formats: YYYY-MM-DD, MM/DD/YYYY.

billItemslist of objectsOptional

Array of LineItems contained in bill.

billNumberstringOptional
Unique identifier for the bill. Required when adding a bill.
commentsstringOptional<=250 characters
Any comment or description.
dueDatedateOptional

Due date of bill. Accepted formats: YYYY-MM-DD, MM/DD/YYYY.

endDatedateOptional

End Date for scheduled bills. Applied only in Mode = 1. Accepted formats: YYYY-MM-DD, MM/DD/YYYY

frequencyenumOptional

Frequency for scheduled bills. Applied only in Mode = 1.

modeintegerOptional

Bill mode: value 0 for one-time bills, 1 for scheduled bills.

netAmountstringOptional
Net Amount owed in bill. Required when adding a bill.
statusintegerOptional

The bill’s status. Values are:

  • -99: deleted or canceled
  • 1: Active
  • 2: Sent to approval
  • 5: Partially approved
  • 11: Rejected
  • 20: Approved
  • 50: Payment in transit
  • 100: Paid ”
termsstringOptional

Payment terms for invoice. If no terms are defined, then response data for this field defaults to NET30.

Available Values:

  • PIA: Payment in advance

  • CIA: Cash in advance

  • UR: Upon receipt

  • NET10: 10 days after invoice date

  • NET20: 20 days after invoice date

  • NET30: 30 days after invoice date

  • NET45: 45 days after invoice date

  • NET60: 60 days after invoice date

  • NET90: 90 days after invoice date

  • EOM: Due end of this month

  • MFI: 1st of the month following the invoice date

  • 5MFI: 5th of the month following the invoice date

  • 10MFI: 10th of the month following the invoice date

  • 15MFI: 15th of the month following the invoice date

  • 20MFI: 20th of the month following the invoice date

  • 2/10NET30: 2% discount if paid within 10 days, otherwise net 30 days

  • UF: Until further notice

  • 10UF: 10 days until further notice

  • 20UF: 20 days until further notice

  • 25UF: 25 days until further notice

  • 50UF: 50 days until further notice

vendorobjectOptional

The vendor associated with the bill. Although you can create a vendor in a create bill request, Payabli recommends creating a vendor separately and passing a valid vendorNumber here. At minimum, the vendorNumber is required.

Response

Success
responseCodeinteger or null

Code for the response. Learn more in API Response Codes.

pageIdentifierstring or null
Auxiliary validation used internally by payment pages and components.
roomIdlong or null

Field not in use on this endpoint. It always returns 0.

isSuccessboolean or null

Boolean indicating whether the operation was successful. A true value indicates success. A false value indicates failure.

responseTextstring or null

Response text for operation: ‘Success’ or ‘Declined’.

responseDatainteger or null

If isSuccess = true, this contains the bill identifier. If isSuccess = false, this contains the reason for the error.

Errors