Manage Debrief Transactions

You can use the debriefs REST API to view, create, update, and delete debrief transactions for an Oracle Engagement Cloud work order, or any third-party document.

Here's a typical application processing flow for the scenarios:

  1. You can create a debrief header transaction that links to the source document

  2. You can create debrief transactions of type labor, material, or expense

  3. You can query existing debrief transactions

  4. You may choose to update an already created debrief line

  5. You may choose to delete an existing debrief line

Create a New Debrief Header

In this scenario, you create a new debrief header that links to the source document which could be an Engagement work order or a third-party document.

Example URL

Use this resource URL format.

POST

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

Example Request

Here's an example of the request body in JSON format.

{
	"AssetId": 300100176813209,
	"BillToPartySiteId": 300100172173745,
	"BUOrgId": 204,
	"CustomerAccountId": 300100169483889,
	"DebriefNumber": "5500",
	"DebriefStatusCode": "POSTED",
	"FreezePrice": null,
	"ObjectVersionNumber": 5,
	"ParentEntityCode": "OTHER",
	"ParentEntityId": 3001001792692224,
	"ParentEntityName": "5500",
	"PartyId": 300100126721679,
	"ProductItemId": 300100171272514,
	"ProductSerialNumber": null,
	"TechnicianPartyId": 5615,
	"ProductItemNumber": "RCL_AS54888",
	"BUName": "Vision Operations",
	"TechnicianPartyName": "Fred Smith",
	"CustomerName": "FSACCOUNT",
	"CustomerAccountNumber": "CDRM_168203",
	"AssetNumber": "AA-DJ-RCL-AS54888-001",
	"ParentEntityCodeMeaning": "Third Party Work Order",
	"ParentEntityNumber": null
}

Example Response

Here's an example of the response body in JSON format.

{
	"AssetId": 300100176813209,
	"BillToPartySiteId": 300100172173745,
	"BUOrgId": 204,
	"CustomerAccountId": 300100169483889,
	"DebriefHeaderId": 300100180729573,
	"DebriefNumber": "5500",
	"DebriefStatusCode": "POSTED",
	"FreezePrice": null,
	"ObjectVersionNumber": 5,
	"ParentEntityCode": "OTHER",
	"ParentEntityId": 3001001792692224,
	"ParentEntityName": "5500",
	"PartyId": 300100126721679,
	"ProductItemId": 300100171272514,
	"ProductSerialNumber": null,
	"TechnicianPartyId": 5615,
	"ProductItemNumber": "RCL_AS54888",
	"BUName": "Vision Operations",
	"TechnicianPartyName": "Fred Smith",
	"CustomerName": "FSACCOUNT",
	"CustomerAccountNumber": "CDRM_168203",
	"AssetNumber": "AA-DJ-RCL-AS54888-001",
	"ParentEntityCodeMeaning": "Third Party Work Order",
	"ParentEntityNumber": null,
	"links": [
		{
			"rel": "self",
			"href": "https://servername/fscmRestApi/resources/version/debriefs/300100180729573",
			"name": "debriefs",
			"kind": "item",
			"properties": {
				"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000578"
			}
		},
		{
			"rel": "canonical",
			"href": "https://servername/fscmRestApi/resources/version/debriefs/300100180729573",
			"name": "debriefs",
			"kind": "item"
		},
		{
			"rel": "child",
			"href": "https://servername/fscmRestApi/resources/version/debriefs/300100180729573/child/lines",
			"name": "lines",
			"kind": "collection"
		}
	]
}

Create Debrief Transactions

In this scenario, you create a new debrief transactions for an existing debrief header. The debrief transactions can be of type labor, material, or expense.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' 
"https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines"

Example Request

Here's an example of the request body in JSON format.

{
	"InventoryItemId": 8980,   
	"LineType": "M",
	"LotNumber": null,
	"OrderLineId": null,
	"OrganizationId": 5702,
	"ParentInstanceId": null,
	"Quantity": 1,
	"ReasonCode": null,
	"SerialNumber": null,
	"ServiceActivityId": 300100174857818,
	"SourceId": null,
	"SourceType": null,
	"SubinventoryCode": "FS_Truck1",
	"UOMCode": "Ea",
	"ServiceActivityCode": "INSTALL"
}

Example Response

Here's an example of the response body in JSON format.

{
"BillToPartyId" : null,
"CurrencyCode" : null,
"DebriefHeaderId" : 300100180854659,
"DebriefLineId" : 300100181434964,
"ExpenseAmount" : null,
"InventoryItemId" : 8980,
"ItemRevision" : null,
"LaborEndDate" : null,
"LaborStartDate" : null,
"LineStatusCode" : null,
"LineType" : "M",
"LotNumber" : null,
"OrderLineId" : null,
"OrganizationId" : 5702,
"ParentInstanceId" : null,
"Quantity" : 1,
"ReasonCode" : null,
"SerialNumber" : null,
"ServiceActivityId" : 300100174857818,
"SourceId" : null,
"SourceType" : null,
"SubinventoryCode" : "FS_Truck1",
"UOMCode" : "Ea",
"OrganizationCode" : null,
"InventoryItemNumber" : null,
"BillToPartyName" : null,
"UnitOfMeasure" : null,
"ServiceActivityCode" : "INSTALL",
"StockLocationId" : null,
"links" : [ {
	"rel" : "self",
	"href" : "https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines/300100181434964",
	"name" : "lines",
	"kind" : "item",
	"properties" : {
	"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
	}
}, {
	"rel" : "canonical",
	"href" : "https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines/300100181434964",
	"name" : "lines",
	"kind" : "item"
}, {
	"rel" : "parent",
	"href" : "https://servername/fscmRestApi/resources/version/debriefs/300100180854659",
	"name" : "debriefs",
	"kind" : "item"
} ]
}

