Add Places
post
                    /mobile/system/locationManagement/places
Creates one or more location places.
Permissions
Only team members with the Administrator role can access the Location Management API.
Request
Supported Media Types
                - application/json
Root Schema : Place Items Array
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Place Items Array- 
            items: 
            array  items
            
            Minimum Number of Items:1Array of the places to be created.
Nested Schema : items
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    1Array of the places to be created.
    
    
    
    
    
        Show Source
        - 
            [0]: 
                object  Create Place
            
            Title:Create PlaceThe place to be created.
Nested Schema : Create Place
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Create PlaceThe place to be created.
    
    
    
    
        Show Source
        - 
            address: 
            object  Place's Address
            
            Title:Place's AddressGPS address of the place.
- 
            attributes: 
            object  Attributes
            
            Title:AttributesAdditional Properties Allowed: additionalPropertiesThe attributes entered in the UI, as key/value pairs.
- 
            description: 
            string
            Place's description.
- 
            devices: 
            array  devices
            
            Minimum Number of Items:0IDs of devices that are associated with this place. Typically one device, but there can be multiple devices.
- 
            label: 
            string
            Place's label.
- 
            name: 
            string
            User-defined name for the place. Must be unique.
- 
            parentPlace: 
            number
            Place ID of the place's parent.
Nested Schema : Place's Address
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Place's AddressGPS address of the place.
    
    
    
    
    
    
    
    
    Match One
    Show Source
    
    
    
    
    
Nested Schema : Attributes
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
       AttributesAdditional Properties Allowed
       Show Source
       
       
    
    
    
    
    
    
    The attributes entered in the UI, as key/value pairs.
    
    
    
    
        Show Source
        Nested Schema : devices
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    0IDs of devices that are associated with this place. Typically one device, but there can be multiple devices.
    
    
    
    
    
        Show Source
        
        
    
    
    
    
    
    
Nested Schema : gpsPoint
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectGPS point.
    
    
    
    
        Show Source
        - 
            latitude: 
            number
            GPS point's latitude
- 
            longitude: 
            number
            GPS point's longitude.
Nested Schema : gpsCircle
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectGPS circle.
    
    
    
    
        Show Source
        - 
            latitude: 
            number
            Latitude of the center of the GPS circle.
- 
            longitude: 
            number
            Longitude of the center of the GPS circle.
- 
            radius: 
            number
            GPS circle's radius in meters.
Nested Schema : gpsPolygon
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectGPS polygon.
    
    
    
    
        Show Source
        - 
            vertices: 
            array  vertices
            
            Minimum Number of Items:1GPS polygon's vertices.
Nested Schema : vertices
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    1GPS polygon's vertices.
    
    
    
    
    
        Show Source
        - 
            [0]: 
                object  latitudeLongitudePair
            
            Pair of latitude and longitude values for a place.
Nested Schema : latitudeLongitudePair
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectPair of latitude and longitude values for a place.
    
    
    
    
        Show Source
        - 
            latitude: 
            number
            Place's latitude.
- 
            longitude: 
            number
            Place's longitude.
Example Request (application/json)
                {
    "items":[
        {
            "address":{
                "gpsPoint":{
                    "latitude":37,
                    "longitude":122
                }
            },
            "devices":[
                12345
            ],
            "parentPlace":42,
            "name":"FixItFast Redwood City Warehouse",
            "description":"FixItFast Warehouse in Redwood City",
            "attributes":{
                "hours":"9am-6pm"
            },
            "label":"FixItFast Warehouse"
        }
    ]
}Response
Supported Media Types
                - application/json
200 Response
The location places were created successfully.
                
                
                    Root Schema : Place Items Array
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Place Items Array- 
            items: 
            array  items
            
            Minimum Number of Items:1Array of the created places.
Nested Schema : items
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    1Array of the created places.
    
    
    
    
    
        Show Source
        - 
            [0]: 
                object  Place
            
            Title:PlaceThe created or updated place.
Nested Schema : Place
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    PlaceThe created or updated place.
    
    
    
    
        Show Source
        - 
            address: 
            object  Place's Address
            
            Title:Place's AddressGPS address of the place.
- 
            attributes: 
            object  Attributes
            
            Title:AttributesAdditional Properties Allowed: additionalPropertiesThe attributes entered in the UI, as key/value pairs.
