v2 > Services > MaterialSamplesUpdate


Update one or more material samples in Origin.

  • URL

    /connect/v2/material-samples/update

  • 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 update MaterialSample object(s)
materialSamples[].originId string Only if no materialSamples[].externalId The material sample unique origin ID A UUID
materialSamples[].externalId string Only if no materialSample[].originId The material sample unique ID in your system Any string
materialSamples[].sampleUrl string Yes The material sample url A valid public facing URL

Sample Request (Update of materialSamples attribute)

{
  "materialSamples": [
    {
      "originId": "88dada05-5d38-4b60-91b9-f1bf9d6bf5dd",
      "sampleUrl": "https://material-sample.tld/xyz-modular-updated"
    }
  ]
}
  • 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.result object On success A simple completion message 'Update completed.'
connectRequest object Always The exact request sent that produced this response A MaterialSamplesUpdate request

Sample Response (Success)

  • HTTP Code : 200
{
  "status": {
    "state": "SUCCESS"
  },
  "result": {
    "entityType": "MATERIAL_SAMPLE",
    "result": "Update completed."
  },
  "connectRequest": {
    "materialSamples": [
      {
        "originId": "88dada05-5d38-4b60-91b9-f1bf9d6bf5dd",
        "sampleUrl": "https://material-sample.tld/xyz-modular-updated"
      }
    ]
  }
}

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 originId or externalId.",
      "materialSamples[1] require one sampleUrl."
    ]
  },
  "connectRequest": {
    "materialSamples": [
      {
        "url": "https://material-sample.tld/xyz-modular-updated"
      }
    ]
  }
}

results matching ""

    No results matching ""