Get Plan by ID

Use endpoint to fetch a plan detail
Note the plan ID is required

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Authorization", "Bearer {{API-KEY}}");

const requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://sandbox.nucleusis.io/api/plans/{id}", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
curl --location --request GET 'https://nucleusis-retail-api.herokuapp.com/api/plans/{id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer NUC-1BsOLIJwQyLrqkICdZIO-X'
ParametersTYPEComments
id (int)Plan ID

👍

HTTP 200 (OK)

{
    "msg": "successful",
    "status": true,
    "data": {
       "plan": {
            "id": 23,
            "planName": "TEST FAMILY",
            "planAmount": {
                "amount": "5000.00",
                "currency": "NGN"
            },
            "planTenure": "3 Months",
            "planStatus": true,
            "planCategory": "FAMILY",
            "planBenefits": {
                "general_consulation": false,
                "glasses": false,
                "specialist_consultation": false,
                "paedetrics": false,
                "admission": false,
                "fertility_care": false,
                "mental_care": true,
                "antenatal_care": true,
                "optical_care": true,
                "dental_care": true
            }
        },
        "providers": [
            {
                "id": 6256,
                "name": "NAME OF PROVIDER",
                "location": "LOCATION",
                "address": "ADDRESS"
            },
         ],
         "locations": [
              {
                  "location": "LOCATION"
              },
              {
                  "location": "ABIA"
              },
         ]
    }
}

🚧

HTTP 404 (NOT FOUND)

{
    "msg": "not found",
    "status": false,
}

❗️

HTTP 403 (FORBIBBEN)

{
    "msg": "API key is invalid, Please contact support!",
    "status": false
}