Alternative Method for Segment Upload
For customers with larger files Beeswax may arrange for the files to be uploaded directly to our cloud instead of using the Buzz API for upload. In this case, you still must POST to the segment_upload
method to let us know to process your files.
To do this, you provide this method with the segment_file_list
parameter, which contains a list of files uploaded. You should not include the file_name
or size_in_bytes
parameters.
curl -X POST "[host]/rest/segment_upload" -b cookies.txt -d '{"segment_file_list":["\path\to\file\user_data_sample.txt","\path\to\file\user_data_sample2.txt"],"account_id":1,"file_format":"DELIMITED","segment_key_type":"DEFAULT","user_id_type":"IDFA"}'
Overwriting or Deleting User-Segment Combinations
The operation_type
field on segment uploads acts to control how the new information will be applied to existing data.
To do a full overwrite of a specific user ID you pass REPLACE_ALL_SEGMENTS
. For example, if user ID 123 was previously in segments A and B, and you wanted to remove the user from segment B, you would upload a new file with operation_type
set to REPLACE_ALL_SEGMENTS
and put user ID 123 in segment A only.
If you want want to remove the specific segments provided in the file the operation_type
is REMOVE_SEGMENTS
.
If you want to remove a user ID from all segments (for example for GDPR opt-outs), you can upload a file with operation_type
set to REPLACE_ALL_SEGMENTS
and leave the segments as null
.
curl -X POST "[host]/rest/segment_upload" -b cookies.txt -d '{"file_name":"user_data_sample.txt","size_in_bytes":412, "operation_type": "REPLACE_ALL_SEGMENTS","file_format":"DELIMITED","segment_key_type":"ALTERNATIVE","user_id_type":"IDFA"}'