Back to top

This API provides common access to Open010 protocol (311 protocol based) from Mejora Tu Ciudad MTC.

This API is mainly public, however, users can log in through the login process (Oauth 2.0), providing some special features.

Once logged in, you must send Authorization header with the following format.

Authorization: Bearer your_auth_token

Allowed HTTP request formats:

  • POST - Creates or updates a resource

  • GET - Retrieves a resource or list of resources

Typical Server Responses

  • 200 OK - The request was successful (some API calls may return 201 instead).

  • 400 Bad Request - The request could not be understood or was missing required parameters.

  • 403 Forbidden - Access denied.

  • 404 Not Found - Resource was not found.

  • 405 Method Not Allowed - Requested method is not supported for the specified resource.

  • 501 Not implemented - The server does not support the facility required.

  • 503 Service Unavailable - The service is temporary unavailable (e.g. scheduled Platform Maintenance). Try again later.

If the request is done by a deprecated application version it can receive a 409 response if the update is mandatory, or a 209 if it is optional. The content response will be as follows:

{
    error: 409,
    message: "It is required to update this application",
    
}

The message is a settable text that must be displayed to the end user.

This error can be received if the device is banned.

Headers for all the requests

  • User-Agent : android, ios, widget, other - Identify the platform that is executing the request.

  • X-Device-ID - Unique identification of the device

  • X-API-Version - Operating API version, it use to be the mayor version of the app.

  • X-APP-Version - Version on the app [mayor].[minor].[build]

  • Accept-Language - Supported language of the device

Authentication 

User authentication process

FieldRequiredPossible valuesDescription
client_idrequiredstringOauth 2.0 client code
app_keyrequiredstringMTC Application key
usernamerequiredstringUser or email.
passwordrequiredstringUser password.
remote_access_tokenrequiredstringfacebook acces_token or google acces_token.
registeroptionalbooleanIf true, registers user with given credentials when does not exist previously in database.
first_nameoptionalstringUser first name.
last_nameoptionalstringUser last name
jurisdiction_idoptionalstringJurisdiction to associate user with.
notification_account_codeoptionalstringAndroid or iOS device application id (used to send push notifications).
device_typeoptionalstringOne of [ios, android, desktop]. Required if notification_account_code is provided
device_brandoptionalstringDevice Brand. Required if notification_account_code is provided
device_modeloptionalstringDevice Model. Required if notification_account_code is provided
device_os_versionoptionalstringDevice Os Version. Required if notification_account_code is provided
usernamedeprecatedstringDeprecated since 3.0. To be removed in future versions.
google_tokendeprecatedstringDeprecated since 3.0. To be removed in future versions.
user_iddeprecatedstringDeprecated since 3.0. To be removed in future versions.

Login 

Login or register with username and password

Login
/login
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Body
    {
        "client_id":"52fb43b4a780378d298b456b_1kthjgfcfmas8o8c4c40848gsc0s0cso0sgkwwksks4o0g4cg4",
        "app_key":"1",
        "username":"helysm@radmas.com",
        "password":"123456",
        "notification_account_code":"APA91bEVoMYJDwzeTX3kYJml03WdVY-xPWokIx1_Ixm7L1Vfy214Mhh3c17OvOPhx3SP3fDv3vyy9YgkJBe9xUz9959dgdl7HOwBi-srgoKvqZXzG6tMqaSxpQ7I44P5Z5vZj3GQo6sF",
        "device_type":"android",
        "device_brand":"Nokia",
        "device_model":"M111",
        "device_os_version":"3.3"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "access_token":"MjJlZGVjYTI1ZTAzZTljMzkzZjkyYTRiY",
        "expires_in":604800,
        "token_type":"bearer",
        "refresh_token":"OTc1ODk0MjAxMzljNzk2Y2IyMzY1Njkw"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "User was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "not logged"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Wrong password"
        }
    ]
    

Facebook login 

Login or register with facebook

Facebook login
/login_facebook
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Body
    {
        "client_id":"52fb43b4a780378d298b456b_1kthjgfcfmas8o8c4c40848gsc0s0cso0sgkwwksks4o0g4cg4",
        "app_key":"1",
        "remote_access_token":"hjgfcfmas8o8c4c40848gsc0s0cso0s",
        "notification_account_code":"APA91bEVoMYJDwzeTX3kYJml03WdVY-xPWokIx1_Ixm7L1Vfy214Mhh3c17OvOPhx3SP3fDv3vyy9YgkJBe9xUz9959dgdl7HOwBi-srgoKvqZXzG6tMqaSxpQ7I44P5Z5vZj3GQo6sF",
        "device_type":"android",
        "device_brand":"Nokia",
        "device_model":"M111",
        "device_os_version":"3.3"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "access_token":"MjJlZGVjYTI1ZTAzZTljMzkzZjkyYTRiY",
        "expires_in":604800,
        "token_type":"bearer",
        "refresh_token":"OTc1ODk0MjAxMzljNzk2Y2IyMzY1Njkw"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "not logged"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "facebook credentials not provided"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "facebook denied access"
    }
    

Google+ login 

Login or register with Google Plus

Google+ login
/login_google
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Body
    {
        "client_id":"52fb43b4a780378d298b456b_1kthjgfcfmas8o8c4c40848gsc0s0cso0sgkwwksks4o0g4cg4",
        "app_key":"1",
        "remote_access_token":"hjgfcfmas8o8c4c40848gsc0s0cso0s",
        "notification_account_code":"APA91bEVoMYJDwzeTX3kYJml03WdVY-xPWokIx1_Ixm7L1Vfy214Mhh3c17OvOPhx3SP3fDv3vyy9YgkJBe9xUz9959dgdl7HOwBi-srgoKvqZXzG6tMqaSxpQ7I44P5Z5vZj3GQo6sF",
        "device_type":"android",
        "device_brand":"Nokia",
        "device_model":"M111",
        "device_os_version":"3.3"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "access_token":"MjJlZGVjYTI1ZTAzZTljMzkzZjkyYTRiY",
        "expires_in":604800,
        "token_type":"bearer",
        "refresh_token":"OTc1ODk0MjAxMzljNzk2Y2IyMzY1Njkw"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Google API key was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "not logged"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "google credentials not provided"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "google denied access"
    }
    

Logout 

Logout from server, if device_id is supplied, it will be removed from database. Authorization header is required.

Logout
/logout
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "device_id" : "52fb43b4a780378d298b456b_1kthjgfcfmas8o8c4c40848gsc0s0cso0sgkwwksks4o0g4cg4"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 200,
        "description": "successfully logged out"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "logout failed"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "error": "invalid grant",
        "error_description": "The access token provided is invalid."
    }
    

Reset password 

Sends an e-mail to user to continue the reset password flow.

Reset password
/reset_password
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Body
    {
        "username": "helysm@radmas.com",
        "jurisdiction_id":"es.madrid",
        "app_key":"1"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 200,
        "description": "E-mail sent to user"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "user was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "application was not provided"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "user was not found"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "application was not found"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "jurisdiction was not found"
    }
    

User 

User configuration api calls. Authorization header must be sent.

FieldRequiredDescription
notification_account_coderequiredApplication specific notification account code.
device_typerequired stringOriginDevice id provided in jurisdiction.
app_keyrequiredapp_key of related application.
jurisdiction_idrequiredJurisdiction Id.
widget_buttons_idsoptional arrayIds list of widgets that will be stored by the user as preferred and their display order.
idoptional stringIdentification User Id.
emailoptional stringEmail to User.
first_nameoptional stringFirst name to User login.
nicknameoptional stringNickname to User login.
old_passwordoptional stringOld Password to User login.
new_passwordoptional stringNew Password to User login.
configurationoptional arrayList Options configurations general to User.
email_notificationoptional arrayList Options configurations email notification.
app_notificationoptional arrayList Options configurations app notification.
requestsoptional booleanSetting option email configuracion or app configuration request.
commentsoptional booleanSetting option email configuracion or app configuration comments.
alertsoptional booleanSetting option email configuracion or app configuration alerts.
followsoptional booleanSetting option email configuracion or app configuration follows.

The old_password and new_password is required for change password.

Profile 

Get profile
/profile
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "id": "5781892791236646271621231",
        "email": "user@domain.com",
        "first_name": "lastName",
        "nickname": "userNick",
        "phone": "678954321",
        "configuration": {
            "email_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            },
            "app_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            }
        },
        "locale": "es",
        "devices": [
            {
              "device_id": "1231456754234567665433",
              "os_version": "2345",
              "brand": "srtyh",
              "model": "asdad"
            }
        ],
        "app_evaluations": [
            {
                "app_key": "1"
            }
        ]
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "Access Denied"
        }
    ]
    
Update profile
/profile
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "first_name": "lastName",
        "nickname": "userNick",
        "old_password": "clavevieja",
        "new_password": "clavenueva",
        "phone": "678954321",
        "avatar": "http://www.mejoratuciudad.org/images/profile.png",
        "configuration": {
            "email_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            },
            "app_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            }
        },
        "locale": "es"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "email": "user@domain.com",
        "first_name": "lastName",
        "nickname": "userNick",
        "avatar": "http://www.mejoratuciudad.org/images/profile.png",
        "phone": "678954321",
        "configuration": {
            "email_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            },
            "app_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            }
        },
        "locale": "es"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Nickname is too short"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Nickname already exists"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    Raised when new and old passwords are equal
    [
        {
            "code": 400,
            "description": "Password must be different"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    Raised if old password is incorrect
    [
        {
            "code": 400,
            "description": "Old password do not match"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    Raised when password is too short
    [
        {
            "code": 400,
            "description": "Password must at least of {length} characters length"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Avatar must be a valid url"
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "Access Denied"
        }
    ]
    

User Avatar 

Update user avatar
/profile/avatar
  • Request
  • Headers
    Content-Type: multipart/form-data
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "email": "user@domain.com",
        "first_name": "lastName",
        "nickname": "userNick",
        "avatar": "http://www.mejoratuciudad.org/images/profile.png",
        "phone": "678954321",
        "configuration": {
            "email_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            },
            "app_notification": {
                "requests": true,
                "comments": true,
                "alerts": true,
                "follows": true
            }
        },
        "locale": "es"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "Access Denied"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Image file required"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Error saving changes"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Error uploading image"
        }
    ]
    

Notification Account 

Add notification account
/notification_account
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "notification_account_code": "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4",
        "device_type": "5804ba659a60575c058b4583"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "notification_account_code": "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4",
        "device_type": {
            "id": "5804ba659a60575c058b4583",
            "code": 2,
            "alias": "Android",
            "options": [
              "android"
            ],
            "color": "#ffc107",
            "locale": "es"
        }
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "application was not provided"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "notification_account_code was not provided"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    Raised when device_type is different from `android`,`ios`.
    [
        {
            "code": 400,
            "description": "device_type was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "device_type was not provided"
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "User was not found"
        }
    ]
    

Devices 

Add new device
/me/device

Adds a new device to the user. Returns the user’s profile with the newly added device.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "device_id": "APA-3124sdfs-gerydrtrw1245tdgdfghdfy4w5rw",
        "registration_id": "APA91bHUCb7a3kXzt_TECnRLkFBqQ-CEn7TMeXgJfqReT4EZ8IRrHNDX2j",
        "type": "ios",
        "brand": "apple",
        "model": "iphone 6S",
        "os_version": "10"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "preference": {},
        "id": "582c94c4946b8451008b4567",
        "email": "foo@bar.com",
        "configuration": {
            "email_notification": {
              "requests": true,
              "comments": true,
              "alerts": true,
              "follows": true
            },
            "app_notification": {
              "requests": true,
              "comments": true,
              "alerts": true,
              "follows": true
            }
        },
        "devices": [
            {
              "device_id": "1231456754234567665433",
              "os_version": "2345",
              "brand": "srtyh",
              "model": "asdad",
              "type": "android"
            },
            {
              "device_id": "APA-3124sdfs-gerydrtrw1245tdgdfghdfy4w5rw",
              "os_version": "10",
              "brand": "apple",
              "model": "iphone 6S",
              "type": "ios"
            }
        ]
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "User was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Device_id not provided"
        }
    ]
    

App Evaluation 

Add new app evaluation
/me/app_evaluation

