Endpoints Included in the Document Approval API

The client application queries these endpoints to process invoice or requisition approvables using the Document Approval API.

The Document Approval API includes the following endpoints:

Endpoint

Description

GET /changes

Does one of the following:

  • Returns the list of all approvables whose state has changed. If your site is configured to track delegations and reassignments, those events are included in the response to this endpoint as well.
  • Uses $filter to check the changeSequenceId and return the list of approvables whose state has changed since the last time you checked.

Use $top, $skip, and $count to control pagination. The maximum acceptable value for $top for this endpoint is 1000. By default, the maximum number of documents that can be returned per response is 10.

GET /pendingApprovables

Returns a list of all approvables. Use $filter to filter by approvable type. The maximum number of documents that can be returned per response is 100.

GET /{approvableType}

Does one of the following:

  • Returns a list of all pending approvables of the specified approvable type.

  • Uses $filter to return the approvable matching the value of the uniqueName attribute.

The maximum number of documents that can be returned per response is 10.

GET /{approvableType}/{approvableId}

Provides details of the specified approvable. You can find the value of approvableId in the response to GET /changes, GET /pendingApprovables, or GET /{approvableType}.

PATCH /{approvablType}/{approvableId}

Changes the state of the specified approvable and/or adds a comment.

If you set the showErrorDetails parameter to true in the query URL, any error messages generated due to internal integration errors will be included in the response JSON as a 500 internalServerError

For example:
PATCH {{runtime_url}}/requisitions/Req123?showErrorDetails="true"&...
In this case, if the query triggers the internal system to throw an error, the error details are included in the error block as follows:
"error": 
{
	"code": "InternalServerError",
	"message": "Internal Server Error",
	"details": 
		[{
		"code": "internalCallReturnedError",
		"message": "Localized internal call error message"
		}]
}
Internal call error details are localized to the internal system's region, so if the internal system's region is Portugal, the message may be presented in Portuguese, or German for an internal system in Germany, etc.

GET /{approvableType}/{approvableId}/attachments/{attachmentId}

Returns the specified attachment.

GET /groups

Does one of the following:

  • Returns a list of all groups.

  • Uses $filter to return the group matching the value of the uniqueName attribute.

Use this endpoint to get a group's groupId.

GET /groups/{groupId}/members

Returns the list of users with membership in the specified group.

The Document Approval API provides support for additional Price fields in the Line Item Details:
  • LineItems.Description.PriceBasisQuantity

  • LineItems.Description.PriceBasisQuantityDesc

  • LineItems.Description.PriceBasisQuantityUOM

For example,

"priceBasisQuantity": 2,

"priceBasisQuantityDesc": "Price Desc",

"priceBasisQuantityUOM": "deciliter per gram"