REST API
Recommendations
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 { "tab" "examples", "url" "/v1/dispensary/recommendation/\ recommendation id/item", "name" "api", "method" "delete", "request" { "pathparameters" \[ { "kind" "required", "name" "recommendation id", "type" "integer", "children" \[], "description" "the recommendation to which the item should be added " } ], "queryparameters" \[ { "kind" "required", "name" "id\[]", "type" "array", "children" \[], "description" "one or more ids to be deleted " } ], "headerparameters" \[ { "kind" "required", "name" "authorization", "type" "string", "children" \[], "description" "the access token" } ], "bodydataparameters" \[ { "kind" "required", "name" "items", "type" "array", "children" \[ { "kind" "required", "name" "sku", "type" "boolean", "description" "item sku" }, { "kind" "optional", "name" "qty", "type" "boolean", "description" "item quantity" }, { "kind" "optional", "name" "note", "type" "string", "description" "a note for this recommendation" }, { "kind" "optional", "name" "fulfillment type", "type" "string", "description" "lc for in practice fulfillment\n1l for first time in practice fulfillment on subscriptions" }, { "kind" "optional", "name" "autoship interval", "type" "string", "description" "for subscription recommendations see the recommendation item object spec for details " } ], "description" "array of unique item ids " } ], "formdataparameters" \[] }, "results" { "languages" \[ { "id" "st7x5ecla7vjy6twnarmd", "code" "{\n \\"recommendation id\\" \\"6e6e08cf e2a0 4e0e 9359 e2e42896b56e\\",\n \\"note\\" \\"overall recommendation notes\\",\n \\"status\\" \\"pending\\",\n \\"patient\\" {\n \\"patient id\\" 71,\n \\"firstname\\" \\"juergen\\",\n \\"lastname\\" \\"schreck\\",\n \\"email\\" \\"juergen+uat\@gethealthy store\\"\n },\n \\"practice id\\" 1,\n \\"notify email\\" 1,\n \\"notify sms\\" 0,\n \\"practice conversion url\\" \\"https //uat gethealthy store/admin/dispensary/recommendation/convert/rid/6e6e08cf e2a0 4e0e 9359 e2e42896b56e/\\",\n \\"patient conversion url\\" \\"https //uat gethealthy store/dispensary/recommendation/convert/rid/6e6e08cf e2a0 4e0e 9359 e2e42896b56e/\\" \n \\"items\\" \[\n {\n \\"item id\\" \\"54dddeea 19d6 4914 8b52 4064f050737c\\",\n \\"sku\\" \\"sf811\\",\n \\"qty\\" 1,\n \\"autoship interval\\" \\"once\\",\n \\"fulfillment type\\" \\"lc\\",\n \\"note\\" \\"item specific note\\",\n \\"additional options\\" \[],\n \\"availability\\" \\"in stock\\"\n },\n {\n \\"item id\\" \\"179a7ef1 e1c7 42a2 a468 bd50dbee71f8\\",\n \\"sku\\" \\"sp607\\",\n \\"qty\\" 2,\n \\"autoship interval\\" \\"30d\\",\n \\"fulfillment type\\" \\"1l\\",\n \\"note\\" \\"this is really good stuff\\",\n \\"availability\\" \\"in stock\\",\n \\"additional options\\" \[]\n }\n ]\n}", "language" "200", "customlabel" "" } ], "selectedlanguageid" "st7x5ecla7vjy6twnarmd" }, "examples" { "languages" \[ { "id" " 7yqmyax6g137vanm1fno", "code" "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' \\\\\n header 'content type application/json' \\\\\n header 'authorization bearer {{access token}}' ", "language" "curl", "customlabel" "" } ], "selectedlanguageid" " 7yqmyax6g137vanm1fno" }, "description" "", "currentnewparameter" { "label" "query parameter", "value" "queryparameters" } }