Create a bill

POST/accounting/{connection_id}/bill

Parameters

fieldsstring array
Fields to return
rawstring
Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
connection_idstring required
ID of the connection

Payload

idstring
bill_numberstring
External identifier for this invoice
created_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
due_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
paid_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
refunded_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
cancelled_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
posted_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
total_amountnumber
paid_amountnumber
refund_amountnumber
tax_amountnumber
discount_amountnumber
balance_amountnumber
contact_idstring
(reference to AccountingContact)
currencystring
notesstring
refund_reasonstring
lineitems array
status enum
Valid values:
"DRAFT"
"VOIDED"
"AUTHORIZED"
"PAID"
"PARTIALLY_PAID"
urlstring
The public URL for the invoice to send to a customer to view or pay.
payment_collection_method enum
Valid values:
"send_invoice"
"charge_automatically"
When set to charging_automatically, an automated attempt will occur to pay this invoice using the default payment source attached to the contactcustomer. When set to send_invoice, an will email will be sent with this invoice to the contact/customer with payment instructions.
attachments array
sendboolean
organization_idstring

Returns

idstring
bill_numberstring
External identifier for this invoice
created_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
due_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
paid_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
refunded_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
cancelled_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
posted_atdate
(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
total_amountnumber
paid_amountnumber
refund_amountnumber
tax_amountnumber
discount_amountnumber
balance_amountnumber
contact_idstring
(reference to AccountingContact)
currencystring
notesstring
refund_reasonstring
lineitems array
status enum
Valid values:
"DRAFT"
"VOIDED"
"AUTHORIZED"
"PAID"
"PARTIALLY_PAID"
urlstring
The public URL for the invoice to send to a customer to view or pay.
payment_collection_method enum
Valid values:
"send_invoice"
"charge_automatically"
When set to charging_automatically, an automated attempt will occur to pay this invoice using the default payment source attached to the contactcustomer. When set to send_invoice, an will email will be sent with this invoice to the contact/customer with payment instructions.
attachments array
sendboolean
organization_idstring
const options = {
  method: 'POST',
  url: 'https://api.unified.to/accounting/5de520f96e439b002043d8dc/bill',
  headers: {
    authorization: 'bearer .....'
  },
  data: undefined,
  params: {
    fields: '',
    raw: '',
  }
};

const results = await axios.request(options);
Are we missing anything? Let us know
Was this page helpful?