{"__v":8,"_id":"54dd08d7db3b362100131270","category":{"__v":7,"_id":"54fdad6e660db63700c23b82","pages":["55fbef82af72eb0d0007df93","55fbf623e013770d008fcba8","5617bd3a26e3db230054fba4","5617c4a6f8c9632100ac74f5","561ed6fd0a04340d00d8a0b0","562156adf4e0352100cbf268","562a5c846049f20d0032520b"],"project":"54d0fd1d095c470d00d1646d","version":"54d0fd1e095c470d00d16470","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-03-09T14:25:50.133Z","from_sync":false,"order":2,"slug":"api-reference","title":"API Reference"},"project":"54d0fd1d095c470d00d1646d","user":"54db525474dfff3700f161e9","version":{"__v":20,"_id":"54d0fd1e095c470d00d16470","project":"54d0fd1d095c470d00d1646d","createdAt":"2015-02-03T16:53:50.090Z","releaseDate":"2015-02-03T16:53:50.090Z","categories":["54d0fd1e095c470d00d16471","54d8b5e68934140d00496544","54db6361c6a4d40d0034b8f7","54db638208ea010d00ab1fdd","54db639008ea010d00ab1fde","54db6547c6a4d40d0034b8fd","54db83482092743700ea6ee1","54db84afc6a4d40d0034b93c","54db8805c6a4d40d0034b93f","54db8de9c6a4d40d0034b961","54db931ac6a4d40d0034b96d","54e49219e4365521006fd9ee","54e74fcc652d7c1900cbe737","54e74ffd3c1e111700d05762","54e77e0a523b1b2f00e6f313","54e784affdabe62500fcddcf","54e784fa523b1b2f00e6f319","54e785de8ae8911900cd42c5","54fdad6e660db63700c23b82","54fdff31f7b1202100a25e06"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-02-12T20:11:03.933Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":true,"order":13,"body":"Documents in **goGeo** platform are similar to tuples or rows in relational databases, but without the need to follow a so rigid schema. This means that, to certain extent, some modifications can be made to a [collection](./collections.html)'s schema after that first document was inserted. A new column can be added if needed, for example. Also, a schema does not need to be in the exact order for each document that is inserted, as long as, the schema provided in each insertion is compatible with the collection's schema (if it exists).\n\nThe API's description for handling the documents can be found in [api-docs](https://api-docs.gogeo.io/api#!/documents). All collection management operations must pass as parameter an API key called [**API-KEY**](basic-auth) in the examples below. The documents may also be controlled by the [Console](http://console.gogeo.io) tool.\n\nUsing the Documents API, documents can be inserted individually using the *goGeo JSON* format, as described [here](#insert-json), or in batch, using the [Imports API](<https://api-docs.gogeo.io/api#!/imports>), as described in the [Data Import](./data-import.html) section.\n\nEvery document inserted in **goGeo** platform must be associated with a geometry. This geometry may be a point, a line or a polygon. To inform \nthe geometry associated with the document one should fill the **geom** attribute in the case of JSON insertions. This allows a variety of options for setting the geometry field: a coordinate pair through two different fields; a single comma field containing a comma separeted string with two values for latitude and longitude, respectively; a single field containing a [WKT](<http://en.wikipedia.org/wiki/Well-known_text>) string.\n\nThe following geometry types are supported when using WKT:\n\n- **point**: representation in wkt format of a point \n- **polygon**: representation in wkt format of a polygon\n- **linestring**: representation in wkt format of a line\n- **multipoint**: collection of one or more *point* geometries\n- **multipolygon**: collection of one or more *polygon* geometries\n- **multilinestring**: collection of one or more *linestring* geometries\n\nWhen using a coordinate pair, only **points** are supported.\nIf the **geom** attribute is not informed when inserting a JSON document, an error is returned.\n\n---\n[block:html]\n{\n  \"html\": \"<div class='div-middle'> \\n  <a href='#'>\\n    Top page &spades; </div>\\n  </a>\\n</div>\\n\\n\\n<div class='div-forward'> \\n  <a href='/v1.0/docs/insert-a-json-document'>\\n    Next &raquo; </div>\\n  </a>\\n</div>\\n\\n<style>\\n  .div-middle {\\n  \\ttext-align: center;\\n\\t\\tmargin-top: -15px;\\n  }\\n  \\n  .div-forward {\\n  \\tfloat: right;\\n    padding-right: 15px;\\n\\t\\tmargin-top: -20px;\\n  }\\n</style>\"\n}\n[/block]","excerpt":"","slug":"document-management","type":"basic","title":"Document"}
Documents in **goGeo** platform are similar to tuples or rows in relational databases, but without the need to follow a so rigid schema. This means that, to certain extent, some modifications can be made to a [collection](./collections.html)'s schema after that first document was inserted. A new column can be added if needed, for example. Also, a schema does not need to be in the exact order for each document that is inserted, as long as, the schema provided in each insertion is compatible with the collection's schema (if it exists). The API's description for handling the documents can be found in [api-docs](https://api-docs.gogeo.io/api#!/documents). All collection management operations must pass as parameter an API key called [**API-KEY**](basic-auth) in the examples below. The documents may also be controlled by the [Console](http://console.gogeo.io) tool. Using the Documents API, documents can be inserted individually using the *goGeo JSON* format, as described [here](#insert-json), or in batch, using the [Imports API](<https://api-docs.gogeo.io/api#!/imports>), as described in the [Data Import](./data-import.html) section. Every document inserted in **goGeo** platform must be associated with a geometry. This geometry may be a point, a line or a polygon. To inform the geometry associated with the document one should fill the **geom** attribute in the case of JSON insertions. This allows a variety of options for setting the geometry field: a coordinate pair through two different fields; a single comma field containing a comma separeted string with two values for latitude and longitude, respectively; a single field containing a [WKT](<http://en.wikipedia.org/wiki/Well-known_text>) string. The following geometry types are supported when using WKT: - **point**: representation in wkt format of a point - **polygon**: representation in wkt format of a polygon - **linestring**: representation in wkt format of a line - **multipoint**: collection of one or more *point* geometries - **multipolygon**: collection of one or more *polygon* geometries - **multilinestring**: collection of one or more *linestring* geometries When using a coordinate pair, only **points** are supported. If the **geom** attribute is not informed when inserting a JSON document, an error is returned. --- [block:html] { "html": "<div class='div-middle'> \n <a href='#'>\n Top page &spades; </div>\n </a>\n</div>\n\n\n<div class='div-forward'> \n <a href='/v1.0/docs/insert-a-json-document'>\n Next &raquo; </div>\n </a>\n</div>\n\n<style>\n .div-middle {\n \ttext-align: center;\n\t\tmargin-top: -15px;\n }\n \n .div-forward {\n \tfloat: right;\n padding-right: 15px;\n\t\tmargin-top: -20px;\n }\n</style>" } [/block]