Get a Product by ID
1 min
code examples curl request get \\ \ url https //developer digitail io/api/v1/products/{id} \\ \ header 'accept application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //developer digitail io/api/v1/products/{id}", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //developer digitail io/api/v1/products/{id}") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body import requests import json url = "https //developer digitail io/api/v1/products/{id}" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful operation { "data" { "id" 670, "name" "product prof peter dach", "client name" "clinic name", "staff description" "product description for staff", "unit" "package", "units" \[ "" ], "sub unit" "tablets", "recommended unit price" 11 853, "recommended subunit price" 1 6932857142857143, "price with vat" 11 853, "price without vat" 11 853, "sub price with vat" 1 853, "sub price without vat" 1 853, "formula" 7, "recommended markup" 70, "active substances" "", "administration" "", "recommendations" "", "fixed fee" "0 000", "barcode" "99425161", "producer id" "670", "clinic id" "3876", "vat" 0, "tax rates" \[ { "id" 1, "clinic id" 1, "name" "standard", "percentage" "19 0000", "applicable to" "services", "is archived" false } ], "is controlled" false, "is consumable" false, "is default" false, "status" true, "is used" true, "minimum stock" 0 1, "optimum stock" 0 1, "minimum price" "20 3", "price threshold" { "range" \[ { "start" "", "end" "" } ], "price" "", "unit type" 0 }, "task templates" \[ { "id" 0, "name" "" } ], "external products" \[ { "id" 123, "provider" {}, "external id" "", "name" "", "producer" "", "category" "", "sku" "", "barcode" "00068510041401", "unit" "", "subunit" "", "formula" "", "price" 19 99, "currency" "", "products" \[ "" ], "in stock" false, "stock qty" 0, "is controlled" false } ], "is plan benefit" false, "is deleted" false } }