Create cost adjustment detail

post

/fscmRestApi/resources/11.13.18.05/costAdjustments/{costAdjustmentsUniqID}/child/AdjustmentDetail

Request

Path Parameters
  • 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.
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
  • Title: Cost Element
    Maximum Length: 30
    Cost 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.
  • Title: Cost Element ID
    Value that uniquely identifies the cost element.
  • Title: Expense Pool ID
    Value that uniquely identifies the expense pool.
  • Title: New Cost
    New cost of the cost element.
  • Title: Source Transaction Cost ID
    Value that uniquely identifies the transaction cost identifier for which the adjustment detail is created.
  • Title: Source Transaction ID
    Value that uniquely identifies the transaction for which the adjustment is created.
  • Title: Unit Cost
    Unit cost of the cost element.
  • Title: Comments
    Maximum Length: 240
    Optional comment entered by the user for the cost adjustment detail.
  • Title: User Defined
    Maximum Length: 5
    Contains 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.
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 : costAdjustments-AdjustmentDetail-item-response
Type: object
Show Source
  • Title: Adjustment Header ID
    Read Only: true
    Value that uniquely identifies the adjustment against which this adjustment detail is created.
  • Title: Cost Element
    Maximum Length: 30
    Cost 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.
  • Title: Cost Element ID
    Value that uniquely identifies the cost element.
  • Title: Expense Pool
    Read Only: true
    Maximum Length: 30
    Expense 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.
  • Title: Expense Pool ID
    Value that uniquely identifies the expense pool.
  • Links
  • Title: New Cost
    New cost of the cost element.
  • Title: Source Transaction Cost ID
    Value that uniquely identifies the transaction cost identifier for which the adjustment detail is created.
  • Title: Source Transaction ID
    Value that uniquely identifies the transaction for which the adjustment is created.
  • Title: Unit Cost
    Unit cost of the cost element.
  • Title: User Adjustment ID
    Read Only: true
    Value that uniquely identifies the adjustment detail. The application generates this value.
  • Title: Comments
    Maximum Length: 240
    Optional comment entered by the user for the cost adjustment detail.
  • Title: User Defined
    Maximum Length: 5
    Contains 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.
Back to Top

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,
   ...
}
Back to Top