Send invoice

The following endpoint is used to send an invoice to a customer from the Hyfin application. The invoice will be sent via text message, email or both based on the notification options set on the customer record.


Endpoint

The following endpoint can be used to send an invoice. You must replace the {base_url} variable and replace the {site_id} variable with the site id that was provided when the site was created.

POST
{base_url}/api/v3.1/site/{site_id}/invoice/send
Request
Field
Type
Required
Description
external_id
String
The unique invoice id from the source system/database.
Sample Request
			
				{
  "external_id": "39772921"
}
			
		
Response
Field
Type
Description
success
Boolean
Whether the invoice was sent successfully.
action
String
Will only be returned if `success` is `true`.
One of `updated`
errors
String [ ]
A list of errors. Will only be returned if `success` is `false`.
Sample Response (Successful)
			
				{
  "success": true,
  "action": "updated"
}
			
		
Sample Response (Failed)
			
				{
  "success": false,
  "errors": [
    "Duplicate email sent < 300 sec. ago"
  ]
}