Use of the Supplier Data API with Pagination questionnaires Endpoint

The Supplier Data API with Pagination questionnaires endpoints use the GET and PATCH methods to send JSON requests to your site. The GET request retrieves data about submitted modular questionnaires, and the PATCH request updates expiration dates and due dates of modular questionnaires for a supplier.

The GET URL includes query and filter parameters, and the request header specifies authentication.

Method

Endpoint

Pagination limit per page

Description

GET

{{runtime_URL}}/supplierdatapagination/v4/prod/vendors/{vendorId}/workspaces/questionnaires

5

Gets all modular questionnaire data for the specified supplier.

GET

{{runtime_URL}}/supplierdatapagination/v4/prod/vendors/{vendorId}/workspaces/{workspace id}/questionnaires

5

Gets all modular questionnaire data in the specified project (workspace) for the specified supplier.

GET

{{runtime_URL}}/supplierdatapagination/v4/prod/vendors/{vendorId}/workspaces/questionnaires/{questionnaireId}

N/A

Gets data for the specified modular questionnaire for the specified supplier.

PATCH

N/A

Updates expiration dates or due dates of modular questionnaires for a supplier.

For example, the following URL retrieves all of the modular supplier management questionnaire data in a specific workspace for a specific supplier. Make sure that you append the request parameter includeScore=true if you want the response to include total score related data.
GET {{runtime_URL}}/supplierdatapagination/v4/prod/vendors/SM100015/workspaces/WS9050423/questionnaires/?realm=mysitename&includeScore=true
For example, the following URL updates the expiration date or due date of the modular questionnaire (document ID: Doc12345678) for a specific supplier (SM vendor ID: SM100015):
PATCH {{runtime_URL}}/supplierdatapagination/v4/prod/vendors/SM100015/workspaces/questionnaires/Doc12345678/?realm=mysitename

See Supplier Data API with Pagination Header Parameters for information on header parameters.

The following example shows one sample result out of five for a GET to the questionnaires endpoint that specifies only the SM vendor ID. Each result includes a HATEOAS (Hypermedia as the Engine of Application State) link to the questionnaire.
{
    "_embedded": {
        "questionnaireResourceList": [
            {
                "questionnaireApi": {
                    "active": true,
                    "erpVendorId": null,
                    "sourceSystem": null,
                    "smVendorId": "S1830600",
                    "statusId": "WS7940391",
                    "nextStatusId": null,
                    "processId": null,
                    "filter": null,
                    "vendorName": null,
                    "requester": null,
                    "approver": null,
                    "startDate": null,
                    "endDate": null,
                    "reprocessDate": null,
                    "statusUpdatedDate": null,
                    "title": "MSC Certificate for Drugs and pharmacy in USA for XYZ Company",
                    "reason": null,
                    "newStatusId": null,
                    "filterPaths": null,
                    "workspaceExtInfo": null,
                    "autoApproval": false,
                    "rootId": "68:QUE:58036",
                    "timeUpdated": 1516316869445,
                    "docId": "Doc7940394",
                    "docTitle": null,
                    "type": null,
                    "status": "NotResponded",
                    "updateStatus": null,
                    "hasBeenCompleted": false,
                    "shouldReuse": false,
                    "shouldShowOnProfile": true,
                    "shouldKeepOpen": true,
                    "isExpiry": false,
                    "hasCertificates": null,
                    "isInternal": false,
                    "isRequired": false,
                    "questionnaireUpdatedDate": null
                },
                "_links": {
                    "Questionnaire": {
                        "href": "https://svcmachss.ariba.com:80/SM/rest/smv1/vendors/S1830600/workspaces/questionnaires/Doc7940394"
                    }
                }
            }
        ]
    },
    "_links": {
        "self": {
            "href": "https://svcmachss.ariba.com:80/SM/rest/smv1/vendors/S1830600/workspaces/questionnaires"
        }
    },

...
...
...
...

    "pageMetaData": {
        "size": 5,
        "totalElements": 20,
        "totalPages": 4,
        "number": 0
    },
    "pageToken": "10"
}
The following table describes parameters in the PATCH request body:

Name/Value Pair or Array

Description

expiryDate

Specifies the date after which the modular questionnaire expires.

You can update the expiration date only after the modular questionnaire is approved and before the modular questionnaire expires.

The value format is MM/DD/YYYY.

dueDate

Specifies the date by which the modular questionnaire must be answered.

You can update the due date only before the modular questionnaire is approved.

The value format is MM/DD/YYYY.

comment

This field is optional.

The following example shows a request body that updates expiration dates or due dates of modular questionnaires:
{
  "expiryDate": "MM/DD/YYYY",
  "dueDate": "MM/DD/YYYY",
  "comment": "string"
}
The following example shows a sample result for a questionnaires/{questionnaireId} endpoint:
{
      "status": "OK",
      "message": "Due Date succussfully updated",
      "debugMessage": "",
      "statusCode": 200
}