---
title: "🇫🇷 Norme · Select flows upon criteria"
method: POST
path: "/flow-service/v1/flows/search"
tags: ["AFNOR XP Z12-013/FlowService"]
---

# 🇫🇷 Norme · Select flows upon criteria

`POST /flow-service/v1/flows/search`

Retrieves a set of flows matching the provided search criteria:

  - Need at least one criterion to be specified

  - Assuming a logical AND when combining criteria

  - Assuming a logical OR for criteria allowing a list of values


Pagination works with 2 different ways:

  - with dates and the updatedAfter property

    - the comparison with current date is strict : updatedAt > updatedAfter

  - with cursors (more secure)

    - in case of pagination a nextCursor will be returned

    - next pagination call shall set cursor value to nextCursor value of last call

## Headers

- `Request-Id` string, uuid
- `Organization-Id` string

## Request body

- SearchFlowParams
  - `limit` integer, nullable
  - `cursor` string, nullable — If cursor is provided, then start search starting from that cursor
  - `where` SearchFlowFilters, required — Filtering criteria, at least one is required
    - `updatedAfter` string, date-time, nullable — The comparison with current date is strict : updatedAt > updatedAfter
    - `updatedBefore` string, date-time, nullable
    - `processingRule` ProcessingRule[], nullable
    - `flowType` FlowType[], nullable
    - `flowDirection` FlowDirection[], nullable
    - `trackingId` string, nullable
    - `ackStatus` 'Pending' | 'Ok' | 'Error' — - `Ok`: the following checks have passed: - Anti virus - Integrity checks - Technical rules checks - Unicity checks - `Error`: one of the previous test has failed - `Pending` : the flow is not yet integrated

## Response `200`

OK