- 
            children: 
            array  children
            
            Minimum Number of Items:0Places that are the child places of this place. This includes the full hierarchy of places that descend from this place.
- 
            createdBy: 
            string
            User who added the place.
- 
            createdOn: 
            string
            When the place was added.
- 
            description: 
            string
            Place's description.
- 
            devices: 
            array  devices
            
            Minimum Number of Items:0Devices associated with this place. Typically one device, but there can be multiple devices.
- 
            hasChildren: 
            boolean
            Set to `true` if this place is a parent of other places.
- 
            id: 
            number
            Place's ID.
- 
            label: 
            string
            Place's label.
- 
            links: 
            array  Relationship links
            
            Title:Relationship linksMinimum Number of Items:1Unique Items Required:true
- 
            modifiedBy: 
            string
            User who last modified the place.
- 
            modifiedOn: 
            string
            When the place was last modified.
- 
            name: 
            string
            User-defined name for the place.
- 
            parentPlace: 
            number
            Place ID of the place's parent.
Nested Schema : Place's Address
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Place's AddressGPS address of the place.
    
    
    
    
    
    
    
    
    Match One
    Show Source
    
    
    
    
    
Nested Schema : Attributes
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
       AttributesAdditional Properties Allowed
       Show Source
       
       
    
    
    
    
    
    
    The attributes entered in the UI, as key/value pairs.
    
    
    
    
        Show Source
        Nested Schema : children
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    0Places that are the child places of this place. This includes the full hierarchy of places that descend from this place.
    
    
    
    
    
        Show Source
        - 
            [0]: 
                object  Place
            
            Title:PlaceThe created or updated place.
Nested Schema : devices
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    0Devices associated with this place. Typically one device, but there can be multiple devices.
    
    
    
    
    
        Show Source
        - 
            [0]: 
                object  Associated Location Device
            
            Title:Associated Location DeviceThe properties for an associated location device. Note that this object doesn't contain the `asset` and `place` properties.
Nested Schema : Relationship links
    
      
      Type: 
    
    
    
    arrayTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Relationship linksMinimum Number of Items: 
    
    
    
    1Unique Items Required: 
    
    
    
    
    
    
        Show Source
        true- 
            [0]: 
                object  Link
            
            Title:Link
Nested Schema : gpsPoint
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectGPS point.
    
    
    
    
        Show Source
        - 
            latitude: 
            number
            GPS point's latitude
- 
            longitude: 
            number
            GPS point's longitude.
Nested Schema : gpsCircle
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectGPS circle.
    
    
    
    
        Show Source
        - 
            latitude: 
            number
            Latitude of the center of the GPS circle.
- 
            longitude: 
            number
            Longitude of the center of the GPS circle.
- 
            radius: 
            number
            GPS circle's radius in meters.
Nested Schema : gpsPolygon
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectGPS polygon.
    
    
    
    
        Show Source
        - 
            vertices: 
            array  vertices
            
            Minimum Number of Items:1GPS polygon's vertices.
Nested Schema : vertices
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    1GPS polygon's vertices.
    
    
    
    
    
        Show Source
        - 
            [0]: 
                object  latitudeLongitudePair
            
            Pair of latitude and longitude values for a place.
Nested Schema : latitudeLongitudePair
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectPair of latitude and longitude values for a place.
    
    
    
    
        Show Source
        - 
            latitude: 
            number
            Place's latitude.
- 
            longitude: 
            number
            Place's longitude.
Nested Schema : Associated Location Device
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Associated Location DeviceThe properties for an associated location device. Note that this object doesn't contain the `asset` and `place` properties.
    
    
    
    
        Show Source
        - 
            attributes: 
            object  Attributes
            
            Title:AttributesAdditional Properties Allowed: additionalPropertiesThe attributes entered in the UI, as key/value pairs.
- 
            beacon: 
            object  Beacon
            
            Title:BeaconDevice's identifying information.
- 
            createdBy: 
            string
            User who added the device.
- 
            createdOn: 
            string
            When the device was added.
- 
            description: 
            string
            Device's description.
- 
            id: 
            number
            Device's ID.
- 
            links: 
            array  Relationship links
            
            Title:Relationship linksMinimum Number of Items:1Unique Items Required:true
- 
            modifiedBy: 
            string
            User who last modified the device.
