Bad request on creating a service request

Hello guys!

I’m trying to make a request to POST /api/v2/service_catalog/items/{display_id}/place_request, but I’m taking a bad request from this call and the return was not very clear about what caused it to fail.

I’m using the return of GET /api/v2/service_catalog/items/[display_id] to retrieve the service custom fields and passing them according to the image below. For each custom field, I’m using their name property as the key to identify it.

Could you please help me discovering what might be wrong?

My endpoint call implementation:

The log of how the endpoint is being called and the body:

Hello Thácio Moraes,

Did you try to replicate this API call using postman ?

Does it work ?

Hi @thacio ,

Welcome to the community :tada:

Could you please share the error payload?

Thank you.

Hello @Cyril and @Bene_Immanuel!

I’ve managed to discover what was happening to the call. It was an error regarding the validation of the fields inside custom_fields. For instance, link_do_ambiente must be a valid URL, unidade_area must be an integer and correspond to a valid unit, and so on. Thanks for your replies!

2 Likes

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.