Get Customer

Use this when you need one customer as Hyfin has it, by its _id.


The following endpoint can be used to retrieve the details of a customer within the Hyfin application.


Endpoint

The following endpoint can be used to retrieve a customer. You must replace the {base_url} , {site_id} and {_id} variables with the appropriate values.

GET
{base_url}/api/v4/site/{site_id}/customer/{_id}
Request
No body is required for this API call
Response
Field
Type
Description
_id
String
The id we assign to this customer. Leave it out when creating a customer, and send it when updating one.
externalId
String
Your own id for this customer, from your software. Send the same externalId again to update this customer instead of adding a new one. We match on this value but do not stop duplicates, so keep it unique within the site.
displayName
String
The name that will be displayed for the customer.
accountName
String
The company or household name for the customer, such as ABC Company. It is the name shown for a customer with more than one contact, and for a customer with one contact only when no first or last name is sent.
contacts
A list of customer contacts. Required if primaryContact is not passed in.
parentCustomer
String
The id of the parent customer, if applicable.
billToParentFlag
Boolean
Set to true to send this customer's invoices to the parent customer to pay. Only applies when parentCustomer is set.
notes
String
Internal customer notes. Visible to merchant only.
attachmentRefs
A list of attachments.
createdAt
The date the customer was created. A moment in time in ISO 8601, with a time zone. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
updatedAt
The date the customer was last updated. A moment in time in ISO 8601, with a time zone. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
deleted
Boolean
Whether the customer record has been deleted and is no longer active.
Default = false
Sample Response
			
{
  "_id": "6839e415564d3cc2160d945e",
  "externalId": "39772634",
  "displayName": "ABC Plumbing",
  "accountName": null,
  "contacts": [
    {
      "_id": "6839e415564d3cc216032361",
      "isPrimary": true,
      "roles": []
    }
  ],
  "billToParentFlag": false,
  "notes": null,
  "attachmentRefs": {
    "internal": [],
    "external": []
  },
  "deleted": false,
  "createdAt": "2025-05-30T19:19:44.143Z",
  "updatedAt": "2025-05-30T19:19:44.143Z"
}


		

Related