Skip to main content
Skip table of contents

Cancel Prescription Request

Overview

This endpoint allows a PFS Consumer app to cancel a patient’s existing prescription request. Consumer applications must provide a prescriptionRequestId to cancel.

If the response is successful, a HTTP 200 response is returned.

Making a Request

HTTP method: POST

Endpoint URL: https://{{medicusTenant}}.{{medicusBaseURL}}/pfs-api/v1/patient/{{patientId}}/cancel-prescription-request

Request Headers

Header

Value

Description

Authorization

Bearer [token]

The JWT token provided by the Consumer

Idempotency-Key

uuid

The unique idempotency key

URL Parameters

Parameter

Description

Validation Rules

patientId

Patient ID

e.g. e9af860e-cf8e-4272-b81a-a95cc8a531f7

Mandatory

UUID

Body Parameters

Parameter

Description

Validation Rules

prescriptionRequestId

Prescription Request uuid

The prescriptionRequestId must match a Prescription Request for the specified patientId

Example Request

JSON
POST /pfs-api/v1/patient/dda43bf3-063b-48f6-9960-b9d00021fc34/cancel-prescription-request
Authorization: Bearer [token]

{
    "prescriptionRequestId": "088fe0f3-8f80-4991-8056-4241754646a8"
}

Response Details

Specific Response Codes

HTTP Code

Error Code

Scenario

200

 

The cancellation request was successful

404

PRESCRIPTION_REQUEST_NOT_FOUND

A prescription request with that ID doesn’t exist for this patient.

422

REQUEST_NOT_CANCELLABLE

The cancel prescription request has already been processed.

This is likely because:

  • a prescription request with this ID has already been fulfilled

  • a prescription request with this ID has already been cancelled.

Example Response (Prescription Not Found)

JSON
HTTP/1.1 404 Not Found
Content-Type: application/json

{
  "errors": [
    {
      "code": "PRESCRIPTION_REQUEST_NOT_FOUND"
      "title": "Prescription Request Not Found",
      "detail": "A prescription request with the ID c6dd3106-56ed-444a-9af6-031cdefd040b doesn’t exist for this patient.",
    }
  ]
}

 Example Response (Successful Cancellation)

JSON
HTTP/1.1 200 OK
Content-Type: application/json

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.