Query Parameters for the /Metadata Endpoint
Describes the query parameters for use with /metadata in the Operational reporting API for procurement.
|
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:
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:
|
|
viewTemplateName |
Optional. Restricts the output to include exactly the subset of the document schema that would be returned for the specified view template. |