Syntax

PATCH /api/new-vendor-requests/{id}/

body = {"request_status": "2"}

Returns a set of new vendors that satisfy all selected request parameters. The user performing this request has to be authorized to View New Vendor Requests.

To change the status from Approved to Processed of a New Vendor Request identified by {id}, add a body to the request that will have one key pair: "request_status": "2" . This API call is idempotent.

The user performing this request has to be authorized to Change New Vendor Request Status.

Example:

PATCH /api/new-vendor-requests/20100/

body = {"request_status": "2"}

You can only change the request status of a New Vendor Request to Processed if the current request status is Approved. The request status can not be moved back from Processed to Approved.

Request Parameters

None

Sample Response

An example JSON response can be seen here:

{
  "id": 19658,
  "request_status": "Processed",
  "requesting_company": {
    "id": 12593,
    "name": "Home Depot"
  },
  "ts": "2023-01-11T15:10:37.668916-05:00",
  "user_can_approve": false,
  "user_can_bypass": false,
  "pending_approvers": [],
  "latest_sent_msg_id": null,
  "is_resubmitted": false,
  "last_submitted_ts": "2023-01-11T15:10:37.667110-05:00",
  "request_type": "Edit",
  "registration_routing": {
    "op_code": "overwrite_exiting",
    "annotation": "",
    "related_site_code": "2",
    "related_vendor_number": "12345"
  },
  "tags": []
}

Response Key/Value Explanations

KeyTypeSample ValueDescription
idNumber20100The unique ID for the New Vendor Request.
request_statusStringProcessedThe current request status of the New Vendor Request. Possible values are:

  • Pending
  • Approved
  • Processed
  • Connected
  • Rejected
  • Returned

requesting_companyJSON object{
"id": 12593,
"name": "Home Depot"
}
The identifier and name of the company that submitted the registration.
tsDateTime2023-01-11T15:10:37.668916-05:00Timestamp of when the New Vendor Request was first created.
last_submitted_tsDateTime2023-01-11T15:10:37.667110-05:00The timestamp of when this New Vendor Request was last submitted.
request_typeStringFullThe registration type. Possible values are:

  • Full
  • Edit
  • Partial

HTTP Response Codes

Status CodeDescription
200 OKThe HTTP request succeeded.
400 Bad RequestThe request could not be understood by the server due to incorrect syntax.
401 Unauthenticated
The request requires user authentication information. Your API token is missing or invalid.
403 ForbiddenPermission Denied – User does not have permission to perform this request
404 Not FoundThe resource you requested on the server does not exist
500The request has failed due to a temporary failure of the server. You can try this request at a later time.
503The request has failed due to a temporary failure of the server. You can try this request at a later time.

Calling the API