Download OpenAPI specification:
This API manages EDI (Electronic Data Interchange) data in an agricultural context: ingestion and parsing of EDI files (EDIFACT, Agrial formats), catalogs, products, customers and invoices, and the integration with the Fred accounting backend (via REST and Azure Service Bus). It is part of the larger Fred platform and is consumed by other Fred services.
All endpoints are protected and require a valid Fred bearer token, except where explicitly marked as anonymous. Authentication and authorization follow the common Inqom mechanism shared by every Fred microservice.
See the shared Inqom authentication documentation for how to obtain a token and call the API behind the gateway.
| Environment | Base URL |
|---|---|
| Production | https://api.inqom.com/ediagri |
| Staging | https://api-staging.inqom.com/ediagri |
| enterpriseId required | integer <int32> The unique identifier of the enterprise that owns the company. |
| companyId required | integer <int32> The unique identifier of the company to retrieve accounting folders for. |
[- {
- "Id": 0,
- "AccountingFolderName": "string",
- "ExternalId": "string",
- "FullName": "string"
}
]| enterpriseId required | integer <int32> |
| cooperativeId required | integer <int32> |
{- "Id": 0,
- "Name": "string",
- "Siret": "string",
- "Account": {
- "AccountId": 0,
- "AccountName": "string"
}, - "Catalog": {
- "Id": 0,
- "Name": "string"
}, - "CustomerCount": 0
}| enterpriseId required | integer <int32> |
| cooperativeId required | integer <int32> |
| Name required | string non-empty |
| CatalogId required | integer <int32> |
| AccountId required | integer <int32> |
{- "Name": "string",
- "CatalogId": 0,
- "AccountId": 0
}{- "Id": 0,
- "Name": "string",
- "Siret": "string",
- "Account": {
- "AccountId": 0,
- "AccountName": "string"
}, - "Catalog": {
- "Id": 0,
- "Name": "string"
}, - "CustomerCount": 0
}| enterpriseId required | integer <int32> |
| Name required | string non-empty |
| Siret required | string non-empty |
| CatalogId required | integer <int32> |
| AccountId required | integer <int32> |
{- "Name": "string",
- "Siret": "string",
- "CatalogId": 0,
- "AccountId": 0
}{- "Id": 0,
- "Name": "string",
- "Siret": "string",
- "Account": {
- "AccountId": 0,
- "AccountName": "string"
}, - "Catalog": {
- "Id": 0,
- "Name": "string"
}, - "CustomerCount": 0
}| enterpriseId required | integer <int32> |
| PageNumber required | integer <int32> Default: 1 |
| PageSize required | integer <int32> Default: 100 |
| SearchText | string or null |
| SortColumn | string or null Enum: "Name" "Catalog" "Siret" "Account" "Journal" "CustomerCount" |
| SortDirection | string or null Enum: "Ascending" "Descending" |
{- "PageNumber": 1,
- "PageSize": 100,
- "SearchText": "string",
- "SortColumn": "Name",
- "SortDirection": "Ascending"
}{- "Items": [
- {
- "Id": 0,
- "Name": "string",
- "Siret": "string",
- "Account": {
- "AccountId": 0,
- "AccountName": "string"
}, - "Catalog": {
- "Id": 0,
- "Name": "string"
}, - "CustomerCount": 0
}
], - "PageNumber": 1,
- "PageSize": 1,
- "TotalCount": 1,
- "PageCount": 0,
- "HasPreviousPage": false,
- "HasNextPage": false
}| enterpriseId required | integer <int32> |
| customerId required | integer <int32> |
{- "Id": 0,
- "CompanyId": 0,
- "AccountingFolderId": 0,
- "AccountingFolderName": "string",
- "Name": "string",
- "Reference": "string",
- "Siret": "string",
- "IsReady": true
}| enterpriseId required | integer <int32> |
| customerId required | integer <int32> |
| Name | string or null |
| CompanyId | integer <int32> |
| AccountingFolderId | integer <int32> |
{- "Name": "string",
- "CompanyId": 0,
- "AccountingFolderId": 0
}{- "Id": 0,
- "CompanyId": 0,
- "AccountingFolderId": 0,
- "AccountingFolderName": "string",
- "Name": "string",
- "Reference": "string",
- "Siret": "string",
- "IsReady": true
}| enterpriseId required | integer <int32> |
| PageNumber required | integer <int32> Default: 1 |
| PageSize required | integer <int32> Default: 100 |
| FileBatchId | integer <int32> |
| SearchText | string or null |
| HasReadyCustomers | boolean |
| SortColumn | string or null Value: "Name" |
| SortDirection | string or null Enum: "Ascending" "Descending" |
{- "PageNumber": 1,
- "PageSize": 100,
- "FileBatchId": 0,
- "SearchText": "string",
- "HasReadyCustomers": true,
- "SortColumn": "Name",
- "SortDirection": "Ascending"
}{- "Items": [
- {
- "Id": 0,
- "CompanyId": 0,
- "AccountingFolderId": 0,
- "AccountingFolderName": "string",
- "Name": "string",
- "Reference": "string",
- "Siret": "string",
- "IsReady": true
}
], - "PageNumber": 1,
- "PageSize": 1,
- "TotalCount": 1,
- "PageCount": 0,
- "HasPreviousPage": false,
- "HasNextPage": false
}| enterpriseId required | integer <int32> |
| cooperativeId required | integer <int32> |
| file | string <binary> |
{- "SuccessfulRecords": 0,
- "Errors": [
- {
- "Message": "string",
- "Type": "RowSpecific",
- "Row": 0,
- "Column": "string"
}
], - "FailedRecords": 0,
- "RecordCount": 0
}| enterpriseId required | integer <int32> |
| fecImportId required | integer <int32> |
"Waiting"{- "Id": 0,
- "AccountingFirmId": 0,
- "AccountingFolderId": 0,
- "OperationId": 0,
- "Status": "Waiting"
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
| fileBatchId required | integer <int32> The identifier of the file batch. |
{- "Id": 0,
- "CooperativeId": 0,
- "CatalogId": 0,
- "CreatedByUserId": 0,
- "CreatedAt": "2019-08-24T14:15:22Z",
- "Status": "Received",
- "ErrorCodes": [
- "string"
], - "WarningCodes": [
- "string"
]
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
| fileBatchId required | integer <int32> The identifier of the file batch. |
The command to update the file batch.
| CooperativeId required | integer <int32> |
{- "CooperativeId": 0
}{- "Id": 0,
- "CooperativeId": 0,
- "CatalogId": 0,
- "CreatedByUserId": 0,
- "CreatedAt": "2019-08-24T14:15:22Z",
- "Status": "Received",
- "ErrorCodes": [
- "string"
], - "WarningCodes": [
- "string"
]
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
| fileBatchId required | integer <int32> The identifier of the file batch. |
[- {
- "Id": 0,
- "FileBatchId": 0,
- "ProductId": 0,
- "ProductCode": "string",
- "ProductLabel": "string",
- "ProductFamilyCode": "string",
- "ProductFamilyLabel": "string",
- "IsContributionAccountRequired": true,
- "IsSupplyAccountRequired": true,
- "IsReady": true,
- "ProductContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "ProductSupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "ProductFamilyContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "ProductFamilySupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}
}
]| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
The search query parameters.
| PageNumber required | integer <int32> Default: 1 |
| PageSize required | integer <int32> Default: 100 |
| Status | string or null Enum: "Received" "InProcess" "Waiting" "Ready" "Done" "Error" |
| SearchText | string or null |
| SortColumn | string or null Value: "CreatedAt" |
| SortDirection | string or null Enum: "Ascending" "Descending" |
| FileBatchId | integer <int32> |
{- "PageNumber": 1,
- "PageSize": 100,
- "Status": "Received",
- "SearchText": "string",
- "SortColumn": "CreatedAt",
- "SortDirection": "Ascending",
- "FileBatchId": 0
}{- "Items": [
- {
- "Id": 0,
- "CooperativeId": 0,
- "CatalogId": 0,
- "CreatedByUserId": 0,
- "CreatedAt": "2019-08-24T14:15:22Z",
- "Status": "Received",
- "ErrorCodes": [
- "string"
], - "WarningCodes": [
- "string"
]
}
], - "PageNumber": 1,
- "PageSize": 1,
- "TotalCount": 1,
- "PageCount": 0,
- "HasPreviousPage": false,
- "HasNextPage": false
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
| Files required | Array of strings <binary> [ items <binary > ] |
{- "Id": 0,
- "CooperativeId": 0,
- "CatalogId": 0,
- "CreatedByUserId": 0,
- "CreatedAt": "2019-08-24T14:15:22Z",
- "Status": "Received",
- "ErrorCodes": [
- "string"
], - "WarningCodes": [
- "string"
]
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
The command to delete file batches.
| FileBatchIds required | Array of integers <int32> [ items <int32 > ] |
{- "FileBatchIds": [
- 0
]
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
| fileBatchId required | integer <int32> The identifier of the file batch. |
{- "IsSuccess": true,
- "Errors": [
- "string"
]
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
| fileBatchId required | integer <int32> The identifier of the file batch. |
{- "Id": 0,
- "CooperativeId": 0,
- "CatalogId": 0,
- "CreatedByUserId": 0,
- "CreatedAt": "2019-08-24T14:15:22Z",
- "Status": "Received",
- "ErrorCodes": [
- "string"
], - "WarningCodes": [
- "string"
]
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
| fileBatchId required | integer <int32> The identifier of the file batch. |
The command to set the file batch as error.
| ErrorCodes required | Array of strings |
{- "ErrorCodes": [
- "string"
]
}{- "Id": 0,
- "CooperativeId": 0,
- "CatalogId": 0,
- "CreatedByUserId": 0,
- "CreatedAt": "2019-08-24T14:15:22Z",
- "Status": "Received",
- "ErrorCodes": [
- "string"
], - "WarningCodes": [
- "string"
]
}| enterpriseId required | integer <int32> The identifier of the accounting firm (enterprise). |
The command to send file batches.
| FileBatchIds required | Array of integers <int32> [ items <int32 > ] |
{- "FileBatchIds": [
- 0
]
}| enterpriseId required | integer <int32> |
| productId required | integer <int32> |
{- "Id": 0,
- "Code": "string",
- "Label": "string",
- "ContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "SupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "TaxAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "MeasureUnit": "string",
- "CatalogId": 0,
- "ProductFamilyId": 0,
- "IsReady": true,
- "IsContributionAccountRequired": true,
- "IsSupplyAccountRequired": true
}| enterpriseId required | integer <int32> |
| productId required | integer <int32> |
| Id required | integer <int32> |
| ContributionAccountId | integer <int32> |
| SupplyAccountId | integer <int32> |
| TaxAccountId | integer <int32> |
{- "Id": 0,
- "ContributionAccountId": 0,
- "SupplyAccountId": 0,
- "TaxAccountId": 0
}{- "Id": 0,
- "Code": "string",
- "Label": "string",
- "ContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "SupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "TaxAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "MeasureUnit": "string",
- "CatalogId": 0,
- "ProductFamilyId": 0,
- "IsReady": true,
- "IsContributionAccountRequired": true,
- "IsSupplyAccountRequired": true
}| enterpriseId required | integer <int32> |
| PageNumber required | integer <int32> Default: 1 |
| PageSize required | integer <int32> Default: 100 |
| FileBatchId | integer <int32> |
| CatalogId | integer <int32> |
| ProductFamilyId | integer <int32> |
| HasContributionAccount | boolean |
| HasSupplyAccount | boolean |
| HasTaxAccount | boolean |
| HasReadyProducts | boolean |
| SearchText | string or null |
| SortColumn | string or null Enum: "Code" "Label" |
| SortDirection | string or null Enum: "Ascending" "Descending" |
{- "PageNumber": 1,
- "PageSize": 100,
- "FileBatchId": 0,
- "CatalogId": 0,
- "ProductFamilyId": 0,
- "HasContributionAccount": true,
- "HasSupplyAccount": true,
- "HasTaxAccount": true,
- "HasReadyProducts": true,
- "SearchText": "string",
- "SortColumn": "Code",
- "SortDirection": "Ascending"
}{- "Items": [
- {
- "Id": 0,
- "Code": "string",
- "Label": "string",
- "ContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "SupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "TaxAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "MeasureUnit": "string",
- "CatalogId": 0,
- "ProductFamilyId": 0,
- "IsReady": true,
- "IsContributionAccountRequired": true,
- "IsSupplyAccountRequired": true
}
], - "PageNumber": 1,
- "PageSize": 1,
- "TotalCount": 1,
- "PageCount": 0,
- "HasPreviousPage": false,
- "HasNextPage": false
}| enterpriseId required | integer <int32> |
| File required | string <binary> |
{- "SuccessfulRecords": 0,
- "Errors": [
- {
- "Message": "string",
- "Type": "RowSpecific",
- "Row": 0,
- "Column": "string"
}
], - "FailedRecords": 0,
- "RecordCount": 0
}| enterpriseId required | integer <int32> |
| productFamilyId required | integer <int32> |
{- "Id": 0,
- "Code": "string",
- "Label": "string",
- "ContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "SupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "TaxAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "ProductCount": 0,
- "CatalogId": 0
}| enterpriseId required | integer <int32> |
| productFamilyId required | integer <int32> |
| Label | string or null |
| Code required | string non-empty |
| ContributionAccountId | integer <int32> |
| SupplyAccountId | integer <int32> |
| TaxAccountId | integer <int32> |
{- "Label": "string",
- "Code": "string",
- "ContributionAccountId": 0,
- "SupplyAccountId": 0,
- "TaxAccountId": 0
}{- "Id": 0,
- "Code": "string",
- "Label": "string",
- "ContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "SupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "TaxAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "ProductCount": 0,
- "CatalogId": 0
}| enterpriseId required | integer <int32> |
| PageNumber required | integer <int32> Default: 1 |
| PageSize required | integer <int32> Default: 100 |
| CatalogId | integer <int32> |
| HasContributionAccount | boolean |
| HasSupplyAccount | boolean |
| HasTaxAccount | boolean |
| SearchText | string or null |
| SortColumn | string or null Enum: "Code" "Label" |
| SortDirection | string or null Enum: "Ascending" "Descending" |
{- "PageNumber": 1,
- "PageSize": 100,
- "CatalogId": 0,
- "HasContributionAccount": true,
- "HasSupplyAccount": true,
- "HasTaxAccount": true,
- "SearchText": "string",
- "SortColumn": "Code",
- "SortDirection": "Ascending"
}{- "Items": [
- {
- "Id": 0,
- "Code": "string",
- "Label": "string",
- "ContributionAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "SupplyAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "TaxAccount": {
- "AccountId": 0,
- "AccountName": "string"
}, - "ProductCount": 0,
- "CatalogId": 0
}
], - "PageNumber": 1,
- "PageSize": 1,
- "TotalCount": 1,
- "PageCount": 0,
- "HasPreviousPage": false,
- "HasNextPage": false
}| enterpriseId required | integer <int32> |
| File required | string <binary> |
{- "SuccessfulRecords": 0,
- "Errors": [
- {
- "Message": "string",
- "Type": "RowSpecific",
- "Row": 0,
- "Column": "string"
}
], - "FailedRecords": 0,
- "RecordCount": 0
}