Submit one draft purchase order

post

/fscmRestApi/resources/11.13.18.05/draftPurchaseOrders/{draftPurchaseOrdersUniqID}/action/submit

Submits the draft purchase order document for approval. The purchase order may be created by any purchase order creation method.

Request

Path Parameters
  • This is the hash key of the attributes which make up the composite key for the Draft Purchase Orders resource and used to uniquely identify an instance of Draft Purchase Orders. The client should not generate the hash key value. Instead, the client should query on the Draft Purchase Orders collection resource in order to navigate to a specific instance of Draft Purchase Orders to get the hash key.
Header Parameters
  • This header accepts a string value. The string is a semi-colon separated list of =. It is used to perform effective date range operations. The accepted parameters are RangeMode, RangeSpan, RangeStartDate, RangeEndDate, RangeStartSequence and RangeEndSequence. The parameter values are always strings. The possible values for RangeMode are SET_LOGICAL_START, SET_LOGICAL_END, END_DATE, SET_EFFECTIVE_START, SET_EFFECTIVE_END, REPLACE_CORRECTION, REPLACE_UPDATE, RECONCILE_CORRECTION, CORRECTION, RECONCILE_UPDATE, UPDATE, ZAP and DELETE_CHANGES. The possible values for RangeSpan are PHYSICAL_ROW_END_DATE and LOGICAL_ROW_END_DATE. The values for RangeStartDate and RangeEndDate have to be a string representation of a date in yyyy-MM-dd format. The value for RangeStartSequence and RangeEndSequence must be strings such that when parsed they yield positive integers.
  • 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/vnd.oracle.adf.action+json ()
Root Schema : schema
Type: object
Show Source
  • Contains one of the following values: True or False. If True, then bypass the approval workflow. If False, then do not bypass. The default value is False.
  • Contains one of the following values: True or False. If True, then tax determinant attributes are defaulted on submission of the PO. If False, then tax determinant attributes are not defaulted on submission of the PO. The default value is False.
  • Contains one of the following values: True or False. If True, then the application will request an insufficient funds override if needed. If False, no override will be requested. The default value is False.
  • Contains one of the following values: True or False. If True, then validate the purchase order as part of submission and display any errors in the response payload. If False, then do not validate. The default value is False.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Body ()
Root Schema : schema
Type: object
Show Source
Back to Top

Examples

This example describes how to submit a draft purchase order.

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/draftPurchaseOrders/draftPurchaseOrdersUniqID"

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. In this example, a draft purchase order gets submitted successfully.

{
	"name": "submit"
}

Example 1 Response Body

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

{
	"result": "SUCCESS"
}

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. In this example, a draft purchase order gets submitted successfully with bypass approval.

{
	"name": "submit",
	"parameters": [
	{
		"bypassApprovalsFlag": "true"
	}
	]
}

Example 2 Response Body

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

{
	"result": "SUCCESS"
}

Example 3 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. In this example, if there are errors when submitting a draft purchase order, they are displayed as errors in the response.

{
	"name": "submit",
	"parameters": [
	{
		"validateBeforeSubmitFlag": "true"
	}
	]
}

Example 3 Response Body

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

LineNumber : "1", ScheduleNumber : "1", Message : "The sum of the distribution quantities must be equal to the schedule quantity."
LineNumber : "1", ScheduleNumber : "1", DistributionNumber : "1", Message : "You must provide a value for the attribute PO Charge Account."
LineNumber : "1", ScheduleNumber : "1", DistributionNumber : "1", Message : "You must provide a value for the attribute PO Variance Account."

Example 4 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. When the defaultTaxAttributesFlag attribute is set to true in this example, the REST API defaults the tax attributes on the schedules of a new purchase order line upon submission. Further, when an existing purchase order line is submitted after replacing the item on the line, the REST API re-defaults the tax attributes from the substituted item.
{
	"name": "submit",
	"parameters": [
	{
		"defaultTaxAttributesFlag": true
	}
	]
}

Example 4 Response Body

The following example includes the contents of the response body in JSON format:
{
	"result": "SUCCESS"
}
Back to Top