- SearchFlowContent — A set of flows matching criterias, provided into the request
  - `limit` integer, nullable
  - `nextCursor` string, nullable — Pagination management: - If present, says where to start for next page, set nextCursor as the cursor in the next request - If omitted, says that pagination is finished
  - `filters` SearchFlowFilters — Filtering criteria, at least one is required
    - `updatedAfter` string, date-time, nullable — The comparison with current date is strict : updatedAt > updatedAfter
    - `updatedBefore` string, date-time, nullable
    - `processingRule` ProcessingRule[], nullable
    - `flowType` FlowType[], nullable
    - `flowDirection` FlowDirection[], nullable
    - `trackingId` string, nullable
    - `ackStatus` 'Pending' | 'Ok' | 'Error' — - `Ok`: the following checks have passed: - Anti virus - Integrity checks - Technical rules checks - Unicity checks - `Error`: one of the previous test has failed - `Pending` : the flow is not yet integrated
  - `results` Flow[], nullable
    - `trackingId` string, nullable — The tracking id is an external identifier and is used to track the flow by the sender
    - `name` string, required — Name of the file
    - `processingRule` 'B2B' | 'B2BInt' | 'B2C' | 'B2G' | 'B2GInt' | 'OutOfScope' | 'B2GOutOfScope' | 'ArchiveOnly' | 'NotApplicable' | 'Undefined' — - B2B : e-invoicing - B2BInt : International B2B e-reporting - B2C : B2C e-reporting - B2G : e-invoicing for B2G sales - B2GInt - OutOfScope : Out of scope (not regulated flow) - B2GOutOfScope - ArchiveOnly : Archive only, no transmission - NotApplicable : Not Applicable - Undefined : Not yet defined when in Pending state or unable to define when in Error state
    - `flowSyntax` 'CII' | 'UBL' | 'FacturX' | 'CDAR' | 'FRR', required — Syntax of the original file belonging to a flow
    - `flowProfile` 'Basic' | 'CIUS' | 'ExtendedCTCFR' | 'Undefined'
    - `flowId` string, required
    - `submittedAt` string, date-time, required — The flow submission date and time (the date and time when the flow was created on the system) This property should be used by the API consumer as a time reference to avoid clock synchronization issues
    - `updatedAt` string, date-time, required — The last update date and time of the flow. When the flow is submitted updatedAt is equal to submittedAt. When the flow acknowledgment status is changed updatedAt date and time is updated.
    - `flowType` 'CustomerInvoice' | 'SupplierInvoice' | 'CustomerInvoiceLC' | 'SupplierInvoiceLC' | 'StateCustomerInvoiceLC' | 'StateSupplierInvoiceLC' | 'AggregatedCustomerTransactionReport' | 'UnitaryCustomerTransactionReport' | 'AggregatedCustomerPaymentReport' | 'UnitaryCustomerPaymentReport' | 'UnitarySupplierTransactionReport' | 'MultiFlowReport' | 'StateCustomerInvoice' | 'StateSupplierInvoice' | 'StateTransactionReport' | 'StateTransactionReportLC' | 'StatePaymentReport' | 'StatePaymentReportLC' | 'Undefined', required — - `CustomerInvoice`: a non-self-billed outgoing invoice or a self-billed incoming invoice - `SupplierInvoice`: a non-self-billed incoming invoice or self-billed outgoing invoice - `CustomerInvoiceLC`: a lifecycle (CDAR) related to a customer invoice - `SupplierInvoiceLC`: a lifecycle (CDAR) related to supplier invoice - `StateCustomerInvoiceLC`: a customer invoice LC sent to DFH - `StateSupplierInvoiceLC`: a supplier invoice LC sent to DFH - `AggregatedCustomerTransactionReport` : a transaction e-reporting flow containing aggregated B2C sales (FRR 10.3) - `UnitaryCustomerTransactionReport`: a transaction e-reporting flow containing international B2B sales or a B2C transaction flow reported individually (FRR 10.1) - `AggregatedCustomerPaymentReport` : an e-reporting of collections flow containing collections linked to B2C sales (FRR 10.4) - `UnitaryCustomerPaymentReport` : an e-reporting of collections flow containing collections linked to unit international B2B sales or B2C sales (FRR 10.2) - `UnitarySupplierTransactionReport`: a transaction e-reporting flow containing international B2B purchases (FRR 10.1) - `MultiFlowReport`: an e-reporting flow which contains at least 2 different flow types (FRR 10) - `StateCustomerInvoice` : a reporting flow 1 sent to DFH related to an invoice of type ‘CustomerInvoice’ - `StateSupplierInvoice` : a reporting flow 1 sent to DFH related to an invoice of type ‘SupplierInvoice’ for self-billing - `StateTransactionReport` : a transaction e-reporting flow 10.1 or 10.3 sent to the DFH - `StateTransactionReportLC` : a lifecycle for a StateTransactionReport flow - `StatePaymentReport` : a payment e-reporting flow 10.2 or 10.4 sent to DFH - `StatePaymentReportLC` : a lifecycle for a StatePaymentReport flow - `Undefined` : Not yet defined when in Pending state or unable to define when in Error state
    - `processingRuleSource` 'Input' | 'Computed', required
    - `flowDirection` 'In' | 'Out', required — Direction of the flow: - `In`: Incoming flow, from the PDP to the OD - `Out`: Outgoing flow, from the OD to the PDP
    - `acknowledgement` Acknowledgement, required
      - `status` 'Pending' | 'Ok' | 'Error', required — - `Ok`: the following checks have passed: - Anti virus - Integrity checks - Technical rules checks - Unicity checks - `Error`: one of the previous test has failed - `Pending` : the flow is not yet integrated
      - `details` AcknowledgementDetail[], nullable
        - `level` 'Error' | 'Warning', required
        - `item` string, required — Item on which the error refers
        - `reasonCode` string, required
        - `reasonMessage` string, required

---

[API](https://skmtc.net/neotimo/apis/neotimo-api.md) · [All operations](https://skmtc.net/neotimo/apis/neotimo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/neotimo/neotimo-api/revisions/2ecf51b1543e/schema)
