How to create a support request (Case) via API?

We've been building out API data flows into Creatio including automated order/invoice creation from cart data and webinar registrations from our website. We are now creating a support request form on a website that should create a case linked to a matching contact in the CRM. 

 

Retrieving the contact ID isn't a problem, but we're stuck trying to figure out how to create the new Case. We can query the /Case endpoint and see existing case data. How do we POST a new case?

 

And will we be able to take  file uploads from the webform and submit them into the /CaseFile object? Or will it have to a linked reference like a URL?

Thanks in advance!

Like 0

Like

3 comments

You would just POST to https://mycreatiourl/0/odata/Case with a payload that is structured using Case columns, something that looks like what you get when you GET an existing case. You only need to include the columns you're setting in the new case, not all columns that you see in that payload.

Ryan

As for adding a CaseFile, I use the FileApiService endpoints for that, which is what the Creatio client uses as well. If you look at the network request in the dev tools when you add an attachment to a case, you'll see it uses FileApiService - you can use this externally as well to mimic the same request as it does internally.

Ryan Farley,

Thanks for your help on this Ryan. It worked like a charm.

Show all comments