v2 > Services > MaterialSamplesCreate


Create one or more material samples in Origin.

  • URL

    /connect/v2/material-samples/create

  • Method:

    POST

  • URL Params

    none

  • Request :

Field Type Required Description Domain of value
materialSamples[] array of object At least one The list of material samples to create MaterialSample object(s)
materialSamples[].externalId string Yes The material sample unique ID in your system Any string
materialSamples[].materialOriginId string Yes The material origin id linked to the material sample A UUID result.data[].originId in MaterialsSearch
materialSamples[].sampleUrl string Yes The material sample url A valid public facing URL

Sample Request (Required fields)

{
  "materialSamples": [
    {
      "externalId": "ABC-001",
      "materialOriginId": "93bcbf18-51fb-11e8-8716-8c16451835eb",
      "sampleUrl": "https://material-sample.tld/xyz-modular"
    }
  ]
}
  • 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_SAMPLE'
result.correlations[] object On success The identity correlations for all processed material samples An array of correlation objects
result.correlations[].externalId string On success The external ID of the material sample provided in the request Any string
result.correlations[].originId string On success The origin ID assigned to the create material sample A valid UUID
connectRequest object Always The exact request sent that produced this response A MaterialSamplesCreate request

Sample Response (Success)

  • HTTP Code : 200
{
  "status": {
    "state": "SUCCESS"
  },
  "result": {
    "entityType": "MATERIAL_SAMPLE",
    "correlations": [
      {
        "externalId": "ABC-001",
        "originId": "88dada05-5d38-4b60-91b9-f1bf9d6bf5dd"
      }
    ]
  },
  "connectRequest": {
    "materialSamples": [
      {
        "externalId": "ABC-001",
        "materialOriginId": "93bcbf18-51fb-11e8-8716-8c16451835eb",
        "sampleUrl": "https://material-sample.tld/xyz-modular"
      }
    ]
  }
}

Sample Response (Error)

  • HTTP Code : 400, 500
{
  "status": {
    "state": "ERROR",
    "code": "CE00001 - Connect request failed validation. Refer to provided messages for details.",
    "messages": [
      "materialSamples[1] require one materialOriginId.",
      "materialSamples[1] require one sampleUrl."
    ]
  },
  "connectRequest": {
    "materialSamples": [
      {
        "externalId": "ABC-001",
        "url": "https://material-sample.tld/xyz-modular"
      }
    ]
  }
}

results matching ""

    No results matching ""