- 
            modifiedOn: 
            string
            When the device was last modified.
- 
            name: 
            string
            User-defined name for the device.
Nested Schema : Beacon
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    BeaconDevice's identifying information.
    
    
    
    
    
    
    
    
    Match One
    Show Source
    
    
    
    
    
Nested Schema : iBeacon
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectiBeacon device.
    
    
    
    
        Show Source
        - 
            major: 
            string
            Device's major version number.
- 
            minor: 
            string
            Device's minor version number.
- 
            uuid: 
            string
            Device's UUID.
Nested Schema : altBeacon
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectAltBeacon device.
    
    
    
    
        Show Source
        - 
            id1: 
            string
            Device's first ID.
- 
            id2: 
            string
            Device's second ID.
- 
            id3: 
            string
            Device's third ID.
Nested Schema : eddystone
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectEddystone device.
    
    
    
    
        Show Source
        - 
            eddystoneUid: 
            object  eddystoneUid
            
            Device's UID.
- 
            eddystoneUrl: 
            object  eddystoneUrl
            
            Device's URL.
Nested Schema : eddystoneUid
    
      Type: 
      
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    objectDevice's UID.
    
    
    
    
        Show Source
        - 
            instance: 
            string
            Individual device's ID.
- 
            namespace: 
            string
            Namespace that the device is a member of.
Nested Schema : Link
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Link- 
            href: 
            string
            A relative URL.
- 
            rel: 
            
            Allowed Values:[ "self", "canonical", "prev", "next" ]The type of link.
Example Response (application/json)
                    {
    "items":[
        {
            "address":{
                "gpsPoint":{
                    "latitude":37,
                    "longitude":122
                }
            },
            "devices":[
                {
                    "modifiedOn":"2015-08-08T07:22:44.654Z",
                    "beacon":{
                        "iBeacon":{
                            "major":"1.0",
                            "minor":"1.1",
                            "uuid":"B9407F30-F5F8-466E-AFF9-25556B57FE6D"
                        }
                    },
                    "createdBy":"jdoe",
                    "name":"RC_WH_01_F01_B001",
                    "description":"Beacon on 1st Floor in FixitFast Warehouse in Redwood City",
                    "modifiedBy":"tsmith",
                    "links":[
                        {
                            "rel":"canonical",
                            "href":"/mobile/platform/location/devices/12345"
                        },
                        {
                            "rel":"self",
                            "href":"/mobile/platform/location/devices/12345"
                        }
                    ],
                    "attributes":{
                        "visibility":"Public",
                        "manufacturerId":"10D39AE7-020E-4467-9CB2-DD36366F899D",
                        "manufacturer":"Abc Company",
                        "status":"Active"
                    },
                    "id":12345,
                    "createdOn":"2015-08-06T18:37:59.424Z"
                }
            ],
            "hasChildren":false,
            "description":"FixItFast Warehouse in Redwood City",
            "label":"FixItFast Warehouse",
            "createdOn":"2015-08-06T18:37:59.424Z",
            "modifiedOn":"2015-08-06T18:37:59.424Z",
            "createdBy":"jdoe",
            "parentPlace":42,
            "name":"FixItFast Redwood City Warehouse",
            "modifiedBy":"jdoe",
            "links":[
                {
                    "rel":"canonical",
                    "href":"/mobile/platform/location/places/112"
                },
                {
                    "rel":"self",
                    "href":"/mobile/platform/location/places/112"
                }
            ],
            "attributes":{
                "hours":"9am-6pm"
            },
            "id":112
        }
    ]
}400 Response
Bad request.
Root Schema : Error
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    ErrorThe error JSON object returned by the service.
    
    
    
    
        Show Source
        - 
            detail: 
            string
            Message that provides the error details.
- 
            o:ecid: 
            string
            Execution context ID, which is a unique identifier to correlate events or requests that are associated with the same transaction across several components.
- 
            o:errorCode: 
            string
            The service's error code.
- 
            o:errorDetails: 
            array  o:errorDetails
            
            Minimum Number of Items:0List of the issues that cause the error. Included when the error is caused by multiple issues.
- 
            o:errorPath: 
            string
            The relative point in the API path where the error occurred.
- 
            status: 
            integer
            HTTP status code. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for more details.
- 
            title: 
            string
            Summary of the problem.
