Create one sample

post

/fscmRestApi/resources/11.13.18.05/inspectionEvents/{IpEventId}/child/Sample

Request

Path Parameters
Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
  • Contains one of the following values: true or false. If true, the server performs an Upsert operation instead of a Create operation. During an Upsert operation, the server attempts to find an existing resource that matches the payload. If a match is found, the server updates the existing resource instead of creating a new one. If not found or false (default), the server performs a Create operation. Note that the Upsert operation isn't supported for date-effective REST resources.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : Sample Dispositions
Type: array
Title: Sample Dispositions
The Sample Dispositions resource manages sample item dispositions.
Show Source
Nested Schema : inspectionEvents-Sample-SampleDisposition-item-post-request
Type: object
Show Source
Nested Schema : Sample Results
Type: array
Title: Sample Results
The Sample Results resource manages the sample results for an item.
Show Source
Nested Schema : inspectionEvents-Sample-SampleDisposition-SampleResult-item-post-request
Type: object
Show Source
Nested Schema : Result Attachments
Type: array
Title: Result Attachments
The Result Attachments resource manages the attachments for the sample results.
Show Source
Nested Schema : Result Evaluations
Type: array
Title: Result Evaluations
The Result Evaluations resource manages the evaluation results.
Show Source
Nested Schema : inspectionEvents-Sample-SampleDisposition-SampleResult-Attachments-item-post-request
Type: object
Show Source
Nested Schema : schema
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : inspectionEvents-Sample-item-response
Type: object
Show Source
Nested Schema : Sample Dispositions
Type: array
Title: Sample Dispositions
The Sample Dispositions resource manages sample item dispositions.
Show Source
Nested Schema : inspectionEvents-Sample-SampleDisposition-item-response
Type: object
Show Source
Nested Schema : Sample Results
Type: array
Title: Sample Results
The Sample Results resource manages the sample results for an item.
Show Source
Nested Schema : inspectionEvents-Sample-SampleDisposition-SampleResult-item-response
Type: object
Show Source
Nested Schema : Result Attachments
Type: array
Title: Result Attachments
The Result Attachments resource manages the attachments for the sample results.
Show Source
Nested Schema : Result Evaluations
Type: array
Title: Result Evaluations
The Result Evaluations resource manages the evaluation results.
Show Source
Nested Schema : inspectionEvents-Sample-SampleDisposition-SampleResult-Attachments-item-response
Type: object
Show Source
Nested Schema : inspectionEvents-Sample-SampleDisposition-SampleResult-ResultEvaluation-item-response
Type: object
Show Source
Back to Top

Examples

This example describes how to create one sample for one inspection event.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.action+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/inspectionEvents/IpEventId/child/Sample"

For example, the following command creates one sample for inspection event 300100111678896:

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.action+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample"

Example Request Body

The following example includes the contents of the request body in JSON format. You replace the request payload in the cURL command with the contents of the Example Request Body. The request payload specifies attribute values that the command will use in the record that it creates.

{
      "Quantity" : 1,
      "SampleNumber" : "00001",
      "UOMCode" : "EA",
      "SampleDisposition": [
        {
          "Quantity" : 1,
          "Status" : "COMPLETE",
          "SampleResult": [
            {
              "CharacteristicId" : 300100071895407,
              "Evaluation" : "Y",
              "InspectionDate" : "2016-02-03T01:24:00-08:00",
              "Quantity" : 1,
              "ResultValueNumber" : 1,
              "UOMCode" : "EA",
              "UserSequence" : 10,
              "ResultEvaluation": [
                {
                  "AdditionalChar" : "N",
                  "Evaluation" : "Y"
                }
              ]
            }
          ]
        }
      ]
    }

Example Response Body

The following example includes the contents of the response body in JSON format:

