Export a project
POST
/projects/{pid}/exportBuilds 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.includeEstimateorcsv.includeEstimate) answers403 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
pidstringrequiredThe project's ID, the part after/p/in its address in the app.
Request body application/json
Fields of ExportRequest:
formatsarray | objectrequiredThe formats to build: a list of names, or an object with the names set totrue.languagestringThe language of the files' text:en,es,de,fr,pt,ru,ja,hiorid. English when left out or another.fileNamestringThe files' name, before the extension. The project's name when left out.at most 120 charactersunitsobjectThe units the files are written in. Metric, in the app's default units, when left out. See Units.pdfobjectThe report's options. Your organisation's report rules apply on top, as in the app.csvobject
Responses
typestringrequiredAlways"export"projectIdstringrequiredexpiresOninteger(int64)requiredWhen 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.
400
invalid_bodyA value in the request body is missing, has the wrong type, is too long or is not one of the accepted values.401
unauthorized_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.403
insufficient_scopeThe key does not have the access this endpoint needs. Create a key with that access.403
invalid_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.429
too_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/exportFill in your API key to send.
As a cURL command
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
}
}'