Let your users report map problems
Add a "report a problem" action to your app. Our reviewers fix the data, and you follow each report's status. Reports are free.
Base URLhttps://makani-k8s.lamah.com
How it works
A driver finds a road closed, a customer's pin is on the wrong building, an address is missing. Your app sends that as a report with a key that has the reports:write scope. Reviewers in the country see it on a map beside the nearest addresses and the road closures in effect, correct the data, and decide the report with a note you can read.
- Categories:
wrong_address,missing_address,wrong_location(an address in the wrong place),road_closed,road_wrong(a road missing or wrong),wrong_routeandother. - Statuses:
open(waiting),resolved(fixed),not_reproducible,duplicateandout_of_scope. - A report sent with a test key is stored and read back like any other, but reviewers do not see it: use test keys to build, live keys to report.
Reports are never billed and never count against your plan. They have their own limits a day, per key and per user, so one device cannot flood the queue.
Send a report
Send the category, the country and the point. Everything else is optional: what the user wrote (up to 1,000 characters), a second point for a stretch of road or a route's destination, your own reference for the route or order, the public code of the address it is about, and the language the app was in.
endUserRef is an id of your own for the user who reports: it limits how much one user sends and lets you find their reports. Send an opaque id, never a name, a phone number or an email address: anything with a space, an @ or a + is refused.
The answer has a reference to follow the report. When the same problem was already reported nearby and is still open, the report is counted on that one instead of opening another: duplicate is true, reference is the existing report's and confirmations says how many times it has been reported.
reports:writecurl -X POST "https://makani-k8s.lamah.com/v1/reports" \ -H "x-api-key: $MAKANI_API_KEY" \ -H "content-type: application/json" \ -d '{ "category": "road_closed", "countryCode": "LY", "location": { "latitude": 32.8872, "longitude": 13.1913 }, "description": "The road is closed for works at the roundabout.", "endUserRef": "u_48213", "locale": "ar" }'- 400
VALIDATION_FAILEDA parameter is missing or invalid.details.errorslists each failing field with its messages, andmessagejoins them. - 400
REPORT_OUTSIDE_COUNTRYThe point is outside the country the report names. - 400
REPORT_PHOTO_NOT_FOUNDThe photo upload is unknown, expired, already used or was never uploaded. - 403
API_KEY_SCOPE_DENIEDThe key lacks the scope the endpoint needs.messagenames it. - 429
REPORT_RATE_LIMIT_EXCEEDEDThe key has sent its reports for the day.Retry-Aftersays when the day ends (00:00 UTC). - 429
REPORT_END_USER_RATE_LIMIT_EXCEEDEDThisendUserRefhas sent its reports for the day.
Attach a photo
A photo is optional (JPEG, PNG or WebP, up to 5 MB). Ask for an upload address, PUT the file to its url with the same Content-Type, then send the uploadId as photoUploadId with the report. An upload is used once and expires after 15 minutes.
reports:writecurl -X POST "https://makani-k8s.lamah.com/v1/reports/photo-uploads" \ -H "x-api-key: $MAKANI_API_KEY" \ -H "content-type: application/json" \ -d '{ "contentType": "image/jpeg", "sizeBytes": 482113 }'Follow your reports
Read one report by its reference, or list the reports your project sent, newest first, with a key that has the reports:read scope. Filter by status, category, endUserRef or a date range, and read further pages with meta.nextCursor.
reports:readcurl "https://makani-k8s.lamah.com/v1/reports/7K2QD-M9X4T" \ -H "x-api-key: $MAKANI_API_KEY"reports:readcurl "https://makani-k8s.lamah.com/v1/reports?status=open&perPage=20" \ -H "x-api-key: $MAKANI_API_KEY"When a reviewer decides a report, status changes and resolutionNote carries what they wrote. The people in your organization are notified in the console, where the Problem reports screen shows the same list on a map.
- 404
REPORT_NOT_FOUNDNo report with this reference belongs to the key's project.