Items
The Item entity represents a service (labor, consulting, travel) or a product (a faucet, a sandwich, clothing). This entity populates the item catalog of the portal on INFast. Items can then be used in a Document (invoice, quotation, etc.).
Data format
Common fields
The Item object includes all common-fields.
Specific fields
You can find the detailed format for input and output in the reference.
-
type
: From an accounting and tax perspective, it's important to differentiate between goods and services. That's why each item has atype
field which is eitherservice
orproduct
. -
price
: This is the default price (excluding tax) when adding the item to a Document. -
vat
: This is the default VAT rate applied when adding the item to a Document. -
buyingPrice
: This is the purchase price of the item. It is used to calculate the margin on the item.
Create an item
You can create an item with a POST request to /items.
curl -L -X POST 'https://api.infast.fr/api/v2/items' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer [access_token]' \
--data-raw '{
"name": "Sceance de coaching",
"price": 250,
"vat": 20,
"description": "Scéance de coaching personalisée",
"type": "service",
"buyingPrice": 120,
}'
{
"id": "63e3c82675de4f6978054579",
"portalId": "63e3c82675de4f6978054555",
"name": "Sceance de coaching",
"price": 250,
"vat": 20,
"description": "Scéance de coaching personalisée",
"reference": "P-000123",
"type": "service",
"buyingPrice": 120,
"lastUpdate": "2023-07-21T17:32:28Z"
}
Once your have created an item, you can create a document
Document immutability
Documents generated and validated in INFast must be immutable by law. Therefore, when a Document is created, the information of its Items is copied into it. If the Item is modified after the Document is created, the modification will not be reflected in previous Documents.