Update Proposal Status

ID: UC-WFP-PROPSL-W001
Complexity: Basic
Description: Update proposal status using the WFP proposal API. The status can be updated to DRAFT, SUBMITTED, REJECTED, APPROVED, CLOSED, DEPLOYED, DISCARDED.
Scenario: A business user needs to manage proposal data, update information, and generate comprehensive reports for analysis
Business Value: Enables efficient proposal management and reporting, supporting decision-making processes and compliance requirements

Prerequisites

  • Valid API key for WFP API

  • Access to WFP API environment

  • Proposal ID for existing proposal

Steps

1. Retrieve Proposal Status

Get status of the proposal

Endpoint: GET /api/v1/ext/proposals/{proposal-id}/status

HTTP Request

curl -X GET 'https://{base-url}/api/v1/ext/proposals/{proposal-id}/status' 
  -H 'x-api-key: YOUR_API_KEY' 
  -H 'Content-Type: application/json'

Expected Response: HTTP 200 with current proposal status

Notes: Replace {proposal-id} with the actual proposal ID. This step helps verify the current status before updating

2. Update Proposal Status

Update proposal status using the WFP proposal API. The status can be updated to Draft, Submitted, Rejected, Approved, Closed, Deployed, Discarded.

Endpoint: PATCH /api/v1/ext/proposals/status

HTTP Request

curl -X PATCH 'https://{base-url}/api/v1/ext/proposals/status' 
  -H 'x-api-key: YOUR_API_KEY' 
  -H 'Content-Type: application/json' 
  -d '{\"proposalStatusChangeExternalRequest\": [{\"status\": {\"name\": \"APPROVED\"}, \"proposalId\": 121}]}'

Expected Response: HTTP 200 with updated proposal status

Notes: Provide the proposal IDs in the body payload.

Error Scenarios

Invalid Proposal ID (400): Verify that the proposal ID is valid Recovery: Contact Nakisa Support team to verify the proposal ID

Invalid Update Data (400): Validate the update data format and required fields Recovery: Check the API documentation for required fields and data format

Unauthorized Access (403): Verify that your API key has the necessary permissions Recovery: Contact the Nakisa Support team to grant appropriate permissions

Proposal Not Found (Step 1) (404): Verify that the proposal ID exists and you have access permissions Recovery: Check proposal ID validity and ensure proper authorization

Proposal Not Found (Step 2) (409): Verify that the proposal ID exists and you have access permissions Recovery: Check proposal ID validity and ensure proper authorization

Best Practices

  • Validate proposal data before updates

  • Implement proper error handling for failed operations

  • Log all proposal access for audit purposes

  • Implement retry logic for failed requests