v1 > Services > MaterialsSearch
Search one or more materials in Origin. The search result is organized in pages.
URL
/connect/v1/materials/search
Method:
POST
URL Params
none
Request :
Field | Type | Required | Description | Domain of value |
---|---|---|---|---|
locale |
string | Yes | An Origin supported locale | 'de', 'es_MX', 'en', 'fr' or 'zh_CN' |
pageNumber |
number | Yes | The page number the search result will start from | Positive integer greater than 0 |
pageSize |
number | Yes | The maximum number of result by page | Integer between 1 and 100 |
searchCriteria[] |
array of object | Yes | The list of search criteria | SearchCriteria object array |
searchCriteria[].name |
string | Yes | A criterion code supported by the search | See the reference |
searchCriteria[].value |
variable | Yes | The value to search | See the reference |
- Sample Request :
This sample request could be translated as : "Search the material with ORIGINID value of db65ac6b-5850-11e8-803c-8c16451835eb starting from page 1 with 10 results by page."
{
"locale": "en",
"pageNumber": "1",
"pageSize": "10",
"searchCriteria": [
{
"name": "ORIGINID",
"value": "db65ac6b-5850-11e8-803c-8c16451835eb"
}
]
}
- Response :
Field | Type | Presence | Description | Domain of value |
---|---|---|---|---|
status |
object | Always | The execution status | A status object |
status.state |
string | Always | The state of execution | 'SUCCESS' or 'ERROR' |
status.code |
string | On error | The general error code and message | See Errors reference |
status.messages[] |
array of string | On error | List of error causes | A validation message or other causes |
result |
object | On success | The execution result | A result object |
result.entityType |
string | On success | The type of entity this result is about | 'MATERIAL' |
result.searchInfo |
object | On success | Informations about the search result pages | A searchInfo object |
result.searchInfo.numberOfElements |
object | On success | The total number of elements found | A positive integer |
result.searchInfo.numberOfPages |
object | On success | The total number of pages | NumberOfElements / pageSize |
result.data[] |
array of object | On success | The actual search result : a list of materials | Array of material object |
result.data[].locale |
string | On success | An Origin supported locale | 'de', 'es_MX', 'en', 'fr' or 'zh_CN' |
result.data[].originId |
string | On success | The material unique origin ID | A UUID |
result.data[].externalId |
string | On success | The material unique ID in your system | Any string |
result.data[].productId |
string | On success | An identification code (ex: a catalog id, SKU code) | Any string |
result.data[].managementPermission |
string | On success | The access permission profile | Any string |
result.data[].name |
string | On success | The material name | Any string |
result.data[].description |
string | On success | The material description | Any string |
result.data[].contentManagedBy |
string | On success | The material content manager name | Any string |
result.data[].lastUpdated |
date | On success | The material last update date | A ISO-8601 date |
result.data[].brand |
object | On success | The material brand | Brand object |
result.data[].brand.originId |
string | On success | The brand unique origin ID | A UUID |
result.data[].brand.name |
string | On success | The brand name | Any string |
result.data[].brand.website |
string | On success | The brand website | A valid public facing URL |
result.data[].logoUrl |
object | On success | The material logo URL. In Origin, It refers to the material thumbnail image and the first image of the material. This image can also be set in Origin Website -> Material edit page -> Image Section -> Featured Image checkbox. | A logoUrl object |
result.data[].logoUrl.originalUrl |
string | On success | The material logo original URL | A public facing URL |
result.data[].logoUrl.referenceUrl |
string | On success | The material logo reference URL | A public facing URL |
result.data[].company |
object | On success | The company owner of the material | A company object |
result.data[].company.originId |
string | On success | The company unique origin ID | A UUID |
result.data[].company.name |
string | On success | The company name | Any string |
result.data[].company.companyType |
string | On success | The company type (related with Data Source) | MANUFACTURER, REPORTING_BODY |
result.data[].collection |
object | On success | The Material collection (ex: winter collection) | A collection object |
result.data[].collection.name |
string | On success | The collection name | Any string |
result.data[].libraries[] |
array of object | On success | The list of libraries for the material | Library object(s) |
result.data[].libraries[].originId |
string | On success | The library unique origin ID | A UUID |
result.data[].libraries[].name |
string | On success | The library name | Any string |
result.data[].category |
object | On success | The category for the material | A Category object |
result.data[].category.name |
string | On success | The category name | See CategoriesLookup for a list of possible values |
result.data[].category.code |
string | On success | The category code | See CategoriesLookup for a list of possible values |
result.data[].csiDivisions[] |
array of object | On success | The CSI Divisions for the material | CsiDivision object(s) |
result.data[].csiDivisions[].code |
string | On success | The CSI Division code | See CsiDivisionsLookup for a list of possible values |
result.data[].csiDivisions[].name |
string | On success | The CSI Division name | See CsiDivisionsLookup for a list of possible values |
result.data[].idealProjects[] |
array of object | On success | The list of ideal projects for the material | Ideal project object(s) |
result.data[].idealProjects[].value |
string | On success | The ideal project value | Any string |
result.data[].images[] |
array | On success | The list of images for the material | Array of image |
result.data[].images[].originalUrl |
string | On success | The original image URL | A public facing URL |
result.data[].images[].referenceUrl |
string | On success | The image URL | A public facing URL |
result.data[].additionalsDocuments[] |
array of object | On success | The list of document for the material | Document object(s) |
result.data[].additionalsDocuments[].originalUrl |
string | On success | The original URL of a document related to the material | A valid public facing URL |
result.data[].additionalsDocuments[].referenceUrl |
string | On success | URL of a document related to the material | A valid public facing URL |
result.data[].contacts[] |
array of object | On success | The related contacts | Contact object(s) |
result.data[].contacts[].externalId |
string | On success | A unique identifier of your choosing that serves as a unique key for the contact | Any string |
result.data[].contacts[].type |
string | On success | The contact type | MANUFACTURER, AUDITOR or VENDOR |
result.data[].contacts[].companyName |
string | On success | The contact company name | Any string |
result.data[].contacts[].name |
string | On success | The contact name | Any string |
result.data[].contacts[].website |
string | On success | The contact website | A valid public facing URL |
result.data[].contacts[].postalAddress |
string | On success | The contact postal address | Any string |
result.data[].contacts[].phone |
string | On success | The contact phone | Any string |
result.data[].contacts[].email |
string | On success | The contact email | A valid email |
result.data[].tags[] |
array of object | On success | The list of tags for the material | Tag object(s) |
result.data[].tags[].name |
string | On success | The tag name | Any string |
result.data[].connectedCertifications[] |
array of object | On success | The list of certifications connected to the material | Certification object(s) |
result.data[].connectedCertifications[].originId |
string | On success | The certification unique origin ID | Any string |
result.data[].connectedDeclarations[] |
array of object | On success | The list of declarations connected to the material | Declaration object(s) |
result.data[].connectedDeclarations[].originId |
string | On success | The declaration unique origin ID | Any string |
result.data[].connectedTestReports[] |
array of object | On success | The list of test reports connected to the material | Declaration object(s) |
result.data[].connectedTestReports[].originId |
string | On success | The test report unique origin ID | Any string |
result.data[].url |
string | On success | The material URL | A public facing URL |
result.data[].originUrl |
string | On success | The link to the material in the Origin Data hub | A public facing URL |
connectRequest |
object | Always | The exact request sent that produced this response | A MaterialsSearch request |
Sample Response (Success):
HTTP Code : 200
{
"status":{
"state":"SUCCESS"
},
"result":{
"entityType":"MATERIAL",
"searchInfo":{
"numberOfElements":"1",
"numberOfPages":"1"
},
"data":[
{
"locale":"en",
"originId":"93bcbf18-51fb-11e8-8716-8c16451835eb",
"externalId":"00006060-8ebf-4a0f-94a5-de7c949a1a28",
"productId": "refcode001",
"managementPermission": "COMPANY_READONLY",
"name":"XYZ Modular",
"description":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tincidunt orci eget lacus dignissim bibendum.",
"contentManagedBy": "John Smith",
"lastUpdated": "2018-11-06T13:20:30Z",
"brand":{
"originId":"13949a9b-ee17-4760-93e9-7749ff2faa79",
"name":"XYZ Modular Furniture",
"website": "https://www.xyzmodfurniture.tld"
},
"logoUrl":{
"originalUrl": "https://www.xyzmodfurniture.tld/public/img/xyzmod/XYZ-asset-image-0-4444.jpeg",
"referenceUrl":"https://origin.build/equinox/storage/public/XYZ-asset-image-0-4444.jpeg"
},
"company":{
"originId":"101dd127-90d0-4123-9981-37998ceaa317",
"name":"GIGA",
"companyType": "MANUFACTURER"
},
"collection": {
"name": "My fall collection"
},
"libraries": [
{
"originId": "c254638f-1fde-4ca8-ae1f-8fb5abbfe8dd",
"name": "My library"
}
],
"category":{
"name":"Seating",
"code": "gc_3"
},
"csiDivisions": [
{
"code": "12 58 29",
"name": "Beds"
}
],
"idealProjects":[
{
"value":"Commercial"
},
{
"value":"Residential"
}
],
"images":[
{
"originalUrl": "https://www.xyzmodfurniture.tld/public/img/xyzmod/XYZ-asset-image-0-4444.jpeg",
"referenceUrl":"https://origin.build/equinox/storage/public/XYZ-asset-image-0-4444.jpeg"
}
],
"additionalsDocuments": [
{
"originalUrl": "https://www.xyzmodfurniture.tld/public/doc/xyzmod/xyzmod001.txt",
"referenceUrl": "https://origin.build/equinox/storage/public/xyzmod001.txt"
},
{
"originalUrl": "https://www.xyzmodfurniture.tld/public/doc/xyzmod/xyzmod002.txt",
"referenceUrl": "https://origin.build/equinox/storage/public/xyzmod002.txt"
}
],
"contacts": [
{
"externalId": "JOHNSMITHVENDOR1",
"type": "VENDOR",
"name": "John Smith",
"companyName": "ACME Inc.",
"website": "https://www.acme.com/",
"postalAddress": "2500 Street Avenues",
"phone": "1-999-123-1234",
"email": "salesrep@acme.com"
}
],
"tags": [
{
"name": "xyz"
}
],
"connectedCertifications": [
{
"originId": "6e7bcbfe-4d82-42ad-aa62-6c8d9b142a73"
},
{
"originId": "a78a0a24-5829-4723-bde6-0ccf565a6f3c"
},
{
"originId": "e7917326-1055-460a-8118-1bc0c48121bd"
}
],
"connectedDeclarations": [
{
"originId": "4184443c-0c0d-405c-9a5e-125256b62afe"
},
{
"originId": "5d29b08c-2174-499a-a752-463a9c60d9bf"
}
],
"connectedTestReports": [
{
"originId": "71072fb6-6616-4658-b440-beeac537a97b"
}
],
"url": "https://www.xyzmodfurniture.tld/xyzmod.html",
"originUrl":"https://origin.build/#/material/93bcbf18-51fb-11e8-8716-8c16451835eb?locale=en"
}
]
},
"connectRequest":{
"locale":"en",
"pageNumber":"1",
"pageSize":"100",
"searchCriteria":[
{
"name":"ORIGINID",
"value":"93bcbf18-51fb-11e8-8716-8c16451835eb"
}
]
}
}
Sample Response (Error):
HTTP Code : 400, 500
{
"status": {
"state": "ERROR",
"code": "CE00001 - Connect request failed validation. Refer to provided messages for details.",
"messages": [
"Request has invalid value '0' for field pageNumber. Allowed value(s) : [positive integer not equal zero]",
"searchCriteria[1] has invalid value 'ORIGIN_IDENT' for field name. Allowed value(s) : [COMPANYID,LIBRARYID,KEYWORD,EXTERNALID,ORIGINID,MODIFIEDSINCE]"
]
},
"connectRequest": {
"locale": "en",
"pageNumber": "0",
"pageSize": "1",
"searchCriteria": [
{
"name": "ORIGIN_IDENT",
"value": "93bcbf18-51fb-11e8-8716-8c16451835eb"
}
]
}
}