Create a Shipment Trade Operation association.
/fscmRestApi/resources/11.13.18.05/tradeOperations/{TradeOperationId}/child/tradeOperationShipments
Request
-
TradeOperationId(required): integer(int64)
Value that uniquely identifies the trade operation.
-
Metadata-Context:
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".
-
REST-Framework-Version:
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.
- application/json
object
-
ShipmentHeaderId: integer
(int64)
System generated value that uniquely identifies a shipment or an advanced shipment notice.
-
ShipmentNumber: string
Title:
Shipment Number
Maximum Length:30
Value provided by the user that identifies a shipment or an advanced shipment notice. -
TradeOperationId: integer
(int64)
Title:
Trade Operation ID
Value that uniquely identifies a trade operation. -
TradeOperationShipmentId: integer
(int64)
Value that uniquely identifies a shipment in the context of a trade operation.
Response
- application/json
Default Response
-
Metadata-Context(required):
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".
-
REST-Framework-Version(required):
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.
object
-
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
ShipmentHeaderId: integer
(int64)
System generated value that uniquely identifies a shipment or an advanced shipment notice.
-
ShipmentNumber: string
Title:
Shipment Number
Maximum Length:30
Value provided by the user that identifies a shipment or an advanced shipment notice. -
TradeOperationId: integer
(int64)
Title:
Trade Operation ID
Value that uniquely identifies a trade operation. -
TradeOperationShipmentId: integer
(int64)
Value that uniquely identifies a shipment in the context of a trade operation.
array
Links
object
-
href: string
Title:
hyperlink reference
The URI to the related resource. -
kind: string
Title:
kind
Allowed Values:[ "collection", "item", "describe", "other" ]
The kind of the related resource. -
name: string
Title:
name
The name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relation
Allowed Values:[ "self", "lov", "parent", "canonical", "child", "enclosure", "action", "custom" ]
The name of the relation to the resource instance. Example: self.
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Examples
The following example includes the contents of the request body in JSON format to associate a shipment to trade operation. This is only applicable when Allocate Landed Cost Charges using ASN Quantity feature is opted-in.
Example 1 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/tradeOperations/TradeOperationId/child/tradeOperationShipments"
Example 1 Request Body
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.
{ "ShipmentNumber": "SHP-01", }
Example 1 Response Body
The following example includes the contents of the response body in JSON format:
{ "TradeOperationShipmentId": 300100576052258, "TradeOperationId": 300100576038482, "ShipmentHeaderId": 3157466, "ShipmentNumber": "SHP-01", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052258", "name": "tradeOperationShipments", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052258", "name": "tradeOperationShipments", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482", "name": "tradeOperations", "kind": "item" }, { "rel": "lov", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052258/lov/ShipmentHeadersVA", "name": "ShipmentHeadersVA", "kind": "collection" } ] }
The following example includes the contents of the request body in JSON format to associate multiple shipments to a trade operation. This is only applicable when Allocate Landed Cost Charges using ASN Quantity feature is opted-in.
Example 2 cURL Command
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.action+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/tradeOperations"
Example 2 Request Body
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.
{ "parts": [ { "id": "part1", "path": "/tradeOperations/300100576038482/child/tradeOperationShipments", "operation": "create", "payload": { "ShipmentNumber" :"SHP-02" } }, { "id": "part2", "path": "/tradeOperations/300100576038482/child/tradeOperationShipments", "operation": "create", "payload": { "ShipmentNumber": "SHP-03" } } ] }
Example 2 Response Body
The following example includes the contents of the response body in JSON format:
{ "parts": [ { "id": "part1", "path": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments", "operation": "create", "payload": { "TradeOperationShipmentId": 300100576052393, "TradeOperationId": 300100576038482, "ShipmentHeaderId": 3158465, "ShipmentNumber": "SHP-02", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052393", "name": "tradeOperationShipments", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052393", "name": "tradeOperationShipments", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482", "name": "tradeOperations", "kind": "item" }, { "rel": "lov", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052393/lov/ShipmentHeadersVA", "name": "ShipmentHeadersVA", "kind": "collection" } ] } }, { "id": "part2", "path": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments", "operation": "create", "payload": { "TradeOperationShipmentId": 300100576052394, "TradeOperationId": 300100576038482, "ShipmentHeaderId": 3157467, "ShipmentNumber": "SHP-03", "links": [ { "rel": "self", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052394", "name": "tradeOperationShipments", "kind": "item" }, { "rel": "canonical", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052394", "name": "tradeOperationShipments", "kind": "item" }, { "rel": "parent", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482", "name": "tradeOperations", "kind": "item" }, { "rel": "lov", "href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100576038482/child/tradeOperationShipments/300100576052394/lov/ShipmentHeadersVA", "name": "ShipmentHeadersVA", "kind": "collection" } ] } } ] }