Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
242 lines (242 sloc) 5.55 KB
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "#",
"title": "Object",
"type": "object",
"required": [
"width",
"height",
"depth",
"unit_of_measurement",
"weight",
"weight_unit",
"type",
"sub_type",
"value",
"value_currency"
],
"properties": {
"id": {
"readOnly": true,
"description": "The object id",
"type": "string"
},
"customer_reference": {
"type": "string",
"description": "This field can be used to pass through any character data that you may want returned unaltered.",
"maxLength": 255
},
"name": {
"description": "A user defined name of the object",
"type": "string",
"maxLength": 255
},
"width": {
"allOf": [
{
"$ref": "#/definitions/dimension"
},
{
"description": "The width of the object"
}
]
},
"height": {
"allOf": [
{
"$ref": "#/definitions/dimension"
},
{
"description": "The height of the object"
}
]
},
"depth": {
"allOf": [
{
"$ref": "#/definitions/dimension"
},
{
"description": "The depth of the object"
}
]
},
"unit_of_measurement": {
"type": "string",
"enum": [
"in",
"cm"
]
},
"value": {
"allOf": [
{
"$ref": "#/definitions/monetary_amount"
},
{
"description": "The value of the item"
}
]
},
"value_currency": {
"allOf": [
{
"$ref": "metadata/currency.schema.json#/definitions/currency_code"
},
{
"description": "The currency of the given value"
}
]
},
"weight_unit": {
"type": "string",
"enum": [
"lb",
"kg"
]
},
"weight": {
"allOf": [
{
"$ref": "#/definitions/dimension"
},
{
"description": "The weight of the object"
}
]
},
"type": {
"type": "string",
"description": "The object type id",
"pattern": "^[0-9a-z_]{1,56}$"
},
"sub_type": {
"description": "The object sub-type id",
"type": "string",
"pattern": "^[0-9a-z_]{1,56}$"
},
"current_packing": {
"type": "array",
"description": "A list of packing type ids describing how the item is currently packed",
"items": {
"type": "string"
}
},
"requested_packing": {
"type": "array",
"description": "A list of packing type ids requesting how the item should be packed",
"items": {
"type": "string"
}
},
"images": {
"type": "array",
"description": "A list image urls of the object",
"items": {
"type": "string",
"format": "uri"
}
},
"details": {
"$ref": "#/definitions/details"
},
"origin_location": {
"allOf": [
{
"$ref": "location.schema.json"
},
{
"description": "Origin location of object, for use with multiple locations. Note: this is planned and not currently supported"
}
]
},
"destination_location": {
"allOf": [
{
"$ref": "location.schema.json"
},
{
"description": "Destination location of object, for use with multiple locations. Note: this is planned and not currently supported"
}
]
}
},
"definitions": {
"dimension": {
"$id": "#/definitions/dimension",
"type": [
"string",
"number"
],
"examples": [
15,
3.75,
"15",
"12.5",
"9 3/4",
"8 ½"
]
},
"monetary_amount": {
"$id": "#/definitions/monetary_amount",
"type": "string",
"pattern": "^(0|([1-9]+[0-9]*))(\\.[0-9]{1,2})?$",
"minLength": 1,
"examples": [
"0",
"0.00",
"0.05",
"19.95",
"255.5",
"120000"
]
},
"details": {
"$id": "#/definitions/details",
"type": "object",
"properties": {
"materials": {
"type": "array",
"description": "A list of ids the types of materials used",
"items": {
"type": "string"
}
},
"year_created": {
"description": "The creation year of the object. Use negative for BCE, see ISO 8601 for details",
"type": "string",
"minLength": 4,
"pattern": "^[-|+]?[0-9]{4,}$"
},
"creator": {
"description": "The creator of the object",
"type": "string"
},
"notes": {
"type": "string",
"description": "Any notes about the item"
},
"title": {
"type": "string",
"description": "The object title"
},
"is_fragile": {
"type": "boolean",
"description": "Set this flag to true is the item is fragile. This may effect packing and handling costs",
"default": false
},
"is_cites": {
"type": "boolean",
"description": "Set to true if the object is governed by the Convention on International Trade in Endangered Species of Wild Fauna and Flora",
"default": false
},
"is_oversized": {
"type": "boolean",
"description": "True if an object was determined by the system to be oversized",
"default": false,
"readOnly": true
}
}
}
}
}
You can’t perform that action at this time.