- 
            type: 
            string
            The URI to the link that provides details about the HTTP status code.
Nested Schema : o:errorDetails
    
      
      Type: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    arrayMinimum Number of Items: 
    
    
    
    
    0List of the issues that cause the error. Included when the error is caused by multiple issues.
    
    
    
    
    
        Show Source
        - 
            [0]: 
                object  Error Detail
            
            Title:Error Detail
Nested Schema : Error Detail
    
      Type: 
      
    
    
    
    objectTitle: 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
        Show Source
        Error Detail- 
            instance: 
            string
            The URI to the link that provides more detailed information about the error.
- 
            o:errorCode: 
            string
            The service's error code.
- 
            o:errorPath: 
            string
            The relative point in the API path where the error occurred.
- 
            title: 
            string
            Summary of the problem.
- 
            type: 
            string
            The URI to the link that provides details about the HTTP status code.
Examples
The following example shows how to create places by submitting a POST request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -i -X POST -u administrator@example.com:password -d @places.json -H "Content-Type: application/json; charset=utf-8" -H "Oracle-Mobile-Backend-ID: ABCD9278-091f-41aa-9cb2-184bd0586fce" http://fif.cloud.oracle.com/mobile/system/locationManagement/places
Examples of Request Body
The following shows an example of the request body.
{
  "items": [
        {
            "name": "l1b1",
            "label": "lot 1 block 1",
            "description": "Lot 1 block 1 New City",
            "address" : {
                "gpsCircle" : {
                    "latitude": 37.9856,
                    "longitude": -120.8745,
                    "radius": 30000
                }
            },
            "properties" : {
                "acres": ".25"
            }
            
        },
        {
            "name": "l2b1",
            "label": "lot2 block 1",
            "description": "Lot 2 block 1 New City",
            "address" : {
                "gpsPolygon" : {
                    "vertices": [
                        {
                            "latitude": 37.8453,
                            "longitude": -121.7845
                        },
                        {
                            "latitude": 37.1248,
                            "longitude": -120.9853
                        },
                        {
                            "latitude": 37.6983,
                            "longitude": -121.7758
                        }
                     ]
                }
            },
            "properties" : {
                "acres": ".25"
            }
            
        }
    ]
}Example of Response Header
The following shows an example of the response header:
200 OK Content-Length: 1045 Content-Type: application/json Date: Tue, 19 Sep 2017 21:48:18 GMT
Example of Response Body
The following example shows the contents of the response body in JSON format:
{
    "items": [
        {
            "id": 30,
            "createdOn": "2017-09-19T23:14:50.300Z",
            "createdBy": "administrator",
            "modifiedOn": "2017-09-19T23:14:50.300Z",
            "modifiedBy": "administrator",
            "name": "l1b1",
            "label": "lot 1 block 1",
            "description": "Lot 1 block 1 New City",
            "hasChildren": false,
            "address": {
                "gpsCircle": {
                    "longitude": -120.8745,
                    "latitude": 37.9856,
                    "radius": 30000
                }
            },
            "attributes": {
                "acres": ".25"
            },
            "links": [
                {
                    "rel": "canonical",
                    "href": "/mobile/platform/location/places/30"
                },
                {
                    "rel": "self",
                    "href": "/mobile/platform/location/places/30"
                }
            ]
        },
        {
            "id": 31,
            "createdOn": "2017-09-19T23:14:50.316Z",
            "createdBy": "uimcs",
            "modifiedOn": "2017-09-19T23:14:50.316Z",
            "modifiedBy": "uimcs",
            "name": "l2b1",
            "label": "lot2 block 1",
            "description": "Lot 2 block 1 New City",
            "hasChildren": false,
            "address": {
                "gpsPolygon": {
                    "vertices": [
                        {
                            "longitude": -121.7845,
                            "latitude": 37.8453
                        },
                        {
                            "longitude": -120.9853,
                            "latitude": 37.1248
                        },
                        {
                            "longitude": -121.7758,
                            "latitude": 37.6983
                        }
                    ]
                }
            },
            "attributes": {
                "acres": ".25"
            },
            "links": [
                {
                    "rel": "canonical",
                    "href": "/mobile/platform/location/places/31"
                },
                {
                    "rel": "self",
                    "href": "/mobile/platform/location/places/31"
                }
            ]
        }
    ]
}