{
  "IpEventId" : 300100111678896,
  "ObjectVersionNumber" : 1,
  "OriginalDisposition" : null,
  "Quantity" : 1,
  "SampleId" : 300100118590094,
  "SampleNumber" : "00001",
  "SerialNumber" : null,
  "UOMCode" : "EA",
  "WoOperationTransactionId" : null,
  "SampleDisposition" : [ {
    "Disposition" : "ACCEPT",
    "IpEventDispositionId" : 300100111679127,
    "IpEventId" : 300100111678896,
    "ObjectVersionNumber" : 2,
    "Quantity" : 1,
    "SampleEventDispositionId" : 300100118590095,
    "SampleId" : 300100118590094,
    "Status" : "COMPLETE",
    "SampleResult" : [ {
      "CharacteristicId" : 300100071895407,
      "Comments" : null,
      "Disposition" : null,
      "Evaluation" : "Y",
      "InSpecification" : null,
      "InspectionDate" : "2016-02-03T09:24:00+00:00",
      "IpEventId" : 300100111678896,
      "ObjectVersionNumber" : 1,
      "Quantity" : 1,
      "ResultValueChar" : null,
      "ResultValueDate" : null,
      "ResultValueNumber" : 1,
      "SampleId" : 300100118590094,
      "SampleResultId" : 300100118590097,
      "SpecificationMaximum" : null,
      "SpecificationMinimum" : null,
      "SpecificationTarget" : null,
      "UOMCode" : "EA",
      "UserSequence" : 10,
      "ResultEvaluation" : [ {
        "AdditionalChar" : "N",
        "Evaluation" : "Y",
        "InSpecification" : null,
        "IpEventDispositionId" : 300100111679127,
        "IpEventId" : 300100111678896,
        "ObjectVersionNumber" : 2,
        "ResultEvaluationId" : 300100118590098,
        "SampleResultId" : 300100118590097,
        "links" : [ {
          "rel" : "self",
          "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095/child/SampleResult/300100118590097/child/ResultEvaluation/300100118590098",
          "name" : "ResultEvaluation",
          "kind" : "item",
          "properties" : {
            "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
          }
        }, {
          "rel" : "canonical",
          "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095/child/SampleResult/300100118590097/child/ResultEvaluation/300100118590098",
          "name" : "ResultEvaluation",
          "kind" : "item"
        }, {
          "rel" : "parent",
          "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095/child/SampleResult/300100118590097",
          "name" : "SampleResult",
          "kind" : "item"
        } ]
      } ],
      "links" : [ {
        "rel" : "self",
        "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095/child/SampleResult/300100118590097",
        "name" : "SampleResult",
        "kind" : "item",
        "properties" : {
          "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
        }
      }, {
        "rel" : "canonical",
        "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095/child/SampleResult/300100118590097",
        "name" : "SampleResult",
        "kind" : "item"
      }, {
        "rel" : "parent",
        "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095",
        "name" : "SampleDisposition",
        "kind" : "item"
      }, {
        "rel" : "child",
        "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095/child/SampleResult/300100118590097/child/ResultEvaluation",
        "name" : "ResultEvaluation",
        "kind" : "collection"
      } ]
    } ],
    "links" : [ {
      "rel" : "self",
      "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095",
      "name" : "SampleDisposition",
      "kind" : "item",
      "properties" : {
        "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
      }
    }, {
      "rel" : "canonical",
      "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095",
      "name" : "SampleDisposition",
      "kind" : "item"
    }, {
      "rel" : "parent",
      "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094",
      "name" : "Sample",
      "kind" : "item"
    }, {
      "rel" : "child",
      "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition/300100118590095/child/SampleResult",
      "name" : "SampleResult",
      "kind" : "collection"
    } ]
  } ],
  "links" : [ {
    "rel" : "self",
    "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094",
    "name" : "Sample",
    "kind" : "item",
    "properties" : {
      "changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
    }
  }, {
    "rel" : "canonical",
    "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094",
    "name" : "Sample",
    "kind" : "item"
  }, {
    "rel" : "parent",
    "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896",
    "name" : "inspectionEvents",
    "kind" : "item"
  }, {
    "rel" : "child",
    "href" : "https://servername/fscmRestApi/resources/version/inspectionEvents/300100111678896/child/Sample/300100118590094/child/SampleDisposition",
    "name" : "SampleDisposition",
    "kind" : "collection"
  } ]
}
Back to Top