Create or Restore a Provider

Overview

Description: This endpoint allows you to restore or create providers.

Endpoints: /v1/custom/providers/{NPI}

Status: Live

Methods: POST

Example use-case: A provider you deleted because she retired has decided to take her talents back to medicine and come out of retirement!

Diving In

Like DELETE at this endpoint, creating a doctor object just takes making a post request to v1/custom/doctors/{NPI}:

curl -X POST \
  'https://api.ribbonhealth.com/v1/custom/providers/1234567890' \
  -H 'authorization: Token your_token'

If this is successful, you'll receive a 201 created response.

Now, if the doctor already exists, you'll receive a 400 with the following message:

{
  "errors": [
    "this record already exists. To overwrite, append a query parameter of reset=True"
  ]
}

If the doctor already exists, then you need to pass the parameter reset into the call and set it to True, like so:

curl -X POST \
  'https://api.ribbonhealth.com/v1/custom/providers/1234567890?reset=True' \
  -H 'authorization: Token your_token'

Doing so will completely override the current NPI with the latest data that Ribbon has on the doctor.

❗️

Be careful!

If you have appended unique data to the doctor object, delete the doctor object, and POST to bring it back, the record will not be the last state of the Doctor object -- that is it will be a hard reset to what Ribbon had originally before any other data was added.