On This Page
Retrieve a List of Organizations
You can send a GET request to retrieve a list of all your organizations. You can use the GET
request without parameters to retrieve the full list or use query parameters to limit
the results. You can retrieve up to 1000 rows of organizations. To retrieve a list of
organizations:
Endpoint
Production:
GET
https://api.cybersource.com
/oms/v1/organizationsTest:
GET
https://apitest.cybersource.com
/oms/v1/organizationsUsing Query Parameters to Filter Results
When you request the list of organizations for your account, you can use URL-encoded query
parameters to narrow the list.
- hierarchyQuery
- filters
- Specify API field values using Lucene syntax. Keyword matching is supported. AND is the supported operator. For example,type:"TRANSACTING" AND businessInformation.country:"US"will return transacting organizations in the US.
- fields
- This will allow you to limit the response payload. Pass the payload attributes you want and the response will only contain those values:{ organizationId, businessInformation:{ phoneNumber } }
- offset
- The number specified in this parameter excludes that many items from the response. The default is0
- limit
- The number specified in this parameter limits how many items to include in the response. When combined with offset, limits the items returned to a specific number of items starting from a specific item. The default is10.
- sort
- The order in which you would like your results sorted. For example,type:desc,entityName:asc.
Using the hierarchyQuery Parameter
The hierarchy query allows you to query relationships and explore your parents and
children. This is a type of graph, so there is a defined language syntax that is flexible
enough for you to explore this hierarchy in a natural way. The structure of the query
is:
organizationId.direction.distance
- organizationIdindicates the organizationId.
- directionspecifies hierarchical relationships. Values can bedescendentsorancestors.
- distanceindicates levels of hierarchy. You can provide a whole number to specify the number levels of hierarchy to return. You can also use the asterisk*to include all levels.
Examples:
- org1.descendents.*- This will retrieve all descendents.
- org1.ancestors.*- This will retrieve all ancestors.
- revent1234.descendents.1- This will retrieve all direct children.
REST Example: Retrieving a List of Organizations
Request
GEThttps://api.cybersource.com/oms/v1/organizations?hierarchyQery=org1.descendents.1
Response to a Successful Request
200 OK