Skip to main content

Suppliers

The Supplier entity represents a company you buy from. It is the counterpart of the Customer on the purchase side: every SupplierDocument (purchase invoice, credit note, ...) you receive is attached to a Supplier of your Portal.

Data format​

Common fields​

The Supplier object includes the id, portalId and lastUpdate common-fields. It does not carry a metadata field.

Specific fields​

You can find the detailed format for input and output in the reference.

  • legalName: The legal name of the supplier. Required.

  • legalIdentifier: The legal identifier of the supplier (the SIRET for a french company). Required, and unique among the suppliers of your portal: creating a second supplier with the same one fails with a 409. It therefore cannot be changed once the supplier is created: PATCH /suppliers/{id} rejects it.

  • postalAddress: The postal address of the supplier. Required.

  • tradeName, vatIdentifier, email, phone, contact: Optional details about the supplier.

Search your suppliers​

List your suppliers returns the suppliers of your portal, deleted ones excluded. Once you know the id of a supplier, retrieve it directly. Beyond the usual pagination and sorting, it accepts:

  • search: a free text query, matched against the legal name, the trade name, the legal identifier and the address fields.
  • legalName and legalIdentifier: an exact match on either field. legalIdentifier is the reliable way to find a known supplier, since it is unique in your portal.
  • tagIds: a comma separated list of tags. Only the suppliers carrying all of them are returned.
Curl request: GET /suppliers
curl -L -X GET 'https://api.infast.fr/api/v2/suppliers?legalIdentifier=81234567800017' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer [access_token]'
Response
{
"data": [
{
"id": "63e3c82675de4f6978054579",
"portalId": "63e3c82675de4f6978054555",
"legalName": "COGIP",
"legalIdentifier": "81234567800017",
"tradeName": "Cogip Brest",
"vatIdentifier": "FR12812345678",
"postalAddress": {
"street": "12 rue de Siam",
"postalCode": "29200",
"city": "Brest",
"country": "FRANCE"
},
"email": "compta@cogip29.com",
"phone": "02 98 01 02 03",
"tagIds": [],
"lastUpdate": "2026-09-16T17:32:28Z"
}
]
}

Create a supplier​

You can create a supplier with a POST request to /suppliers.

Curl request: POST /suppliers
curl -L -X POST 'https://api.infast.fr/api/v2/suppliers' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer [access_token]' \
--data-raw '{
"legalName": "COGIP",
"legalIdentifier": "81234567800017",
"tradeName": "Cogip Brest",
"vatIdentifier": "FR12812345678",
"postalAddress": {
"street": "12 rue de Siam",
"postalCode": "29200",
"city": "Brest",
"country": "FRANCE"
},
"email": "compta@cogip29.com",
"phone": "02 98 01 02 03"
}'

The response is the created supplier, in the same shape as the entries of the list above. Its id is what you attach a SupplierDocument to.

If the legalIdentifier is already used, the request fails with a 409. To find the supplier that holds it, list your suppliers filtered on legalIdentifier.

Delete a supplier​

A supplier that still has SupplierDocuments attached to it cannot be deleted: DELETE /suppliers/{id} fails with a 409. Delete the supplier documents first.

Deletion is logical: a deleted supplier is never returned again by the API.