Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global_Ref.html">Global Unlock Sample for sample code.
http := chilkat.NewHttp()
var success bool
queryParams := chilkat.NewJsonObject()
queryParams.UpdateString("view","complete")
// Adds the "Authorization: Bearer {{partner_token}}" header.
http.SetAuthToken("{{partner_token}}")
resp := http.QuickRequestParams("GET","https://domain.com/partner/v2/products/{{product_id}}",queryParams)
if http.LastMethodSuccess() == false {
fmt.Println(http.LastErrorText())
http.DisposeHttp()
queryParams.DisposeJsonObject()
return
}
fmt.Println(resp.StatusCode())
fmt.Println(resp.BodyStr())
resp.DisposeHttpResponse()
http.DisposeHttp()
queryParams.DisposeJsonObject()
Curl Command
curl -G -d "view=complete"
-H "Authorization: Bearer {{partner_token}}"
https://domain.com/partner/v2/products/{{product_id}}
Postman Collection Item JSON
{
"name": "[Partner] Get a Specific Product",
"_postman_id": "42260739-60b8-4624-8c71-954a4e4e4436",
"request": {
"method": "GET",
"header": [
{
"key": "Authorization",
"value": "Bearer {{partner_token}}",
"type": "text"
}
],
"url": {
"raw": "{{api_host}}/partner/v2/products/{{product_id}}?view=complete",
"host": [
"{{api_host}}"
],
"path": [
"partner",
"v2",
"products",
"{{product_id}}"
],
"query": [
{
"key": "view",
"value": "complete"
}
]
}
},
"response": [
]
}