A structure that allows files to be generated to facilitate the exchange of data concerning trade. It can be utilized to exchange information on product specifications, requirements, defaults and restrictions as well as capabilities. It can also be used to exchange a material list or other needed related data.
A structure that allows files to be generated to facilitate the exchange of data concerning trade. It can be utilized to exchange information on product specifications, requirements, defaults and restrictions as well as capabilities. It can also be used to exchange a material list or other needed related data.
Is meant to facilitate both XML and JSON creation.
The root level should be an element with the name of “open_trade_transfer_package”:
{
"open_trade_transfer_package": {
"version": 1.0,
{content here}
}
<?xml version = 1.0 encoding = "UTF-8"?>
<open_trade_transfer_package version="1.0">
{content here}
</open_trade_transfer_package>
Current version is 1.0. This should stated in every file as showed in the example above. 1.0 is the first released version, and there are no prior versions.
Within the root level (open_trade_transfer_package) everything is divided into four groups and their subgroups:
JSON schema is available in the versions folder. To link to it, please use the raw link. The schema allows you to validate your OTTP file syntax. An example of how this is done in Ruby with the json-schema GEM below:
ottp = '{
"open_trade_transfer_package": {
"version": 1.0,
"information": {
"company": "Elmatica as",
"created": "2017-04-03T08:00:00Z"
},
"profiles": {
"restricted": {
"generic": {
"version": 1.0,
"country_of_origin": {
"nato_member": false
}
}
}
}
}
}'
puts JSON::Validator.validate!('https://raw.githubusercontent.com/elmatica/Open-Trade-Transfer-Package/master/v1/ottp_schema.json', ottp)
When possible subelements are documented, they need to specify what format to use. Possible formats are:
A string wih the company who owns the information in the file
A string with the person responsible for the information in the file
Astring with the software that has generated the file
The timestamp of the creation of the file, in format RFC 3339 date-time
The timestamp of the last update of the file, in format RFC 3339 date-time
A string with name of the project included in the file
A number with the version of the information included in the file
A string representing the description of the content
If you want to place generic information in the file, you should enclose the information within a section called “generic”. E.g. if you wanted to create a profile indicating that no products can be manufactures outside NATO countries, you could do it like this:
{
"open_trade_transfer_package": {
"version": 1.0,
"information": {
"company": "Elmatica as",
"created": "2017-04-03T08:00:00Z"
},
"profiles": {
"restricted": {
"generic": {
"version": 1.0,
"country_of_origin": {
"nato_member": false
}
}
}
}
}
}
If the format is boolean and nothing is stated other than the name of the standard in the Description column, it should be understood as follows: Are to be met (if Specification), required/restricted/default (in Profile) or possible (in Capability)
Data tag | Format | Description |
---|---|---|
ul | Boolean | Indicating if UL is required for the board. Can not be used as a capability, as this will be indicated on each material |
c_ul | Boolean | Indicating if Canadian UL is required for the board. Can not be used as a capability, as this will be indicated on each material |
rohs | Boolean | RoHS |
itar | Boolean | ITAR |
dfars | Boolean | DFARS |
E.g. this would indicate that UL approval should be handled as a default if not otherwise instructed:
{
"open_trade_transfer_package": {
"version": 1.0,
"information": {
"company": "Elmatica as",
"created": "2017-04-03T08:00:00Z"
},
"profile": {
"default": {
"generic": {
"version": 1.0,
"standards": {
"ul": true
}
}
}
}
}
}
Data tag | Format | Description |
---|---|---|
iso_3166_1_alpha_3 | String | A three letter string representation of the Country of origin according too ISO 3166-1 |
iso_3166_1_alpha_2 | String | A two letter string representation of the Country of origin according too ISO 3166-1 |
nato_member | Boolean | Indicates if the COO is a NATO member state (or needs to be if used as a profile) |
eu_member | Boolean | Indicates if the COO is a European Union member state (or needs to be if used in a profile) |
This element is where you place description of colors or materials
Data tag | Format | Description |
---|---|---|
name | String | Any name to describe the colour |
value_type | String | Can be any of “hex”, “rgb”, “cmyk” or “name” |
value | String | If value_type is hex, the value needs to be a "#" + 6 hexadecimals (e.g. "#FFFFFF"). for "rgb" the format is "rgb(0, 255, 255)", for "cmyk" the format is "cmyk(100%, 0%, 0%, 0%)". The name is just a string. |
Example:
...
"custom": {
"colors": [
{
"name": "orange",
"value_type": "hex",
"value": "#f4ad42"
}
]
}
...
Look in the examples folder