GET /customers/:id/attributes

Returns a map with custom attributes assigned to the specified customer.

The provided id can be either:

uri = URI.parse("https://api.invisiblecollector.com/customers/2314234/attributes") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true

request = Net::HTTP::Get.new(uri.request_uri) request['Content-Type'] = 'application/json' request['Authorization'] = 'Bearer 4a415cc660e67d8f4d26d5a7f390183a86fc3a4524ded78dc2448e86c48b2739'

response = http.request(request)

IcApiFacade apiFacade = new IcApiFacade("56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98");

Customer aNewCustomer = new Customer(); // set the customer id or externalId Map<String, String> customerAttributes = apiFacade.requestCustomerAttributes(customer);

//or String customerId = Map<String, String> customerAttributes = apiFacade.requestCustomerAttributes(customerId);

var ic = new InvisibleCollector("56a73507b66cd761caae7547ef2a66fc3a393746ba4bb9a91e303fcb3ceefb98"); string customerId = … ; IDictionary<string, string> customerAttributes = await ic.GetCustomerAttributesAsync(customerId);

var channel = make(chan ic.AttributesPair) go iC.GetCustomerAttributes(channel, aCustomerModel.Id()) p := <-channel

fmt.Println(p.Attributes)

This request returns the following JSON response:

{
  "name_1": "attribute_1",
  "name_2": "attribute_2"
}

Endpoint

GET https://api.invisiblecollector.com/customers/:id/attributes

Errors

This endpoint may return the following errors

HTTP Code Description
401 Unauthorized Invalid credentials were supplied
404 Not found The user doesn’t have any customer registered with that specific id.