Add Geo Category via REST API

I am trying to add a Geo category using the REST API and the response is coming back as NULL.

My request is using the PUT method. I have logged in and have set the user token from the login in the HTTP header.

Is there something else I should be setting ?

This problem was in my code baseline. I was setting the HTTP header with Content-Type: application/json.

Adding categories works now.

Hi Roy!

Please, try with this request:

-H application-id:<your app id>
-H secret-key:<rest secret key>
-H application-type:REST

This request adds empty category in Geo service.
Check please if your query looks the same.
More information you can find here:


You also can use Content-Type: application/json (if you need):

-H application-id:<your app id>
-H secret-key:<rest secret key>
-H Content-Type:application/json
-H application-type:REST
-v [url=][/url] -d null

Hello Kate,

Yes I double checked the request as you pointed at and it is the same. I originally had an extra header of Content-Type: application/json that should not been part of the API call.

Thanks, Roy

A nice feature that could be added to the REST API document is that if the category already exists then the existing objectId is returned instead of en error statement stating that the category already exists.

The response returned when an category already exists like the following:


I don’t think that receiving an existing category (maybe already filled with some geopoints) is what the user expects when sending a request to create it. In other words, it’s more meaningful to notify him that the category already exists.

I agree that it should return that the object already exists. Should this issue be reopened?

What issue? Currently, if the category already exists, the user receives an error saying that the category exists. And if the category doesn’t exist, then it is created and the user receives the following json in response:


If the category already exists and you call the REST API to create the category, you get a JSON response with the existing objectId {“objectId”:“C3F9151E-5347-94EE-FF56-B1B141314300”,“name”:“foobar73”,“size”:0}, and NOT a JSON messsage stating that the category already exists.

Oh, I’m sorry, I misunderstood the case.
Here you’re sending PUT request, which in principles of REST is regarded as “create or update”. So in case the category exists, it performs update, and there is no need to throw any error.
My words above would have sense in case of POST request, but unfortunately our API doesn’t provide POST request to create category.