JSON schema of a product
GET/pim/jschema
- Requires Data Editor ApiKey permissions.
- Example URI: https://instancename.piminto.com/api/en-us/pim/jschema
In Pims, users can create various types of attributes and customize them according to their needs. This includes populating lists for multi-selects, defining custom fields for complex objects, and applying data validation masks. The API endpoint generates a JSON schema JSON schema of a product based on these attributes, incorporating all modifications made by the user. This structured schema aids in organizing and validating data transmission.
Use Case: JSON schemas serve as blueprints for defining the structure and constraints of data objects. They provide a standardized format for describing the expected properties and their types within a JSON document. With the generated schema, users can ensure data consistency and integrity, validate incoming data against predefined rules, and streamline data exchange processes. Additionally, JSON schemas facilitate interoperability between systems by establishing a common understanding of data structure and validation requirements. This simplifies the integration of Pims data with external applications and services, enhancing overall data management efficiency and accuracy.
Returns
This API endpoint returns a JSON schema of a product, constructed based on the previously created attributes in PIMS. The schema encompasses all available attributes for the specified API key.
Request
Header Parameters
View name from the PIM's view Dictionary. ✔If the ApiView parameter is not passed- data is returned according to default View defined for access group.
Responses
- 200
success
- application/json
- Schema
- Example (from schema)
- Example
Schema
- any
{
"type": "object",
"properties": {
"sku": {
"type": [
"null",
"string"
]
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"image": {
"type": "array",
"items": {
"properties": {
"description": {
"type": [
"null",
"string"
]
},
"size": {
"type": [
"null",
"number"
]
},
"tags": {
"type": [
"null",
"string"
]
},
"type": {
"required": true,
"enum": [
"application",
"audio",
"example",
"font",
"image",
"message",
"model",
"multipart",
"text",
"video"
],
"type": "string"
},
"keywords": {
"type": [
"null",
"string"
]
},
"url": {
"type": "string",
"required": true
},
"filename": {
"required": true,
"type": "string"
},
"thumbnail_url": {
"type": [
"null",
"string"
]
}
},
"type": "object",
"additionalProperties": false
}
},
"weight": {
"pattern": "^\\d+(\\.\\d{1,3})?$",
"type": [
"null",
"number"
]
}
}
}
{
"type": "object",
"properties": {
"sku": {
"type": [
"null",
"string"
]
},
"categories": {
"type": "array",
"items": {
"type": "string"
}
},
"image": {
"type": "array",
"items": {
"properties": {
"description": {
"type": [
"null",
"string"
]
},
"size": {
"type": [
"null",
"number"
]
},
"tags": {
"type": [
"null",
"string"
]
},
"type": {
"required": true,
"enum": [
"application",
"audio",
"example",
"font",
"image",
"message",
"model",
"multipart",
"text",
"video"
],
"type": "string"
},
"keywords": {
"type": [
"null",
"string"
]
},
"url": {
"type": "string",
"required": true
},
"filename": {
"required": true,
"type": "string"
},
"thumbnail_url": {
"type": [
"null",
"string"
]
}
},
"type": "object",
"additionalProperties": false
}
},
"weight": {
"pattern": "^\\d+(\\.\\d{1,3})?$",
"type": [
"null",
"number"
]
}
}
}