• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update Band Profile: Not Working?
#6
(01-09-2021, 06:42 PM)marcuspainter Wrote: 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
Hi Marcus, Nice debugging! I will add this to the support thread i have started -- i got the gold plan so i could file bug reports. As much as i'd like to have fun and do the work around i will hope that JK does the fix quickly since you have identified the issue so succinctly. --- Dan
  Reply


Messages In This Thread
Update Band Profile: Not Working? - by mblack77 - 04-11-2020, 08:02 PM
RE: Update Band Profile: Not Working? - by backinterrapin - 01-09-2021, 07:13 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)