Submit a draft purchase order

post

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

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

Request

Supported Media Types
Path Parameters
Body ()
The following table describes the body parameters in the request for this task.
Root Schema : draftPurchaseOrders-submitRequest
Type: object
Show Source
Nested Schema : parameters
Type: array
Minimum Number of Items: 2
Maximum Number of Items: 2
Show Source
Nested Schema : parameters-items[0]
Type: object
Show Source
  • 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.
Nested Schema : parameters-items[1]
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.
Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Body ()
Root Schema : draftPurchaseOrders-submitResponse
Type: object
Show Source
  • If the request is successful, then this action returns Success.
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."
Back to Top