Operations API
Customers
Bulk Add To Mailing List
this endpoint ( post post ) adds multiple customers to a mailing list if the request succeeds, it will return the ids of the customers permissions customers edit body parameters customers array of strings an array of customer ids to email the maximum number of customers is 50 mailing list string the id of the mailing list require "uri" require "json" require "net/http" url = uri("https //api tamio com/v2/customers/bulk/add to list") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" data = { customers \[ 'c5f3b078 5520 4694 a4d1 d45885a6314e' ], mailing list 'b1234c 5520 4694 a4d1 d45885a6314e' } request body = data to json response = https request(request) puts response read bodyvar myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var data = { customers \[ 'c5f3b078 5520 4694 a4d1 d45885a6314e' ], mailing list 'b1234c 5520 4694 a4d1 d45885a6314e' }; var body = json stringify(data); var requestoptions = { method 'post', headers myheaders, body body }; fetch("https //api tamio com/v2/customers/bulk/add to list", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));curl location request post 'https //api tamio com/v2/customers/bulk/add to list' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here' \\ \ data raw '{"customers" \["c5f3b078 5520 4694 a4d1 d45885a6314e"], "mailing list" "b1234c 5520 4694 a4d1 d45885a6314e"}'{ "status" 200, "customers" \[ "c5f3b078 5520 4694 a4d1 d45885a6314e" ] }