v1 > Services > MaterialsCreate
Create one or more materials in Origin.
URL
/connect/v1/materials/create
/connect/v1/async/materials/create
Method:
POST
URL Params
none
Request :
Field | Type | Required | Description | Domain of value |
---|---|---|---|---|
materials[] |
array of object | At least one | The list of materials to create | Material object(s) |
materials[].locale |
string | Yes | An Origin supported locale | 'de', 'es_MX', 'en', 'fr' or 'zh_CN' |
materials[].externalId |
string | Yes | The material unique ID in your system | Any string |
materials[].productId |
string | No | An identification code (ex: a catalog id, SKU code) | Any string |
materials[].managementPermission |
string | Yes | The access permission profile | COMPANY_READONLY, COMPANY_EDITABLE, ONLY_ME |
materials[].name |
string | Yes | The material name | Any string |
materials[].description |
string | No | The material description | Any string |
materials[].brand |
object | No | The material brand | A brand object |
materials[].brand.name |
string | Only if materials[].brand is present |
The brand name | Any string |
materials[].brand.website |
string | No | The brand website | A valid public facing URL |
materials[].logoUrl |
object | Only if materials[].channels[] is present |
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 |
materials[].logoUrl.originalUrl |
string | Only if materials[].logoUrl is present |
The logo URL | A valid public facing URL |
materials[].collection |
object | No | The Material collection (ex: winter collection) | A collection object |
materials[].collection.name |
string | Only if materials[].collection is present |
The collection name | Any string |
materials[].libraries[] |
array of object | No | The list of libraries for the material | Library object(s) |
materials[].libraries[].name |
string | Only if materials[].libraries[] is present |
The library name | Any string |
materials[].category |
object | Only if materials[].channels[] is present |
The category for the material | A category object |
materials[].category.name |
string | Only if materials[].category is present |
The category name | See CategoriesLookup for a list of possible values |
materials[].csiDivisions[] |
array of object | No | The CSI Divisions for the material | CsiDivision object(s) |
materials[].csiDivisions[].code |
string | Only if materials[].csiDivisions[] is present and if materials[].csiDivisions.name is empty |
The CSI Division code | See CsiDivisionsLookup for a list of possible values |
materials[].csiDivisions[].name |
string | Only if materials[].csiDivisions[] is present and if materials[].csiDivisions.code is empty |
The CSI Division name | See CsiDivisionsLookup for a list of possible values |
materials[].idealProjects[] |
array of object | No | The list of ideal projects for the material | IdealProject object(s) |
materials[].idealProjects[].value |
string | Only if materials[].idealProjects[] is present |
The ideal project value | See PropertyDetailsLookup for a list of possible values with the code 'IDEALPROJECTS' |
materials[].images[] |
array of object | No | The list of images for the material | Image object(s) |
materials[].images[].originalUrl |
string | Only if materials[].images[] is present |
URL of an image related to the material | A valid public facing URL |
materials[].additionalsDocuments[] |
array of object | No | The list of document for the material | Document object(s) |
materials[].additionalsDocuments[].originalUrl |
string | Only if materials[].additionalsDocuments[] is present |
URL of a document related to the material | A valid public facing URL |
materials[].contacts[] |
array of object | No | The related contacts | Contact object(s) |
materials[].contacts[].externalId |
string | Only if materials[].contacts[] is present |
A unique identifier of your choosing that serves as a unique key for the contact | Any string |
materials[].contacts[].type |
string | Only if materials[].contacts[] is present |
The contact type | MANUFACTURER, AUDITOR or VENDOR |
materials[].contacts[].companyName |
string | Only if materials[].contacts[] is present |
The contact company name | Any string |
materials[].contacts[].name |
string | No | The contact name | Any string |
materials[].contacts[].website |
string | No | The contact website | A valid public facing URL |
materials[].contacts[].postalAddress |
string | No | The contact postal address | Any string |
materials[].contacts[].phone |
string | Only if materials[].contacts[] is present and materials[].contacts[].email is empty |
The contact phone | Any string |
materials[].contacts[].email |
string | Only if materials[].contacts[] is present and materials[].contacts[].phone is empty |
The contact email | A valid email |
materials[].channels[] |
array of object | No | The list of channels on which the material will be published | Channel object(s). Not published if empty. |
materials[].channels[].name |
string | Only if materials[].channels[] is present |
The channel name | 'ORIGIN' (more to come) |
materials[].featuresCustoms[] |
array of object | No | The list of Origin Customs features for the material | Custom feature object(s) |
materials[].featuresCustoms[].name |
string | Only if materials[].featuresCustoms[] is present |
The custom feature name | Any string |
materials[].featuresCustoms[].value |
string | Only if materials[].featuresCustoms[] is present |
The custom feature value | Any string |
materials[].featuresProperties[] |
array of object | No | The list of Origin Properties features for the material | Feature property object(s) |
materials[].featuresProperties[].code |
string | Only if materials[].featuresProperties[] is present |
The property feature code | See PropertiesLookup for a list of possible values |
materials[].featuresProperties[].value |
string | Only if materials[].featuresProperties[] is present |
The property feature value | See PropertyDetailsLookup for a list of possible values |
materials[].featuresProperties[].unit |
string | No | The property feature unit | See PropertyDetailsLookup for a list of possible values |
materials[].tags[] |
array of object | No | The list of tags for the material | Tag object(s) |
materials[].tags[].name |
string | Only if materials[].tags[] is present |
The tag name | Any string |
materials[].skus[] |
array of object | No | The list of SKUs for the material | Sku object(s) |
materials[].skus[].name |
string | Only if materials[].skus[] is present |
The SKU name | Any string |
materials[].skus[].productId |
string | No | An identification code (ex: a catalog id, SKU code) | Any string |
materials[].skus[].images[] |
array of object | No | The list of images for the SKU | Image object(s) |
materials[].skus[].images[].originalUrl |
string | Only if materials[].skus[].images[] is present |
URL of an image related to the SKU | A valid public facing URL |
materials[].skus[].additionalsDocuments[] |
array of object | No | The list of document for the SKU | Document object(s) |
materials[].skus[].additionalsDocuments[].originalUrl |
string | Only if materials[].skus[].additionalsDocuments[] is present |
URL of a document related to the SKU | A valid public facing URL |
materials[].skus[].featuresCustoms[] |
array of object | No | The list of Origin Customs features for the SKU | Custom feature object(s) |
materials[].skus[].featuresCustoms[].name |
string | Only if materials[].skus[].featuresCustoms[] is present |
The custom feature name | Any string |
materials[].skus[].featuresCustoms[].value |
string | Only if materials[].skus[].featuresCustoms[] is present |
The custom feature value | Any string |
materials[].skus[].featuresProperties[] |
array of object | No | The list of Origin Properties features for the SKU | Feature property object |
materials[].skus[].featuresProperties[].code |
string | Only if materials[].skus[].featuresProperties[] is present |
The property feature code | See PropertiesLookup for a list of possible values |
materials[].skus[].featuresProperties[].value |
string | Only if materials[].skus[].featuresProperties[] is present |
The property feature value | See PropertyDetailsLookup for a list of possible values |
materials[].skus[].featuresProperties[].unit |
string | No | The property feature unit | See PropertyDetailsLookup for a list of possible values |
materials[].connectedCertifications[] |
array of object | No | The list of certifications connected to the material | Certification object(s) |
materials[].connectedCertifications[].originId |
string | Only if materials[].connectedCertifications[] is present |
The certification unique origin ID | Any string |
materials[].connectedDeclarations[] |
array of object | No | The list of declarations connected to the material | Declaration object(s) |
materials[].connectedDeclarations[].originId |
string | Only if materials[].connectedDeclarations[] is present |
The declaration unique origin ID | Any string |
materials[].url |
string | No | The material URL | A valid public facing URL |
- Sample Request (Required fields):
{
"materials": [
{
"locale": "en",
"externalId": "ABC-001",
"managementPermission": "COMPANY_EDITABLE",
"name": "My Material"
}
]
}
- Sample Request (Required fields for publishing):
{
"materials": [
{
"locale": "en",
"externalId": "ABC-001",
"managementPermission": "COMPANY_EDITABLE",
"name": "My Material",
"logoUrl": {
"originalUrl": "https://public.facing.url/logo.jpg"
},
"category": {
"name": "Tables"
},
"channels": [
{
"name": "ORIGIN"
}
]
}
]
}
- Sample Request (All fields):
{
"materials": [
{
"locale": "en",
"externalId": "ABC-001",
"productId": "MYMAT-001",
"managementPermission": "COMPANY_EDITABLE",
"name": "My Material",
"description": "a material description",
"brand": {
"name": "ACME Inc.",
"website": "www.acmexyz.com"
},
"logoUrl": {
"originalUrl": "https://public.facing.url/logo.jpg"
},
"collection": {
"name": "Winter collection"
},
"libraries": [
{
"name": "My Library"
}
],
"category": {
"name": "TABLES"
},
"csiDivisions": [
{
"code": "125819",
"name": "Dining Tables and Chairs"
}
],
"idealProjects": [
{
"value": "RETAIL"
}
],
"images": [
{
"originalUrl": "https://public.facing.url/image.jpg"
}
],
"additionalsDocuments": [
{
"originalUrl": "https://public.facing.url/document.pdf"
}
],
"contacts": [
{
"externalId": "JOHNSMITHVENDOR1",
"type": "VENDOR",
"companyName": "ACME Inc.",
"name": "John Smith",
"website": "https://www.acme.com/",
"postalAddress": "2500 Street Avenues",
"phone": "1-999-123-1234",
"email": "salesrep@acme.com"
}
],
"channels": [
{
"name": "ORIGIN"
}
],
"featuresCustoms": [
{
"name": "Highest supported temperature",
"value": "1500C"
}
],
"featuresProperties": [
{
"code": "LENGTH",
"value": "10",
"unit": "CENTIMETER"
}
],
"tags": [
{
"name": "kitchen"
}
],
"skus": [
{
"name": "My Sku",
"productId": "MY-SKU-001",
"images": [
{
"originalUrl": "https://public.facing.url/image.jpg"
}
],
"additionalsDocuments": [
{
"originalUrl": "https://public.facing.url/document.pdf"
}
],
"featuresCustoms": [
{
"name": "Highest supported temperature",
"value": "1800C"
}
],
"featuresProperties": [
{
"code": "LENGTH",
"value": "20",
"unit": "CENTIMETER"
}
]
}
],
"connectedCertifications": [
{
"originId": "f6f2c73e-4054-44bc-95f2-9e033b9c2282"
}
],
"connectedDeclarations": [
{
"originId": "f12e0a43-37a4-4644-a700-c771315ac0bc"
}
],
"url": "https://public.facing.url/mymaterial.html"
}
]
}
- Response (sync mode) :
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.correlations[] |
object | On success | The identity correlations for all processed materials | An array of correlation objects |
result.correlations[].externalId |
string | On success | The external ID of the material provided in the request | Any string |
result.correlations[].originId |
string | On success | The origin ID assigned to the create material | A valid UUID |
connectRequest |
object | Always | The exact request sent that produced this response | A MaterialsCreate request |
Sample Response (Success in sync mode):
HTTP Code : 200
{
"status":{
"state":"SUCCESS"
},
"result":{
"entityType":"MATERIAL",
"correlations":[
{
"externalId":"ABC-001",
"originId":"88dada05-5d38-4b60-91b9-f1bf9d6bf5dd"
}
]
},
"connectRequest":{
"materials": [
{
"locale": "en",
"externalId": "ABC-001",
"managementPermission": "COMPANY_EDITABLE",
"name": "My Material"
}
]
}
}
- Response (async mode):
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.poolingCallback |
string | On success | The URL callback to pool using the ResultGet endpoint | A URL |
connectRequest |
object | Always | The exact request you sent that produced this response | A MaterialsCreate request |
Sample Response (Success in async mode):
HTTP Code : 200
{
"status":{
"state":"SUCCESS"
},
"result":{
"poolingCallback":"https://origin.build/equinox/connect/v1/result/materials_create/batch/1c8a06b6-45be-4e68-9e2d-5c1f075e6ca2"
},
"connectRequest":{
"materials": [
{
"locale": "en",
"externalId": "ABC-001",
"managementPermission": "COMPANY_EDITABLE",
"name": "My Material"
}
]
}
}
Sample Response (Error):
HTTP Code : 400, 500
{
"status": {
"state": "ERROR",
"code": "CE00001 - Connect request failed validation. Refer to provided messages for details.",
"messages": [
"materials[1] require one locale.",
"materials[1] require one name.",
"materials[1] require one images[1].originalUrl.",
"materials[1] has invalid value 'COMPANY_WRITE' for field managementPermission. Allowed value(s) : [COMPANY_EDITABLE,COMPANY_READONLY,ONLY_ME]",
"materials[1] require one csiDivisions[1].code or csiDivisions[1].name.",
"materials[1] has invalid value 'VENDORS' for field contacts[1].type. Allowed value(s) : [AUDITOR,MANUFACTURER,VENDOR]",
"materials[1] require one contacts[1].email or contacts[1].phone.",
"materials[1] require one logoUrl for the publication.",
"materials[1] require one skus[1].name."
]
},
"connectRequest": {
"materials": [
{
"externalId": "matexternalid001",
"productId": "ABC-001",
"managementPermission": "COMPANY_WRITE",
"description": "a material description",
"brand": {
"name": "ACME Inc."
},
"libraries": [
{
"name": "My Library"
}
],
"category": {
"name": "TABLES"
},
"csiDivisions": [
{
"name": ""
}
],
"images": [
{
}
],
"contacts": [
{
"externalId": "JOHNSMITHVENDOR1",
"type": "VENDORS",
"name": "John Smith",
"companyName": "ACME Inc.",
"website": "https://www.acme.com/",
"postalAddress": "2500 Street Avenues"
}
],
"channels": [
{
"name": "ORIGIN"
}
],
"skus": [
{
"productId": "ABC-001"
}
]
}
]
}
}