Delete Items
Unlike updating items on a recommendation - which uses the item spec - they are deleted by their unique id.See the Recommendation Item Object documention for details.
Multiple items can be passed in the array of item ids as a query parameter: ?id[]=...&id[]=...
Items that do not exist will be siltently ignored.
Return
This call returns the entire recommendation object from which the items were deleted.
API
DELETE
/V1/dispensary/recommendation/:recommendation_id/item
Path Parameters
- recommendation_idIntegerrequiredDescription
Query Parameters
- id[]ArrayrequiredDescription
Header Parameters
- AuthorizationstringrequiredDescription
Body Parameters
- itemsArrayrequiredDescription
- skuBooleanrequiredDescription
- qtyBooleanDescription
- notestringDescription
- fulfillment_typestringDescription
- autoship_intervalstringDescription
curl
curl --location -g --request PUT 'https://{{api_host}}/rest/{{scope}}/V1/dispensary/recommendation/6e6e08cf-e2a0-4e0e-9359-e2e42896b56/item?id[]=54dddeea-19d6-4914-8b52-4064f050737c' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' 200
{
"recommendation_id": "6e6e08cf-e2a0-4e0e-9359-e2e42896b56e",
"note": "Overall recommendation notes",
"status": "pending",
"patient": {
"patient_id": 71,
"firstname": "Juergen",
"lastname": "Schreck",
"email": "[email protected]"
},
"practice_id": 1,
"notify_email": 1,
"notify_sms": 0,
"practice_conversion_url": "https://uat.gethealthy.store/admin/dispensary/recommendation/convert/rid/6e6e08cf-e2a0-4e0e-9359-e2e42896b56e/",
"patient_conversion_url": "https://uat.gethealthy.store/dispensary/recommendation/convert/rid/6e6e08cf-e2a0-4e0e-9359-e2e42896b56e/"
"items": [
{
"item_id": "54dddeea-19d6-4914-8b52-4064f050737c",
"sku": "SF811",
"qty": 1,
"autoship_interval": "once",
"fulfillment_type": "LC",
"note": "Item specific Note",
"additional_options":[],
"availability": "In Stock"
},
{
"item_id": "179a7ef1-e1c7-42a2-a468-bd50dbee71f8",
"sku": "SP607",
"qty": 2,
"autoship_interval": "30d",
"fulfillment_type": "1L",
"note": "This is really good stuff",
"availability": "In Stock",
"additional_options":[]
}
]
}