Create cost adjustment detail
/fscmRestApi/resources/11.13.18.05/costAdjustments/{costAdjustmentsUniqID}/child/AdjustmentDetail
Request
-
costAdjustmentsUniqID(required): string
This is the hash key of the attributes which make up the composite key for the Cost Adjustments resource and used to uniquely identify an instance of Cost Adjustments. The client should not generate the hash key value. Instead, the client should query on the Cost Adjustments collection resource in order to navigate to a specific instance of Cost Adjustments to get the hash key.
-
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.
- application/json
object-
CostElement: string
Title:
Cost ElementMaximum Length:30Cost element to use when creating an adjustment detail. Review and update the value for this attribute using the Setup and Maintenance work area, and the Manage Cost Elements task. -
CostElementId: integer
(int64)
Title:
Cost Element IDValue that uniquely identifies the cost element. -
ExpensePoolId: integer
(int64)
Title:
Expense Pool IDValue that uniquely identifies the expense pool. -
NewCost: number
Title:
New CostNew cost of the cost element. -
SourceTransactionCostId: integer
(int64)
Title:
Source Transaction Cost IDValue that uniquely identifies the transaction cost identifier for which the adjustment detail is created. -
SourceTransactionId: integer
(int64)
Title:
Source Transaction IDValue that uniquely identifies the transaction for which the adjustment is created. -
UnitCost: number
Title:
Unit CostUnit cost of the cost element. -
UserComment: string
Title:
CommentsMaximum Length:240Optional comment entered by the user for the cost adjustment detail. -
UserDefinedFlag: boolean
Title:
User DefinedMaximum Length:5Contains one of the following values: true or false. If true, then adjustment detail is user defined. If false, then adjustment detail is generated from the existing cost elements associated with the item. The attribute does not have a default value.
Response
- application/json
Default Response
-
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.
object-
AdjustmentHeaderId: integer
(int64)
Title:
Adjustment Header IDRead Only:trueValue that uniquely identifies the adjustment against which this adjustment detail is created. -
CostElement: string
Title:
Cost ElementMaximum Length:30Cost element to use when creating an adjustment detail. Review and update the value for this attribute using the Setup and Maintenance work area, and the Manage Cost Elements task. -
CostElementId: integer
(int64)
Title:
Cost Element IDValue that uniquely identifies the cost element. -
ExpensePool: string
Title:
Expense PoolRead Only:trueMaximum Length:30Expense pool to use when creating an adjustment detail. Review and update the value for this attribute using the Setup and Maintenance work area, and the Manage Expense Pools task. -
ExpensePoolId: integer
(int64)
Title:
Expense Pool IDValue that uniquely identifies the expense pool. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
NewCost: number
Title:
New CostNew cost of the cost element. -
SourceTransactionCostId: integer
(int64)
Title:
Source Transaction Cost IDValue that uniquely identifies the transaction cost identifier for which the adjustment detail is created. -
SourceTransactionId: integer
(int64)
Title:
Source Transaction IDValue that uniquely identifies the transaction for which the adjustment is created. -
UnitCost: number
Title:
Unit CostUnit cost of the cost element. -
UserAdjustmentId: integer
(int64)
Title:
User Adjustment IDRead Only:trueValue that uniquely identifies the adjustment detail. The application generates this value. -
UserComment: string
Title:
CommentsMaximum Length:240Optional comment entered by the user for the cost adjustment detail. -
UserDefinedFlag: boolean
Title:
User DefinedMaximum Length:5Contains one of the following values: true or false. If true, then adjustment detail is user defined. If false, then adjustment detail is generated from the existing cost elements associated with the item. The attribute does not have a default value.
arrayLinksobject-
href: string
Title:
hyperlink referenceThe URI to the related resource. -
kind: string
Title:
kindAllowed Values:[ "collection", "item", "describe", "other" ]The kind of the related resource. -
name: string
Title:
nameThe name of the link to the related resource. -
properties: object
properties
-
rel: string
Title:
relationAllowed 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
This example describes how to create cost adjustment detail.
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/costAdjustments/AdjustmentHeaderId/child/AdjustmentDetail
For example, the following command creates cost adjustment detail for cost element ZCST-VO-GAS with adjustment header identifier 4011:
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.action+json" -d 'request payload' "https://servername/fscmRestApi/resources/version/costAdjustments/4011/child/AdjustmentDetail"
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. For details, see the topic named Structuring Post, Patch, Delete, and Other Requests in the Getting Started section of the SCM REST API documentation website:
{
"CostElement" : "ZCST-VO-GAS",
"NewCost" : 10
}Example Response Body
The following example includes the contents of the response body in JSON format:
{
"AdjustmentHeaderId": 4011,
"CostElementId": 100000011624025,
"ExpensePoolId": 0,
"NewCost": 10,
"SourceTransactionCostId": null,
"SourceTransactionId": 333133,
"UnitCost": 0,
"UserAdjustmentId": 5067,
"CostElement": "ZCST-VO-GAS",
"ExpensePool": null,
"UserDefinedFlag": true,
...
}