Create a charge related line
/fscmRestApi/resources/11.13.18.05/tradeOperations/{TradeOperationId}/child/charges/{TradeOperationChargeId}/child/chargeRelatedLines
Request
-
TradeOperationChargeId(required): integer(int64)
Value that uniquely identifies the trade operation charge.
-
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.
-
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-
ChargeLineNumber: integer
Title:
Related Charge Line NumberValue that uniquely identifies the charge line number for the charge entered as related in a charge line. -
IncludePurchaseValueFlag: boolean
Title:
Include item valueContains one of the following values: true or false. If true, then the purchase value needs to be included for the purpose of deriving the charge amount. If false, then the purchase value is not included for the purpose of deriving the charge amount. The default value is false. -
PercentageOfItemValue: number
Title:
Percentage of Item ValuePercent of the purchase value. It is required only when Include Item Value Flag is set to yes. -
RelatedChargeLineId: integer
(int64)
Title:
Related Charge Line IDValue that uniquely identifies the related charge line for a trade operation charge. -
RelatedChargeLinePercentage: number
Title:
Related Charge Line PercentagePercent for each of the related charge line based on which the charge line amount will be derived. -
TradeOperationChargeId: integer
(int64)
Title:
Trade Operation Charge IDValue that uniquely identifies the trade operation charge. -
TradeOperationChargeRelatedLineId: integer
(int64)
Title:
Trade Operation Charge Related Line IDValue that uniquely identifies the trade operation charge related line.
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-
ChargeBU: string
Title:
Charge BURead Only:trueMaximum Length:240Value that indicates the requisitioning business unit that incurs the charge. -
ChargeLineNumber: integer
Title:
Related Charge Line NumberValue that uniquely identifies the charge line number for the charge entered as related in a charge line. -
ChargeLineStatus: string
Title:
Charge Line Status MeaningRead Only:trueMaximum Length:80Value that indicates the meaning of the charge line status. -
ChargeLineStatusCode: string
Title:
Charge Line StatusRead Only:trueMaximum Length:30Abbreviation that uniquely identifies the status of the charge line. Values include Allocated, Allocated with Warning, Allocation in Error, Cancelled, Draft Allocation, Incomplete, New, Pending Association, Ready for Allocation, and Requires Reallocation. -
ChargeName: string
Title:
Related Charge NameRead Only:trueMaximum Length:80Name of the charge for the related charge line entered in a charge line. -
EnteredCurrencyCode: string
Title:
Charge CurrencyRead Only:trueMaximum Length:15Transaction currency in which the charge is entered. -
IncludePurchaseValueFlag: boolean
Title:
Include item valueContains one of the following values: true or false. If true, then the purchase value needs to be included for the purpose of deriving the charge amount. If false, then the purchase value is not included for the purpose of deriving the charge amount. The default value is false. -
links: array
Links
Title:
LinksThe link relations associated with the resource instance. -
PercentageOfItemValue: number
Title:
Percentage of Item ValuePercent of the purchase value. It is required only when Include Item Value Flag is set to yes. -
RelatedChargeLineId: integer
(int64)
Title:
Related Charge Line IDValue that uniquely identifies the related charge line for a trade operation charge. -
RelatedChargeLinePercentage: number
Title:
Related Charge Line PercentagePercent for each of the related charge line based on which the charge line amount will be derived. -
TotalAmount: number
Title:
Total AmountRead Only:trueEstimated total amount on the charge line. -
TradeOperationChargeId: integer
(int64)
Title:
Trade Operation Charge IDValue that uniquely identifies the trade operation charge. -
TradeOperationChargeRelatedLineId: integer
(int64)
Title:
Trade Operation Charge Related Line IDValue that uniquely identifies the trade operation charge related line.
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 a charge related line.
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/tradeOperations/TradeOperationId/child/charges/TradeOperationChargeId/child/chargeRelatedLines"
Example 1 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.
{
"ChargeLineNumber":2,
"RelatedChargeLinePercentage":18,
"PercentageOfItemValue":20,
"IncludePurchaseValueFlag":true
}
Example 1 Response Body
The following example includes the contents of the response body in JSON format:
{
"ChargeBU": "Vision Services",
"ChargeLineNumber": 2,
"ChargeLineStatusCode": "INCOMPLETE",
"ChargeLineStatus": "Incomplete",
"ChargeName": "Freight",
"EnteredCurrencyCode": "USD",
"IncludePurchaseValueFlag": true,
"PercentageOfItemValue": 20,
"RelatedChargeLineId": 300100125725126,
"RelatedChargeLinePercentage": 18,
"TotalAmount": null,
"TradeOperationChargeId": 300100125727023,
"TradeOperationChargeRelatedLineId": 300100125775113,
"links": [{
"rel": "self",
"href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100125727022/child/charges/300100125727023/child/chargeRelatedLines/300100125775113",
"name": "chargeRelatedLines",
"kind": "item",
"properties": {
"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
}
}, {
"rel": "canonical",
"href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100125727022/child/charges/300100125727023/child/chargeRelatedLines/300100125775113",
"name": "chargeRelatedLines",
"kind": "item"
}, {
"rel": "parent",
"href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100125727022/child/charges/300100125727023",
"name": "charges",
"kind": "item"
}, {
"rel": "lov",
"href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100125727022/child/charges/300100125727023/child/chargeRelatedLines/300100125775113/lov/relatedChargeLineNumberLOV",
"name": "relatedChargeLineNumberLOV",
"kind": "collection"
}]
}
Example 2 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.
{
"parts" : [
{
"id": "part1",
"path": "/tradeOperations/300100169198027/child/charges/300100169198177/child/chargeRelatedLines/",
"operation": "create",
"payload": {
"ChargeLineNumber":3,
"RelatedChargeLinePercentage":20
}
}
]
}
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/300100169198027/child/charges/300100169198177/child/chargeRelatedLines",
"operation": "create",
"payload": {
"ChargeBU": "Vision Services",
"ChargeLineNumber": 3,
"ChargeLineStatusCode": "ALLOCATED",
"ChargeLineStatus": "Successfully allocated",
"ChargeName": "Miscellaneous",
"EnteredCurrencyCode": "USD",
"IncludePurchaseValueFlag": true,
"PercentageOfItemValue": 20,
"RelatedChargeLineId": 300100169198079,
"RelatedChargeLinePercentage": 20,
"TotalAmount": 3,
"TradeOperationChargeId": 300100169198177,
"TradeOperationChargeRelatedLineId": 300100169330911,
"links": [{
"rel": "self",
"href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100169198027/child/charges/300100169198177/child/chargeRelatedLines/300100169330911",
"name": "chargeRelatedLines",
"kind": "item",
"properties": {
"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
}
}, {
"rel": "canonical",
"href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100169198027/child/charges/300100169198177/child/chargeRelatedLines/300100169330911",
"name": "chargeRelatedLines",
"kind": "item"
}, {
"rel": "parent",
"href": "https://servername/fscmRestApi/resources/version/tradeOperations/300100169198027/child/charges/300100169198177",
"name": "charges",
"kind": "item"
}]
}
}]
}