Agicap Invoice Flows API
The Invoice Flows API from Agicap — 4 operation(s) for invoice flows.
The Invoice Flows API from Agicap — 4 operation(s) for invoice flows.
openapi: 3.0.0
info:
contact: {}
title: Clients AR Account reports Invoice Flows API
version: v1
servers:
- url: https://api.agicap.com
- url: https://api.agicap.internal
tags:
- name: Invoice Flows
paths:
/public/einvoicing/v1/flows:
post:
description: 'A flow is a single-invoice file, with:
- an XML/PDF file with the data of the invoice
The flow is created with a FlowInfo object, allowing to qualify the flow.
A flow can be:
- an invoice (CII, UBL, Factur-X, JsonInvoice...)
- a lifecycle (CDAR)
- or an e-reporting file'
operationId: CreateFlow
parameters:
- in: query
name: flowInfo
required: true
schema:
$ref: '#/components/schemas/FlowInfo'
- in: header
name: Request-Id
schema:
format: uuid
type: string
- description: 'Allowed values: Production, Sandbox. Defaults to Production when not specified.'
in: header
name: X-FlowMode
schema:
type: string
requestBody:
content:
multipart/form-data:
encoding:
file:
style: form
schema:
properties:
file:
format: binary
type: string
type: object
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/FullFlowInfo'
text/json:
schema:
$ref: '#/components/schemas/FullFlowInfo'
text/plain:
schema:
$ref: '#/components/schemas/FullFlowInfo'
description: 'OK - Response message once the flow has been uploaded. '
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
$ref: '#/components/schemas/Error'
description: 'Error 400 : Bad request.'
'401':
description: Unauthorized request.
'403':
description: Forbidden request.
'429':
description: Too many requests. Please try again later.
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
description: 'Error 500 : Server Internal Error.'
'503':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
$ref: '#/components/schemas/Error'
description: 'Error 503 : Unavailable Resource.'
security:
- bearer_client_credentials:
- agicap:public-api
- bearer_client_credentials:
- agicap:public-api
- bearerAuth: []
summary: Create a flow
tags:
- Invoice Flows
/public/einvoicing/v1/flows/json/validate:
post:
description: This allows to validate the JSON invoice before uploading it.
operationId: ValidateJsonFlow
parameters:
- in: query
name: country
schema:
$ref: '#/components/schemas/ValidationCountry'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PivotInvoice'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AcknowledgementResult'
text/json:
schema:
$ref: '#/components/schemas/AcknowledgementResult'
text/plain:
schema:
$ref: '#/components/schemas/AcknowledgementResult'
description: 'OK - Response message once the flow has been validated. '
'401':
description: Unauthorized request.
'403':
description: Forbidden request.
'429':
description: Too many requests. Please try again later.
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
description: An internal server occurred.
security:
- bearer_client_credentials:
- agicap:public-api
- bearer_client_credentials:
- agicap:public-api
- bearerAuth: []
summary: Validate a JSON invoice.
tags:
- Invoice Flows
/public/einvoicing/v1/flows/search:
post:
description: "Retrieves a set of flows matching the provided search criteria: \n- When setting flowId, do not specify other criteria \n- Need at least one criterion to be specified \n- Assuming a logical AND when combining criteria \n- Assuming a logical OR for criteria allowing a list of values\n\nPagination works with pages: \n- In the request, provide the page to be returned \n- In the response, the total count of items"
operationId: SearchFlow
parameters:
- in: header
name: Request-Id
schema:
format: uuid
type: string
requestBody:
content:
application/json:
example:
limit: 25
offset: 0
where:
ackStatus: Ok
electronicAddress: 0225:123456789
flowDirection: Out
flowId: 019f7277-202e-78a9-aacc-2b9b519c0458
flowMode: Production
flowType: CustomerInvoice
trackingId: 019f7277-202e-79d2-81e4-0880c309eec3
updatedAfter: '2026-07-17T23:43:57.4867414Z'
updatedBefore: '2026-07-17T23:43:57.4867419Z'
schema:
$ref: '#/components/schemas/SearchFlowParams'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SearchFlowContent'
text/json:
schema:
$ref: '#/components/schemas/SearchFlowContent'
text/plain:
schema:
$ref: '#/components/schemas/SearchFlowContent'
description: 'OK - Response message when returning the results of a search request. - Holds all the results if code is 200 - Holds partial content if code is 206 '
'206':
content:
application/json:
schema:
$ref: '#/components/schemas/SearchFlowContent'
text/json:
schema:
$ref: '#/components/schemas/SearchFlowContent'
text/plain:
schema:
$ref: '#/components/schemas/SearchFlowContent'
description: 'OK - Response message when returning the results of a search request. - Holds all the results if code is 200 - Holds partial content if code is 206 '
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
$ref: '#/components/schemas/Error'
description: 'Error 400 : Bad request.'
'401':
description: Unauthorized request.
'403':
description: Forbidden request.
'429':
description: Too many requests. Please try again later.
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
description: 'Error 500 : Server Internal Error.'
'503':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
$ref: '#/components/schemas/Error'
description: 'Error 503 : Unavailable Resource.'
security:
- bearer_client_credentials:
- agicap:public-api
- bearer_client_credentials:
- agicap:public-api
- bearerAuth: []
summary: Select flows upon criteria
tags:
- Invoice Flows
/public/einvoicing/v1/flows/{flowId}:
get:
description: 'Download a file related to a given flow:
- an invoice
- a life cycle
- an e-reporting'
operationId: GetFlow
parameters:
- description: Flow identifier
in: path
name: flowId
required: true
schema:
format: uuid
type: string
- description: 'This parameter allows to provide the type of file to be uploaded, can be either one:
- Original: the document that has been initially sent/provided by the emitter
- Converted: the document that has been optionally converted by the system
- ReadableView: the document that has been optionally generated as the readable file
- Attachment: one of the attached documents, provide the optional index if needed'
in: query
name: docType
schema:
$ref: '#/components/schemas/FlowDocType'
- description: If docType is an Attachment and in case there are several attached documents, it says which one to address
in: query
name: docIndex
schema:
format: int32
type: integer
- description: If docType is Converted, it says in which format to convert. By default, it is Json
in: query
name: docFormat
schema:
$ref: '#/components/schemas/FlowDocFormat'
responses:
'200':
content:
application/json: {}
application/pdf: {}
application/xml: {}
description: Ok
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
$ref: '#/components/schemas/Error'
description: 'Error 400 : Bad request.'
'401':
description: Unauthorized request.
'403':
description: Forbidden request.
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
$ref: '#/components/schemas/Error'
description: 'Error 404 : Resource Not Found.'
'429':
description: Too many requests. Please try again later.
'500':
content:
application/problem+json:
schema:
$ref: '#/components/schemas/ProblemDetails'
description: 'Error 500 : Server Internal Error.'
'503':
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
text/json:
schema:
$ref: '#/components/schemas/Error'
text/plain:
schema:
$ref: '#/components/schemas/Error'
description: 'Error 503 : Unavailable Resource.'
security:
- bearer_client_credentials:
- agicap:public-api
- bearer_client_credentials:
- agicap:public-api
- bearerAuth: []
summary: Download a flow
tags:
- Invoice Flows
components:
schemas:
SellerAgentAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
postalCode:
nullable: true
type: string
region:
nullable: true
type: string
type: object
ExtBillingService:
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/BillingServiceAddress'
businessName:
nullable: true
type: string
contact:
$ref: '#/components/schemas/BillingServiceContact'
electronicAddress:
nullable: true
type: string
identifier:
items:
type: string
nullable: true
type: array
legalRegistrationId:
nullable: true
type: string
registrationName:
nullable: true
type: string
roleCode:
nullable: true
type: string
vatId:
nullable: true
type: string
type: object
BuyerAgentContact:
additionalProperties: false
properties:
email:
nullable: true
type: string
name:
nullable: true
type: string
telephone:
nullable: true
type: string
type: object
ItemAttribute:
additionalProperties: false
properties:
name:
nullable: true
type: string
value:
nullable: true
type: string
type: object
Note:
additionalProperties: false
properties:
noteCode:
nullable: true
type: string
noteValue:
nullable: true
type: string
type: object
TaxRepresentativeAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
countrySubdivision:
nullable: true
type: string
postalCode:
nullable: true
type: string
type: object
ExtSellerAgent:
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/SellerAgentAddress'
businessName:
nullable: true
type: string
contact:
$ref: '#/components/schemas/SellerAgentContact'
electronicAddress:
nullable: true
type: string
identifier:
items:
type: string
nullable: true
type: array
legalRegistrationId:
nullable: true
type: string
registrationName:
nullable: true
type: string
roleCode:
nullable: true
type: string
vatId:
nullable: true
type: string
type: object
FlowAckStatus:
additionalProperties: false
enum:
- Pending
- Ok
- Error
- Archived
type: string
SellerAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
postalCode:
nullable: true
type: string
region:
nullable: true
type: string
type: object
InvoicePayerAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
postalCode:
nullable: true
type: string
region:
nullable: true
type: string
type: object
FlowProfile:
additionalProperties: false
enum:
- Basic
- CIUS
- Extended-CTC-FR
type: string
BuyerAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
postalCode:
nullable: true
type: string
region:
nullable: true
type: string
type: object
AcknowledgementDetailResult:
additionalProperties: false
properties:
businessTermCode:
nullable: true
type: string
businessTermLabelFr:
nullable: true
type: string
fixHintFr:
nullable: true
type: string
item:
nullable: true
type: string
level:
$ref: '#/components/schemas/Level'
reasonCode:
minLength: 1
type: string
reasonMessage:
minLength: 1
type: string
reasonMessageFr:
nullable: true
type: string
ruleCode:
nullable: true
type: string
sourcePath:
nullable: true
type: string
required:
- level
- reasonCode
- reasonMessage
type: object
SearchFlowFilters:
additionalProperties: false
properties:
ackStatus:
$ref: '#/components/schemas/FlowAckStatus'
electronicAddress:
description: Reception electronic address in Peppol format "scheme:identifier" (e.g. "0225:123456789").
nullable: true
pattern: ^[^:]+:[^:]+$
type: string
flowDirection:
$ref: '#/components/schemas/FlowDirection'
flowId:
maxLength: 36
nullable: true
type: string
flowMode:
$ref: '#/components/schemas/FlowMode'
flowType:
$ref: '#/components/schemas/FlowType'
trackingId:
nullable: true
type: string
updatedAfter:
format: date-time
nullable: true
type: string
updatedBefore:
format: date-time
nullable: true
type: string
type: object
ValidationCountry:
additionalProperties: false
enum:
- FR
- BE
type: string
TaxRepresentative:
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/TaxRepresentativeAddress'
name:
nullable: true
type: string
vatId:
nullable: true
type: string
type: object
PivotAttachment:
additionalProperties: false
properties:
content:
nullable: true
type: string
contentType:
nullable: true
type: string
externalLocation:
nullable: true
type: string
fileName:
nullable: true
type: string
reference:
nullable: true
type: string
supportingDocumentDescription:
nullable: true
type: string
type: object
BillingServiceContact:
additionalProperties: false
properties:
email:
nullable: true
type: string
name:
nullable: true
type: string
telephone:
nullable: true
type: string
type: object
ProcessingRule:
additionalProperties: false
enum:
- B2B
- B2BInt
- B2C
type: string
SearchFlowParams:
additionalProperties: false
properties:
limit:
format: int32
type: integer
offset:
format: int32
type: integer
where:
$ref: '#/components/schemas/SearchFlowFilters'
required:
- where
type: object
ExtBuyerAgent:
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/BuyerAgentAddress'
businessName:
nullable: true
type: string
contact:
$ref: '#/components/schemas/BuyerAgentContact'
electronicAddress:
nullable: true
type: string
identifier:
items:
type: string
nullable: true
type: array
legalRegistrationId:
nullable: true
type: string
registrationName:
nullable: true
type: string
roleCode:
nullable: true
type: string
vatId:
nullable: true
type: string
type: object
AcknowledgementResult:
additionalProperties: false
properties:
details:
items:
$ref: '#/components/schemas/AcknowledgementDetailResult'
nullable: true
type: array
status:
$ref: '#/components/schemas/FlowAckStatus'
required:
- status
type: object
Level:
additionalProperties: false
enum:
- Error
- Warning
type: string
SellerContact:
additionalProperties: false
properties:
email:
nullable: true
type: string
name:
nullable: true
type: string
telephone:
nullable: true
type: string
type: object
Item:
additionalProperties: false
properties:
attributes:
items:
$ref: '#/components/schemas/ItemAttribute'
nullable: true
type: array
basePriceQuantity:
format: double
nullable: true
type: number
basePriceQuantityUnit:
nullable: true
type: string
buyersItemIdentification:
nullable: true
type: string
commodityClassificationCode:
nullable: true
type: string
description:
nullable: true
type: string
grossPrice:
format: double
nullable: true
type: number
name:
nullable: true
type: string
netAmount:
format: double
nullable: true
type: number
originCountryCode:
nullable: true
type: string
priceDiscount:
format: double
nullable: true
type: number
sellersItemIdentification:
nullable: true
type: string
standardItemIdentification:
nullable: true
type: string
taxCategoryCode:
nullable: true
type: string
taxRate:
format: double
nullable: true
type: number
type: object
FlowDto:
additionalProperties: false
properties:
acknowledgement:
$ref: '#/components/schemas/AcknowledgementResult'
attachmentNumber:
format: int32
nullable: true
type: integer
flowDirection:
$ref: '#/components/schemas/FlowDirection'
flowId:
maxLength: 36
nullable: true
type: string
flowProfile:
$ref: '#/components/schemas/FlowProfile'
flowSyntax:
$ref: '#/components/schemas/FlowSyntax'
flowType:
$ref: '#/components/schemas/FlowType'
submittedAt:
format: date-time
type: string
trackingId:
nullable: true
type: string
updatedAt:
format: date-time
type: string
required:
- acknowledgement
- flowId
type: object
FlowType:
additionalProperties: false
enum:
- CustomerInvoice
- SupplierInvoice
- CustomerInvoiceLC
- SupplierInvoiceLC
- TransactionReport
- PaymentReport
type: string
BuyerAgentAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
postalCode:
nullable: true
type: string
region:
nullable: true
type: string
type: object
Payee:
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/PayeeAddress'
contact:
$ref: '#/components/schemas/PayeeContact'
electronicAddress:
nullable: true
type: string
identifier:
items:
type: string
nullable: true
type: array
legalRegistrationId:
nullable: true
type: string
name:
nullable: true
type: string
roleCode:
nullable: true
type: string
vatId:
nullable: true
type: string
type: object
Allowance:
additionalProperties: false
properties:
baseAmount:
format: double
nullable: true
type: number
multiplierFactor:
format: double
nullable: true
type: number
reason:
nullable: true
type: string
reasonCode:
nullable: true
type: string
taxCategoryCode:
nullable: true
type: string
taxExclusiveAmount:
format: double
nullable: true
type: number
taxRate:
format: double
nullable: true
type: number
type: object
FullFlowInfo:
additionalProperties: false
properties:
flowId:
maxLength: 36
nullable: true
type: string
flowProfile:
$ref: '#/components/schemas/FlowProfile'
flowSyntax:
$ref: '#/components/schemas/FlowSyntax'
name:
minLength: 1
type: string
sha256:
nullable: true
pattern: ^[a-f0-9]{64}$
type: string
trackingId:
nullable: true
type: string
required:
- flowId
- flowSyntax
- name
- sha256
type: object
InvoiceeAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
postalCode:
nullable: true
type: string
region:
nullable: true
type: string
type: object
InvoiceeContact:
additionalProperties: false
properties:
email:
nullable: true
type: string
name:
nullable: true
type: string
telephone:
nullable: true
type: string
type: object
Buyer:
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/BuyerAddress'
businessName:
nullable: true
type: string
contact:
$ref: '#/components/schemas/BuyerContact'
electronicAddress:
nullable: true
type: string
identifier:
items:
type: string
nullable: true
type: array
legalRegistrationId:
nullable: true
type: string
registrationName:
nullable: true
type: string
vatId:
nullable: true
type: string
type: object
FlowDirection:
additionalProperties: false
enum:
- In
- Out
type: string
Error:
additionalProperties: false
properties:
errorCode:
minLength: 1
type: string
errorMessage:
nullable: true
type: string
required:
- errorCode
type: object
Seller:
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/SellerAddress'
businessName:
nullable: true
type: string
companyLegalForm:
nullable: true
type: string
contact:
$ref: '#/components/schemas/SellerContact'
electronicAddress:
nullable: true
type: string
identifier:
items:
type: string
nullable: true
type: array
legalRegistrationId:
nullable: true
type: string
registrationName:
nullable: true
type: string
vatId:
nullable: true
type: string
type: object
Delivery:
additionalProperties: false
properties:
actualDeliveryDate:
nullable: true
type: string
address:
$ref: '#/components/schemas/DeliveryAddress'
locationId:
nullable: true
type: string
name:
nullable: true
type: string
type: object
DeliveryAddress:
additionalProperties: false
properties:
addressLine1:
nullable: true
type: string
addressLine2:
nullable: true
type: string
addressLine3:
nullable: true
type: string
city:
nullable: true
type: string
countryCode:
nullable: true
type: string
postalCode:
nullable: true
type: string
region:
nullable: true
type: string
type: object
ProblemDetails:
additionalProperties: false
properties:
detail:
nullable: true
type: string
instance:
nullable: true
type: string
status:
format: int32
nullable: true
type: integer
title:
nullable: true
type: string
type:
nullable: true
type: string
type: object
PayeeContact:
additionalProperties: false
properties:
email:
nullable: true
type: string
name:
nullable: true
type: string
telephone:
nullable: true
type: string
type: object
SellerAgentContact:
additionalProperties: false
properties:
email:
nullable: true
type: string
name:
nullable: true
type: string
telephone:
nullable: true
type: string
type: object
Totals:
additionalProperties: false
properties:
allowances:
format: double
nullable: true
type: number
charges:
format: double
nullable: true
type: number
dueAmount:
format: double
nullable: true
type: number
lineNetAmounts:
format: double
nullable: true
type: number
paidAmount:
format: double
nullable: true
type: number
roundingAmount:
format: double
nullable: true
type: number
taxAmount:
format: double
nullable: true
# --- truncated at 32 KB (46 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/agicap/refs/heads/main/openapi/agicap-invoice-flows-api-openapi.yml