======================= POST /:country/listings ======================= Creates a new listing. New listings are automatically claimed by it's creator. Body Parameters --------------- A `Listing`_ model. Response -------- On success returns **HTTP 201 Created** with the newly created Listing in the body. On error returns an `Error`_ object. Examples -------- Request ~~~~~~~ **POST https://api.opendi.com/de/listings** .. code-block:: javascript { "name": "Opendi AG", "description": "A company full of nice people creating internet based white pages and and yellow pages.", "keywords": [ "White Pages", "Yellow Pages", "Telephonenumbers", "Contacts", "Nice People" ], "address": "40 Müllerstr.", "zip": "80469", "place": "München", "country_code": "DE", "latitude": 48.1312973, "longitude": 11.5699438, "emails": [ { "address": "info@opendi.com" } ], "phones": [ { "type": "landline", "number": "+498001055105" }, { "type": "landline", "number": "+4989189476620" }, { "type": "fax", "number": "+4989189476626" } ], "hours": { "monday": [ { "start": "10:00", "end": "17:00" } ], "tuesday": [ { "start": "09:00", "end": "17:00" } ], "wednesday": [ { "start": "09:00", "end": "17:00" } ], "thursday": [ { "start": "09:00", "end": "17:00" } ], "friday": [ { "start": "09:00", "end": "17:00" } ], "saturday": [], "sunday": [] }, "links": [ { "type": "website", "url": "www.stadtbranchenbuch.com" }, { "type": "googleplus", "url": "https://plus.google.com/118150864364347134043/" } ], "categories": [ { "id": "58", "name": "Bestatter" } ], "active": true } Response ~~~~~~~~ The response will have IDs populated for the listing and every submodel such as phones, links and emails. Also, it will have the the *url* on which the listing is viewable. **HTTP 201 Created** .. code-block:: json { "id": "6874671", "name": "Opendi AG", "address": "40 Müllerstr.", "zip": "80469", "place": "München", "country_code": "DE", "latitude": 48.1312973, "longitude": 11.5699438, "keywords": [ "Contacts", "White Pages", "Yellow Pages", "Telephonenumbers", "Nice People" ], "description": "A company full of nice people creating internet based white pages and and yellow pages.", "emails": [ { "id": "37026", "address": "info@opendi.com" } ], "phones": [ { "id": "2828447", "type": "landline", "number": "+498001055105" }, { "id": "2828448", "type": "landline", "number": "+4989189476620" }, { "id": "2828449", "type": "fax", "number": "+4989189476626" } ], "url": "http://vereinigtes-koenigreich.uk-eu-staging.opendi.com/london-colney/6874671.html", "hours": { "monday": [ { "start": "10:00:00", "end": "17:00:00" } ], "tuesday": [ { "start": "09:00:00", "end": "17:00:00" } ], "wednesday": [ { "start": "09:00:00", "end": "17:00:00" } ], "thursday": [ { "start": "09:00:00", "end": "17:00:00" } ], "friday": [ { "start": "10:00:00", "end": "12:00:00" }, { "start": "14:00:00", "end": "17:00:00" } ], "saturday": [], "sunday": [] }, "links": [ { "id": "37027", "type": "website", "url": "www.stadtbranchenbuch.com" }, { "id": "37028", "type": "googleplus", "url": "https://plus.google.com/118150864364347134043/" } ], "categories": [ { "id": "58", "name": "Mot Testing Centres" } ], "active": true, "contact": null } .. _Listing: ./../models.html#listing .. _Error: ./../models.html#error