Query Debrief Transactions

In this scenario, you can query for existing debrief transactions.

Example URL

Use this resource URL format.

GET

curl -u username:password "https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines"

Example Response

Here's an example of the response body in JSON format.

{
	"items": [
	{
		"BillToPartyId": null,
		"CurrencyCode": null,
		"DebriefHeaderId": 300100180854659,
		"DebriefLineId": 300100180854668,
		"ExpenseAmount": null,
		"InventoryItemId": 8980,
		"ItemRevision": null,
		"LaborEndDate": null,
		"LaborStartDate": null,
		"LineStatusCode": "ERROR_SCM_WO",
		"LineType": "M",
		"LotNumber": null,
		"OrderLineId": null,
		"OrganizationId": 5702,
		"ParentInstanceId": null,
		"Quantity": 1,
		"ReasonCode": null,
		"SerialNumber": null,
		"ServiceActivityId": 300100174857818,
		"SourceId": null,
		"SourceType": null,
		"SubinventoryCode": "FS_Truck1",
		"UOMCode": "Ea",
		"OrganizationCode": "FST",
		"InventoryItemNumber": "FS54888",
		"BillToPartyName": null,
		"UnitOfMeasure": "Each",
		"ServiceActivityCode": "INSTALL",
		"StockLocationId": null
	},
	{
		"BillToPartyId": null,
		"CurrencyCode": null,
		"DebriefHeaderId": 300100180854659,
		"DebriefLineId": 300100180859548,
		"ExpenseAmount": null,
		"InventoryItemId": 708,
		"ItemRevision": null,
		"LaborEndDate": "2019-05-21T21:21:00+00:00",
		"LaborStartDate": "2019-05-20T21:21:00+00:00",
		"LineStatusCode": "NEW",
		"LineType": "L",
		"LotNumber": null,
		"OrderLineId": null,
		"OrganizationId": 207,
		"ParentInstanceId": null,
		"Quantity": 24,
		"ReasonCode": null,
		"SerialNumber": null,
		"ServiceActivityId": 300100174857818,
		"SourceId": null,
		"SourceType": null,
		"SubinventoryCode": null,
		"UOMCode": "HR",
		"OrganizationCode": "M1",
		"InventoryItemNumber": "Labor",
		"BillToPartyName": null,
		"UnitOfMeasure": "Hour",
		"ServiceActivityCode": "INSTALL",
		"StockLocationId": null
	}
	],
	"count": 2,
	"hasMore": false,
	"limit": 25,
	"offset": 0,
	"links": [
	{
		"rel": "self",
		"href": "https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines",
		"name": "lines",
		"kind": "collection"
	}
	]
}

Update Existing Debrief Transaction

In this scenario, you can update an existing debrief transaction.

Example URL

Use this resource URL format.

PATCH

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

Example Request

Here's an example of the request body in JSON format.

{
	"SubinventoryCode": "FS_Truck2"
}

Example Response

Here's an example of the response body in JSON format.

{
	"BillToPartyId" : null,
	"CurrencyCode" : null,
	"DebriefHeaderId" : 300100180854659,
	"DebriefLineId" : 300100181434964,
	"ExpenseAmount" : null,
	"InventoryItemId" : 8980,
	"ItemRevision" : null,
	"LaborEndDate" : null,
	"LaborStartDate" : null,
	"LineStatusCode" : null,
	"LineType" : "M",
	"LotNumber" : null,
	"OrderLineId" : null,
	"OrganizationId" : 5702,
	"ParentInstanceId" : null,
	"Quantity" : 1,
	"ReasonCode" : null,
	"SerialNumber" : null,
	"ServiceActivityId" : 300100174857818,
	"SourceId" : null,
	"SourceType" : null,
	"SubinventoryCode" : "FS_Truck2",
	"UOMCode" : "Ea",
	"OrganizationCode" : "FST",
	"InventoryItemNumber" : "FS54888",
	"BillToPartyName" : null,
	"UnitOfMeasure" : "Each",
	"ServiceActivityCode" : "INSTALL",
	"StockLocationId" : null,
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines/300100181434964",
		"name" : "lines",
		"kind" : "item",
		"properties" : {
			"changeIndicator" : "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
		}
	}, {
		"rel" : "canonical",
		"href" : "https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines/300100181434964",
		"name" : "lines",
		"kind" : "item"
	}, {
		"rel" : "parent",
		"href" : "https://servername/fscmRestApi/resources/version/debriefs/300100180854659",
		"name" : "debriefs",
		"kind" : "item"
	} ]
}

Delete Existing Debrief Transaction

In this scenario, you can delete an existing debrief transaction.

Example URL

Use this resource URL format.

DELETE

curl -u username:password -X DELETE "https://servername/fscmRestApi/resources/version/debriefs/300100180854659/child/lines/300100181434964"