Adds a new app evaluation to the user. Returns the user’s profile with the newly added device.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "rating":4,
        "comment": "really good",
        "app_key": 1
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "app_evaluations": [
            {
              "app_key": "1"
            }
          ],
        "preference": {},
        "id": "582c94c4946b8451008b4567",
        "email": "foo@bar.com",
        "configuration": {
            "email_notification": {
              "requests": true,
              "comments": true,
              "alerts": true,
              "follows": true
            },
            "app_notification": {
              "requests": true,
              "comments": true,
              "alerts": true,
              "follows": true
            }
        },
        "devices": [
            {
              "device_id": "1231456754234567665433",
              "os_version": "2345",
              "brand": "srtyh",
              "model": "asdad",
              "type": "android"
            },
            {
              "device_id": "APA-3124sdfs-gerydrtrw1245tdgdfghdfy4w5rw",
              "os_version": "10",
              "brand": "apple",
              "model": "iphone 6S",
              "type": "ios"
            }
        ]
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "User was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "App with app_key 1 was already evaluated by user"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "App with app_key 1 does not exist"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Missing parameters"
        }
    ]
    
  • Response  500
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 500,
            "description": "Error saving user"
        }
    ]
    
Remove device
/me/app_evaluation

Removes a device from a user.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "device_id": "APA-3124sdfs-gerydrtrw1245tdgdfghdfy4w5rw"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "preference": {},
        "id": "582c94c4946b8451008b4567",
        "email": "foo@bar.com",
        "configuration": {
            "email_notification": {
              "requests": true,
              "comments": true,
              "alerts": true,
              "follows": true
            },
            "app_notification": {
              "requests": true,
              "comments": true,
              "alerts": true,
              "follows": true
            }
        },
        "devices": [
            {
              "device_id": "1231456754234567665433",
              "os_version": "2345",
              "brand": "srtyh",
              "model": "asdad",
              "type": "android"
            }
        ]
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "User was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Missing parameters"
        }
    ]
    

Preferences Jurisdiction 

User preferences within the jurisdiction

Get preferences
/jurisdiction_preferences/{jurisdiction_id}

Gets user preferences stored within the jurisdiction.

  • Parameters
  • jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction ID to show.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "widget_buttons_ids":
            [
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4" ,
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F5" ,
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4" 
            ]
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "Access Denied"
        }
    ]
    
Update preferences
/jurisdiction_preferences/{jurisdiction_id}

Updates user preferences stored within the jurisdiction.

  • Parameters
  • jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction ID to show.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    [
        {
            "widget_buttons_ids":
            [
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4" ,
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F5" ,
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4" 
            ]
        }
    ]
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "widget_buttons_ids":
            [
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4" ,
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F5" ,
                "DSFKUSUJG89UDFS9Y8G79834IF43UI_34RF34F4" 
            ]
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "Access Denied"
        }
    ]
    

Application 

User legal terms api calls. Authorization header must be sent.

FieldDescription
origin_deviceOriginDevice id (optional)

If a user is using the app and legal terms have been updated, a response with code 510 will be sent. Said user will then be required to accept the new ones via api call, specifying the origin device they are accepted from.

accept
/accept_terms
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    
       [
       "code : 200,
       "Legal Terms Accepted"
       ]
    
    

Application 

Application options settings.

FieldValueDescription
namestringName applicacion.
logostringUrl logo image.
activebooleanStatus active the application.
default_jurisdiction_idstringDefault jurisdiction identification Id.

U

Application Status 

Get Application Status

Get Application Status
/applications/{app_key}
  • Parameters
  • app_key
    string (required) Example: 1

    Application ID

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "name": "Mejora tu ciudad",
        "logo": "http:\/\/www.radmas.com\/clientes\/ayto\/img\/logo.png",
        "active": true,
        "default_jurisdiction":"es.madrid"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "app_key does not exist or is not allowed"
    }
    

Application Configuration 

Possible values for type are: cityapp, workapp, cityweb.

Possible values for headboard type are: icon, small_image, gallery.

Get Application Configuration
/appconfiguration{jurisdiction_id,type}

This request return the application configuration for the specified type of device.

  • Parameters
  • jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction ID

    type
    string (required) Example: cityapp

    Type of configuration

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "name": "Application Name",
        "default_language": "es_ES",
        "jurisdiction_id": "es.madrid",
        "main_color": "#666666",
        "font_color": "#FF0000",
        "login_background_url": "https://example.com/category_light.png",
        "login_logo_url": "https://example.com/category_light.png",
        "managers_icon_url": "https://example.com/category_seat.png",
        "app_icon_url": "https://example.com/category_seat.png",
        "headboard": {
            "type": "gallery",
            "small_image": "https://example.com/category_seat.png",
            "icon": "https://example.com/category_seat.png",
            "gallery": [
                {
                    "image_url": "https://example.com/category_light.png",
                    "image_link": "https://example.com/category_seat.png"
                }
            ]
        },
        "cards": [
            {
                "id": "58bd2d144e4ea8a40d8b4d35",
                "name": "A Twitter Card",
                "preset": false,
                "required": false,
                "type": "twitter_card",
                "channels": [
                    {
                        "id": "5a79c2354e4ea851038b45cf",
                        "name": "Jardineros"
                    },
                    {
                        "id": "5a79c2354e4ea851038b45d0",
                        "name": "Bomberos"
                    }
                ],
                "accounts": [
                    {
                        "name": "@MejoraTuCiudad_",
                        "tags": [
                            {
                                "name": "BestApp",
                                "color": "#C6C6C6"
                            }
                        ],
                    }
                ],
            },
        ],
        "buttons": [
            {
                "id": "58bd2d144e4ea8a40d8b4d33",
                "name": "A Button",
                "preset": true,
                "required": true,
                "button_type": "phoneCollection",
                "collection": [
                    {
                        "name": "emergencias",
                        "value": "112",
                    }
                ],
                "icon": ,
                "tags": [
                    {
                        "id": "58bd2d144e4ea8a40d8b4d30",
                        "name": "Deportes",
                        "color": "#A8F962"
                    },
                    {
                        "id": "58bd2d144e4ea8a40d8b4d32",
                        "name": "Politica",
                        "color": "#F962A8"
                    }
                ]
            }
        ]
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "App configuration was not found"
    }
    

Application Configuration Common 

Possible values for type are: cityapp, workapp, cityweb.

Get
/appconfigurationcommon{jurisdiction_id,type}

This request return the application configuration common for the specified type of device.

  • Parameters
  • jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction ID

    type
    string (required) Example: cityapp

    Type of configuration

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "name": "Application Name",
        "default_language": "es_ES",
        "jurisdiction_id": "es.madrid",
        "main_color": "#666666",
        "font_color": "#FF0000",
        "login_background_url": "https://example.com/category_light.png",
        "login_logo_url": "https://example.com/category_light.png",
        "managers_icon_url": "https://example.com/category_seat.png",
        "app_icon_url": "https://example.com/category_seat.png",
        "headboard": {
            "type": "top_bar",
            "small_image": "https://example.com/category_seat.png",
            "icon": "https://example.com/category_seat.png",
            "gallery": [
                {
                    "image_url": "https://example.com/category_light.png",
                    "image_link": "https://example.com/category_seat.png"
                }
            ]
        },
        "cards": [
            {
                "id": "5cd53fd64e4ea864018b4567",
                "position": 8,
                "priority": 5,
                "name": "Twitter card!",
                "preset": true,
                "required": true,
                "channels": [
                    {
                        "id": "5cd3ea744e4ea878088b459f",
                        "name": "Jardineros",
                        "external": false,
                        "public": false,
                        "jurisdictions": [
                            {
                                "jurisdiction_id": "es.madrid"
                            }
                        ]
                    }
                ],
                "type": "twitter_card"
            },
        ],
        "buttons": [
            {
                "id": "58bd2d144e4ea8a40d8b4d33",
                "name": "A Button",
                "preset": true,
                "required": true,
                "type": "button",
                "button_type": "phoneCollection",
                "collection": [
                    {
                        "name": "emergencias",
                        "value": "112",
                    }
                ],
                "icon": "https://example.com/category_seat.png",
                "tags": [
                    {
                        "id": "58bd2d144e4ea8a40d8b4d30",
                        "name": "Deportes",
                        "color": "#A8F962"
                    },
                    {
                        "id": "58bd2d144e4ea8a40d8b4d32",
                        "name": "Politica",
                        "color": "#F962A8"
                    }
                ]
            }
        ]
    }
    
  • Response  401
  • Headers
    Content-Type: application/json
    Body
    {
        "error": "access_denied",
        "error_description": "OAuth2 authentication required"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "App configuration was not found"
    }
    

User Custom Configuration 

Possible values for type are: `cityapp`, `workapp`, `cityweb`.
Get User Custom Configuration
/usercustomconfiguration{jurisdiction_ids,type}
This request return the user custom configuration for the specified user, jurisdiction and application type.
  • Parameters
  • jurisdiction_ids
    string (required) Example: es.madrid

    Jurisdiction IDs

    type
    string (required) Example: cityapp

    Type of configuration

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    ```
    {
        "es.madrid": {
            "active_buttons": [
                {
                    "app_element": "58e23b074e4ea87b4a8b4f40",
                    "position": 1
                },
                {
                    "app_element": "58e23b074e4ea87b4a8b4f41",
                    "position": 1
                },
            ],
            "active_cards": [
                {
                    "app_element": "58e23b074e4ea87b4a8b4f43",
                    "position": 3
                },
                {
                    "app_element": "58e23b074e4ea87b4a8b4f44",
                    "position": 2
                }
            ]
        },
        "net.carboneroelmayor": {
            "active_buttons": [
                {
                    "app_element": "58e23b074e4ea87b4a8b4f42",
                    "position": 2
                }
            ],
            "active_cards": []
        }
    }
    ```
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 400,
        "description": "Type not send"
    }]
    ```
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 400,
        "description": "Jurisdiction_ids not send"
    }]
    ```
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 403,
        "description": "User was not found"
    }]
    ```
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 404,
        "description": "Jurisdictions not found"
    }]
    ```
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 404,
        "description": "UserCustomConfigurations not found"
    }]
    
