Querying

Filtering

Endpoints for listing data types typically support filtering. The filter syntax is common for all endpoints and consists of a filter query parameter with the following syntax:

filter=<propName>:<op>:<value>

op
  • eq: equals
  • ne: not equals
  • gt: greater than
  • lt: less than
  • contains: case-insensitive contains for array type properties
  • in: in array, array elements separated with | (see example below)
  • nin: not in array, array elements separated with | (see example below)

Example: …/document_types?filter=category:eq:Invoice

Contains vs in

The contains operator is typically used for array type properties, consider a deliveryMethod property which can hold multiple values, e.g. ['sms', 'email']. To filter for objects with sms delivery method one would use filter=deliveryMethod:contains:sms

The in operator is an OR operation, allowing to filter for objects with multiple values. Consider two objects with different values on an age property, e.g. a.age=5, b.age=7. To filter for both these one would use filter=age:in:5|7

Sorting

Sorting of lists is supported via sort and sortOrder query parameters:

sort=<propName>&sortOrder=order

Order: asc or desc for getting the list in ascending or descending order. Ascending is the default order.

Searching

Searching is supported via the search query parameter:

search=<search string>

Unlike filtering and sorting search is not performed on a specific property name, rather the search is carried out on all the searchable properties for the given data type. For example, a search on participants for the term 'acm' will return a participant with name=Acme as well as a participant with participantIdentifier=000x:123-acm-990.

The searchable properties for each datatype are listed in the table below.

Filter/sort support per endpoint

EndpointSort PropertiesFilter Properties
/orgs/:id/transactionscreatedAt, transactionStatuscreatedAt, transactionStatus
/orgs/:id/participantsname, createdAtcreatedAt, environment, apRef
/orgs/:id/usersname, createdAt, emailcountry, createdAt
/orgs/:id/webhooks/eventscreatedAteventType, createdAt, isEnabled
/orgs/:idlegalName, createdAt, participantCountorganisationMode, createdAt, country

Search support per endpoint

EndpointSearch Properties
/orgs/:id/transactionssenderId, receiverId, senderSP, receiverSP, id, docInstanceId
/orgs/:id/participantsname, participantIdentifier
/orgs/:id/usersname, email
/orgs/:id/webhooks/eventspayload
/orgs/:idlegalName, shortName, legalIdentifier

Below is a concise summary of how to use filtering, sorting, and searching with the described endpoints.

ConceptSyntax / OptionsNotes / Examples
Filter syntaxfilter=<propName>:<op>:<value>Example: /document_types?filter=category:eq:Invoice
Filter operatorseq, ne, gt, lt, contains, in, nineq=equals, ne=not equals, gt=greater than, lt=less than, contains=array contains, in=in list, nin=not in list
contains vs incontains: array contains value; in: OR over multiple valuescontains example: docTypeName:contains:Invoice; in example: age:in:5|7
Sorting syntaxsort=<propName>&sortOrder=<asc|desc>Ascending is default if sortOrder is omitted
Search syntaxsearch=<search string>Runs across all searchable properties for that endpoint, not a single field
/orgs/:id/transactions – sortcreatedAt, transactionStatusExample: ?sort=createdAt&sortOrder=desc
/orgs/:id/transactions – filtercreatedAt, transactionStatusExample: ?filter=transactionStatus:eq:COMPLETED
/orgs/:id/participants – sortname, createdAtExample: ?sort=name&sortOrder=asc
/orgs/:id/participants – filtercreatedAt, environment, apRefExample: ?filter=environment:eq:prod
/orgs/:id/users – sortname, createdAt, emailExample: ?sort=email
/orgs/:id/users – filtercountry, createdAtExample: ?filter=country:eq:SE
/orgs/:id/webhooks/events – sortcreatedAtExample: ?sort=createdAt&sortOrder=desc
/orgs/:id/webhooks/events – filtereventType, createdAt, isEnabledExample: ?filter=isEnabled:eq:true
/orgs/:id – sortlegalName, createdAt, participantCountExample: ?sort=participantCount&sortOrder=desc
/orgs/:id – filterorganisationMode, createdAt, countryExample: ?filter=organisationMode:eq:production
Searchable fields – /orgs/:id/transactionssenderId, receiverId, senderSP, receiverSP, id, docInstanceIdExample: ?search=acme-tx-123
Searchable fields – /orgs/:id/participantsname, participantIdentifierExample: ?search=acm
Searchable fields – /orgs/:id/usersname, emailExample: ?search=jane.doe
Searchable fields – /orgs/:id/webhooks/eventspayloadExample: ?search=InvoiceCreated
Searchable fields – /orgs/:idlegalName, shortName, legalIdentifierExample: ?search=Acme
GET /orgs/123/transactions?filter=transactionStatus:eq:COMPLETED&sort=createdAt&sortOrder=desc&search=INV-2024-001
GET /orgs/123/participants?filter=environment:eq:prod&sort=name&search=acm
GET /orgs/123/users?filter=country:in:SE|NO&sort=createdAt&sortOrder=asc&search=john
GET /orgs/123/webhooks/events?filter=isEnabled:eq:true&sort=createdAt&sortOrder=desc&search=InvoiceCreated
GET /orgs/123?filter=country:eq:SE&sort=participantCount&sortOrder=desc&search=Acme