Create Patient Recommendation
There are two ways to create a recommendation. The parameters for the JSON object are entirely optional. You can pass an array of item objects to add items right upon creation to reduce the amount of api calls required to create a complete recommendation.
The only requirement is a path variable :patient_id, so it is necessary to create the patient prior to creating a recommendation if the patient does not yet exist.
Deprecation Notice
The :patient_id is identical to the Magento customer_id and applications may create customers using the core Magento API calls.
When creating comprehensive recommendations, each item passed in the items array require at minimum a sku and qty attribute. The rest of the attributes are optional. See the Recommendation Item Object documention for details.
Return
This call returns the entire recommendation object.
curl --location -g --request POST 'https://{{api_host}}/rest/{{scope}}/V1/dispensary/patient/71/recommendation' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data-raw '{
"recommendation": {
"notify_email" : "1",
"notify_sms":"0",
"note":"Recommendation to help with your lipids."
"items":[{
"sku":"SF811",
"qty":"1",
"autoship_interval":"once",
"note":"Take two before bedtime.",
"doctor_id": 25,
"loction_id": 123,
},{
"sku":"SP607",
"qty":3,
"fulfillment_type":"1L",
"autoship_interval":"30d",
"note":"This is really good stuff. Take 1 in the morning with food"
}]
}
}'