Update a landed cost charge

patch

/fscmRestApi/resources/11.13.18.05/invoicesForLandedCostCharges/{invoicesForLandedCostChargesUniqID}

Request

Path Parameters
  • This is the hash key of the attributes which make up the composite key for the Invoices for Landed Cost Charges resource and used to uniquely identify an instance of Invoices for Landed Cost Charges. The client should not generate the hash key value. Instead, the client should query on the Invoices for Landed Cost Charges collection resource in order to navigate to a specific instance of Invoices for Landed Cost Charges 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.
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : Charge References
Type: array
Title: Charge References
The Charge References resource manages the charge references on the charge used for an invoice association.
Show Source
Nested 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 : invoicesForLandedCostCharges-item-response
Type: object
Show Source
Nested Schema : Charge References
Type: array
Title: Charge References
The Charge References resource manages the charge references on the charge used for an invoice association.
Show Source
Nested Schema : invoicesForLandedCostCharges-landedCostChargeReferencesForInvoiceLines-item-response
Type: object
Show Source
Back to Top

Examples

This example describes how to update a landed cost charge.

Example cURL Command

Use the following cURL command to submit a request on the REST resource.

curl -X PATCH -u "username:password" -H "Content-Type: application/vnd.oracle.adf.resourceitem+json" -d 'request payload'  "https://servername/fscmRestApi/resources/version/invoicesForLandedCostCharges/invoicesForLandedCostChargesUniqID"

Example 1 Request Body

The following example includes the contents of the request body in JSON format to patch an invoice to associate it with a charge (where an invoice has no charge but charge references exist). 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 updates.

{
	"ChargeName": "SS_Shipment
}

Example 1 Response Body

The following example includes the contents of the response body in JSON format where a charge (and default charge references, if any) gets patched to the invoice:

200 OK                                                                             
{
	"AssociationMode": null,
	"AssociationModeCode": null,
	"AssociationStatus": "Good match",
	"ChargeName": "SS_Shipment",
	"ChargeCode": "SS_Shipment",
	"ChargeId": null,
	"ChargeBU": "Vision Operations",
	"ChargeBUId": null,
	"MissingChargeReferences": "false",
	"InvoiceNumber": "LCMINV_10151824454",
	"InvoiceId": 300100175150435,
	"InvoiceLineNumber": "1",
	"InvoiceLineType": "ITEM",
	"InvoiceAmount": 150,
	"InvoiceNonrecoverableTaxAmount": 0,
	"InvoiceCurrency": "US Dollar",
	"InvoiceCurrencyCode": "USD",
	"InvoiceCreationDate": "10/15/18",
	"ProcurementBU": "Vision Operations",
	"ProcurementBUId": 204,
	"Supplier": "Advanced Network Devices",
	"SupplierId": 21,
	"SupplierSite": "FRESNO",
	"SupplierSiteId": 1969,
	"TradeOperationName": null,
	"TradeOperationNumber": null,
	...
}

Example 2 Request Body

The following example includes the contents of the request body in JSON format to patch an invoice with a charge (when you want to deassociate a charge from an invoice) 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 updates.

{
	"ChargeName":  null             
}

Example 2 Response Body

The following example includes the contents of the response body in JSON format where the charge (and its default charge references, if any) gets deleted. Note: Since a record is getting deleted, the self link of the invoice charge changes. To view the result, search with the invoice number using the finder and go to its self link.

200 OK                                                                             
{
	"AssociationMode": null,
	"AssociationModeCode": null,
	"AssociationStatus": "Good match",
	"ChargeName": null,
	"ChargeCode": null,
	"ChargeId": null,
	"ChargeBU":  null,
	"ChargeBUId": null,
	"MissingChargeReferences": "false",
	"InvoiceNumber": "LCMINV_10151824454",
	"InvoiceId": 300100175150435,
	"InvoiceLineNumber": "1",
	"InvoiceLineType": "ITEM",
	"InvoiceAmount": 150,
	"InvoiceNonrecoverableTaxAmount": 0,
	"InvoiceCurrency": "US Dollar",
	"InvoiceCurrencyCode": "USD",
	"InvoiceCreationDate": "10/15/18",
	"ProcurementBU": "Vision Operations",
	"ProcurementBUId": 204,
	"Supplier": "PennyPack Systems",
	"SupplierId": 21,
	"SupplierSite": "FRESNO",
	"SupplierSiteId": 1969,
	"TradeOperationName": null,
	"TradeOperationNumber": null,
	...
}

