hello!
I’m making the following request to Mylist API (based on the documentation):
headers = {
'Authorization': f'Bearer {access_token}',
'X-DIGIKEY-Client-Id': 'MYCLIENTID',
'Content-Type': 'application/json',
}
post_data = {
"ListName": "rf_booster",
"CreatedBy": "ektocomms",
"Tags": [
"epic"
],
"ListSettings": {
"Visibility": "ReadOnly",
"PackagePreference": "CutTapeOrTR",
"ColumnPreferences": [
{
"ColumnName": "string",
"IsVisible": True
}
],
"AutoCorrectQuantities": True,
},
"RefList": {
"ListId": "string",
"IsRevision": True
}
}
response = requests.post(f'{base_url}{api_endpoint}', headers=headers, json=post_data)
And I’m getting this error:
{'ErrorResponseVersion': '3.0.0.0',
'StatusCode': 400,
'ErrorMessage': 'Error with CustomerId',
'ErrorDetails': 'CustomerId of zero is not allowed',
'RequestId': 'b9f0a822-4083-4001-e928-3d1f3541b0aa',
'ValidationErrors': []}
I’ve tried adding the X-DIGIKEY-Customer-Id
to the headers but it did not work,
Anyone can help me understand what I’m doing wrong?
Thanks,
Fito.-