Issue with Mindbody API Request - Missing Required Fields and Formatting Error

I’m encountering an issue when attempting to create a new client in the Mindbody API through Make. Despite providing the required fields, I receive a 400 Bad Request response with the error:

{“Error”:{“Message”:“Request was poorly formatted.”,“Code”:“MissingRequiredFields”}}

{
“FirstName”: "
“LastName”: “,”,
“Email”: "
“MobilePhone”: "
“City”: "
“State”: “”,
“Country”: “”,
“Location”: “”,
“LeadChannelId”:
“IsProspect”: true,
“ProspectStage”: {
“Active”: true,
“Description”: “New Lead”,
"
},
“SendAccountEmails”: true,
“SendPromotionalEmails”: true,
“SendScheduleEmails”: true,
“HomeLocation”: "{
“ReferredBy”: “SEO”
}

  1. LastName Field: The error suggests that there is a formatting issue or a missing required field. In particular, the LastName is currently set as ",". This could be interpreted as missing or incorrectly formatted by the API.
  2. Missing Fields: The error message MissingRequiredFields suggests that the API expects specific fields that might be missing or incorrectly named. The City field, for example, is empty in the HomeLocation section of the payload.

Next Steps:

  • Review Required Fields: Mindbody may require more fields or stricter formatting for certain fields, such as LastName, City, or HomeLocation. I need to verify the exact required fields for creating a client.
  • Ensure Data Format: The HomeLocation field seems to contain improperly formatted data. Specifically, the City field within HomeLocation is empty, which could be one of the missing fields.
  • Debug the Request: I will try sending a simpler request with only the required fields (FirstName, LastName, Email, etc.) to determine if the error is caused by missing optional fields.

Questions for the Community:

  1. Has anyone encountered this issue when working with the Mindbody API in Make or Integromat? How did you resolve it?

  2. Are there any specific required fields for the client creation endpoint in the Mindbody API that I might be missing?

  3. Is there a way to better debug the request in Make, especially for ensuring that dynamic data (e.g., 2.Location, 2.City) is correctly mapped?

I’d appreciate any advice or solutions!

Hey there,

the formatting of that request is all over the place. You are missing commas, you have extra commas, you are missing double quotation marks, you have extra double quotation marks…

To better debug Make request, you can install a Make dev tools browser extension to get full access to what Make is actually sending. You can combine that with an IDE of your choice that can highlight code and help with debugging. And I suggest starting with cleaning up you r request to use proper formatting.

1 Like

Welcome to the Make Community!

Looks like your JSON is invalid.

You can verify and fix this by pasting the Input Bundle’s “Body” into https://jsonformatter.org

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like

Hi Where Can I find the professonal who can help me with that issues?

Can you please point me to a professional or agency that specializes in these types of integrations, automation, and CRM troubleshooting? Please let me know where I can find them, and feel free to share any recommendations or advice!

Hi @arkar :waving_hand:

Welcome to the Community! We have a designated category for this purpose Hire a Pro - Make Community.

Hope you will find the help you are looking for!

3 Likes

Thank you. I will check, Misha