segment_upload

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"}'
Body Params
string
required

The filename to be uploaded, including the extension. <255 chars, no spaces or special characters other than dashes and underscores.

string

The location of the file on the server. If this field is populated, Buzz assumes the file was already uploaded and will not allow further uploads. If absent, Buzz will auto-fill this when the file is uploaded in a subsequent POST.

int32
required

Size of the file to be uploaded, in bytes.

string

Not currently used.

string
Defaults to DELIMITED

The type of file format expected. Valid formats are stored in the segment_file_format table.

segment_file_list
array of strings

When uploading multiple files of segment-user associations, a list of these files can be passed in a single POST. This will generally improve performance of the upload as well.

segment_file_list
string
Defaults to DEFAULT

Indicates whether the user IDs in the uploaded file should be put into a segment defined by the segment_key or the alternative_id from the segment. Must be set to either DEFAULT or ALTERNATIVE.

string
Defaults to NAM

The destination continent data centers to upload the data. Only one continent may be specified per upload. If a segment is required across continents it must be uploaded twice. Options are NAM, EMEA, or APAC.

string

Indicates the type of IDs being imported, as defined in the "segment_user_type" view. Valid types include BEESWAX, CUSTOMER, HEM, IDFA, IDFA_MD5, IDFA_SHA1 , AD_ID, AD_ID_MD5, AD_ID_SHA1 , IP_ADDRESS, OTHER_MOBILE_ID

string

Indicates the type of the first-party IDs being imported (up to 191 characters). This field cannot be set alongside user_id_type in the same request. A valid value can be any type ID that exists for the customer.

boolean
Defaults to false

DEPRECATED. When set the segments associated with a user will overwrite all other user-segment associations for the given user. Use the operation_type field instead.

string
Defaults to ADD_SEGMENTS

What action should be taken on these users. Commonly set to ADD_SEGMENTS or REPLACE_ALL_SEGMENTS

string
Defaults to custom value

This field should be left null unless otherwise instructed. After POST the value will be set to the buzz_key of the account.

Response

Language
Request
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json