Version 2.0
INFast API 2.0 is a big milestone for the Intia team. This changelog lists all the changes compared to INFast API 1.0.
The objectives of this new version are:
- Clean up the API design for more consistency,
- Provide a foundation for our future developments,
- Support a global overhaul of INFast.
You may also notice a change in the documentation. Indeed, we have decided to switch to Docusaurus. The goal is to provide you with cleaner, more functional documentation. You can easily make test requests directly in the API documentation. Here are the updates:
New Address
The first change is the new address for API V2. The base address is now https://api.infast.fr/api/v2. For consistency, the OAuth endpoint is now at this address: https://api.infast.fr/api/v2/oauth2/token.
It is also worth noting that there is no more demonstration platform for this version. We now invite you to use dedicated test accounts on the production platform. Feel free to contact support via chat for subscription issues or if you need us to transfer your data from the demo environment to the production environment.
New Response Format
All our endpoints now follow the same response format. The same applies to errors and Webhooks. Specifically, the change from the previous version is that responses are now encapsulated in a data field. For example:
{
"data": [
{
"id": "63e3c82675de4f6978054579",
"portalId": "63e3c82675de4f6978054555",
"name": "Item #1",
[Truncated]
},
{
"id": "666aa62f18a3a96aeb5d00b2",
"portalId": "63e3c82675de4f6978054555",
"name": "Item #2",
[Truncated]
},
{
"id": "666aa63fe883e6236f34ae07",
"portalId": "63e3c82675de4f6978054555",
"name": "Item #3",
[Truncated]
}
]
}
Update on Base Entity Models
We have revised the naming of the basic properties of our entities. This page presents the common properties. Key points to remember when transitioning from the previous version:
_idis now calledidcustomTagbecomesmetadata- The use of
lastUpdate(previously knowed aslastModDate) is now generalized
Product becomes Item
In the previous version, we referred to Product to describe what the company sold. We now refer to it as Item (to avoid saying a Product with type = product). Functionally, the entity remains the same. Note that this also applies to fields that reference this Item (e.g., itemId instead of productId).
Pagination Parameters
For consistency, the pagination parameters on list requests (for example here for Items) have been renamed:
| Old Name | New Name | Role |
|---|---|---|
orderBy | orderBy | The field name to sort by |
order | sortOrder | The order to sort by |
limit | limit | The limit of the number of results |
offset | skip | The number of results to skip (for pagination) |
Transaction and Transaction Usage
This new version provides read access to Transactions and Transaction Usages. Specifically, it allows you to track the movement of money and its accounting implications. More simply: tracking payments, and more 🤓.
These pages explains everything about Transaction and Transaction Usage
Transaction and Transaction Usage endpoints
- Transactions
- Transactions Usages
Modifications resource by resource
Portal
Portal schema modifications
- additions
lastUpdate: Last entity modification date
- modifications
_idbecomesidcustomTagbecomesmetadataenterprise.vatThe European intra-Community VAT identifier becomesenterprise.vatIdpackwhich could have had valuesproorfuriousnow have the valuesPROorFURIOUSrecurrencewhich could have had valuesnone,monthly,yearlyorbi-yearlynow have the valuesNONE,MONTHLY,YEARLYorBI_YEARLY
- deletions
accountantLockPeriodfield is deleted
Portal endpoints modifications
- Update current Portal
- body parameters modified
enterprise.vatThe European intra-Community VAT identifier becomesenterprise.vatId
- body parameters modified
Customers
Customers schema modifications
- additions
portalId: Unique identifier of the portal ownwing this resourcelastUpdate: Last entity modification date
- modifications
_idbecomesidcustomTagbecomesmetadatavatThe European intra-Community VAT identifier becomesvatId
- deletions
deletedfield is deleted.paymentsfield is deleted. You need use the List transaction of a customer endpoint to retrieve Transactions
Customers new endpoints
Customers endpoints modifications
- List Customers
- new query parameters
orderby: allow new possible values [lastUpdate, name, reference, phone, dueAmount, documentsCount]updatedSinceupdatedUntilminimumDueAmountmaximumDueAmountdocumentStatus
- new query parameters
- Create a Customer
- body parameters modified
vatThe European intra-Community VAT identifier is replaced byvatId
- body parameters modified
- Update a Customer
- body parameters modified
vatThe European intra-Community VAT identifier is replaced byvatId
- body parameters modified
Customers new webhook
Items
Items schema modifications
- additions
portalId: Unique identifier of the portal ownwing this resourcelastUpdate: Last entity modification date
- modifications
_idbecomesidcustomTagbecomesmetadataisServicewas a boolean and becomestypewhich can have one of values [PRODUCTorSERVICE]
- deletions
deletedfield is deleted.
Items endpoints modifications
- List Items
- new query parameters
orderby: allow new possible values [lastUpdate, name, type, reference, price]updatedSinceupdatedUntiltypeminimumPricemaximumPrice
- new query parameters
- Create an Item
- body parameters modified
isServicewas a boolean and becomestypewhich can have one of values [PRODUCTorSERVICE]
- body parameters modified
- Update an Item
- body parameters modified
isServicewas a boolean and becomestypewhich can have one of values [PRODUCTorSERVICE]
- body parameters modified
Items new webhook
Documents
Documents schema modifications
- additions
portalId: Unique identifier of the portal ownwing this resourcelastUpdate: Last entity modification date
- modifications
_idbecomesidcustomTagbecomesmetadatasubtype: new possible values:ORDER_FORM,DELIVERY_NOTEandCUSTOMtype: new possible value:OTHERfor subtypeORDER_FORM,DELIVERY_NOTEandCUSTOMstatus: a new possible valueCLOSEDexist forOTHERdocument typerefIntbecomesreferenceInternalamountVatsbecomesvatSummaryamountVats.amountVatbecomesvatSummary.vatParthistoryEmailsbecomesmessagesand have a new fieldinboxUrlrepresenting the url to see this document in INFast INBoxhistoryEmails.sourcebecomesmessages.sourceand have had possible valuesportalorcustomerhave now valuesPORTALorCUSTOMERfrom.vatThe European intra-Community VAT identifier becomesfrom.vatIdto.vatThe European intra-Community VAT identifier becomesto.vatIdlineshas know 3 different schemas to representitem,grouporcomment- no changes for
groupandcomment - for
item:lineTypewasproductis nowITEMproductIdbecomesitemIdisServicewas a boolean and becomestypewhich can have one of values [PRODUCTorSERVICE]isNewLine: Only use on situation invoice. True if this line was not on quotation and not on a previous situationcomputeMethod: To avoid rounding issues, this specify which reference field to consider for the price:PRICE,AMOUNT, orAMOUNT_WITH_VAT.
- for
group:lineTypewasgroupis nowGROUP
- for
comment:lineTypewascommentis nowCOMMENT
- no changes for
deposit: has some new fieldsreferenceTemporary,originalQuotationReferenceTemporaryandoriginalQuotationDepositPercentdeposit.payedDatebecomesdeposit.paidDateprevDoc.refIntbecomesprevDoc.referenceInternalnextDochas a new fieldreferenceTemporary
- deletions
deletedfield is deleted.paymentsfield is deleted. You need you the List Transaction Usage of a document endpoint to retrieve Transaction Usages
Documents new endpoints
Documents endpoints modifications
- List Documents
- new query parameters
orderby: allow new possible values [lastUpdate, emitDate, to.name, reference, amount]subtypereferencecustomerIdupdatedSinceupdatedUntilstartEmitDateendEmitDateminimumAmountmaximumAmountminimumAmountWithVatmaximumAmountWithVat
- new query parameters
- Create Document
- body parameters modified
- See schema modification
- body parameters modified
- Send a message about document
- the endpoint in V1 was
/api/v1/documents/:id/email, now it's/api/v2/documents/:id/messages
- the endpoint in V1 was
- Add a payment
- response schema has changed as payments have been replaced by transactions. See the endpoint definition
Documents webhook modifications
-
invoice.paidAs payment has been replaced by Transactions and Transaction Usages the payload of the webhook event
invoice.paidchange. Instead return the paid document in datafield, now we return an object with the document and all its transaction usages:
{
id: string,
portalId: string,
event: {
eventId: string,
data: {
document: Document,
transactionUsages: [TransactionUsage],
}
}
}