Update User Custom Configuration
/usercustomconfiguration{jurisdiction_ids,type}
  • Parameters
  • jurisdiction_ids
    string (required) Example: es.madrid

    Jurisdiction IDs

    type
    string (required) Example: cityapp

    Type of configuration

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "type" : "cityapp",
        "jurisdiction_ids" : "es.madrid",
        "active_cards": [
                {
                    "app_element": "5a1802344e4ea8473d8b4be6",
                    "position": 1,
                    "selected": true,
                    "account_config": [
                        "test",
                        "youtube"
                    ]
                }
            ],
         "active_buttons": [
          {
                   "app_element": "5a1802344e4ea8473d8b4be6",
                   "position": 1,
                   "selected": true
                 }
            ]
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 400,
        "description": "Type not send"
    }]
    ```
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 400,
        "description": "Jurisdiction_ids not send"
    }]
    ```
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 400,
        "description": "UserCustomConfiguration params not valid"
    }]
    ```
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 403,
        "description": "User was not found"
    }]
    ```
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 404,
        "description": "Jurisdiction not found"
    }]
    ```
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    ```
    [{
        "code": 404,
        "description": "AppConfiguration not found"
    }]
    ```
    

Get App Element 

Get App Element
/app-element/{id}

This request return the app element for the specified id.

  • Parameters
  • id
    string (required) Example: 5cd53c944e4ea860018b456a

    AppElement id.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "id": "5cd53c944e4ea860018b456a",
        "sources": [
            {
                "name": "20Minutos",
                "source_link": "http://www.20minutos.es/rss",
                "tags": [
                    {
                        "name": "Cultura",
                        "id": "Cultura",
                        "color": "#62F9A8"
                    }
                ],
                "channels": [
                    {
                        "id": "5cd3ea744e4ea878088b459f",
                        "name": "Jardineros",
                        "external": false,
                        "public": false,
                        "jurisdictions": [
                            {
                                "jurisdiction_id": "es.madrid"
                            }
                        ]
                    }
                ]
            }
        ],
        "configuration": {
            "icon": "https://5cc844efe179b.png",
            "predetermined_image": "https://5cc844d46ed48.png",
            "content_image": "https://5cc844d46ed48.png",
            "error_image": "https://5cc844ee5679b.png",
            "color": "#8dbbff"
        }
    }
    
  • Response  401
  • Headers
    Content-Type: application/json
    Body
    {
        "error": "access_denied",
        "error_description": "OAuth2 authentication required"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "Application Element was not found"
    }
    

Jurisdictions 

This is the group of jurisdictions

Description of values

The service has the following information:

FieldPossible valuesDescription
jurisdiction_idstringExternal identifier, used in the public protocol to generate requests.
namestringName of the jurisdiction.
key_namestringThis string is used to adjust the map searches.
server_urlstringServer base url where requests for this jurisdiction must be sent.
activeboolCheck if the service is available to accept requests.
iconstringURL to the icon of this jurisdiction.
logostringURL to the logo of this jurisdiction.
main_logostringURL to the main_logo of this jurisdiction.
loading_imagestringURL to the loading_image of this jurisdiction.
login_imagestringURL to the login_image of this jurisdiction.
header_iconstringURL to the header_icon of this jurisdiction.
color_header_textstringColor of the header text of this jurisdiction.
color_header_backgroundstringColor of the header background of this jurisdiction.
color_buttonstringColor button of this jurisdiction.
color_fontstringColor font of this jurisdiction.
color_iconsstringColor icons of this jurisdiction.
latnumberJurisdiction geographic center latitude of jurisdiction.
lngnumberJurisdiction geographic center longitude of jurisdiction.
geo_perimeterarrayCollection of [lat, long] defining jurisdiction geographic perimeter.
geo_boundarrayCollection of [lat, long] defining jurisdiction geographic bounds.
updated_datetimestringLast jurisdiction update date ISO8601.
mobile_default_localestringJurisdiction desired default language locale string for mobile apps (es, fr, en), this parameter can be blank.
app_keystringIdentification Application ID.
typologiesarrayCollection of typologies into Jurisdiction
origin_devicesarrayCollection of origin devices into Jurisdiction

Deprecated of values

The following value in type the buttons will be removed in future versions:

FieldValuesDescription
typeurlThe value was replaced by the option url_collection and add all urls collections
typephoneThe value was replaced by the option phone_collection and add all phones collections

Add new of values

The following new values are available:

FieldValuesDescription
typeurl_collectionThe value can be stored url collections
typephone_collectionThe value can be stored phone collections
typesocial_collectionThe value can be stored url social collections
typenews_collectionThe value can be stored url news collections
typenotices_collectionThe value can be stored url notices collections

List of jurisdictions 

Get Jurisdiction definition.

Get jurisdictions
/jurisdictions{?app_key,lng,lat}

Get list of application jurisdictions.

  • Parameters
  • app_key
    integer (optional) Example: 1

    Application ID.

    lng
    number (required) Example: 32.48576

    Longitud Jurisdiction.

    lat
    number (required) Example: -32.48576

    Latitud Jurisdiction.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
         {
            "only_registered_users": true,
            "automatic_typology": false,
            "id": "58984bf54e4ea84c078b4586",
            "jurisdiction_id": "es.madrid",
            "name": "Madrid",
            "key_name": "Madrid, España",
            "color_button": "#ADDFFF",
            "long": -3.6795367,
            "lat": 40.4378271,
            "geo_perimeter": [
              {
                "long": -3.5217381831055,
                "lat": 40.468696616332
              },
              {
                "long": -3.5679632396211,
                "lat": 40.439353064073
              },
              {
                "long": -3.5819159572695,
                "lat": 40.409735283428
              },
              {
                "long": -3.5720558896365,
                "lat": 40.368773317026
              },
              {
                "long": -3.5887279662848,
                "lat": 40.354309182685
              },
              {
                "long": -3.6364916752453,
                "lat": 40.352587390944
              },
              {
                "long": -3.6880737806664,
                "lat": 40.331872509877
              },
              {
                "long": -3.7246333772507,
                "lat": 40.333881515929
              },
              {
                "long": -3.7215349190521,
                "lat": 40.365633257583
              },
              {
                "long": -3.7709562887878,
                "lat": 40.360585848344
              },
              {
                "long": -3.7825950487671,
                "lat": 40.377695549523
              },
              {
                "long": -3.7790933939209,
                "lat": 40.400921921918
              },
              {
                "long": -3.7957793542481,
                "lat": 40.434808530162
              },
              {
                "long": -3.7776528618165,
                "lat": 40.44298363235
              },
              {
                "long": -3.7510129140626,
                "lat": 40.476047037837
              },
              {
                "long": -3.6922398544922,
                "lat": 40.512897776404
              },
              {
                "long": -3.5877399999999,
                "lat": 40.514539
              }
            ],
            "geo_bound": [
              {
                "long": -3.798113,
                "lat": 40.36074
              },
              {
                "long": -3.58774,
                "lat": 40.514539
              }
            ],
            "buttons": [
              {
                "label": "Madrid",
                "icon": "http://www.picaronablog.com/wp-content/uploads/google-hangouts-icon.png",
                "url": "http://www.madrid.es",
                "url_collection": [],
                "phone_collection": [],
                "social_collection": [],
                "news_collection": [],
                "type": "url",
                "sequence": 0,
                "optional": false
              },
              {
                "label": "EMT",
                "icon": "http://www.emtmadrid.es/img/logotipo.jpg",
                "url": "http://www.emtmadrid.es/",
                "url_collection": [],
                "phone_collection": [],
                "social_collection": [],
                "news_collection": [],
                "type": "url",
                "sequence": 5,
                "optional": false
              }
            ],
            "locales": [
              "es"
            ],
            "typologies": [
              {
                "id": "58984bf54e4ea84c078b459b",
                "name": "avisos"
              },
              {
                "id": "58984bf54e4ea84c078b45b0",
                "name": "avisos_madrid"
              },
              {
                "id": "58984bf54e4ea84c078b45ad",
                "name": "peticiones"
              }
            ],
            "typology_nodes": [
              {
                "id": "58984bf54e4ea84c078b459d",
                "visible_name": "En progreso",
                "order": 3,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b459b",
                  "name": "avisos"
                }
              },
              {
                "id": "58984bf54e4ea84c078b459c",
                "visible_name": "Nuevo",
                "order": 1,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b459b",
                  "name": "avisos"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45a0",
                "visible_name": "Rechazado",
                "order": 2,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b459b",
                  "name": "avisos"
                }
              },
              {
                "id": "58984bf54e4ea84c078b459e",
                "visible_name": "Resuelto",
                "order": 4,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b459b",
                  "name": "avisos"
                }
              },
              {
                "id": "58984bf54e4ea84c078b459f",
                "visible_name": "Solucionado",
                "order": 5,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b459b",
                  "name": "avisos"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45af",
                "visible_name": "Considerada",
                "order": 2,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45ad",
                  "name": "peticiones"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45ae",
                "visible_name": "Nueva",
                "order": 1,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45ad",
                  "name": "peticiones"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b7",
                "visible_name": "Cancelado",
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b6",
                "visible_name": "Comunicado",
                "order": 0,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b3",
                "visible_name": "En curso",
                "order": 0,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b4",
                "visible_name": "En ejecución",
                "order": 0,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b2",
                "visible_name": "En progreso",
                "order": 0,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b5",
                "visible_name": "Finalizado",
                "order": 0,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b1",
                "visible_name": "Recepcionado",
                "order": 0,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              },
              {
                "id": "58984bf54e4ea84c078b45b8",
                "visible_name": "Trasladado",
                "order": 0,
                "color": "#7da038",
                "typology": {
                  "id": "58984bf54e4ea84c078b45b0",
                  "name": "avisos_madrid"
                }
              }
            ],
            "origin_devices": [
              {
                "id": "58984bf54e4ea84c078b457d",
                "options": []
              },
              {
                "id": "58984bf54e4ea84c078b457e",
                "options": [
                  "inperson"
                ]
              },
              {
                "id": "58984bf54e4ea84c078b457f",
                "options": [
                  "android"
                ]
              },
              {
                "id": "58984bf54e4ea84c078b4580",
                "options": [
                  "ios"
                ]
              },
              {
                "id": "58984bf54e4ea84c078b4581",
                "options": [
                  "inperson"
                ]
              },
              {
                "id": "58984bf54e4ea84c078b4582",
                "options": [
                  "inperson"
                ]
              },
              {
                "id": "58984bf54e4ea84c078b4583",
                "options": [
                  "inperson"
                ]
              },
              {
                "id": "58984bf54e4ea84c078b4584",
                "options": [
                  "facebook",
                  "inperson"
                ]
              },
              {
                "id": "58984bf54e4ea84c078b4585",
                "options": [
                  "twitter",
                  "inperson"
                ]
              }
            ],
            "icon": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/icon.jpg",
            "logo": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/logo.png",
            "main_logo": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/main_logo.png",
            "header_icon": null,
            "loading_image": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/loading_image.png",
            "login_image": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/login_image.png"
          }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "app_key was not provided"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "app_key does not exist or is not allowed"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "latitude or longitude not provided"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "No jurisdiction found in the specified coordinates"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "user can not join to this jurisdiction"
        }
    ]
    

Jurisdiction 

Get Jurisdiction definition.

Get jurisdiction
/jurisdictions/{jurisdiction_id}{?app_key}

Get a single instance of a jurisdiction.

  • Parameters
  • jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction ID to show.

    app_key
    integer (optional) Example: 1

    Application ID.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
     {
        "only_registered_users": true,
        "automatic_typology": false,
        "id": "58984bf54e4ea84c078b4586",
        "jurisdiction_id": "es.madrid",
        "name": "Madrid",
        "key_name": "Madrid, España",
        "color_button": "#ADDFFF",
        "long": -3.6795367,
        "lat": 40.4378271,
        "geo_perimeter": [
          {
            "long": -3.5217381831055,
            "lat": 40.468696616332
          },
          {
            "long": -3.5679632396211,
            "lat": 40.439353064073
          },
          {
            "long": -3.5819159572695,
            "lat": 40.409735283428
          },
          {
            "long": -3.5720558896365,
            "lat": 40.368773317026
          },
          {
            "long": -3.5887279662848,
            "lat": 40.354309182685
          },
          {
            "long": -3.6364916752453,
            "lat": 40.352587390944
          },
          {
            "long": -3.6880737806664,
            "lat": 40.331872509877
          },
          {
            "long": -3.7246333772507,
            "lat": 40.333881515929
          },
          {
            "long": -3.7215349190521,
            "lat": 40.365633257583
          },
          {
            "long": -3.7709562887878,
            "lat": 40.360585848344
          },
          {
            "long": -3.7825950487671,
            "lat": 40.377695549523
          },
          {
            "long": -3.7790933939209,
            "lat": 40.400921921918
          },
          {
            "long": -3.7957793542481,
            "lat": 40.434808530162
          },
          {
            "long": -3.7776528618165,
            "lat": 40.44298363235
          },
          {
            "long": -3.7510129140626,
            "lat": 40.476047037837
          },
          {
            "long": -3.6922398544922,
            "lat": 40.512897776404
          },
          {
            "long": -3.5877399999999,
            "lat": 40.514539
          }
        ],
        "geo_bound": [
          {
            "long": -3.798113,
            "lat": 40.36074
          },
          {
            "long": -3.58774,
            "lat": 40.514539
          }
        ],
        "buttons": [
          {
            "label": "Madrid",
            "icon": "http://www.picaronablog.com/wp-content/uploads/google-hangouts-icon.png",
            "url": "http://www.madrid.es",
            "url_collection": [],
            "phone_collection": [],
            "social_collection": [],
            "news_collection": [],
            "type": "url",
            "sequence": 0,
            "optional": false
          },
          {
            "label": "EMT",
            "icon": "http://www.emtmadrid.es/img/logotipo.jpg",
            "url": "http://www.emtmadrid.es/",
            "url_collection": [],
            "phone_collection": [],
            "social_collection": [],
            "news_collection": [],
            "type": "url",
            "sequence": 5,
            "optional": false
          }
        ],
        "locales": [
          "es"
        ],
        "typologies": [
          {
            "id": "58984bf54e4ea84c078b459b",
            "name": "avisos"
          },
          {
            "id": "58984bf54e4ea84c078b45b0",
            "name": "avisos_madrid"
          },
          {
            "id": "58984bf54e4ea84c078b45ad",
            "name": "peticiones"
          }
        ],
        "typology_nodes": [
          {
            "id": "58984bf54e4ea84c078b459d",
            "visible_name": "En progreso",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            }
          },
          {
            "id": "58984bf54e4ea84c078b459c",
            "visible_name": "Nuevo",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45a0",
            "visible_name": "Rechazado",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            }
          },
          {
            "id": "58984bf54e4ea84c078b459e",
            "visible_name": "Resuelto",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            }
          },
          {
            "id": "58984bf54e4ea84c078b459f",
            "visible_name": "Solucionado",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45af",
            "visible_name": "Considerada",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45ad",
              "name": "peticiones"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45ae",
            "visible_name": "Nueva",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45ad",
              "name": "peticiones"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b7",
            "visible_name": "Cancelado",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b6",
            "visible_name": "Comunicado",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b3",
            "visible_name": "En curso",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b4",
            "visible_name": "En ejecución",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b2",
            "visible_name": "En progreso",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b5",
            "visible_name": "Finalizado",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b1",
            "visible_name": "Recepcionado",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          },
          {
            "id": "58984bf54e4ea84c078b45b8",
            "visible_name": "Trasladado",
            "order": 0,
            "color": "#7da038",
            "typology": {
              "id": "58984bf54e4ea84c078b45b0",
              "name": "avisos_madrid"
            }
          }
        ],
        "origin_devices": [
          {
            "id": "58984bf54e4ea84c078b457d",
            "options": []
          },
          {
            "id": "58984bf54e4ea84c078b457e",
            "options": [
              "inperson"
            ]
          },
          {
            "id": "58984bf54e4ea84c078b457f",
            "options": [
              "android"
            ]
          },
          {
            "id": "58984bf54e4ea84c078b4580",
            "options": [
              "ios"
            ]
          },
          {
            "id": "58984bf54e4ea84c078b4581",
            "options": [
              "inperson"
            ]
          },
          {
            "id": "58984bf54e4ea84c078b4582",
            "options": [
              "inperson"
            ]
          },
          {
            "id": "58984bf54e4ea84c078b4583",
            "options": [
              "inperson"
            ]
          },
          {
            "id": "58984bf54e4ea84c078b4584",
            "options": [
              "facebook",
              "inperson"
            ]
          },
          {
            "id": "58984bf54e4ea84c078b4585",
            "options": [
              "twitter",
              "inperson"
            ]
          }
        ],
        "icon": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/icon.jpg",
        "logo": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/logo.png",
        "main_logo": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/main_logo.png",
        "header_icon": null,
        "loading_image": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/loading_image.png",
        "login_image": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/login_image.png"
      }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "app_key was not provided"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "app_key does not exist or is not allowed"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "user can not join to this jurisdiction"
        }
    ]
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 404,
            "description": "jurisdiction_id was not found"
        }
    ]
    

Jurisdiction within coordinates 

Get the jurisdiction which the sent position coordinates belong to.

Get jurisdiction within
/jurisdictions_within{?app_key,lng,lat}

Get a single instance of a jurisdiction.

  • Parameters
  • app_key
    integer (required) Example: 1

    Application ID.

    lng
    float (required) Example: 40.632489

    Your position Longitude.

    lat
    float (required) Example: -3.16017

    Your position latitude.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "jurisdiction_id": "es.madrid"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "app_key was not provided"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "app_key does not exist or is not allowed"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "latitude or longitude not provided"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "No jurisdiction found in the specified coordinates"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "user can not join to this jurisdiction"
        }
    ]
    

Services 

This is the group of services

The creation of Services must be done through the Backoffice Application.

Description of values

The service has the following information:

FieldPossible valuesDescription
metadatabooleanIndicates when a service has attributes.
groupstringGroup the services.
service_codestringService identifier, relative to jurisdiction.
service_namestringName of the service.
descriptionstringShort description of the service.
public_requestsbooleanDetermine is the request public.
typestringType Service.
keywordsstringKeywords settings the Service.
service_iconurlThis can be a external url or a base64 url. Contains the image that is associated to this category in the mobile application and in the backoffice.
socialbooleanIndicates when a service has comments in associated requests.
attributesarrayThe attributes are the metadata that can be defined in the request of this service. The attributes fields are detailed below.
typologyarrayThe definition of Typology included into Service
status_nodearrayThe definition of Status Node included into Service

Attributes fields description

FieldPossible valuesDescription
idstringInternal id of the service.
codestringInternal identifier of the service.
variableboolDescribe if the attribute is a variable (true) or it is used just to display some data.
datatypeOptions: string, number, datetime, date, text, singlevaluelist, multivaluelistDescribes the datatype of the value which expect to receive.
requiredboolName of the service.
descriptionstringDetail of the attribute which is normally displayed to the user.
ordernumberOrder in which this attribute is showed to the final user.
valuesarrayContains a list of values which can be selected when the datatype is singlevaluelist or multivaluelist. Every element contains a key and a name.
deletedbooleanDetermine the deleted values services
keystringKey values services
namestringName values services
children_servicesarrayList Children component to service
socialbooleanDetermine the social service

Typology fields description

FieldPossible valuesDescription
idstringInternal id of the typology.
namestringName unique the typology
visible_namestringVisible name the typology

Status_Node fields description

FieldPossible valuesDescription
idstringInternal id of the status node.
namestringName unique the status node
visible_namestringVisible name the status node

List of Services 

List of Services
/services{?jurisdiction_ids,lat,lng,typology_ids,color}
  • Parameters
  • jurisdiction_ids
    string array (required) Example: es.madrid,es.funsalida

    One or more jurisdiction codes separated by commas

    lat
    float (optional) Example: 40.4432203

    Latitude of the center point to search. Required if lng is present.

    lng
    float (optional) Example: -3.7042705

    Longitude of the center point to search. Required if lat is present.

    typology_ids
    string array (optional) Example: 57e9101d9a605741068b45af,57e9101d9a605741068b45cb

    One or more typology ids separated by commas

    color
    string (optional) Example: #a3065b

    Color assigned to service. Expressed in hex.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
          {
            "metadata": true,
            "group": "",
            "jurisdiction_id": "es.madrid",
            "visible_name": "Limpieza y Residuos (Avisos)",
            "id": "58984bf54e4ea84c078b45d5",
            "service_name": "Limpieza y Residuos",
            "description": "Incidencias relacionadas con la recogida de residuos y la limpieza de las calles.",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            },
            "service_icon": "https://s3-eu-west-1.amazonaws.com/static.open010.org/images_iyc/category_trash.png",
            "social": true,
            "evaluation": true
          }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "At least one valid jurisdiction is required"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "Both lat and lng must by provided"
        }
    ]
    

Service 

Display the details of a Service

Service details
/services/{service_id}{?jurisdiction_id}
  • Parameters
  • service_id
    string (required) Example: 1

    Service identifier.

    jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction id to which the required services belong.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
     {
       "metadata": true,
       "group": "",
       "visible_name": "Limpieza y Residuos (Avisos)",
       "id": "58984bf54e4ea84c078b45d5",
       "service_code": "1",
       "typology": {
         "hasLocation": true,
         "id": "58984bf54e4ea84c078b459b",
         "name": "avisos",
         "visible_name": "Avisos",
         "icon": "data:image/png;base64,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",
         "color": "#337ab7",
         "with_medias": true,
         "location_type": "geolocation"
       },
       "public_requests": true,
       "service_icon": "https://s3-eu-west-1.amazonaws.com/static.open010.org/images_iyc/category_trash.png",
       "public": true,
       "attributes": [
         {
           "deleted": false,
           "id": "58984c034e4ea84c078b47c7",
           "code": "ESPACE",
           "variable": true,
           "datatype": "singlevaluelist",
           "required": true,
           "description": "¿Qué tipo de espacio es?",
           "order": 0,
           "values": [
             {
               "deleted": false,
               "key": "123",
               "name": "Parque"
             },
             {
               "deleted": false,
               "key": "124",
               "name": "Jardín"
             }
           ]
         },
         {
           "deleted": false,
           "id": "58984c034e4ea84c078b47ca",
           "code": "ELEMENTTYPE",
           "variable": true,
           "datatype": "multivaluelist",
           "required": true,
           "description": "Zonas afectadas",
           "order": 1,
           "values": [
             {
               "deleted": false,
               "key": "223",
               "name": "Árbol"
             },
             {
               "deleted": false,
               "key": "224",
               "name": "Planta"
             },
             {
               "deleted": false,
               "key": "225",
               "name": "Arbusto"
             },
             {
               "deleted": false,
               "key": "226",
               "name": "Césped"
             }
           ]
         },
         {
           "deleted": false,
           "id": "58984c034e4ea84c078b47cf",
           "code": "NUMBEROFELEMENTS",
           "variable": true,
           "datatype": "number",
           "required": true,
           "description": "Cantidad de elementos afectados",
           "order": 2,
           "values": []
         },
         {
           "deleted": false,
           "id": "58984c034e4ea84c078b47d0",
           "code": "SEENONDATE",
           "variable": true,
           "datatype": "datetime",
           "required": true,
           "description": "¿Cuando divisaste el acontencimiento?",
           "order": 3,
           "values": []
         },
         {
           "deleted": false,
           "id": "58984c034e4ea84c078b47d1",
           "code": "MOREINFO",
           "variable": true,
           "datatype": "text",
           "required": false,
           "description": "Amplíe la descripción de la incidencia.",
           "order": 4,
           "values": []
         },
         {
           "deleted": false,
           "id": "58984c034e4ea84c078b47d2",
           "code": "LONGDESCRIPTION",
           "variable": false,
           "datatype": "text",
           "required": false,
           "description": "En un lugar de la Mancha, de cuyo nombre no quiero acordarme, no ha mucho tiempo que vivía un hidalgo de los de lanza en astillero, adarga antigua, rocín flaco y galgo corredor. Una olla de algo más vaca que carnero, salpicón las más noches, duelos y quebrantos los sábados, lentejas los viernes, algún palomino de añadidura los domingos, consumían las tres partes de su hacienda. El resto della concluían sayo de velarte, calzas de velludo para las fiestas con sus pantuflos de lo mismo, los días de entre semana se honraba con su vellori de lo más fino. Tenía en su casa una ama que pasaba de los cuarenta, y una sobrina que no llegaba a los veinte, y un mozo de campo y plaza, que así ensillaba el rocín como tomaba la podadera. Frisaba la edad de nuestro hidalgo con los cincuenta años, era de complexión recia, seco de carnes, enjuto de rostro; gran madrugador y amigo de la caza. Quieren decir que tenía el sobrenombre de Quijada o Quesada (que en esto hay alguna diferencia en los autores que deste caso escriben), aunque por conjeturas verosímiles se deja entender que se llama Quijana; pero esto importa poco a nuestro cuento; basta que en la narración dél no se salga un punto de la verdad.",
           "order": 5,
           "values": []
         }
       ],
       "social": true,
       "evaluation": true,
       "status_node": [
         {
           "name": "en_progreso",
           "color": "#7da038",
           "typology_node_id": "58984bf54e4ea84c078b459d",
           "visible_name": "En progreso",
           "id": "58984bf54e4ea84c078b45cf"
         },
         {
           "name": "nuevo",
           "color": "#7da038",
           "typology_node_id": "58984bf54e4ea84c078b459c",
           "visible_name": "Nuevo",
           "id": "58984bf54e4ea84c078b45d0"
         },
         {
           "name": "rechazado",
           "color": "#7da038",
           "typology_node_id": "58984bf54e4ea84c078b45a0",
           "visible_name": "Rechazado",
           "id": "58984bf54e4ea84c078b45d1"
         },
         {
           "name": "resuelto",
           "color": "#7da038",
           "typology_node_id": "58984bf54e4ea84c078b459e",
           "visible_name": "Resuelto",
           "id": "58984bf54e4ea84c078b45d2"
         },
         {
           "name": "solucionado",
           "color": "#7da038",
           "typology_node_id": "58984bf54e4ea84c078b459f",
           "visible_name": "Solucionado",
           "id": "58984bf54e4ea84c078b45d3"
         }
       ],
       "mandatory_informant_config": [
         {
           "required": false,
           "field": "first_name",
           "message": ""
         },
         {
           "required": false,
           "field": "last_name",
           "message": ""
         },
         {
           "required": false,
           "field": "phone",
           "message": ""
         },
         {
           "required": false,
           "field": "email",
           "message": ""
         },
         {
           "required": false,
           "field": "twitter_nickname",
           "message": ""
         }
       ]
     }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 404,
            "description": "jurisdiction_id was not found"
        }
    ]
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 404,
            "description": "service_code was not found "
        }
    ]
    

Requests 

Requests contains the information about any issue that can happen in the jurisdiction. To ensure a correct mapping between both systems there is a token (internal identifier) an a service_request_id, which is a value that can be set by an external system or it would be randomly generated.

This model is highly influenced by the Open311 Georeport v2 protocol, but it focus in management so there are aditional fields and options that are not available in this protocol.

List of Requests 

Search Requests
/requests{?jurisdiction_ids,service_request_ids,service_ids,start_date,end_date,lat,long,own,limit,page,any_field, following, order, complaints, reiterations}

This request return a set with the last requests in the jurisdiction. If the lat and long parameters are set it try to find the requests that are in a area of 6Km. If no value is found it return all the requests without taking into account the location.

  • Parameters
  • jurisdiction_ids
    string array (required) Example: es.madrid,es.fuensalida

    One or more jurisdiction codes distinguish between commas

    service_request_ids
    string (optional) Example: 14092214355,14092214356

    Request ID’s

    service_ids
    string (optional) Example: 1

    Service ID’s

    start_date
    string (optional) Example: 2014-07-01T00:00:00Z

    Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ Only Request created after this time are returned.

    end_date
    string (optional) Example: 2014-08-13T17:45:01Z

    Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ Only Request created before this time are returned.

    lat
    float (optional) Example: 40.4432203

    Latitude of the center point to search in a 6km range. required if long is defined

    long
    float (optional) Example: -3.7042705

    Longitude of the center point to search in a 6km range. required if lat is defined

    own
    boolean (optional) Example: false

    If set to true, only requests owned by the current user will be sent.

    page
    integer (optional) Example: 1

    page number to be sent.

    limit
    integer (optional) Example: 10

    Maximum number of requests to be sent ( if page is set, the limit is for each page )…

    any_field
    string (optional) Example: farolas

    Description, address or ID requests

    status
    array (optional) Example: 56e1a6809a6057f7068b45af

    For multiple: status[]=56e1a6809a6057f7068b45af&status[]=56e1a6809a6057f7068b45b1

    typologies
    array (optional) Example: 56e1a6809a6057f7068b45af

    For multiple: typologies[]=56e1a6809a6057f7068b45af&typologies[]=56e1a6809a6057f7068b45b1

    distance
    string (optional) Example: 20km

    Must be used with lat and long

    following
    boolean (optional) Example: false

    If set to true, only followed requests by the current user will be sent.

    order
    string (optional) Example: date_asc

    Values sorting: own_desc, own_asc, date_desc, date_asc, updated_desc, updated_asc, seen_asc, priority_desc, followers_asc, unseen_comments_asc, assigned_self, distance (with distance, distance_from must be setted)

    complaints
    boolean (optional) Example: 0

    If set to 1, only requests with complaints will be sent

    reiterations
    boolean (optional) Example: 0

    If set to 1, only requests with reiterations will be sent

    user_reiterated
    boolean (optional) Example: true

    If set to true, only requests reiterated by the user will be sent

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "service_id": "58984bf54e4ea84c078b45e1",
            "service_name": "Zonas verdes y arbolado",
            "status_node_type": "initial_node",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            },
            "token": "58984c594e4ea87e018b4573",
            "service_request_id": "MAD1085",
            "description": "Testing Open010 POST Request 1stTime",
            "long": -3.742991,
            "lat": 40.368958,
            "status_node": {
              "typology_node_id": "58984bf54e4ea84c078b459c",
              "id": "58984bf54e4ea84c078b45dc"
            },
            "requested_datetime": "2017-02-06T10:13:45+0000",
            "address": "Calle Falsa, 123",
            "supporting": false,
            "complaining": false,
            "user": {
              "id": "58984bf54e4ea84c078b4597"
            },
            "comments_count": 0,
            "evaluation": 0,
            "reiterations_count": 0,
            "complaints_count": 0
          }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "jurisdiction_id was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "lat or long was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "user was not found"
        }
    ]
    
    

List of Requests 

Search Requests
/requests-list

This request return a set with the last requests in the jurisdiction. If the lat and long parameters are set it try to find the requests that are in a area of 6Km. If no value is found it return all the requests without taking into account the location.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "jurisdiction_ids": "es.madrid",
        "service_request_ids": "580483cd9a6057ca048b4587",
        "service_ids": "1",
        "start_date": "2014-07-01T00:00:00Z",
        "end_date": "2014-08-01T00:00:00Z",
        "lat": 40.403040,      
        "long": -3.770370,
        "own": false,
        "page": 1,
        "limit": 10,
        "any_field": "farolas",
        "status": ["56e1a6809a6057f7068b45af"],
        "typologies": ["56e1a9461a6057f9531b09bd"],
        "distance": "20km",
        "following": true,
        "order": "date_asc",
        "complaints": 0,
        "reiterations": 0,
        "user_reiterated": true
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "service_id": "58984bf54e4ea84c078b45e1",
            "service_name": "Zonas verdes y arbolado",
            "status_node_type": "initial_node",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            },
            "token": "58984c594e4ea87e018b4573",
            "service_request_id": "MAD1085",
            "description": "Testing Open010 POST Request 1stTime",
            "long": -3.742991,
            "lat": 40.368958,
            "status_node": {
              "typology_node_id": "58984bf54e4ea84c078b459c",
              "id": "58984bf54e4ea84c078b45dc"
            },
            "requested_datetime": "2017-02-06T10:13:45+0000",
            "address": "Calle Falsa, 123",
            "supporting": false,
            "complaining": false,
            "user": {
              "id": "58984bf54e4ea84c078b4597"
            },
            "comments_count": 0,
            "evaluation": 0,
            "reiterations_count": 0,
            "complaints_count": 0
          }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "jurisdiction_id was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "lat or long was not found"
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "user was not found"
        }
    ]
    
    

List of own Requests 

Search Own Requests
/requests_owns{?app_key}

Lists all user created requests (no jurisdiction_id must be supplied).

  • Parameters
  • app_key
    int (required) Example: 1

    App Key

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "service_id": "58984bf54e4ea84c078b45e1",
            "service_name": "Zonas verdes y arbolado",
            "status_node_type": "initial_node",
            "typology": {
              "id": "58984bf54e4ea84c078b459b",
              "name": "avisos"
            },
            "token": "58984c594e4ea87e018b4573",
            "service_request_id": "MAD1085",
            "description": "Testing Open010 POST Request 1stTime",
            "long": -3.742991,
            "lat": 40.368958,
            "status_node": {
              "typology_node_id": "58984bf54e4ea84c078b459c",
              "id": "58984bf54e4ea84c078b45dc"
            },
            "requested_datetime": "2017-02-06T10:13:45+0000",
            "address": "Calle Falsa, 123",
            "supporting": false,
            "complaining": false,
            "user": {
              "id": "58984bf54e4ea84c078b4597"
            },
            "comments_count": 0,
            "evaluation": 0,
            "reiterations_count": 0,
            "complaints_count": 0
          }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "user was not found"
        }
    ]
    

Request 

Get single object
/requests/{id}

Get a single instance of a request.

  • Parameters
  • id
    string (required) Example: 53ff033df98f71e7058b4571

    Request ID

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "service_id": "58984bf54e4ea84c078b45e1",
        "service_name": "Zonas verdes y arbolado",
        "status_node_type": "initial_node",
        "typology": {
          "id": "58984bf54e4ea84c078b459b",
          "name": "avisos"
        },
        "token": "58984c594e4ea87e018b4573",
        "service_request_id": "MAD1085",
        "description": "Testing Open010 POST Request 1stTime",
        "long": -3.742991,
        "lat": 40.368958,
        "status_node": {
          "typology_node_id": "58984bf54e4ea84c078b459c",
          "id": "58984bf54e4ea84c078b45dc"
        },
        "requested_datetime": "2017-02-06T10:13:45+0000",
        "address": "Calle Falsa, 123",
        "supporting": false,
        "complaining": false,
        "user": {
          "id": "58984bf54e4ea84c078b4597"
        },
        "comments_count": 0,
        "evaluation": 0,
        "reiterations_count": 0,
        "complaints_count": 0
      }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "jurisdiction_id was not found"
        }
    ]
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 404,
            "description": "service_request_id was not found"
        }
    ]
    

List of Requests Coordinates 

Search Requests coordinates
/requests/coordinates{?jurisdiction_ids,service_request_ids,service_ids,start_date,end_date,lat,long,own,page,limit,any_field}

This request return a set with the coordinates of the last requests in the jurisdiction. If the lat and long parameters are set it try to find the requests that are in a area of 6Km. If no value is found it return all the requests without taking into account the location.

  • Parameters
  • jurisdiction_ids
    string array (required) Example: es.madrid

    One or more jurisdiction codes distinguish between commas

    service_request_ids
    string (optional) Example: 14092214355

    Request ID

    service_ids
    string (optional) Example: 1

    Service Id

    start_date
    string (optional) Example: 2014-07-01T00:00:00Z

    Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ Only Request created after this time are returned.

    end_date
    string (optional) Example: 2014-08-13T17:45:01Z

    Timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ Only Request created before this time are returned.

    lat
    float (optional) Example: 40.4432203

    Latitude of the center point to search in a 6km range. required if long is defined

    long
    float (optional) Example: -3.7042705

    Longitude of the center point to search in a 6km range. required if lat is defined

    own
    boolean (optional) Example: false

    If set to true, only requests owned by the current user will be sent.

    page
    integer (optional) Example: 1

    Number page of view Request.

    limit
    integer (optional) Example: -3.7042705

    Maximum number of requests to be sent.

    any_field
    string (optional) Example: farolas

    Description, address or ID requests

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "token": "57286e7e946b8412008b456d",
            "long": -4.2669868469238,
            "lat": 41.121618473181
        },
        {
            "token": "57286048946b8412008b456a",
            "long": -4.2669868469238,
            "lat": 41.121618473181
        },
        {
            "token": "57285300946b8411008b4567",
            "long": -4.2669868469238,
            "lat": 41.121618473181
        },
        {
            "token": "57284eb3946b8412008b4567",
            "long": -4.2669868469238,
            "lat": 41.121618473181
        },
        {
            "token": "572356a1946b8412008b4575",
            "long": -4.2669868469238,
            "lat": 41.121618473181
        },
        {
            "token": "572351019a60579e218b4f42",
            "long": -3.6855367,
            "lat": 40.4495271
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "jurisdiction_id was not found"
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "lat or long was not found"
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "user was not found"
        }
    ]
    

Create Request 

FieldRequiredDescription
app_keyrequiredApp Key Id
jurisdiction_idrequiredJurisdiction id.
service_idrequiredService ID (category) used to categorize this request.
descriptionrequiredShort description of the issue/request.
latrequiredThe request geoposition latitude.
longrequiredThe request geoposition longitude.
address_stringrequiredAddress related to the geoposition.
device_typerequiredOriginDevice id provided in jurisdiction.
first_namerequired/optionalName user register incidence - Is optional if the jurisdiction allows anonymous registration, otherwise it is required
last_namerequired/optionalLast Name user register incidence - Is optional if the jurisdiction allows anonymous registration, otherwise it is required
emailrequired/optionalEmail user register incidence - Is optional if the jurisdiction allows anonymous registration, otherwise it is required
situationoptionalFurther description of the request location.
attributeoptionalRequest attributes defined by Service. Required if there are at least one of service’s attributes required
publicoptionalMarks when a request can be displayed in public requests list.
device_idoptionalIdentification mobile Ejm: [ccf7eb0d03274780].
email_notificationoptionalIf sent, the author will be set as following the request, the value true or false will set the communication via email active or inactive for that specific request
push_notificationoptionalIf sent, the author will be set as following the request, the value true or false will set the communication via push active or inactive for that specific request
sms_notificationoptionalIf sent, the author will be set as following the request, the value true or false will set the communication via sms active or inactive for that specific request (a phone number must be specified in the request or set in the user profile)
mediasoptionalarray of strings containing already uploaded medias’names (5yw49wfsdfs.png )
geo_server_propertiesoptionalArray of geoServerProperty(administrative_level, name, administrative_level_weight)
Create Request
/requests{?jurisdiction_id,email_notification,push_notification}

Generate a new request. By default, requests are created as anonymous. By adding Authorization header requests are created associated to corresponding user.

  • Parameters
  • jurisdiction_id
    string (required) Example: es.madrid

    Id Jurisdiction id

    email_notification
    boolean (optional) Example: true

    Email notifications active/inactive for the request

    push_notification
    boolean (optional) Example: true

    Push notifications active/inactive for the request

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "app_key" : "1",
        "jurisdiction_id": "es.madrid",
        "service_id": "580483cd9a6057ca048b4587",
        "description": "Esto es una descripción de ejemplo para el API de Open010",
        "long": -3.770370,
        "lat": 40.403040,
        "address_string": "Calle Falsa, 123",
        "device_type":"580483cd9a6057ca048b4587",
        "device_id":"ccf7eb0d03274780",
        "public": "1",
        "first_name":"Radmas",
        "last_name": "Company",
        "email":"radmas@radmas.com",
        "attribute": {
            "1":"QV0"
        },
         "geo_server_properties": [
             {
                 "administrative_level": "Colonia",
                 "name": "Aaaaa",
                 "administrative_level_weight": 7
             }
         ]
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "token": "53ff1056f98f71d9698b456d",
            "service_request_id": "14092247908"
        }
    ]
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "requests": {
            "token": "56d68cd8946b8416008b4567",
            "service_request_id": "1206"
        }
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Jurisdiction id is required."
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "attributes where not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "lat&long was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Coordinates are not within jurisdiction"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Invalid value {value} for attribute {code}"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "This value not empty."
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Token: request was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Description: cannot be longer than 2500 characters"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "First_name: Parameter 'first_name' can't be empty.\nLast_name: Parameter 'last_name' can't be empty.\nEmail: Parameter 'email' can't be empty."
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 403,
            "description": "REQUESTS_ACCESS_MODULE not active"
        }
    ]
    

List of Request Medias 

List of Medias
/request/{request_token}/medias
  • Parameters
  • request_token
    string (required) Example: 53df4fb76803fa443e8b456d

    Request internal ID

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        [
            "id": "5a33a2c94e4ea8df128b46a1",
            "created_at": "2017-12-15T10:24:09+0000",
            "type": "image/jpeg",
            "deleted": false,
            "media_code": "5a33a2c94e4ea8df128b46a1",
            "created_datetime": "2017-12-15T10:24:09+0000",
            "tags": [],
            "media_metadata": [],
            "request": [
                "service_id": "5a33a2c34e4ea8df128b45e7"
            ],
            "media_url": "https://open010.org/static/es.madrid/53ff16dc80db1.png"
        ]
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "code": 400,
            "description": "request_token not exist"
        }
    ]
    

Request Medias 

FieldRequiredDescription
tokenrequiredRequest ID.
mediarequiredFile attachment
typerequiredFile type (image or video)
Create Medias
/requests_medias
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "token": "14092214355",
        "media": File,
        "type": "image"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "media_code": "53ff16ddf98f71eb698b4567",
        "media_url": "https://open010.org/static/es.madrid/53ff16dc80db1.png",
        "created_datetime": "2014-08-28T13:47:40+0200",
        "type": "image"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "media was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "type was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "error field values request media"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
     {
        "code": 400,
        "description": "No more medias are allowed"
      }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not found"
    }
    

Request Files 

FieldRequiredDescription
tokenrequiredRequest ID.
files[ ]requiredArray of file attachments
descriptions[ ]optionalFile descriptions in the same order as the files are uploaded
Create Files
/requests_files
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "token": "14092214355",
        "files[0]": File,
        "files[1]": File,
        "descriptions[0]" : "File one"
    
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
           "id": "5a561f024e4ea8e6018b456a",
           "created_at": "2018-01-10T14:11:13+0000",
           "updated_at": "2018-01-10T14:11:14+0000",
           "type": "1",
           "description": "File one",
           "url": "https://open010.org/local/open010/5a561f015d1cc.pdf"
       },
       {
           "id": "5a561f024e4ea8e6018b456b",
           "created_at": "2018-01-10T14:11:13+0000",
           "updated_at": "2018-01-10T14:11:14+0000",
           "type": "1",
           "description": "11082017072112.xls",
           "url": "https://open010.org/local/open010/5a561f02185ee.xls"
       }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "too many files uploaded"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "request not found"
    }
    

Following Requests 

Search Following Requests
/requests_follows{?app_key}
  • Parameters
  • app_key
    int (required) Example: 1

    App Key

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "deleted": false,
            "jurisdiction_id": "es.madrid",
            "jurisdiction_name": "Madrid",
            "service_code": "1",
            "service_name": "Limpieza y Residuos",
            "token": "53ff033df98f71e7058b4571",
            "service_request_id": "14092214355",
            "description": "This is a test",
            "lat": 40.4432203,
            "long": -3.7042705,
            "requested_datetime": "2014-08-28T12:23:55+0200",
            "updated_datetime": "2014-08-28T12:23:55+0200",
            "address": "Calle Bravo Murillo, 77, 28003 Madrid, Madrid, España",
            "media_url": "https://open010.org/static/es.madrid/53ff033b7735b.png",
            "priority": 0,
            "following_count": 0,
            "following": {
              "isFollowing": true,
              "channels": {
                "email": true,
                "push": false
              }
            },
            "supporting_count": 0,
            "supporting": false,
            "complaining_count": 0,
            "complaining": false,
            "comments_count": 0,
            "public": true,
            "typology": {
              "id": "57538bfe9a60573c048b458f",
              "name": "avisos",
              "visible_name": "Avisos"
            },
            "status_node": {
              "name": "asignado",
              "visible_name": "Asignado",
              "id": "57538bfe9a60573c048b45d2"
            }
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction_id was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "user was not found"
    }
    

Create Following Requests 

Create Following Requests
/requests_follows{?jurisdiction_id,service_request_id,email_notification,push_notification,sms_notification}
  • Parameters
  • service_request_id
    string (required) Example: 14092214355

    Request ID

    jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction code

    email_notification
    boolean (optional) Example: true

    Email notifications active/inactive for the request

    push_notification
    boolean (optional) Example: true

    Push notifications active/inactive for the request

    sms_notification
    boolean (optional) Example: true

    Push sms active/inactive for the request

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "deleted": false,
        "jurisdiction_id": "es.madrid",
        "jurisdiction_name": "Madrid",
        "service_code": "1",
        "service_name": "Limpieza y Residuos",
        "token": "53ff033df98f71e7058b4571",
        "service_request_id": "14092214355",
        "description": "This is a test",
        "lat": 40.4432203,
        "long": -3.7042705,
        "requested_datetime": "2014-08-28T12:23:55+0200",
        "updated_datetime": "2014-08-28T12:23:55+0200",
        "address": "Calle Bravo Murillo, 77, 28003 Madrid, Madrid, España",
        "media_url": "https://open010.org/static/es.madrid/53ff033b7735b.png",
        "seen": true,
        "priority": 0,
        "accepted": false,
        "medias": [
            {
                "media_code": "53ff033df98f71e7058b4570",
                "media_url": "https://open010.org/static/es.madrid/53ff033b7735b.png",
                "created_datetime": "2014-08-28T12:23:55+0200"
            }
        ],
        "following_count": 0,
        "following": {
          "isFollowing": true,
          "channels": {
            "email": true,
            "push": false
          }
        },
        "supporting_count": 0,
        "supporting": false,
        "complaining_count": 0,
        "complaining": false,
        "user": {
            "id": "123810974734782622",
            "nickname": "",
            "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
        },
        "security_user": {
            "id": "123810981217278272",
            "nickname": "",
            "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
        },
        "comments_count": 0,
        "public": true,
        "typology": {
          "id": "57538bfe9a60573c048b458f",
          "name": "avisos",
          "visible_name": "Avisos"
        },
        "status_node": {
          "name": "asignado",
          "visible_name": "Asignado",
          "id": "57538bfe9a60573c048b45d2"
        }
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction_id was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Already supported request"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    

Stop Following a Request 

Stop Following a Request
/request_stop_follow{?jurisdiction_id,service_request_id}
  • Parameters
  • service_request_id
    string (required) Example: 14092214355

    Request ID

    jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction code

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "deleted": false,
        "jurisdiction_id": "es.madrid",
        "jurisdiction_name": "Madrid",
        "service_code": "1",
        "service_name": "Limpieza y Residuos",
        "token": "53ff033df98f71e7058b4571",
        "service_request_id": "14092214355",
        "description": "This is a test",
        "lat": 40.4432203,
        "long": -3.7042705,
        "requested_datetime": "2014-08-28T12:23:55+0200",
        "updated_datetime": "2014-08-28T12:23:55+0200",
        "address": "Calle Bravo Murillo, 77, 28003 Madrid, Madrid, España",
        "media_url": "https://open010.org/static/es.madrid/53ff033b7735b.png",
        "seen": true,
        "priority": 0,
        "accepted": false,
        "medias": [
            {
                "media_code": "53ff033df98f71e7058b4570",
                "media_url": "https://open010.org/static/es.madrid/53ff033b7735b.png",
                "created_datetime": "2014-08-28T12:23:55+0200"
            }
        ],
        "following_count": 0,
        "following": {
          "isFollowing": false
          }
        },
        "supporting_count": 0,
        "supporting": false,
        "complaining_count": 0,
        "complaining": false,
        "user": {
            "id": "123810974734782622",
            "nickname": "",
            "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
        },
        "security_user": {
            "id": "123810981217278272",
            "nickname": "",
            "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
        },
        "comments_count": 0,
        "public": true,
        "typology": {
          "id": "57538bfe9a60573c048b458f",
          "name": "avisos",
          "visible_name": "Avisos"
        },
        "status_node": {
          "name": "asignado",
          "visible_name": "Asignado",
          "id": "57538bfe9a60573c048b45d2"
        }
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction_id was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    

Supporting Requests 

Search Following Requests
/requests_supports{?jurisdiction_id,service_request_id}
  • Parameters
  • service_request_id
    string (required) Example: 14092214355

    Request ID

    jurisdiction_id
    string (required) Example: es.madrid

    Jurisdiction code

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "deleted": false,
        "jurisdiction_id": "es.madrid",
        "jurisdiction_name": "Madrid",
        "service_code": "1",
        "service_name": "Limpieza y Residuos",
        "token": "53ff033df98f71e7058b4571",
        "service_request_id": "14092214355",
        "description": "This is a test",
        "lat": 40.4432203,
        "long": -3.7042705,
        "requested_datetime": "2014-08-28T12:23:55+0200",
        "updated_datetime": "2014-08-28T12:23:55+0200",
        "address": "Calle Bravo Murillo, 77, 28003 Madrid, Madrid, España",
        "media_url": "https://open010.org/static/es.madrid/53ff033b7735b.png",
        "seen": true,
        "priority": 0,
        "accepted": false,
        "medias": [
            {
                "media_code": "53ff033df98f71e7058b4570",
                "media_url": "https://open010.org/static/es.madrid/53ff033b7735b.png",
                "created_datetime": "2014-08-28T12:23:55+0200"
            }
        ],
        "following_count": 0,
        "following": {
          "isFollowing": true,
          "channels": {
            "email": true,
            "push": false
          }
        },
        "supporting_count": 0,
        "supporting": false,
        "complaining_count": 0,
        "complaining": false,
        "user": {
            "id": "123810974734782622",
            "nickname": "",
            "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
        },
        "security_user": {
            "id": "123810981217278272",
            "nickname": "",
            "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
        },
        "comments_count": 0,
        "public": true,
        "typology": {
          "id": "57538bfe9a60573c048b458f",
          "name": "avisos",
          "visible_name": "Avisos"
        },
        "status_node": {
          "name": "asignado",
          "visible_name": "Asignado",
          "id": "57538bfe9a60573c048b45d2"
        }
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction_id was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Already supported request"
    }
    

Request Finished Successfully 

Get the number of request which had finished successfully.

FieldRequiredDescription
jurisdiction_idsrequiredJurisdiction codes, separated by comma.
last_daysrequiredDays to query, default 7.
Get Count
/request/count_last_days{?jurisdiction_id,last_days}
  • Parameters
  • jurisdiction_ids
    string (required) Example: com.mycity,es.madrid

    Jurisdiction codes

    days
    integer (optional) Example: 7

    Days to query, default 7

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "jurisdiction_id": "com.mycity,es.madrid",
        "last_days": 7,
        "count": 200
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
      "error": "invalid_grant",
      "error_description": "The access token provided is invalid."
    }
    

Check for duplicates 

Check for duplicates
/request_duplicate
  • Parameters
  • service_id
    string (required) Example: 53df4fb76803fa443e8b456d

    Service internal ID

    lat
    double (required) Example: 40.3434526
    lng
    double (required) Example: 40.3434526
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
      [
          {
              "jurisdiction": "597ee85a4e4ea819028b4588",
              "service_id": "597ee85c4e4ea819028b45e6",
              "position": {
                  "lng": -3.6966153,
                  "lat": 40.3434526
              },
              "address_string": "Calle de S. Dalmacio, 21, 28021 Madrid, Spain",
              "typology": {
                  "id": "597ee85b4e4ea819028b45aa",
                  "name": "avisos",
                  "visible_name": "Avisos",
                  "icon": "data:image/png;base64,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",
                  "color": "#337ab7",
                  "with_medias": true,
                  "location_type": "geolocation"
              },
              "status_node_targets": [
                  {
                      "name": "en_progreso",
                      "color": "#7da038",
                      "typology_node_id": "597ee85b4e4ea819028b45ac",
                      "visible_name": "En progreso",
                      "id": "597ee85c4e4ea819028b45df",
                      "manual_actions": [
                          "assign",
                          "reassign",
                          "auto_assign",
                          "comment",
                          "change_status",
                          "mark_as_duplicated",
                          "reiterate",
                          "complaint",
                          "generate_work_order",
                          "edit",
                          "pause_resume"
                      ]}
             [...]
      ]
    }
    
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    
    []
    
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    
    Service Not Configured
    
    

Request Comments 

The comments have the following fields

FieldRequiredDescription
tokenrequiredInternal identifier of the request.
descriptionrequiredContent of the comment.
jurisdiction_idrequiredId Jurisdiction id.
created_datetimeoptionalCreation date of the message.
backofficeoptionalManager user that created the comment.
backffice_user.nicknameoptionalNickname of manager user.
backoffice_user.avataroptionalAvatar of manager user.
useroptionalUser that created the comment.
user.nicknameoptionalNickname of user.
user.avataroptionalAvatar of user.
medias_urlsoptionalIt contains a list of URLs of all links of the images linked to comment.
mediasoptionalList of images in String of Base64.
medias_dataoptionalList of images in File.

List of Request Comments 

List all comments associated with request references by token

FieldDescription
comment_codeInternal identifier of the comment.
userUser that created the comment.
backoffice_userGestor that created the comment.
descriptionContent of the comment.
created_datetimeCreation date of the message.
medias_urlsIt contains a list of URLs of all links of the images linked to comment.
  • Define data field Gestor “backoffice_user”

    FieldDescription
    backoffice_user.idIdentifier internal of gestor.
    backoffice_user.nicknameNickname of user.
    backoffice_user.avatarAvatar of user.
  • Define data field User “user”

    FieldDescription
    user.idIdentifier internal of user.
    user.nicknameNickname of user.
    user.avatarAvatar of user.
  • Define collection data field medias_url

    FieldDescription
    idIdentifier internal image media.
    media_urlUrl public image media
Get Comments List
/requests_comments/{token}{?jurisdiction_id}
  • Parameters
  • token
    string (required) Example: 53df4fb76803fa443e8b456d

    Request internal ID

    jurisdiction_id
    string (required) Example: es.madrid

    Id Jurisdiction id

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "comment_code": "53ff181ef98f71eb698b4568",
            "user": {
                "id": "53ff181ef98f71eb698b4869",
                "nickname": "User Public Of the World",
                "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
            },
            "description": "test comment",
            "created_datetime": "2014-08-28T13:53:02+0200",
            "medias_urls": [
                {
                    "id": "53ff181ef98f71eb698b6452",
                    "media_url": "https://aws.com/558813734b819.png"
                },
                {   
                    "id": "53ff181ef98f71eb698b2345",
                    "media_url": "https://aws.com/5534567734b819.png"
                }
            ]
        }
    ]
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "comment_code": "53ff181ef98f71eb698b1111",
            "backoffice_user": {
                "id": "53ff181ef98f71eb698b2222",
                "nickname": "User Private Gestor",
                "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
            },
            "description": "test comment",
            "created_datetime": "2014-08-28T13:53:02+0200",
            "medias_urls": [
                {
                    "id": "53ff181ef98f71eb698b6662",
                    "media_url": "https://aws.com/558813734b819.png"
                },
                {   
                    "id": "53ff181ef98f71eb698b8888",
                    "media_url": "https://aws.com/5534567734b819.png"
                }
            ]
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "request was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "token was not found"
    }
    

Add comment 

Add a new request comment. By adding Authorization header requests are created associated to corresponding user.

FieldRequiredDescription
tokenrequiredInternal identifier of the request.
descriptionrequiredContent of the comment.
mediasoptionalList of images in String of Base64.
medias_dataoptionalList of images in File.
Create new comment
/requests_comments{?jurisdiction_id}
  • Parameters
  • jurisdiction_id
    string (required) Example: es.madrid

    Id Jurisdiction id

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "token":"MAD1000",
        "description": "Description New Comment",
        "medias": [
            "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAcICAgGBwcGBQgGBwwIBwcHCAUFBgkI...",
            "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAcICAgGBwcGBQgGBwwIBwcHCAUFBgkI..."
        ],
        "medias_data": [
            "558813734b819.png",
            "5534567734b819.png"
        ],
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "comment_code": "53ff181ef98f71eb698b4568",
        "user": {
            "id": "53ff181ef98f71eb698b4869",
            "nickname": "User Public Of the World",
            "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
        },
        "description": "test comment",
        "created_datetime": "2014-08-28T13:53:02+0200",
        "medias_urls": [
            { 
                "id": "53ff181ef98f71eb698b2345",
                "media_url": "https://aws.com/5534567734b819.png"
            },
            {   
                "id": "53ff181ef98f71eb698b2345",
                "media_url": "https://aws.com/5534567734b819.png"
            }
        ]
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "request was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    

Request Evaluations 

The evaluations have the following fields

FieldRequiredDescription
idrequiredInternal identifier of the evaluation.
evaluationrequiredEvaluation value. Values can be 1, 2 or 3.
useroptionalAuthor of the evaluation
security_useroptionalManager user that assigned the evaluation.

List of Request Evaluations 

List all evaluations associated to the request referenced by the token.

Get Evaluations List
/requests_evaluations/{token}
  • Parameters
  • token
    string (required) Example: 53df4fb76803fa443e8b456d

    Request internal ID

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "id": "53ff181ef98f71eb698b4568",
            "evaluation": "2",
            "user": {
                "nickname": "PrototypeUser"
            },
            "security_user": {
                "nickname": "PrototypeManager",
                "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
            }
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "USER_EVALUATION_ACCESS_MODULE_OPEN010_API not active"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "token was not found"
    }
    

Add evaluation 

Adds a new request evaluation or updates an existing one. Needs Authorization header to create an evaluation associated to corresponding user. Only the author of the request can evaluate it.

Create new evaluation
/requests_evaluations{?token,evaluation}

To create or update an evaluation the following fields are required.

FieldRequiredDescription
tokenrequiredInternal identifier of the request.
evaluationrequiredEvaluation value. Values can be 1, 2 or 3.
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
      "token": "f181ef98f71eb698b4"
      "evaluation": "1"
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "id": "53ff181ef98f71eb698b4568",
            "evaluation": "2",
            "user": {
                "nickname": "PrototypeUser"
            },
            "security_user": {
                "nickname": "PrototypeManager",
                "avatar": "https://open010.org/static/es.madrid/Y60Tetl60apf79Iw.jpg"
            }
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "evaluation was not provided"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "evaluation must be equal to 1, 2 or 3"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "This status of request it can not be evaluated"
    }
    
  • Response  401
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 401,
        "description": "you can not evaluate a request anonymously"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "USER_EVALUATION_ACCESS_MODULE_OPEN010_API not active"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "only authors can evaluate a request"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "Request has already been evaluated"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "request was not found"
    }
    
  • Response  409
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 409,
        "description": "anonymous requests can not be evaluated"
    }
    
  • Response  409
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 409,
        "description": "this request's Jurisdiction final evaluation module is not active"
    }
    
  • Response  409
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 409,
        "description": "this request's service has the final evaluation module deactivated"
    }
    

Request Reiterations 

Reiterations have the following fields

FieldRequiredDescription
tokenrequiredInternal identifier of the request.
descriptionoptionalContent of the reiteration.
sourceoptionalOriginDevice id provided in jurisdiction.
follow_requestoptional booleanFollow reiterated request
email_notificationoptional booleanIf ‘follow_request’ is set, it will set the communication via email active or inactive for that specific request
push_notificationoptional booleanIf ‘follow_request’ is set, it will set the communication via push active or inactive for that specific request

List of Request Reiterations 

List all reiterations associated with request references by token

Get Reiterations List
/request/{token}/reiterations
  • Parameters
  • token
    string (required) Example: 53df4fb76803fa443e8b456d

    Request internal ID

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
      {
        "id": "57482eb7946b84f6008b4567",
        "request": {
            "token": "574d82943587b843d058b0476",
            "following_count": 4,
            "reiterations_count": 1,
            "complaints_count": 0
          },
        "source": {
          "id": "5804ba659a60575c058b4581",
          "alias": "Otros"
        },
        "email": "hola@ramdas.com",
        "first_name": "Hola",
        "last_name": "Radmas",
        "phone": "3452345",
        "datetime": "2016-05-27T11:25:43+0000",
        "follow_request": true
      },
      {
        "id": "57482f3e946b8404018b4567",
        "request": {
            "token": "574d8292946b843d058b4567",
            "following_count": 0,
            "reiterations_count": 1,
            "complaints_count": 0
          },
        "description": "Continua",
        "source": {
            "id": "5804ba659a60575c058b4581",
            "alias": "Otros"
        },
        "user": {
          "id": "574819c49a6057f9078b4584",
          "nickname": "user"
        },
        "email": "user@radmas.com",
        "first_name": "user",
        "datetime": "2016-05-27T11:27:58+0000",
        "follow_request": true
      },
      {
        "id": "57482f5b946b8408018b4567",
        "request": {
            "token": "574d8292946b843d058b8479",
            "following_count": 1,
            "reiterations_count": 1,
            "complaints_count": 1
          },
        "description": "Sigue habiendo basura por el suelo",
        "source": {
          "id": "5804ba659a60575c058b4581",
          "alias": "Otros"
        },
        "email": "hola@ramdas.com",
        "datetime": "2016-05-27T11:28:27+0000",
        "follow_request": true
      }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "token was not found"
    }
    

Add Reiteration 

Add a new request reiteration. By adding Authorization header requests are created associated to corresponding user.

Create new Reiteration
/request/{token}/reiteration
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "description": "Reiteración",
        "source": "5804ba659a60575c058b4581",
        "follow_request": false,
        "email_notification": false,
        "push_notification": false,
        "sms_notification": false
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
      "id": "57483af2946b8440018b4567",
      "request": {
          "token": "574d8292946b843d058b4567",
          "following_count": 0,
          "reiterations_count": 1,
          "complaints_count": 0
        },
      "description": "Reiteración POSTMAN",
      "source": {
        "id": "5804ba659a60575c058b4581",
        "alias": "Otros"
      },
      "email": "jorge.garcia@radmas.com",
      "first_name": "Jorge",
      "last_name": "García",
      "datetime": "2016-05-27T12:17:54+0000"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "Description: cannot be longer than 2500 characters"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    

Request Complaints 

Complaints have the following fields

FieldRequiredDescription
tokenrequiredInternal identifier of the request.
descriptionoptionalContent of the complaint.
sourceoptionalOriginDevice id provided in jurisdiction.

List of Request Complaints 

List all Complaints associated with request references by token

Get Complaints List
/request/{token}/complaints
  • Parameters
  • token
    string (required) Example: 53df4fb76803fa443e8b456d

    Request internal ID

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
          {
            "id": "57482eb7946b84f6008b4567",
            "request": {
                "token": "574d82943587b843d058b0476",
                "following_count": 4,
                "reiterations_count": 1,
                "complaints_count": 0
              },
            "source": {
              "id": "5804ba659a60575c058b4581",
              "alias": "Otros"
            },
            "email": "hola@ramdas.com",
            "first_name": "Hola",
            "last_name": "Radmas",
            "phone": "3452345",
            "datetime": "2016-05-27T11:25:43+0000",
            "follow_request": true
          },
          {
            "id": "57482f3e946b8404018b4567",
            "request": {
                "token": "574d8292946b843d058b4567",
                "following_count": 0,
                "reiterations_count": 1,
                "complaints_count": 0
              },
            "description": "Continua",
            "source": {
              "id": "5804ba659a60575c058b4581",
              "alias": "Otros"
            },
            "user": {
              "id": "574819c49a6057f9078b4584",
              "nickname": "user"
            },
            "email": "user@radmas.com",
            "first_name": "user",
            "datetime": "2016-05-27T11:27:58+0000",
            "follow_request": true
          },
          {
            "id": "57482f5b946b8408018b4567",
            "request": {
                "token": "574d8292946b843d058b8479",
                "following_count": 1,
                "reiterations_count": 1,
                "complaints_count": 1
              },
            "description": "Sigue habiendo basura por el suelo",
            "source": {
              "id": "5804ba659a60575c058b4581",
              "alias": "Otros"
            },
            "email": "hola@ramdas.com",
            "datetime": "2016-05-27T11:28:27+0000",
            "follow_request": true
          }
        ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 404,
        "description": "token was not found"
    }
    

Add Complaint 

Add a new request complaint. By adding Authorization header requests are created associated to corresponding user.

Create new Complaint
/request/{token}/complaint
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
    Body
    {
        "description": "Denuncia",
        "source": "5804ba659a60575c058b4581",
        "email_notification": false,
        "push_notification": false,
        "sms_notification": false
    }
    
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
      "id": "57483af2946b8440018b4567",
      "request": {
          "token": "574d8292946b843d058b8479",
          "following_count": 1,
          "reiterations_count": 1,
          "complaints_count": 1
        },
      "description": "Denuncia POSTMAN",
      "source": {
        "id": "5804ba659a60575c058b4581",
        "alias": "Otros"
      },
      "email": "jorge.garcia@radmas.com",
      "first_name": "Jorge",
      "last_name": "García",
      "datetime": "2016-05-27T12:17:54+0000"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "token was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "REQUESTS_ACCESS_MODULE_OPEN010_API not active"
    }
    

Categories 

Defines all passible alert categories API calls. Categories are configured by jurisdiction and this calls are only available in case of jurisdiction activated it.

Field description

FieldTypeDescription
idintCategory identifier.
namestringCategory name.
iconstringCategory icon, base64 encoded.
colorstringHexadecimal category color.
bannerstringURL category image.
parentobjectParent category object with fields [id, name, color]. Only avalable in plain list format.
childrenarrayCategory children categories. Only available in hierarchy list format.

Categories list 

List Alerts
/categories{?jurisdiction_id,format}
  • Parameters
  • jurisdiction_id
    string (required) Example: es.mtc

    Jurisdiction to find by. Required if there is more than one jurisdiction.

    format
    string (optional) Example: plain

    One of [plain, hierarchy]. plain by default.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "id": 714,
            "name": "General"
        },
        {
            "id": 723,
            "name": "children",
            "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA",
            "color": "#db8f8f",
            "banner": "https://static.open010.org/541bf42aa5abf.jpg",
            "parent": {
                "id": 714,
                "name": "General"
            },
            sponsoring_info: {
                display: true,
                description: "Esta información es importante.",
                url: "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/sponsoring/55c1e97b62027.png"
            }
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": 'format must be "plain" or "hierarchy".'
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "ALERTS_PREMIUM not active"
    }
    

Category 

Category
/categories/{id}{?jurisdiction_id}
  • Parameters
  • id
    string (required) Example: 714

    Category id.

    jurisdiction_id
    string (required) Example: es.mtc

    Jurisdiction to find by. Required if there is more than one jurisdiction.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "id": 714,
        "name": "General",
        "children": [
            {
                "id": 723,
                "name": "children",
                "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAC0",
                "color": "#db8f8f",
                "banner": "https://static.open010.org/541bf42aa5abf.jpg",
                "children": []
            }
        ]
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "category not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "ALERTS_PREMIUM not active"
    }
    

Alerts 

Alerts are jurisdiction relevant short communications. Such as events, important traffic or street info.

Field description

FieldTypeDescription
idstringAlert identifier.
titlestringTitle.
descriptionstringAlert text content.
more_infostringRelated link with more information.
linksarrayArray of related links.
datedateDate when the alert will start
headingbooleanImportant alert.
notificationbooleanMarks when the alert will be notified to applications.
imagestringAlert related image.
categoryarrayCategory the alert belongs to.
published_atdateDate when alert became public.
published_todateDate when alert will be unpublished.
latfloatThe alert geoposition latitude.
longfloatThe alert geoposition longitude.

Alerts list 

List Alerts
/alerts{?jurisdiction_id,category_id}
  • Parameters
  • jurisdiction_id
    string (required) Example: es.mtc

    Jurisdiction to find by. Required if there is more than one jurisdiction.

    category_id
    string (optional) Example: 714

    Categories filter. It can be either a value or an array.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
                "title": "ImproveYourCity beats in Madrid",
                "description": "ImproveYourCity is the new city issue reporting app in Madrid",
                "more_info": "http://www.madrid.es",
                "links": [
                    {
                        "link": "https://www.youtube.com/channel/UCESmx8_PfHLKErQCPEIgvgQ",
                        "description": "Videos Youtube"
                    }
                ],
                "date": "2014-09-17T13:47:57+0200",
                "heading": true,
                "notification": false,
                "image": "https://static.open010.org/iyc.jpg",
                "category": {
                    "id": 714,
                    "name": "General",
                    "color": ""
                },
                "id": "1005",
                "published_at": "2014-09-15T13:47:57+0200",
                "published_to": "2014-09-20T13:47:57+0200",
                "lat": 40.416726,
                "lng": -3.703701
            }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction_id was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "ALERTS_ACCESS_MODULE_OPEN010_API not active"
    }
    

Alert 

Alert
/alerts/{id}{?jurisdiction_id}
  • Parameters
  • id
    string (required) Example: 714

    Alert id.

    jurisdiction_id
    string (required) Example: es.mtc

    Jurisdiction to find by. Required if there is more than one jurisdiction.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
        "title": "ImproveYourCity beats in Madrid",
        "description": "ImproveYourCity is the new city issue reporting app in Madrid",
        "more_info": "http://www.madrid.es",
        "links": [
            {
                "link": "https://www.youtube.com/channel/UCESmx8_PfHLKErQCPEIgvgQ",
                "description": "Videos Youtube"
            }
        ],
        "date": "2014-09-17T13:47:57+0200",
        "heading": true,
        "notification": false,
        "image": "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/jorgegofi/alert/demo/iyc.jpg",
        "category": {
            "id": 714,
            "name": "General",
            "color": ""
        },
        "id": "1005",
        "published_at": "2014-09-15T13:47:57+0200",
        "published_to": "2014-09-20T13:47:57+0200",
        "lat": 40.416726,
        "lng": -3.703701
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction_id was not found"
    }
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "alert not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "ALERTS_ACCESS_MODULE_OPEN010_API not active"
    }
    

News 

Group management news jurisdictions

Attributes description

FieldTypeDescription
idstringNews identification Id
namestringName to news
colorstringColor Code HTML to news
iconstringIcon assigned to news
sourcesarraysList sources into news
idstringId to Source identification
namestringName to source
urlstringUrl access news

News list 

List News
/news{?jurisdiction_id}
  • Parameters
  • jurisdiction_id
    string (required) Example: es.mtc

    Jurisdiction to find by. Required if there is more than one jurisdiction.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
            "id":"554cabac3ca0847e0c8b4567",
            "name":"Tabl\u00f3n de anuncios",
            "color":"#599e6d",
            "icon":"",
            "sources":
            [
                {
                    "id":"554cabac3ca0847e0c8b4568",
                    "name":"Ayuntamiento",
                    "url":"http:\/\/www.valencia.es\/ayuntamiento\/tablon_anuncios.nsf\/tablon.xml"
                }
            ]
        },
        {
            "id":"554cabc43ca084830c8b4567",
            "name":"Agenda Cultural",
            "color":"#d67474",
            "icon":"",
            "sources":
            [
                {
                    "id":"554cabc43ca084830c8b4568",
                    "name":"20minutos",
                    "url":"http:\/\/www.20minutos.es\/rss\/artes\/"
                }
            ]
        },
        {
            "id":"554cabe83ca084830c8b456b",
            "name":"Sucesos",
            "color":"#d1e00b",
            "icon":"",
            "sources":
            [
                {
                    "id":"554cabe83ca084830c8b456c",
                    "name":"20minutos",
                    "url":"http:\/\/www.20minutos.es\/rss\/"
                }
            ]
        },
        {
            "id":"554cac1b3ca084990c8b4567",
            "name":"Cultura",
            "color":"#4527a0",
            "icon":"",
            "sources":
            [
                {
                    "id":"554cac1b3ca084990c8b4568",
                    "name":"20minutos",
                    "url":"http:\/\/www.20minutos.es\/rss\/madrid\/"
                }
            ]
        },
        {
            "id":"554cac333ca084830c8b456f",
            "name":"Deportes",
            "color":"#ff8f00",
            "icon":"",
            "sources":
            [
                {
                    "id":"554cac333ca084830c8b4570",
                    "name":"20minutos",
                    "url":"http:\/\/www.20minutos.es\/rss\/deportes\/"
                }
            ]
        }
    ]
    
  • Response  400
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 400,
        "description": "jurisdiction_id was not found"
    }
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "NEWS_ACCESS_MODULE_OPEN010_API not active"
    }
    

Releases 

Releases are jurisdiction relevant short communications. Such as events, important traffic or street info.

Field description

FieldTypeDescription
idstringRelease identifier.
jurisdictionsarrayArray of jurisdiction_id (Required)
applicationTypesarrayArray of AppConfiguration ids (Required)
namestringRelease title (Required)
descriptionstringRelease description (Required)
tagsarrayArray of Tag ids (Required)
imagesarrayCollection of attached images
start_datedateDate and time when the release is published (Required)
end_datedateDate and time when the release is unpublished (Required)
event_start_datedateDate and time when the event starts
event_end_datedateDate and time when the event ends
positionarrayArray containing ‘lat’ and ‘long’ geoposition coordinates where the event takes place.
address_stringstringEvent address
linksarrayCollection of related links
filescollectionCollection of attached files
statusconstRelease Status ("pending", “published” , “unpublished”) This field is automatically set

Releases list 

List Releases
/releases?{app_type}{&jurisdiction_id}{&page}{&limit}
  • Parameters
  • app_type
    string (required) 
    jurisdiction_id
    string (required) 
    page
    int (optional) 
    limit
    int (optional) 
  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    [
        {
          "id": "59281bcb4e4ea8da0f8b456f",
          "jurisdictions": [
            {
              "name": "Carbonero el mayor"
            }
          ],
          "application_types": [
            {
              "id": "592813c74e4ea8b1158b4fab",
              "name": "Actua Madrid"
            }
          ],
          "name": "test_Release2",
          "description": "testing release API",
          "tags": [
            {
              "name": "Deportes"
            }
          ],
          "images": [
            "https://imageserver/logo.png"
          ],
          "channels": [
              {
                  "id": "5a79d73c4e4ea8b7038b45cf",
                  "name": "Jardineros"
              },
              {
                  "id": "5a79d73c4e4ea8b7038b45d0",
                  "name": "Bomberos"
              }
          ]
          "start_date": "2017-05-11T10:58:16.000+02:00",
          "end_date": "2017-05-13T10:58:16.000+02:00",
          "event_start_date": "2017-05-13T10:58:16.000+02:00",
          "event_end_date": "2017-05-14T10:58:16.000+02:00",
          "position": {
            "long": -103.3325444,
            "lat": 20.6805989
          },
          "address_string": "test address",
          "links": [
            {
              "name": "TestLink",
              "link": "http://testlink.com"
            }
          ],
          "files": []
        }
    ]
    
  • Response  403
  • Headers
    Content-Type: application/json
    Body
    {
        "code": 403,
        "description": "Permission ALERTS_ACCESS_MODULE not granted"
    }
    
  • Response  401
  • Headers
    Content-Type: application/json
    Body
    {
      "error": "access_denied",
      "error_description": "OAuth2 authentication required"
    }
    

Release 

Get Release
/release/{id}
  • Parameters
  • id
    string (required) Example: 5936543a4e4ea87f018b4568

    Release id.

  • Request
  • Headers
    Accept: application/json
    Content-Type: application/json
    Authorization: Bearer NTM0MTcxMjVjODViNTY5YTcxZWViZjNjZj
  • Response  200
  • Headers
    Content-Type: application/json
    Body
    {
              "id": "59281bcb4e4ea8da0f8b456f",
              "jurisdictions": [
                {
                  "name": "Carbonero el mayor"
                }
              ],
              "application_types": [
                {
                  "id": "592813c74e4ea8b1158b4fab",
                  "name": "Actua Madrid"
                }
              ],
              "name": "test_Release2",
              "description": "testing release API",
              "tags": [
                {
                  "name": "Deportes"
                }
              ],
              "images": [
                "https://s3-eu-west-1.amazonaws.com/static.lab.open010.org/local/jurisdiction/demojurisdictions/es.madrid/logo.png"
              ],
              "start_date": "2017-05-11T10:58:16.000+02:00",
              "end_date": "2017-05-13T10:58:16.000+02:00",
              "event_start_date": "2017-05-13T10:58:16.000+02:00",
              "event_end_date": "2017-05-14T10:58:16.000+02:00",
              "position": {
                "long": -103.3325444,
                "lat": 20.6805989
              },
              "address_string": "test address",
              "links": [
                {
                  "name": "TestLink",
                  "link": "http://testlink.com"
                }
              ],
              "files": []
            },
            "channels": [
                {
                    "id": "5a79d73c4e4ea8b7038b45cf",
                    "name": "Jardineros"
                },
                {
                    "id": "5a79d73c4e4ea8b7038b45d0",
                    "name": "Bomberos"
                }
            ]
    
  • Response  404
  • Headers
    Content-Type: application/json
    Body
    {
        "error_code": 1028,
        "error_description": "Release not found"
    }
    

Generated by aglio on 26 May 2020