Create transactions
post
/fscmRestApi/resources/11.13.18.05/customerAssetTransactions
Request
Header Parameters
-
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.
-
Upsert-Mode:
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
- application/json
Root Schema : schema
Type:
Show Source
object
-
BusinessProcessCode: string
Maximum Length:
30
Abbreviation that identifies the process to be used when the staged transactions are created for the replacement or advance exchange processing. This attribute differentiates the exchange process and the depot repair process. -
ReferencedTransactionId: integer
(int64)
Value that uniquely identifies the transaction to be canceled. A value is required if the transaction type is ORA_CANCEL_TRANSACTION.
-
SrcSystem: string
Name of the source system sending the transaction. It is the name of the external application when source system type is ORA_EXTERNAL, or the Fusion product identifier when the source system type is ORA_INTERNAL. The attribute is required.
-
SrcSystemType: string
Maximum Length:
30
Type of source system that sends the transaction. Valid values are ORA_EXTERNAL or ORA_INTERNAL, which are defined in lookup type ORA_CSE_SOURCE_SYSTEM_TYPE. The attribute is required. -
SrcTransactionDate(required): string
(date-time)
Date when the transaction occurred in the source system. Only a past date can be provided. The attribute is required.
-
SrcTransactionType(required): string
Maximum Length:
240
Type of asset transaction to be processed. Valid values are ORA_REPLACE, ORA_UPGRADE, or ORA_CANCEL_TRANSACTION, which are defined in the lookup type ORA_CSE_TRANSACTION_TYPE. The attribute is required. -
TransactedCustomerAsset: array
Transacted Customer Assets
Title:
Transacted Customer Assets
The Transacted Customer Assets resource manages details that allow you to create a customer asset. -
TransactionId: integer
(int64)
Value that uniquely identifies the asset transaction. It is a value that the application generates when it creates a transaction. This attribute is read-only.
Nested Schema : Transacted Customer Assets
Type:
array
Title:
Transacted Customer Assets
The Transacted Customer Assets resource manages details that allow you to create a customer asset.
Show Source
Nested Schema : schema
Type:
Show Source
object
-
AssetId: integer
(int64)
Value that uniquely identifies the asset. A customer asset identifying the replaced asset is required if the transaction line type is ORA_INBOUND. A customer asset identifying the replacement asset is required if the transaction line type is ORA_OUTBOUND and the source system type is ORA_EXTERNAL. You can provide either the asset number or the asset identifier.
-
AssetNumber: string
Number that uniquely identifies the asset. A customer asset identifying the replaced asset is required if the transaction line type is ORA_INBOUND. A customer asset identifying the replacement asset is required if the transaction line type is ORA_OUTBOUND and the source system type is ORA_EXTERNAL. You can provide either the asset number or the asset identifier.
-
SalesOrderLineId: integer
(int64)
Value that uniquely identifies the order line. It is the return material authorization line for the replaced asset if the transaction line type is ORA_INBOUND. It is the sales order line for the replacement asset if the transaction line type is ORA_OUTBOUND.
-
SalesOrderLineNumber: string
Maximum Length:
120
Number that identifies the order line. It is the return material authorization line number for the replaced asset if the transaction line type is ORA_INBOUND. It is the sales order line number for the replacement asset if the transaction line type is ORA_OUTBOUND. If the source system type is ORA_INTERNAL, the value provided is ignored and the value defaults to the sales order line number from the order line identifier for the transaction. -
SalesOrderNumber: string
Maximum Length:
120
Number that identifies the order. It is the return material authorization order number for the replaced asset if the transaction line type is ORA_INBOUND. It is the sales order number for the replacement asset if the transaction line type is ORA_OUTBOUND. If the source system type is ORA_INTERNAL, the value provided is ignored and the value defaults to the sales order number from the order line identifier for the transaction. -
SrcOrderFulfillmentDate: string
(date-time)
Date when the order line is fulfilled in the source system. If the source system type is ORA_EXTERNAL, a value is required, only a past date can be provided. When the source system type is ORA_INTERNAL, the fulfillment dates of the orders are used as the source of truth.
-
TransactedAssetId: integer
(int64)
Value that uniquely identifies transacted asset in the asset transaction. It is a value that the application generates when it creates a transaction. This attribute is read-only.
-
TransactedQuantity: number
Quantity of transaction for the asset. It is the quantity to be replaced when the transaction line type is ORA_INBOUND. It is the replacement quantity when the transaction line type is ORA_OUTBOUND. If the source system type is ORA_EXTERNAL, quantities and unit of measures for the transaction are defaulted from the assets. If the source system is ORA_INTERNAL, quantities and unit of measures for the transaction are defaulted from the order lines.
-
TransactedUOMCode: string
Maximum Length:
3
Abbreviation that identifies the unit of measure of the transacted asset quantity. It must be convertible to the primary asset item unit of measure for non-serialized products. If it is not provided, it is defaulted to the primary asset item unit of measure. -
TransactionId: integer
(int64)
Value that uniquely identifies the asset transaction. It is a value that the application generates when it creates a transaction. This attribute is read-only.
-
TransactionLineType: string
Maximum Length:
30
Type of transaction line. Valid values are ORA_INBOUND or ORA_OUTBOUND, which are defined in the lookup type ORA_CSE_TXN_LINE_TYPE. It is required to provide one transaction line of ORA_INBOUND type and one line of ORA_OUTBOUND type when the transaction type is ORA_REPLACE or ORA_UPGRADE.
Response
Supported Media Types
- application/json
Default Response
The following table describes the default response for this task.
Headers
-
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.
Root Schema : customerAssetTransactions-item-response
Type:
Show Source
object
-
BusinessProcessCode: string
Maximum Length:
30
Abbreviation that identifies the process to be used when the staged transactions are created for the replacement or advance exchange processing. This attribute differentiates the exchange process and the depot repair process. -
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
ReferencedTransactionId: integer
(int64)
Value that uniquely identifies the transaction to be canceled. A value is required if the transaction type is ORA_CANCEL_TRANSACTION.
-
SrcSystem: string
Name of the source system sending the transaction. It is the name of the external application when source system type is ORA_EXTERNAL, or the Fusion product identifier when the source system type is ORA_INTERNAL. The attribute is required.
-
SrcSystemType: string
Maximum Length:
30
Type of source system that sends the transaction. Valid values are ORA_EXTERNAL or ORA_INTERNAL, which are defined in lookup type ORA_CSE_SOURCE_SYSTEM_TYPE. The attribute is required. -
SrcTransactionDate: string
(date-time)
Date when the transaction occurred in the source system. Only a past date can be provided. The attribute is required.
-
SrcTransactionId: number
Read Only:
true
Value that identifies the transaction from the source application that created or updated the asset. -
SrcTransactionType: string
Maximum Length:
240
Type of asset transaction to be processed. Valid values are ORA_REPLACE, ORA_UPGRADE, or ORA_CANCEL_TRANSACTION, which are defined in the lookup type ORA_CSE_TRANSACTION_TYPE. The attribute is required. -
SrcTransactionTypeId: string
Read Only:
true
Maximum Length:30
Value that identifies the type of transaction from the source application that created or updated the asset. -
TransactedCustomerAsset: array
Transacted Customer Assets
Title:
Transacted Customer Assets
The Transacted Customer Assets resource manages details that allow you to create a customer asset. -
TransactionId: integer
(int64)
Value that uniquely identifies the asset transaction. It is a value that the application generates when it creates a transaction. This attribute is read-only.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Nested Schema : Transacted Customer Assets
Type:
array
Title:
Transacted Customer Assets
The Transacted Customer Assets resource manages details that allow you to create a customer asset.
Show Source
Nested Schema : link
Type:
Show Source
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.
Nested Schema : properties
Type:
Show Source
object
-
changeIndicator: string
Change indicator or the ETag value of the resource instance.
Nested Schema : customerAssetTransactions-TransactedCustomerAsset-item-response
Type:
Show Source
object
-
AssetId: integer
(int64)
Value that uniquely identifies the asset. A customer asset identifying the replaced asset is required if the transaction line type is ORA_INBOUND. A customer asset identifying the replacement asset is required if the transaction line type is ORA_OUTBOUND and the source system type is ORA_EXTERNAL. You can provide either the asset number or the asset identifier.
-
AssetNumber: string
Number that uniquely identifies the asset. A customer asset identifying the replaced asset is required if the transaction line type is ORA_INBOUND. A customer asset identifying the replacement asset is required if the transaction line type is ORA_OUTBOUND and the source system type is ORA_EXTERNAL. You can provide either the asset number or the asset identifier.
-
links: array
Links
Title:
Links
The link relations associated with the resource instance. -
SalesOrderLineId: integer
(int64)
Value that uniquely identifies the order line. It is the return material authorization line for the replaced asset if the transaction line type is ORA_INBOUND. It is the sales order line for the replacement asset if the transaction line type is ORA_OUTBOUND.
-
SalesOrderLineNumber: string
Maximum Length:
120
Number that identifies the order line. It is the return material authorization line number for the replaced asset if the transaction line type is ORA_INBOUND. It is the sales order line number for the replacement asset if the transaction line type is ORA_OUTBOUND. If the source system type is ORA_INTERNAL, the value provided is ignored and the value defaults to the sales order line number from the order line identifier for the transaction. -
SalesOrderNumber: string
Maximum Length:
120
Number that identifies the order. It is the return material authorization order number for the replaced asset if the transaction line type is ORA_INBOUND. It is the sales order number for the replacement asset if the transaction line type is ORA_OUTBOUND. If the source system type is ORA_INTERNAL, the value provided is ignored and the value defaults to the sales order number from the order line identifier for the transaction. -
SrcOrderFulfillmentDate: string
(date-time)
Date when the order line is fulfilled in the source system. If the source system type is ORA_EXTERNAL, a value is required, only a past date can be provided. When the source system type is ORA_INTERNAL, the fulfillment dates of the orders are used as the source of truth.
-
TransactedAssetId: integer
(int64)
Value that uniquely identifies transacted asset in the asset transaction. It is a value that the application generates when it creates a transaction. This attribute is read-only.
-
TransactedQuantity: number
Quantity of transaction for the asset. It is the quantity to be replaced when the transaction line type is ORA_INBOUND. It is the replacement quantity when the transaction line type is ORA_OUTBOUND. If the source system type is ORA_EXTERNAL, quantities and unit of measures for the transaction are defaulted from the assets. If the source system is ORA_INTERNAL, quantities and unit of measures for the transaction are defaulted from the order lines.
-
TransactedUOMCode: string
Maximum Length:
3
Abbreviation that identifies the unit of measure of the transacted asset quantity. It must be convertible to the primary asset item unit of measure for non-serialized products. If it is not provided, it is defaulted to the primary asset item unit of measure. -
TransactionId: integer
(int64)
Value that uniquely identifies the asset transaction. It is a value that the application generates when it creates a transaction. This attribute is read-only.
-
TransactionLineType: string
Maximum Length:
30
Type of transaction line. Valid values are ORA_INBOUND or ORA_OUTBOUND, which are defined in the lookup type ORA_CSE_TXN_LINE_TYPE. It is required to provide one transaction line of ORA_INBOUND type and one line of ORA_OUTBOUND type when the transaction type is ORA_REPLACE or ORA_UPGRADE. -
TransactionStatusCode: string
Read Only:
true
Maximum Length:30
Abbreviation that identifies the status of the transacted asset. This attribute is read-only. Values are ORA_PENDING or ORA_COMPLETED. When the source system type is ORA_INTERNAL, the transaction status is initially set to ORA_PENDING. It moves to ORA_COMPLETED whenever the corresponding order is fulfilled. When the source system is ORA_EXTERNAL, the transaction status is directly set to ORA_COMPLETED since it is assumed that the orders are fulfilled in the source system.
Nested Schema : Links
Type:
array
Title:
Links
The link relations associated with the resource instance.
Show Source
Links
- TransactedCustomerAsset
-
Parameters:
- TransactionId:
$request.path.TransactionId
The Transacted Customer Assets resource manages details that allow you to create a customer asset. - TransactionId:
Examples
This example describes how to create customer asset transactions.
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.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/customerAssetTransactions"
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.
{ "SrcTransactionType": "ORA_REPLACE", "SrcSystem":"SAP", "SrcTransactionDate":"2017-06-01T00:00:00+00:00", "SrcSystemType":"ORA_EXTERNAL", "TransactedCustomerAsset": [ { "TransactionLineType": "ORA_OUTBOUND", "AssetId":300100126918874, "SalesOrderLineId": 300100126882162, "SalesOrderNumber": 490230, "SalesOrderLineNumber": 1, "TransactedQuantity":11, "TransactedUOMCode":"Ea", "SrcOrderFulfillmentDate":"2017-06-01T00:00:00+00:00" }, { "TransactionLineType": "ORA_INBOUND", "AssetNumber":"BA Test Asset 11062017 01", "SalesOrderLineId": 300100126882164, "SalesOrderNumber": 490230, "SalesOrderLineNumber": 2, "TransactedQuantity":1, "TransactedUOMCode":"Ea", "SrcOrderFulfillmentDate":"2017-06-01T00:00:00+00:00" } ] }
Example Response Body
The following example includes the contents of the response body in JSON format:
{ "TransactionId": 300100126918901, "SrcTransactionType": "ORA_REPLACE", "SrcTransactionDate": "2017-06-01T00:00:00+00:00", "SrcSystemType": "ORA_EXTERNAL", "ReferencedTransactionId": null, "SrcSystem": "SAP", "TransactedCustomerAsset": [ { "TransactionId": 300100126918901, "TransactedAssetId": 300100126918902, "TransactionLineType": "ORA_OUTBOUND", "AssetId": 300100126918874, "AssetNumber": "BA Test Asset 11062017", "SalesOrderLineId": 300100126882162, "SalesOrderLineNumber": "1", "SalesOrderNumber": "490230", "TransactedQuantity": 11, "TransactedUOMCode": "Ea", "TransactionStatusCode": "ORA_COMPLETED", "SrcOrderFulfillmentDate": "2017-06-01T00:00:00+00:00", }, { "TransactionId": 300100126918901, "TransactedAssetId": 300100126918903, "TransactionLineType": "ORA_INBOUND", "AssetId": 300100126918895, "AssetNumber": "BA Test Asset 11062017 01", "SalesOrderLineId": 300100126882164, "SalesOrderLineNumber": "2", "SalesOrderNumber": "490230", "TransactedQuantity": 1, "TransactedUOMCode": "Ea", "TransactionStatusCode": "ORA_COMPLETED", "SrcOrderFulfillmentDate": "2017-06-01T00:00:00+00:00", } ] }