Example 3 Request Body

The following example includes the contents of the request body in JSON format to patch an invoice with a charge when the invoice is already associated. 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 updates.

{
	"ChargeName": "SS_Shipment"
}

Example 3 Response Body

The following example includes the contents of the response body in JSON format where an error is thrown:

400 Bad Request                                                                       
This invoice is already associated with a charge. (CML-3720089)

Example 4 Request Body

The following example includes the contents of the request body in JSON format to patch a collection of invoices with charges. 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 updates.

{
	"ChargeName": "SS_Freight"
}

Example 4 Response Body

The following example includes the contents of the response body in JSON format:


{
	"parts":[
	{
		"id": "part1",
		"path": "https://servername/fscmRestApi/resources/version/invoicesForLandedCostCharges/00040000000EACED0005770800000000075BCD15000000033733370000000EACED0005770800000000075BCD150000000EACED0005770800000000000002E1",
		"operation": "update",
		"payload":{
			"AssociationMode": null,
			"AssociationModeCode": null,
			"AssociationStatus": "New",
			"ChargeName": "SS_Freight",
			"ChargeCode": "SS_Freight",
			"ChargeId": 1,
			"ChargeBU": "Vision Operations",
			"ChargeBUId": 204,
			"MissingChargeReferences": "true",
			"InvoiceNumber": "Bulk_Invoice",
			"InvoiceId": 123456789,
			"InvoiceLineNumber": "737",
			"InvoiceLineType": "ITEM",
			"InvoiceAmount": 30,
			"InvoiceNonrecoverableTaxAmount": 0,
			"InvoiceCurrency": "US Dollar",
			"InvoiceCurrencyCode": "USD",
			"InvoiceCreationDate": "2017-02-23T12:11:53+00:00",
			"ProcurementBU": "Vision Operations",
			"ProcurementBUId": 204,
			"Supplier": "CV_SuppA01",
			"SupplierId": 12,
			"SupplierSite": "CVSuppA01Site01",
			"SupplierSiteId": 2444,
			"TradeOperationName": null,
			"TradeOperationNumber": null,
			"links":[{"rel": "self", "href": "https://servername/fscmRestApi/resources/version/invoicesForLandedCostCharges/00040000000EACED0005770800000000075BCD15000000033733370000000EACED0005770800000000075BCD150000000EACED0005770800000000000002E1",...]
			}
		},
		{
			"id": "part2",
			"path": "https://servername/fscmRestApi/resources/version/invoicesForLandedCostCharges/00040000000EACED0005770800000000075BCD15000000033436300000000EACED0005770800000000075BCD150000000EACED0005770800000000000001CC",
			"operation": "update",
			"payload":{
				"AssociationMode": null,
				"AssociationModeCode": null,
				"AssociationStatus": "New",
				"ChargeName": "SS_Freight",
				"ChargeCode": "SS_Freight",
				"ChargeId": 1,
				"ChargeBU": "Vision Operations",
				"ChargeBUId": 204,
				"MissingChargeReferences": "true",
				"InvoiceNumber": "Bulk_Invoice",
				"InvoiceId": 123456789,
				"InvoiceLineNumber": "460",
				"InvoiceLineType": "ITEM",
				"InvoiceAmount": 30,
				"InvoiceNonrecoverableTaxAmount": 0,
				"InvoiceCurrency": "US Dollar",
				"InvoiceCurrencyCode": "USD",
				"InvoiceCreationDate": "2017-02-23T12:11:53+00:00",
				"ProcurementBU": "Vision Operations",
				"ProcurementBUId": 204,
				"Supplier": "CV_SuppA01",
				"SupplierId": 12,
				"SupplierSite": "CVSuppA01Site01",
				"SupplierSiteId": 2444,
				"TradeOperationName": null,
				"TradeOperationNumber": null,
				"links":[{"rel": "self", "href": "https://servername/fscmRestApi/resources/version/invoicesForLandedCostCharges/00040000000EACED0005770800000000075BCD15000000033436300000000EACED0005770800000000075BCD150000000EACED0005770800000000000001CC",...]
				}
			}
		}
	}
	]
}

Back to Top