Create a charge related line

post

/fscmRestApi/resources/11.13.18.05/tradeOperations/{TradeOperationId}/child/charges/{TradeOperationChargeId}/child/chargeRelatedLines

Request

Path Parameters
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
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 : tradeOperations-charges-chargeRelatedLines-item-response
Type: object
Show Source
  • Title: Charge BU
    Read Only: true
    Maximum Length: 240
    Value that indicates the requisitioning business unit that incurs the charge.
  • Title: Related Charge Line Number
    Value that uniquely identifies the charge line number for the charge entered as related in a charge line.
  • Title: Charge Line Status Meaning
    Read Only: true
    Maximum Length: 80
    Value that indicates the meaning of the charge line status.
  • Title: Charge Line Status
    Read Only: true
    Maximum Length: 30
    Abbreviation 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.
  • Title: Related Charge Name
    Read Only: true
    Maximum Length: 80
    Name of the charge for the related charge line entered in a charge line.
  • Title: Charge Currency
    Read Only: true
    Maximum Length: 15
    Transaction currency in which the charge is entered.
  • Title: Include item value
    Contains 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
  • Title: Percentage of Item Value
    Percent of the purchase value. It is required only when Include Item Value Flag is set to yes.
  • Title: Related Charge Line ID
    Value that uniquely identifies the related charge line for a trade operation charge.
  • Title: Related Charge Line Percentage
    Percent for each of the related charge line based on which the charge line amount will be derived.
  • Title: Total Amount
    Read Only: true
    Estimated total amount on the charge line.
  • Title: Trade Operation Charge ID
    Value that uniquely identifies the trade operation charge.
  • Title: Trade Operation Charge Related Line ID
    Value that uniquely identifies the trade operation charge related line.
Back to Top

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"
			}]
		}
	}]
}
Back to Top