Use the API to set up reference catalogs on your AODocs tenant

This article is for developers with a full understanding of how to work with our API. 

Important note about the API explorer:
When you follow the link we provide to the API explorer, you'll see a red warning.
image01.png 
The API itself is not deprecated. It's the Google API explorer that is deprecated. All the processes described in our API articles function correctly and safely if you use this Google API explorer.

This article provides instructions for AODocs super administrators on how to use the AODocs API to set up and manage reference catalogs on their AODocs tenant. It explains how to create catalogs with multiple levels, add hierarchical values, list catalogs and their IDs, and access available API actions.


In this article:

Automatically generated table of contents


What does the API call do?

As a super administrator, you can use the API to create reference catalogs with values.

Reference catalogs let you define properties that behave like categories but which are defined at the tenant level. This means that users can access exactly the same set of properties that behave like categories with the same values in all libraries on your AODocs tenant. 

Learn more:

Reference catalogs can be single-level or multi-level. Learn more: Best practices for multi-level reference catalogs.

Important: You must set up your reference catalogs by API.

Learn more about what else you can do with reference catalogs using the API.


Create reference catalogs

1. As a super administrator, follow one of these links to the referenceCatalog API:

  • US instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://ao-docs.appspot.com/_ah/api#search/referencecatalog/referenceCatalog/v1/referenceCatalog.referenceCatalog.createReferenceCatalog

  • EU instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://aodocs-core-eu-1.ey.r.appspot.com/api#search/referencecatalog/referenceCatalog/v1/referenceCatalog.referenceCatalog.createReferenceCatalog

Note: Dedicated instances have their own URLs. Learn more: What are AODocs instances?

2. Enter the name of the reference catalog you want to create, for example, Country.

3. Optionally, if you want to create a multi-level catalog, you can define level names using the updateReferenceCatalog endpoint.

Add the levelNames array with ordered names for each level. For example: ["Continent", "Country", "Region", "City"].

4. Click Authorize and execute.

The response is displayed in the lower part of the screen. You can see the name and ID of your newly created reference catalog. It currently has no values.

image01.png


Create values for single-level reference catalogs

Important: You must have the ID of the reference catalog for which you want to create values. If you have just created your reference catalog, you can recover its ID in the response to the call to create it. Otherwise, you can list the reference catalogs and IDs on your AODocs tenant.

1. As a super administrator, follow one of these links to the referenceCatalog API:

  • US instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://ao-docs.appspot.com/_ah/api#search/referencecatalog/referenceCatalog/v1/referenceCatalog.referenceCatalog.saveReferenceCatalogValues

  • EU instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://aodocs-core-eu-1.ey.r.appspot.com/api#search/referencecatalog/referenceCatalog/v1/referenceCatalog.referenceCatalog.saveReferenceCatalogValues

Note: Dedicated instances have their own URLs. Learn more: What are AODocs instances?

2. In the catalogId field, enter the ID of the reference catalog for which you want to create values.

3. In the Request body field, select referenceCatalogValues in the add a property menu.

image02.png

4. Click the green plus button to add an array element. A new add a property menu appears.

image03.png

5. Select name in the drop-down menu.

image04.png

6. Enter the value you want to add to your reference catalog, for example, France

7. Optionally, you can define an ID for the value:

  • Select id in the add a property menu. 
  • Enter an ID for your value, for example, France33.

Note: An ID is automatically generated if you don't define one.

image05.png

8. Repeat steps 4 to 7 as many times as you like to enter more values. 

Tip: Alternatively, prepare a JSON file with all your values beforehand. Switch to Freeform editor and paste the content of your JSON file into the text field.


image06.png
 

9. Click Authorize and execute. The response is displayed in the lower part of the screen.

image07.png


Create values for multi-level reference catalogs

Important: You must have the ID of the reference catalog for which you want to create values. If you have just created your reference catalog, you can recover its ID in the response to the call to create it. Otherwise, you can list the reference catalogs and IDs on your AODocs tenant.

For multi-level catalogs, you need to specify parent-child relationships.

1. Follow steps 1 to 6 from the instruction on creating values for single-level reference catalogs.

2. For top-level values (no parent) add values without specifying a parent field.

These will be at level 0 in your hierarchy.

