Add/Update Item

Use this to keep the products and services you sell in Hyfin, so invoice lines can refer to them.


The following endpoint can be used to add or update an item within the Hyfin application.


Endpoint

The following endpoint can be used to add or update an item. You must replace the {base_url} and {site_id} variables with your issued host and the site id that was provided when the site was created.

POST
{base_url}/api/v4/site/{site_id}/item/addUpdate
Request
Field
Type
Description
_id
String
The id we assign to this item. Leave it out when creating an item, and send it when updating one.
externalId
String
Your own id for this item, from your software. Send the same externalId again to update this item instead of adding a new one. We match on this value but do not stop duplicates, so keep it unique within the site.
name
String
The name of the item.
description
String
The description of the item.
unitPrice
Number
The price per unit of the item. This is an integer number of cents, so 1035 means $10.35.
deleted
Boolean
This flag represents whether the record is deleted and no longer available to be used.
			
{
  "name": "Men's Large T-Shirt",
  "unitPrice": 1499,
  "deleted": false
}


		
Response
Field
Type
Description
success
Boolean
Whether the record was added or updated successfully.
action
String
Informs whether the record was added or updated. Will only be returned if success is true.
One of added, updated
_id
String
The id we assign to the record.
updatedAt
The date the record was last updated. A moment in time in ISO 8601, with a time zone. Format = YYYY-MM-DDTHH:mm:ss.SSSZ
errors
String [ ]
A list of errors. Will only be returned if success is false.
			
{
  "success": true,
  "action": "added",
  "_id": "60f720d248f143332af022e0",
  "updatedAt": "2025-05-30T19:19:44.143Z"
}


		

Related