Accurate, secure transactions require that a second individual approve some electronic marketplace actions before they proceed. This individual, called an approver, can accept or reject requests to perform a specific action. This class provides RESTful services to retrieve order and buyer approval status record details and to approve or reject them.
com.ibm.commerce.rest.approvalstatus.handler.ApprovalStatusHandler
| HTTP Method | Path | Description |
|---|---|---|
| GET | /store/{storeId}/approval_status?q={q} | Finds approval status records by a query. See each query for details on input and output. |
| GET | /store/{storeId}/approval_status?q=all | Finds all approval status records available to the current user. |
| GET | /store/{storeId}/approval_status?q=buyerApprovals | Finds buyer approval status records available to the current user. |
| GET | /store/{storeId}/approval_status?q=orderApprovals | Finds order approval status records available to the current user. |
| GET | /store/{storeId}/approval_status/{approvalStatusId} | Find an approval status record by its id. |
| POST | /store/{storeId}/approval_status/{approvalStatusId} | Updates the status to approve or reject and adds an optional comment to the approval status record. |
| POST | /store/{storeId}/approval_status/{approvalStatusId}?action={action} | Performs an action on an approval status record. See action for details on input and output. |
Finds approval status records by a query. See each query for details on input and output.
findByQuery
true
false
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| q | The query name. | query | string | true | false |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.approval.beans.ApprovalStatusListDataBean_IBM_Store_Summary
Finds all approval status records available to the current user.
findAll
true
false
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| q | The query name. | query | string | true | false |
| flowTypeIdentifier | Query by flow type identifier. | query | string | false | false |
| submitterFirstName | Query by approval request submitter's first name. | query | string | false | false |
| submitterMiddleName | Query by approval request submitter's middle name. | query | string | false | false |
| submitterLastName | Query by approval request submitter's last name. | query | string | false | false |
| startSubmitTime | Query by approval request start time. | query | string | false | false |
| endSubmitTime | Query by approval request end time. | query | string | false | false |
| status | Query by approval request status. | query | integer | false | false |
| approvalStatusId | Query by approval request approval status id. | query | integer | false | false |
| entityId | Query by approval request entity id, such as order id. | query | integer | false | false |
| approverId | Query by approver id. Only returns approval requests that can be approved by the current user. | query | integer | false | false |
| orderBy | Order by. | query | string | false | false |
| pageNumber | Page number, starting at 1. Valid values include positive integers of 1 and above. The "pageSize" must be specified for paging to work. | query | integer | false | false |
| pageSize | Page size. Used to limit the amount of data returned by a query. Valid values include positive integers of 1 and above. The "pageNumber" must be specified for paging to work. | query | integer | false | false |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.approval.beans.ApprovalStatusListDataBean_IBM_Store_Summary
GET /wcs/resources/store/10801/approval_status?q=all&pageNumber=1&pageSize=5
200
{
"recordSetCompleteIndicator": false,
"recordSetCount": 5,
"recordSetStartNumber": 0,
"recordSetTotal": 34,
"resultList": [
{
"approvalStatusId": "10003",
"approveTime": null,
"approverGroupId": "8000000000000000057",
"approverId": "-1000",
"comment": null,
"entityId": "7000000000000000903",
"flowId": "10005",
"flowTypeId": "10005",
"stateId": "10035",
"status": "0",
"submitTime": "2014-11-06T20:01:05.736000000Z",
"submitterId": "4036"
},
{
"approvalStatusId": "10004",
"approveTime": null,
"approverGroupId": "8000000000000000057",
"approverId": "-1000",
"comment": null,
"entityId": "4036",
"flowId": "10006",
"flowTypeId": "10006",
"stateId": "10040",
"status": "0",
"submitTime": "2014-11-06T20:01:06.908000000Z",
"submitterId": "4036"
},
{
"approvalStatusId": "10005",
"approveTime": null,
"approverGroupId": "8000000000000000057",
"approverId": "-1000",
"comment": null,
"entityId": "7000000000000000904",
"flowId": "10005",
"flowTypeId": "10005",
"stateId": "10035",
"status": "0",
"submitTime": "2014-11-06T20:01:12.972000000Z",
"submitterId": "4037"
},
{
"approvalStatusId": "10006",
"approveTime": null,
"approverGroupId": "8000000000000000057",
"approverId": "-1000",
"comment": null,
"entityId": "4037",
"flowId": "10006",
"flowTypeId": "10006",
"stateId": "10040",
"status": "0",
"submitTime": "2014-11-06T20:01:14.969000000Z",
"submitterId": "4037"
},
{
"approvalStatusId": "10007",
"approveTime": null,
"approverGroupId": "8000000000000000057",
"approverId": "-1000",
"comment": null,
"entityId": "7000000000000000905",
"flowId": "10005",
"flowTypeId": "10005",
"stateId": "10035",
"status": "0",
"submitTime": "2014-11-06T20:01:15.407000000Z",
"submitterId": "4038"
}
]
}
Finds buyer approval status records available to the current user.
findBuyerApprovals
true
false
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| q | The query name. | query | string | true | false |
| submitterFirstName | Query by approval request submitter's first name. | query | string | false | false |
| submitterMiddleName | Query by approval request submitter's middle name. | query | string | false | false |
| submitterLastName | Query by approval request submitter's last name. | query | string | false | false |
| startSubmitTime | Query by approval request start time. | query | string | false | false |
| endSubmitTime | Query by approval request end time. | query | string | false | false |
| status | Query by approval request status. | query | integer | false | false |
| approvalStatusId | Query by approval request approval status id. | query | integer | false | false |
| entityId | Query by approval request entity id, such as order id. | query | integer | false | false |
| approverId | Query by approver id. Only returns approval requests that can be approved by the current user. | query | integer | false | false |
| orderBy | Order by. | query | string | false | false |
| pageNumber | Page number, starting at 1. Valid values include positive integers of 1 and above. The "pageSize" must be specified for paging to work. | query | integer | false | false |
| pageSize | Page size. Used to limit the amount of data returned by a query. Valid values include positive integers of 1 and above. The "pageNumber" must be specified for paging to work. | query | integer | false | false |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.approval.beans.BuyerApprovalStatusListDataBean_IBM_Store_Summary
GET /wcs/resources/store/10801/approval_status?approverId=-1004&pageSize=12&q=buyerApprovals&status=0&pageNumber=1&responseFormat=json
200
{
"recordSetCompleteIndicator": true,
"recordSetCount": 1,
"recordSetStartNumber": 0,
"recordSetTotal": 1,
"resultList": [
{
"approvalStatusId": "13003",
"approveTime": null,
"approverGroupId": "-999",
"approverId": "-1004",
"comment": null,
"entityId": "12050",
"flowId": "10004",
"flowTypeId": "10004",
"stateId": "10030",
"status": "0",
"submitTime": "2014-11-24T18:58:06.804000000Z",
"submitter": {
"firstName": "Jane",
"lastName": "Smith",
"middleName": ""
},
"submitterId": "12050"
}
]
}
Finds order approval status records available to the current user.
findOrderApprovals
true
false
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| q | The query name. | query | string | true | false |
| submitterFirstName | Query by approval request submitter's first name. | query | string | false | false |
| submitterMiddleName | Query by approval request submitter's middle name. | query | string | false | false |
| submitterLastName | Query by approval request submitter's last name. | query | string | false | false |
| startSubmitTime | Query by approval request start time. | query | string | false | false |
| endSubmitTime | Query by approval request end time. | query | string | false | false |
| status | Query by approval request status. | query | integer | false | false |
| approvalStatusId | Query by approval request approval status id. | query | integer | false | false |
| entityId | Query by approval request entity id, such as order id. | query | integer | false | false |
| approverId | Query by approver id. Only returns approval requests that can be approved by the current user. | query | integer | false | false |
| orderBy | Order by. | query | string | false | false |
| pageNumber | Page number, starting at 1. Valid values include positive integers of 1 and above. The "pageSize" must be specified for paging to work. | query | integer | false | false |
| pageSize | Page size. Used to limit the amount of data returned by a query. Valid values include positive integers of 1 and above. The "pageNumber" must be specified for paging to work. | query | integer | false | false |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.approval.beans.OrderApprovalStatusListDataBean_IBM_Store_Summary
Find an approval status record by its id.
findByApprovalStatusId
true
false
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| approvalStatusId | The approval status ID. | path | string | true | N/A |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 404 | The specified resource couldn't be found. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.approval.beans.ApprovalStatusDataBean_IBM_Store_Summary
GET /wcs/resources/store/10801/approval_status/13002
200
{
"resultList": [
{
"approvalStatusId": "13002",
"approveTime": "2014-11-24T19:13:18.583000000Z",
"approverGroupId": "-999",
"approverId": "-1004",
"comment": null,
"entityId": "12049",
"flowId": "10004",
"flowTypeId": "10004",
"stateId": "10030",
"status": "1",
"submitTime": "2014-11-24T16:43:38.562000000Z",
"submitterId": "12049"
}
]
}
Updates the status to approve or reject and adds an optional comment to the approval status record.
updateApprovalStatus
true
false
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| approvalStatusId | The approval status ID. | path | string | true | N/A |
| body | The request body for updating an approval status record. | body | com.ibm.commerce.rest.approvalstatus.handler.ApprovalStatusHandler$UpdateApprovalStatusParameterDescription | true | N/A |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
com.ibm.commerce.rest.approvalstatus.handler.ApprovalStatusHandler$UpdateApprovalStatusResponse
Performs an action on an approval status record. See action for details on input and output.
performAction
true
false
| Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
|---|---|---|---|---|---|
| storeId | The store identifier. | path | string | true | N/A |
| approvalStatusId | The approval status ID. | path | string | true | N/A |
| action | The action. | query | string | true | false |
| body | The body data. | body | string | false | N/A |
| HTTP Status Code | Description |
|---|---|
| 200 | The requested completed successfully. |
| 400 | Bad request. Some of the inputs provided to the request aren't valid. |
| 401 | Not authenticated. The user session isn't valid. |
| 403 | The user isn't authorized to perform the specified request. |
| 500 | Internal server error. Additional details will be contained on the server logs. |
| Name | Data Type | Required |
|---|---|---|
| approverId | string | false |
| approvalStatusId | string | false |
| status | string | false |
| flowTypeId | string | false |
| submitterId | string | false |
| submitTime | string | false |
| approverGroupId | string | false |
| flowId | string | false |
| approveTime | string | false |
| stateId | string | false |
| entityId | string | false |
| comment | string | false |
| Name | Data Type | Required |
|---|---|---|
| recordSetTotal | string | false |
| recordSetCompleteIndicator | string | false |
| recordSetStartNumber | string | false |
| resultList | com.ibm.commerce.approval.beans.ApprovalStatusListDataBean_IBM_Store_Summary.resultList array | false |
| recordSetCount | string | false |
| Name | Data Type | Required |
|---|---|---|
| approverId | string | false |
| approvalStatusId | string | false |
| status | string | false |
| flowTypeId | string | false |
| submitterId | string | false |
| submitTime | string | false |
| approverGroupId | string | false |
| flowId | string | false |
| approveTime | string | false |
| stateId | string | false |
| entityId | string | false |
| comment | string | false |
| Name | Data Type | Required |
|---|---|---|
| recordSetTotal | string | false |
| recordSetCompleteIndicator | string | false |
| recordSetStartNumber | string | false |
| resultList | com.ibm.commerce.approval.beans.BuyerApprovalStatusListDataBean_IBM_Store_Summary.resultList array | false |
| recordSetCount | string | false |
| Name | Data Type | Required |
|---|---|---|
| approverId | string | false |
| approvalStatusId | string | false |
| status | string | false |
| flowTypeId | string | false |
| submitterId | string | false |
| submitTime | string | false |
| approverGroupId | string | false |
| flowId | string | false |
| approveTime | string | false |
| stateId | string | false |
| entityId | string | false |
| comment | string | false |
| Name | Data Type | Required |
|---|---|---|
| recordSetTotal | string | false |
| recordSetCompleteIndicator | string | false |
| recordSetStartNumber | string | false |
| resultList | com.ibm.commerce.approval.beans.OrderApprovalStatusListDataBean_IBM_Store_Summary.resultList array | false |
| recordSetCount | string | false |
| Name | Data Type | Required |
|---|---|---|
| approverId | string | false |
| approvalStatusId | string | false |
| status | string | false |
| flowTypeId | string | false |
| submitterId | string | false |
| submitTime | string | false |
| approverGroupId | string | false |
| flowId | string | false |
| approveTime | string | false |
| stateId | string | false |
| entityId | string | false |
| comment | string | false |
Description of the post input body to update an approval status record.
| Name | Data Type | Required |
|---|---|---|
| comments | string | false |
| aprv_act | string | true |
Description of approval status record update response.
| Name | Data Type | Required |
|---|---|---|
| resultmsg | string | false |