3. For child values:

  • Add the parent property in the add a property menu.
  • Enter the ID of the parent value. This assumes the parent value already exists.
  • The system automatically calculates:
    • The level (incremented from parent's level)
    • The parentIds array (chain of all ancestor IDs)
    • The leaf status of parent values

Note: Before creating child values, the corresponding level must already exist in the reference catalog.

4. Optionally. set the display order:

  • Add the rank property to control the display order.
  • Enter a positive integer (lower numbers appear first)

By default, values are displayed in alphabetical order (A → Z). However, you can define a custom order by assigning a rank to each value.

If both ranked and unranked values are present, the ranked values will appear first, sorted according to their assigned ranks. The remaining unranked values will follow, sorted alphabetically.

Below is a JSON example for multi-level structure:

{
"referenceCatalogValues": [ 
    { 
      "name": "Europe", 
       "id": "europe" 
     }, 
     { 
       "name": "France", 
       "id": "france", 
       "parent": "europe" 
     }, 
     { 
       "name": "Paris", 
       "id": "paris", 
       "parent": "france" 
     }, 
     { 
       "name": "Germany", 
       "id": "germany", 
       "parent": "europe" 
      }, 
      { 
        "name": 
        "Berlin", 
        "id": "berlin", 
        "parent": "germany" 
      } 
   ] 
}

Tip: For complex hierarchies, prepare a JSON file with all your values and their relationships beforehand. Switch to Freeform editor and paste the content of your JSON file into the text field.

5. Click Authorize and execute. The response is displayed in the lower part of the screen.


List the reference catalogs on your AODocs tenant with their IDs

1. As a super administrator, follow one of these links to the referenceCatalog API:

  • US instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://ao-docs.appspot.com/_ah/api#search/referencecatalog/referenceCatalog/v1/referenceCatalog.referenceCatalog.getReferenceCatalogs

  • EU instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://aodocs-core-eu-1.ey.r.appspot.com/api#search/referencecatalog/referenceCatalog/v1/referenceCatalog.referenceCatalog.getReferenceCatalogs

Note: Dedicated instances have their own URLs. Learn more: What are AODocs instances?

2. Enter your AODocs tenant name. 

3. Click Authorize and execute

image04.png

The response is displayed in the lower part of the screen. It lists all the reference catalogs on your AODocs tenant. Copy the ID of the reference catalog for which you want to create values

image05.png


Access the list of all actions available for managing your reference catalogs

As a super administrator, follow one of these links to the referenceCatalog API:

  • US instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://ao-docs.appspot.com/_ah/api#search/referencecatalog/referenceCatalog/v1/

  • EU instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://aodocs-core-eu-1.ey.r.appspot.com/api#search/referencecatalog/referenceCatalog/v1/

Note: Dedicated instances have their own URLs. Learn more: What are AODocs instances?

The referenceCatalog API has the following methods.

referenceCatalog.referenceCatalog.createReferenceCatalog
 

referenceCatalog.referenceCatalog.deleteReferenceCatalog

  • Deletes a reference catalog.
  • Enter the reference catalog ID.

referenceCatalog.referenceCatalog.getReferenceCatalog
 

  • Lists details of a reference catalog, including its name, ID, level names (for multi-level catalogs), and number of values.
  • Enter the reference catalog ID.

referenceCatalog.referenceCatalog.getReferenceCatalogValue

  • Lists details of a reference catalog value, including its name, parent information, level, when it was created, and when it was last updated.
  • Enter the reference catalog ID and the value ID.

referenceCatalog.referenceCatalog.getReferenceCatalogValueSuggestions

  • Lists values with a specific prefix in a reference catalog (for example, all values beginning with "ch").
  • Enter the reference catalog ID and the required prefix.
  • Optionally specify a parent parameter to get suggestions only for children of a specific parent value

referenceCatalog.referenceCatalog.getReferenceCatalogValues

  • Lists all the values of a reference catalog with their IDs. 
  • Enter the reference catalog ID.
  • Parameters for multi-level catalogs:
    • parent: Filter to show only direct children of a specific parent ID
    • expandDepth: Control how many levels deep to retrieve (0 = all levels)
    • order: Sort by NAME, ID, CREATION_DATE, or RANK

referenceCatalog.referenceCatalog.getReferenceCatalogs

  • Lists all reference catalogs on your AODocs tenant with their IDs.
  • Enter the name of your AODocs tenant.

referenceCatalog.referenceCatalog.saveReferenceCatalogValues

referenceCatalog.referenceCatalog.updateReferenceCatalog
 

  • Updates a reference catalog (for example, changes its name or defines level names for multi-level catalogs).
  • Enter the AODocs tenant and then the reference catalog ID in the Request body field.
  • Use the levelNames array to define descriptive names for each level in your hierarchy.
     

referenceCatalog.referenceCatalog.permanentlyDeleteReferenceCatalogValue

  • Permanently deletes a value of a reference catalog in the AODocs tenant.
  • Enter the reference catalog ID and the value ID to delete.

Note: This is is different from marking a value as deleted. This permanently removes the value from the reference catalog


Best practices for multi-level reference catalogs

  • Plan your hierarchy: before creating values, map out your complete hierarchical structure to ensure consistency.
  • Use meaningful IDs: create descriptive IDs for values that will help you identify parent-child relationships easily.
  • Build top-down: create parent values before their children.
  • Use bulk operations: for large hierarchies, prepare your entire structure in JSON format and upload it in a single operation.
  • Consider performance: very deep hierarchies (more than 5 levels) may impact user interface performance – test your structure before full deployment.
  • Maintain consistency: ensure all libraries on your AODocs tenant use the same reference catalog structure for consistent data management across your organization.
Was this article helpful? 2 out of 2 found this helpful
If you didn’t find what you were looking for, don’t hesitate to leave a comment!
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.