01-09-2021, 06:42 PM
I'm new to JamKazam and I too came across this frustrating problem.
I'm also a developer and I have found a workaround to solve it. Unfortunately, the solution is rather technical.
Here is the problem. Using a Web Proxy (Charles), the API returns the following when trying to save.
{
"errors": {
"hourly_rate": ["is not a number"],
"gig_minimum": ["is not a number"]
}
}
This is usually because the supplied value is an empty string. But the problem is not the String data type, the API validation rejects anything that evaluates to zero.
"" - fail
null - fail
"1" - pass
1 - pass
0 - fail
"0" - fail
How To Fix:
Run Charles Web Proxy
Start recording API requests
Press Save in the app
Find the POST request
Enable SSL for the site (right click)
Edit the request
Change the JSON, see below example.
Execute the request
The API request will go to www.jamkazam.com/api/bands/b1fa2bee-8b68-4553-9e56-72588d93aa7f or similar.
The request contents:
Change highlighted JSON properties.
{
"instruments": [],
"id": "b1fa2bee-8b68-4553-9e56-72588d93aa7f",
"name": "The Pelican Band",
"website": null,
"biography": "Acoustic band based in London.",
"city": "Fulham",
"state": "F1",
"country": "GB",
"band_type": "physical",
"band_status": "amateur",
"concert_count": "",
"add_new_members": false,
"paid_gigs": false,
"free_gigs": false,
"touring_option": false,
"play_commitment": "1",
"hourly_rate": "1", <-- Set to 1 or another number. Cannot be zero.
"gig_minimum": "1", <-- - Set to 1 another number. Cannot be zero
"online_presences": [],
"performance_samples": [],
"validate_genres": false
}
Workaround to JamKazam API developers:
Allow zero values for:
hourly_rate
gig_minimum
I'm also a developer and I have found a workaround to solve it. Unfortunately, the solution is rather technical.
Here is the problem. Using a Web Proxy (Charles), the API returns the following when trying to save.
{
"errors": {
"hourly_rate": ["is not a number"],
"gig_minimum": ["is not a number"]
}
}
This is usually because the supplied value is an empty string. But the problem is not the String data type, the API validation rejects anything that evaluates to zero.
"" - fail
null - fail
"1" - pass
1 - pass
0 - fail
"0" - fail
How To Fix:
Run Charles Web Proxy
Start recording API requests
Press Save in the app
Find the POST request
Enable SSL for the site (right click)
Edit the request
Change the JSON, see below example.
Execute the request
The API request will go to www.jamkazam.com/api/bands/b1fa2bee-8b68-4553-9e56-72588d93aa7f or similar.
The request contents:
Change highlighted JSON properties.
{
"instruments": [],
"id": "b1fa2bee-8b68-4553-9e56-72588d93aa7f",
"name": "The Pelican Band",
"website": null,
"biography": "Acoustic band based in London.",
"city": "Fulham",
"state": "F1",
"country": "GB",
"band_type": "physical",
"band_status": "amateur",
"concert_count": "",
"add_new_members": false,
"paid_gigs": false,
"free_gigs": false,
"touring_option": false,
"play_commitment": "1",
"hourly_rate": "1", <-- Set to 1 or another number. Cannot be zero.
"gig_minimum": "1", <-- - Set to 1 another number. Cannot be zero
"online_presences": [],
"performance_samples": [],
"validate_genres": false
}
Workaround to JamKazam API developers:
Allow zero values for:
hourly_rate
gig_minimum