getMetadata
get
/ccagent/v1/metadata/{id}
Get Metadata. Get the metadata for an item type
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
ID of the file.
Query Parameters
- dynamicOnly
-
Type:
boolean
Indicates what type of properties to return. If set to true, only dynamic properties will be returned, otherwise all properties will be returned. Only supported for the 'order' item type.- filterByShopperContext
Type:string
If set to true, filters the dynamic properties that are related to shopper context
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getMetadata_response
- default
-
Type:
boolean
The default property of the metadata - dimension
-
Type:
string
The dimension property of the metadata - id
-
Type:
string
The id of the metadata - itemType
-
Type:
string
The itemtype property of the metadata - label
-
Type:
string
The label property of the metadata - length
-
Type:
integer
The length of the metadata - multiSelect
-
Type:
boolean
The multi-select property of the metadata - order
-
Type:
integer
The order of the metadata - required
-
Type:
boolean
The required property of the metadata - searchable
-
Type:
boolean
The searchable property of the metadata - textSearchable
-
Type:
boolean
The textSearchable property of the metadata - type
-
Type:
string
The type property of the metadata - uiEditorType
-
Type:
string
The uiEditorType property of the metadata
Example application/json
[
{
"itemType":"product",
"length":254,
"label":"Name",
"type":"shortText",
"required":true,
"searchable":true,
"uiEditorType":null,
"default":null,
"textSearchable":true,
"id":"displayName",
"dimension":null,
"multiSelect":true,
"order":"0"
},
{
"itemType":"product",
"length":165,
"label":"Product ID",
"type":"shortText",
"required":true,
"searchable":null,
"uiEditorType":null,
"default":"",
"textSearchable":null,
"id":"id",
"dimension":null,
"multiSelect":null,
"order":"10"
}
]
Default Response
The error response
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
[ { "itemType": "product", "length": 254, "label": "Name", "type": "shortText", "required": true, "searchable": true, "uiEditorType": null, "default": null, "textSearchable": true, "id": "displayName", "dimension": null, "multiSelect": true, "order": "0" }, { "itemType": "product", "length": 165, "label": "Product ID", "type": "shortText", "required": true, "searchable": null, "uiEditorType": null, "default": "", "textSearchable": null, "id": "id", "dimension": null, "multiSelect": null, "order": "10" } ]