Query Parameters for the /Metadata Endpoint

Describes the query parameters for use with /metadata in the Operational reporting API for procurement.

This API supports the following query parameters:

Parameter

Description

realm

Required. The site name.

documentType

Optional. If specified, the response contains only fields for the specified document type. If not specified, the response contains fields for all document types.

includeCustomFields

Optional. Default value is false. When true, the response to the /metadata query includes custom fields.

jsonSchema

Optional. The response to a /metadata query can be in either of two formats, which handle complex data structures such as objects two different ways:

Flat JSON format
jsonSchema=false. The response contains a filterFields block, and a selectFields block. Complex data structures such as objects are not expanded, so only the object's name appears in the response at the same level as subfield names, with each comprising a single item in a flat list.
JSON Schema format
jsonSchema=true. The response contains a selectFields block, but no filterFields block. Complex data structures such as objects are expanded in nested blocks within the selectFields block to list their inner fields.
For example, in JSON Schema format, the selectionFields section of the response might list the TaxAmount object as follows:
"TaxAmount": {
	"type": ["object","null"],
	"properties": {
		"AmountInReportingCurrency": {
			"title": "TaxAmount.AmountInReportingCurrency",
			"type": ["number","null"],
			"precision": "28",
			"scale": "10",
			"size": null,
			"allowedValues": null
			},
		"Amount": {
			"title": "TaxAmount.Amount",
			"type": ["number","null"],
			"precision": "28",
			"scale": "10",
			"size": null,
			"allowedValues": null
			},
		"Currency": {
			"type": ["object","null"],
			"properties": {
				"UniqueName": {
					"title": "TaxAmount.Currency.UniqueName",
					"type": ["string","null"],
					"precision": null,
					"scale": null,
					"size": 50,
					"allowedValues": null
					}
				}
			},
		"ApproxAmountInBaseCurrency": {
			"title": "TaxAmount.ApproxAmountInBaseCurrency",
			"type": ["number","null"],
			"precision": "28",
			"scale": "10",
			"size": null,
			"allowedValues": null
			},
		"ConversionDate": {
			"title": "TaxAmount.ConversionDate",
			"type": ["string","null"],
			"precision": null,
			"scale": null,
			"size": null,
			"allowedValues": null,
			"format": "date-time"
			}
		}
	},

Notice that in the JSON Schema example above, TaxAmount.Currency.Uniquename is nested within TaxAmount.Currency, which is in turn nested within TaxAmount. In the Flat JSON format, these fields would all appear at the same hierarchal level.

product

Required. Set value equal to buyer to limit results to fields relevant to the Operational Reporting API for Procurement.

select

Optional. Specifies which fields in the output will be populated and which will be null. Relevant fields are documentType, filterFields, and selectFields.

Possible values of the select parameter are as follows:
documentType
returns a list of all supported document types. These are the supported values of the documentType parameter.
filterFields
returns a list of supported filter fields for the document type specified in the documentType parameter, or for all document types if documentType is not specified.
selectFields
returns a list of supported filter fields for the document type specified in the documentType parameter, or for all document types if documentType is not specified.

viewTemplateName

Optional. Restricts the output to include exactly the subset of the document schema that would be returned for the specified view template.