Measure MapAPI

Export a project

POST/projects/{pid}/export
projects:read EnterpriseOpen GuestSince v2

Builds the project's files in the formats you ask for and answers with links to them. The links work for 24 hours. Whatever the key may read, it may export.

  • The report (pdf) is made in your account's name, with your organisation's letterhead and under its rules, as an export made in the app. It has no map picture: the app photographs its own map, and a server has none.
  • Prices need Products: read. Without it, asking for an estimate (pdf.includeEstimate or csv.includeEstimate) answers 403 insufficient_scope, and a report is made with its prices left out.
  • Units are named: see Units.

Your account can build up to 120 exports an hour.

Path parameters

  • pidstringrequired
    The project's ID, the part after /p/ in its address in the app.

Request body application/json

Fields of ExportRequest:

  • formatsarray | objectrequired
    The formats to build: a list of names, or an object with the names set to true.
  • languagestring
    The language of the files' text: en, es, de, fr, pt, ru, ja, hi or id. English when left out or another.
  • fileNamestring
    The files' name, before the extension. The project's name when left out.
    at most 120 characters
  • unitsobject
    The units the files are written in. Metric, in the app's default units, when left out. See Units.
  • The report's options. Your organisation's report rules apply on top, as in the app.

Responses

  • Export:

    • typestringrequired
      Always"export"
    • projectIdstringrequired
    • filesarray of ExportFilerequired
    • expiresOninteger(int64)required
      When the links stop working, 24 hours after the export. Download the files before then.

Errors

A failed request answers with one of these, in an Error body.

400invalid_bodyA value in the request body is missing, has the wrong type, is too long or is not one of the accepted values.
401unauthorized_actionThe item is not on your account or your members', the request came from a web page on a website the key does not allow, or the action is not allowed for this person.
403insufficient_scopeThe key does not have the access this endpoint needs. Create a key with that access.
403invalid_api_keyNo key was sent in the Authorization header, or the key is unknown, revoked, or past the time it kept working after being replaced.
403subscription_expiredYour subscription is not active. Update your payment method in the app.
404project_not_foundThe project does not exist.
429too_many_requestsYour account reached an hourly limit, such as 600 tokens or 120 export builds an hour. Wait a little and try again; see Rate limits.

Try it

This key is

The key stays in this tab and goes only to the API. Use a sandbox key while you try things: requests are real, and what they change is changed.

The project's ID, the part after `/p/` in its address in the app.
POST https://api.measuremaponline.com/api/v2/projects/Xr7Lp2Qm9KdT4wZs/export

Fill in your API key to send.

As a cURL command
Shell
curl -X POST 'https://api.measuremaponline.com/api/v2/projects/Xr7Lp2Qm9KdT4wZs/export' \
  -H "Authorization: $MMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "formats": [
    "pdf",
    "csv",
    "geojson"
  ],
  "language": "en",
  "fileName": "14-harbour-road",
  "units": {
    "system": "imperial",
    "length": "ft",
    "area": "sqft_acre"
  },
  "pdf": {
    "design": "survey",
    "pageSize": "LETTER",
    "includeEstimate": true
  },
  "csv": {
    "includePoints": true,
    "delimiter": ",",
    "decimals": 2
  }
}'