DTM docs
HomeDor Traffic MinerMetagraphDTM AppMarketingAPI
API
API
  • Overview
  • Authentication
    • Basic Auth
    • Manually Creating Basic Auth Headers
  • Response Format
    • Successful Responses
    • Error Responses
  • Pagination
  • Datetimes
    • Datetime Formats
    • Datetimes Grouped by Local Time Zone
  • Rate Limiting
  • Syncing Data
    • Asynchronous Data
    • Querying by Update Timestamp
  • Data Validity
    • Validity
    • Completeness
  • Endpoints
    • Organizations
      • GET /organizations
      • GET /organizations/{org_id}
    • Locations
      • GET /locations
      • GET /locations/{location_id}
      • GET /locations/{location_id}/devices
      • POST /locations
      • DELETE /locations/{location_id}
    • Devices
      • GET /devices
      • GET /devices/{serial_number}
      • PUT /devices/{serial_number}
      • POST /devices/{serial_number}/install
      • POST /devices/{serial_number}/uninstall
      • GET /uninstalled-devices
    • Foot Traffic
      • GET /foot-traffic/locations
      • GET /foot-traffic/devices/{serial_number}
    • Schemas
      • Organization
      • Location
      • Address
      • Device
      • LocationMetric
      • Foot Traffic
Powered by GitBook
On this page
  1. Endpoints
  2. Locations

POST /locations

Create location

PreviousGET /locations/{location_id}/devicesNextDELETE /locations/{location_id}

Last updated 1 year ago

This endpoint allows a new location to be created. Name and address are required.

Create location

post

Create location

Authorizations
Body
namestringOptionalExample: Mike's Bikes
Responses
200
Successful operation
application/json
400
Invalid parameters
post
POST /dtm-api/v1/locations HTTP/1.1
Host: api.getdor.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 211

{
  "name": "Mike's Bikes",
  "address": {
    "name": "Mike's Bikes Address",
    "address_1": "1234 Demo Street",
    "address_2": "text",
    "city": "San Francisco",
    "administrative_area": "CA",
    "country": "United States",
    "postal_code": 94110
  }
}
{
  "data": {
    "id": "loc_xxxxx",
    "name": "Mike's Bikes",
    "type": "Residential",
    "address": {
      "name": "Mike's Bikes Address",
      "address_1": "1234 Demo Street",
      "address_2": "text",
      "city": "San Francisco",
      "administrative_area": "CA",
      "country": "United States",
      "postal_code": 94110
    },
    "organization": {
      "id": 123,
      "name": "lovely_aquamarine_bonobo"
    }
  },
  "meta": {}
}