Help with Creating Card Filters from the API

I'm using the API I want to create a Filter variable and the corresponding Filter selection Widget (i.e. parameter) for an existing Card in Metabase.
Below are the json elements I created for the new filter variable and its widget/parameter. I then pass this JSON information to the /api/card/card_id endpoint.

filter_json = {
    'name': 'customer_name',
    'display-name': 'Customer Name',
    'type': 'dimension',
    'dimension': ['field', 29815, None],
    'widget-type': 'string/='}

#Update card info with the filter template
response = mb.put('/api/card/{}'.format(3848), json=card_3848_info)

#Similarily I update the Parameter information for the card. 
#Here is the parameter json
parameter_json = {'id':'aa1','type': 'string/=', 'target': ['dimension', ['template-tag', 'customer']], 'name': 'Customer Name', 'slug': 'customer_name'}

#Update card info with the filter parameter
response = mb.put('/api/card/{}'.format(3848), json=card_3848_info)

This code creates the Filter variable and the Filter widget for the card in the Metabase UI. The filter works as expected.

My question is how do I determine the Filter Variable id ?
For now I've assigned a random string as the id, but I need to create filter variables across multiple cards. I cannot leave the id blank it gives me an error in UI (confirmed from browser Network tab).
Can I just assign random id's to all the variables I create?