Places


https://api.apontador.com.br/v2/categories

Method: GET

Authorization: You can use your access_token from application or from user

Parameters:

  • wt: json(default) or xml, the API accepts this information in the request's header(i.e. "Accept: application/xml" or "Accept: application/json"). So you can use the parameter wt or use Accept header.
  • fl: (optional) specify the fields that will be returned for each result
  • q: (optional) term to filter categories
curl -X GET -H "Accept: application/json" -H "Authorization: Bearer ACCESS_TOKEN" https://api.apontador.com.br/v2/categories 

If successful, this call will return:

{"categoryResults":
	{"header":{
		"found":103,
		"rows":103,
		"start":0
	},
	"categories":[
		{
			"id":"41",
			"name":"ACADEMIAS",
			"link":{"rel":"self","uri":"http://localhost:8080/v2/categories/categories/41"}},
		{
			"id":"72",
			"name":"ADMINISTRAÇÃO",
			"link":{"rel":"self","uri":"http://localhost:8080/v2/categories/categories/72"},
			.....
			.....
			.....
 		}]
}
			

https://api.apontador.com.br/v2/categories/{categoryId}

Method: GET

Authorization: You can use your access_token from application or from user

Parameters:

  • wt: json(default) or xml, the API accepts this information in the request's header(i.e. "Accept: application/xml" or "Accept: application/json"). So you can use the parameter wt or use Accept header.
  • fl: (optional) specify the fields that will be returned for each result
  • {categoryId}: is the category id information that you get from categories service
curl -X GET -H "Accept: application/json" -H "Authorization: Bearer ACCESS_TOKEN" https://api.apontador.com.br/v2/categories/91

If successful, this call will return:

{
    "categoryResults": {
        "header": {
            "found": 2,
            "rows": 2,
            "start": 0
        },
        "categories": [
            {
                "id": "91",
                "name": "FACULDADES E UNIVERSIDADES",
                "link": {
                    "rel": "self",
                    "uri": "http://localhost:8080/v2/categories/91"
                },
                "subcategory": {
                    "id": "36153",
                    "name": "Faculdades e Universidades"
                }
            },
            {
                "id": "91",
                "name": "FACULDADES E UNIVERSIDADES",
                "link": {
                    "rel": "self",
                    "uri": "http://localhost:8080/v2/categories/91"
                },
                "subcategory": {
                    "id": "91",
                    "name": "Faculdades e Universidades"
                }
            }
        ]
    }
}