Welcome to the Mapline API Reference. This guide explains the Mapline application programming interface (API). It describes various API operations, related request and response structures, and error codes.
The Mapline API is organized around REST. Our API has predictable, resource-oriented URLs, and uses HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which are understood by off-the-shelf clients. JSON is returned by all API responses, including errors.
Please contact us if you are interested in learning more about Mapline’s API pricing plans and gaining access to Mapline’s API solutions.
In order to use the Mapline API you will need an API key associated with your account. If you own the account (Account Owner), you can manage API Keys associated with your account in the Profile Dashboard. If you are not the account owner you can use the API key generated by the Account owner for the account to authenticate yourself. Your API keys carry many privileges, so be sure to keep them secret.
Follow the below steps to add an API key to your account:
You will authenticate your account when using the API by including your account user email and secret API key in the request. The API is authenticated via HTTP Basic Auth. Provide your email as the basic auth username value and your API keys as the basic auth password value.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
The authorization to resources in the API is dependent on the role associated (Owner, Admin, User or Billing Admin) with the Mapline user email provided during authentication. For example, if you try to add a new user on the account while using the API, the request will fail if the authenticated user role is either “admin”, “user”, or “billing admin”. Only the “owner” has authorization to add a new user to the account.
Api usage limits are calculated on the basis of the number of operations done for each call to Mapline’s API. If the call is for retrieving or deleting an object, the number of calls deducted is always 1. However, for creating or editing an object, the number of calls also depends upon the number of subobjects being referred and the number of operations being performed.
For example, if the user wants to retrieve a map, then the number of calls deducted is 1 irrespective of how many dataset layers the map might contain or how many locations each dataset layer might contain, but if the user wants to create a new map, with a new dataset containing 5 locations, then the number of api calls counted would be 7 – 1 for creating the map, 5 for creating the dataset with 5 locations, and 1 more for adding the dataset as a layer to the newly created map.
In case the server encounters any error, only a single call will be counted. However, if the user input is erroneous, then the number of calls will depend upon the number of objects referred, as mentioned before. So, for example, if the user creates a new map with 5 existing datasets as layers, but among those 5, the user has permission over only 3, in that case too, number of calls counted will be 6 – 1 for creating a map, 3 for adding the valid datasets as layers, and 2 for the remaining 2 invalid datasets.
The API usage limits are calculated on a monthly basis. On the first day of each month, your usage count will reset to zero. Once you have reached your API usage limits, you should receive a 403 error response until the beginning of the next month.
API request rate limit is defined as the number of requests that can be made to Mapline’s API per second. There is a universal limit of 10 requests per second per account (note that this is not per user on an account). This limit is calculated separately from your API usage limit. Each request Mapline’s API counts towards your API rate limit. The API rate limit is recalculated each second.
For example, if you were to send 15 requests to Mapline’s API within one second, the first 10 requests would be successful and you will receive a 200 success response. The last 5 requests would receive a 403 error with the message “You have reached your limit of web api request”. You will continue to receive a 403 error message until a full second has lapsed and then your next requests would receive a success 200 response.
Mapline uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in 2xx range indicate success, codes in 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, you reached daily geocoding limit, etc.), and codes in the 5xx range indicates an error with Mapline’s server (these are rare).
ATTRIBUTES | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
Type | string | The type of error returned. Can be: | |
Message | string | optional | A human-readable message providing more details about the error. |
Code | integer | optional | Code providing additional information associated with the Error. See Error codes. |
Error | Description |
---|---|
ApiError | API Errors cover any type of problem on Mapline’s end. |
AuthenticationError | Failure to properly authenticate yourself |
InvalidRequestError | Invalid request error arises when your request has invalid parameters or when your request is not accepted. |
UserAccessDenied | The user doesn’t have access to the requested resource. |
RateLimitError | Rate Limit error arises when you have hit any of the limits associated with your account. For example, too many requests hit the API too quickly or you have reached the daily geocoding limit, etc. |
Error Code | Description |
---|---|
101 | Datasets limit reached. |
102 | Dataset records limit reached. |
103 | Daily location processing limit reached. |
106 | Maps limit reached. |
108 | Route limit reached. |
109 | Views limit reached. |
111 | Reports limit reached. |
112 | Charts limit reached. |
113 | Survey limit reached. |
114 | Collection limit reached. |
116 | Visualization limit reached. |
HTTP Response Code | Description |
---|---|
200 – OK | Everything worked as expected. |
400 – Bad | The request was unacceptable, often due to a missing required field. |
401 – Unauthorized | No valid API key provided or user doesn’t have access to the resource. |
403 – Forbidden | User doesn’t have access to lookup maps or datasets. |
404 – Not found | The requested resource doesn’t exist. |
429 – Too many requests | Too many requests hit the API too quickly. |
500,502,503,504 | Something went wrong on Mapline’s end. |
All top-level API resources have support for bulk fetches via “list” API methods. For instance you can list maps, list datasets, and list users. These list API methods share a common structure.
Attribute | Type | Description |
---|---|---|
Object | string, value is “dataset” | – |
Data | array | An array containing the actual response elements, paginated by any request parameters. |
HasMore | boolean | Whether or not there are more elements available after this set. If false, this set comprises the end of the list. |
Filter allows you to configure and save a filter setting on various resources like dataset, views and map layers. The saved filter settings is applied to the resource while viewing inside the mapline application, and does not impact the call requesting a list of resources via the REST API.
Filter settings are configured using predicates. Mapline provides two different predicate objects to define your filter settings.
Combination of predicate objects allows you to create more complex filter conditions and supports nested conditions.
PredicateList is a collection of predicates (PredicateList or FieldPredicate) and allows you to define a Logical Operator(AND, OR) on them. This is also the root object of our filter settings.
Attribute | Type | Description |
---|---|---|
All | array, FieldPredicate or PredicateList object | A list of filter predicates where all of the predicates in the list needs to be true. |
Any | array, FieldPredicate or PredicateList object | A list of filter predicates where any of the predicates in the list needs to be true. |
All and Any are mutually exclusive attributes in a PredicateList, implementing one will automatically rule out the other. If both are provided All will be considered. |
FieldPredicate object allows you to define the filtering conditions on the resource’s data column.
Attribute | Type | Description |
---|---|---|
Field | Field object | Specifies the left hand side filtering condition of the Filter. |
Operator | string | The type of comparison operator. Can be Equal NotEqual Contain NotContain BeginWith EndWith Empty NotEmpty GreaterThan GreaterEqual LessThan LessThanEqual |
Expression | Expression object | Specifies the right hand side filtering condition of the Filter. Not required in case operator is of type Empty and Not Empty |
Field object allows you to set the left hand side filtering condition of the filter. It allows you to select a field from your data to evaluate the filter condition. It additionally allows you to use a conversion function if the data is of type datetime.
Attribute | Type | Description |
---|---|---|
ColumnId | string | Specifies the Id of the field of your data on which the filter will be applied. |
ConvertTo | string, optional | If the columnId represents a field with datetime data, ConvertTo allows you to apply an additional date related conversion on data before evaluating the expression. Can beYear Quarter Month Date WeekOfYear DayOfMonth DayOfWeek Hour Minute Trimester |
Expression object allows you to set the right hand side filtering condition of the filter. Using a combination of the Expression attributes you may be able to set complex filtering conditions like $today + 5 days
or Revenue - Expense
etc, where Revenue
and Expense
are fields in your data.
Attribute | Type | Description |
---|---|---|
ColumnId | string | Specifies the Id of the field of your data on which the filter will be applied. |
Value | string or array | Specifies the right hand side value of the predicate. Can be string list of strings, or special strings $today and $now . |
Calculation | Calculation object, Optional | Calculation object allows you to provide an additional set of arithmetic calculations on the right hand side. For example, using a calculation object you can specify $today + 5 days in your expression. |
ColumnId and Value are mutually exclusive attributes in an Expression object, implementing one will automatically rule out the other. If both are provided ColumnId will be considered. |
Calculation object allows you to provide an additional set of arithmetic calculations on the right hand side of the filter expression. For example, using a calculation object you can specify expressions like $today + 5 days
or Total Sales - Expense
in your filter.
Attribute | Type | Description |
---|---|---|
Operator | string | The type of arithmetic operator to be used in calculation. Can be Plus Minus Multiply Divide * The operator Multiply and Divide is not available if the calculation is date related. |
Unit | string | Optional, specifies the type of datetime unit to be used in the calculation. Can be Minutes Hours Days Weeks Months Quarters Years Trimesters |
Expression | Expression object | Specifies additional nested expressions on the right hand side of the filter predicate. Our filter supports a maximum of two levels of nesting of expression object. |
Saves a new filter or updates an existing filter on a Mapline resource.
Argument | Required | Description |
---|---|---|
All or Any | required | The list of predicates. |
Returns a filter object if the filter is created or updated. Returns an error if something goes wrong.
To set a filter on a dataset PUT https://api.mapline.com/v1/datasets/ds_178d50ef/filter
To set a filter on a view PUT https://api.mapline.com/v1/views/vw_123d0xef/filter
To set a filter on a map layer PUT https://api.mapline.com/v1/maps/map_6a54659b/layers/pg_79576e67/filter
{ "All": [ { "Field": { "ColumnId": "hdr_1d41e2de" }, "Operator": "GreaterThan", "Expression": { "Value": "$180.00" } } ] }
{ "All": [ { "Field": { "ColumnId": "hdr_1d41e2de" }, "Operator": "GreaterThan", "Expression": { "Value": "$180.00" } } ] }
Retrieves the filter setting of a mapline resource.
Returns a filter object if the filter is created or updated. Returns an error if something goes wrong.
To retrieve a filter settings of a dataset GET https://api.mapline.com/v1/datasets/ds_178d50ef/filter
To retrieve a filter settings of a view GET https://api.mapline.com/v1/views/vw_123d0xef/filter
To retrieve a filter settings of a map layer GET https://api.mapline.com/v1/maps/map_6a54659b/layers/pg_79576e67/filter
{ "All": [ { "Field": { "ColumnId": "hdr_1d41e2de" }, "Operator": "GreaterThan", "Expression": { "Value": "$180.00" } } ] }
Permanently deletes a filter setting from the requested Mapline resource. This cannot be undone.
Returns an object with a deleted parameter on success or returns an error.
To delete a filter settings on a dataset DELETE https://api.mapline.com/v1/datasets/ds_178d50ef/filter
To delete a filter settings of a view DELETE https://api.mapline.com/v1/views/vw_123d0xef/filter
To delete a filter settings of a map layer DELETE https://api.mapline.com/v1/maps/map_6a54659b/layers/pg_79576e67/filter
{ "Deleted": "true", "Message": "Filter Deleted" }
A Dataset object allows you to perform operations on datasets associated with your account. The API allows you to create and delete datasets on your account. The API allows you to retrieve individual datasets as well as a list of all your datasets.
Attribute | Type | Description |
---|---|---|
Id | string | – |
Object | string, value is “dataset” | – |
Name | string | The name of dataset. |
Headers | array, column object | List of all columns associated with the dataset. |
Records | array, record object | List of all records associated with the dataset. |
RecordCount | integer | Count of records associated with the dataset. |
Owner | user object | Owner of the dataset |
DateCreated | datetime | Date when dataset is first created. |
DateModified | datetime | Date when dataset is last modified. |
CreatedBy | string | User who created dataset |
ModifiedBy | string | User by whom dataset is last modified |
Creates a new dataset.
Argument | Required | Description |
---|---|---|
Name | required | The name of the dataset. |
Headers | required | List of column header names associated with the dataset. |
Records | required | List of all records associated with the dataset. |
Returns a dataset object if the dataset is created. Returns an error if something goes wrong.
POST https://api.mapline.com/v1/datasets
{ "Name": "My Sales", "Headers": [ "NAME", "POSTAL CODE", "SALES" ], "Records": [{ "Values": [ "Mike", "01005", "$290" ] }, { "Values": [ "John", "01010", "$180" ] }] }
{ "Object": "Dataset", "Id": "ds_351ab18c", "Name": "My Sales", "Headers": [ { "Object": "Header", "Id": "hdr_262fa8ba", "Name": "NAME", "DateCreated": "2021-07-13T10:11:36.837", "Ordinal": 0, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_32c3eba1", "Name": "POSTAL CODE", "DateCreated": "2021-07-13T10:11:36.837", "AddressComponent": "PostalCode", "Ordinal": 1, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_59e62e88", "Name": "SALES", "DateCreated": "2021-07-13T10:11:36.837", "Ordinal": 2, "CreatedBy": "Creator Name" } ], "Records": [ { "Object": "Record", "Id": "rec_1b2f2456", "DateCreated": "2021-07-13T05:11:36.867", "DateModified": "2021-07-13T05:11:36.867", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "Values": [ "Mike", "01005", "290" ], "DatasetId": "ds_351ab18c" }, { "Object": "Record", "Id": "rec_27c3673d", "DateCreated": "2021-07-13T05:11:36.867", "DateModified": "2021-07-13T05:11:36.867", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "Values": [ "John", "01010", "180" ], "DatasetId": "ds_351ab18c" } ], "Owner": { "Email": "email@domain.com", "Name": "Owner Name" }, "DateCreated": "2021-07-13T05:11:36.837", "DateModified": "2021-07-13T05:11:36.837", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name" "RecordCount": 2 }
Retrieves the details of an existing dataset.
Argument | Required | Description |
---|---|---|
Id | required | The id of the dataset. |
Returns a dataset object if a valid identifier is provided.
GET https://api.mapline.com/v1/datasets/ds_351ab18c
{ "Object": "Dataset", "Id": "ds_351ab18c", "Name": "My Sales", "Headers": [ { "Object": "Header", "Id": "hdr_262fa8ba", "Name": "NAME", "DateCreated": "2021-07-13T10:11:36.837", "Ordinal": 0, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_32c3eba1", "Name": "POSTAL CODE", "DateCreated": "2021-07-13T10:11:36.837", "AddressComponent": "PostalCode", "Ordinal": 1, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_59e62e88", "Name": "SALES", "DateCreated": "2021-07-13T10:11:36.837", "Ordinal": 2, "CreatedBy": "Creator Name" } ], "Records": [ { "Object": "Record", "Id": "rec_1b2f2456", "DateCreated": "2021-07-13T05:11:36.867", "DateModified": "2021-07-13T05:11:36.867", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "Values": [ "Mike", "01005", "290" ], "DatasetId": "ds_351ab18c" }, { "Object": "Record", "Id": "rec_27c3673d", "DateCreated": "2021-07-13T05:11:36.867", "DateModified": "2021-07-13T05:11:36.867", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "Values": [ "John", "01010", "180" ], "DatasetId": "ds_351ab18c" } ], "Owner": { "Email": "email@domain.com", "Name": "Owner Name" }, "DateCreated": "2021-07-13T05:11:36.837", "DateModified": "2021-07-13T05:11:36.837", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name" "RecordCount": 2 }
Permanently deletes a dataset from the account. This cannot be undone.
Argument | Required | Description |
---|---|---|
Id | required | The id of the dataset. |
Returns an object with a deleted parameter on success. If the dataset Id is not available, this call returns an error.
DELETE https://api.mapline.com/v1/datasets/ds_351ab18c
{ "Deleted": "true", "Id": "ds_351ab18c" }
Returns a list of your datasets sorted by DateModified, with the most recent modified dataset appearing first.
Returns a list object containing all your datasets.
GET https://api.mapline.com/v1/datasets
{ "Object": "List", "HasMore": false, "Limit": 10, "Data": [ { "Object": "Dataset", "Id": "ds_178d50ef", "Name": "My Accounts", "Owner": { "Email": "owner@domain.com", "Name": "Owner Name" }, "DateCreated": "2020-02-11T12:45:49.22", "DateModified": "2021-07-13T11:06:54.29", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "RecordCount": 90 }, { "Object": "Dataset", "Id": "ds_43f1092", "Name": "Area Sales", "Owner": { "Email": "owner@domain.com", "Name": "Owner Name" }, "DateCreated": "2021-07-13T10:53:43.033", "DateModified": "2021-07-13T10:53:43.37", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "RecordCount": 2 } ] }
The Column object allows you to define the components of a dataset column.
Attribute | Type | Description |
---|---|---|
Id | string | – |
Object | string, value is “Header”. | – |
Name | string | The name of the column. |
Ordinal | integer | Position of the column in the dataset column list. |
AddressComponent | string | Type of address. This is available only if the column represents an address type. Allowed values are: Address, City, County, State, Country, PostalCode, Latitude, Longitude |
DateCreated | datetime | Date when column is first created. |
DateModified | datetime | Date when column is last modified. |
CreatedBy | string | User who created the column. |
ModifiedBy | string | User by whom column is last modified. |
Creates a new column on a dataset. Currently, only static data column creation is supported.
Argument | Required | Description |
---|---|---|
Name | optional | The name of the new column. If a name is not provided the new column will be created with the name “[Untitled]”. |
Ordinal | optional | Position of the new column in the dataset column list. If a Ordinal is provided, all existing columns in the dataset with ordinal values that are equal to or greater than the ordinal of new column will shift by one.If a ordinal is not provided then the new column will be added to the end of column list. |
AddressComponent | optional | Type of address. Provide if the new column represents an address type. If another column with the same AddressComponent type already exists on the dataset, the request will fail. |
Returns a column object if the column is created. Returns an error if something goes wrong.
POST https://api.mapline.com/v1/datasets/ds_351ab18c/columns
{ "Name": "POSTAL CODE", "Ordinal":1, "AddressComponent": "PostalCode" }
{ "Object": "Header", "Id": "hdr_32c3eba1", "Name": "POSTAL CODE", "DateCreated": "2021-07-13T10:11:36.837", "AddressComponent": "PostalCode", "Ordinal": 1, "CreatedBy": "Creator Name" }
Retrieves the detail of an existing column.
Argument | Required | Description |
---|---|---|
Id | required | The id of the column. |
Returns a column object if a valid identifier is provided.
GET https://api.mapline.com/v1/datasets/ds_351ab18c/columns/hdr_32c3eba1
{ "Object": "Header", "Id": "hdr_32c3eba1", "Name": "POSTAL CODE", "DateCreated": "2021-07-13T10:11:36.837", "AddressComponent": "PostalCode", "Ordinal": 2, "CreatedBy": "Creator Name" }
Updates information about a column in a dataset.
Argument | Required | Description |
---|---|---|
Id | required | ID of the column to be edited. |
Name | optional | The updated name of the column. |
Ordinal | optional | The updated position of the column. If an Ordinal is provided, all existing columns in the dataset with ordinal values that are equal to or greater than the ordinal of updated column will shift by one.If an Ordinal is not provided then the column position will not change. |
AddressComponent | optional | The updated AddressComponent type. If another header with the same AddressComponent type already exists on the dataset, the request will fail. |
Returns a column object if the column information is updated succesfully. Returns an error if something goes wrong.
PUT https://api.mapline.com/v1/datasets/ds_351ab18c/columns/hdr_32c3eba1
{ "Name": "SALES POSTAL CODE", "AddressComponent": "PostalCode", "Ordinal": 2 }
{ "Object": "Header", "Id": "ds_351ab18c", "Name": "SALES POSTAL CODE", "DateCreated": "2021-07-13T10:11:36.837", "AddressComponent": "PostalCode", "Ordinal": 2, "CreatedBy": "Creator Name", "DateModified": "2021-07-13T07:02:19.397", "ModifiedBy": "Modifier Name", }
Permanently deletes a column from the dataset. This cannot be undone.
Argument | Required | Description |
---|---|---|
Id | required | The id of the column. |
Returns an object with a deleted parameter on success. If the column ID is not available, this call returns an error.
DELETE https://api.mapline.com/v1/datasets/ds_351ab18c/columns/hdr_32c3eba1
{ "Id":"ds_351ab18c", "Deleted":true }
Initiates a dynamic data column to be queued to be processed.
Argument | Required | Description |
---|---|---|
Id | required | The id of the column. |
Returns a success message if the column was able to be successfully queued for processing. Returns an error message if there were any problems queuing the given header for processing.
Currently, only dynamic data columns of type Route Optimization that are set to manually reprocess are available to be reprocessed.
PUT https://api.mapline.com/v1/datasets/ds_351ab18c/columns/hdr_32c3eba2/reprocess
The record object provides information about a single record within a dataset associated with your account.
Attribute | Type | Description |
---|---|---|
Id | string | – |
Object | string, value is “Record” | – |
DatasetId | string | The ID of the dataset the record belongs to. |
Headers | array, Header object | Collection of headers associated with the record. |
Values | array, string | Information for record. |
DateCreated | datetime | Date when record is created. |
CreatedBy | string | User who created record. |
DateModified | datetime | Date when record was last modified. |
ModifiedBy | string | User by whom record is last modified |
Creates a new record in a dataset.
Argument | Required | Description |
---|---|---|
DatasetId | required | Dataset to which the record will be added. |
Values | required | Collection of values associated with the record. |
Returns a record object if the record is created. Returns an error if something goes wrong.
POST https://api.mapline.com/v1/records
{ "Values": [ "Jhon", "10022", "$100" ], "DatasetId": "ds_149305c6" }
{ "Object": "Record", "Id": "rec_58eb94a1", "DateCreated": "2021-07-13T07:02:19.397", "DateModified": "2021-07-13T07:02:19.397", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "Headers": [ { "Object": "Header", "Id": "hdr_7989b2d", "Name": "NAME", "DateCreated": "2021-06-29T10:26:58.943", "Ordinal": 0, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_12bcde14", "Name": "POSTAL CODE", "DateCreated": "2021-06-29T10:26:58.943", "AddressComponent": "PostalCode", "Ordinal": 1, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_3950e1fb", "Name": "SALES", "DateCreated": "2021-06-29T10:26:58.943", "Ordinal": 2, "CreatedBy": "Creator Name" } ], "Values": [ "Jhon", "10022", "$100.00" ], "DatasetId": "ds_149305c6" }
Retrieves the details of an existing record.
Argument | Required | Description |
---|---|---|
Id | required | The id of the record. |
Returns a record object if a valid identifier is provided.
GET https://api.mapline.com/v1/records/rec_58eb94a1
{ "Object": "Record", "Id": "rec_58eb94a1", "DateCreated": "2021-07-13T07:02:19.397", "DateModified": "2021-07-13T07:02:19.397", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "Headers": [ { "Object": "Header", "Id": "hdr_7989b2d", "Name": "NAME", "DateCreated": "2021-06-29T10:26:58.943", "Ordinal": 0, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_12bcde14", "Name": "POSTAL CODE", "DateCreated": "2021-06-29T10:26:58.943", "AddressComponent": "PostalCode", "Ordinal": 1, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_3950e1fb", "Name": "SALES", "DateCreated": "2021-06-29T10:26:58.943", "Ordinal": 2, "CreatedBy": "Creator Name" } ], "Values": [ "Jhon", "10022", "$100.00" ], "DatasetId": "ds_149305c6" }
Updates information about a record in a dataset.
Argument | Required | Description |
---|---|---|
Id | required | ID of the record to be edited. |
Values | required | Collection of values associated with the record. |
Returns a record object if the record is created. Returns an error if something goes wrong.
PUT https://api.mapline.com/v1/records/rec_58eb94a1
{ "Values":[ "Sally", "60563", "$500" ] }
{ "Object": "Record", "Id": "rec_58eb94a1", "DateCreated": "2021-07-13T07:02:19.397", "DateModified": "2021-07-13T07:02:19.397", "CreatedBy": "Creator Name", "ModifiedBy": "Modifier Name", "Headers": [ { "Object": "Header", "Id": "hdr_7989b2d", "Name": "NAME", "DateCreated": "2021-06-29T10:26:58.943", "Ordinal": 0, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_12bcde14", "Name": "POSTAL CODE", "DateCreated": "2021-06-29T10:26:58.943", "AddressComponent": "PostalCode", "Ordinal": 1, "CreatedBy": "Creator Name" }, { "Object": "Header", "Id": "hdr_3950e1fb", "Name": "SALES", "DateCreated": "2021-06-29T10:26:58.943", "Ordinal": 2, "CreatedBy": "Creator Name" } ], "Values": [ "Sally", "60563", "$500" ], "DatasetId": "ds_149305c6" }
Permanently deletes a record from the account. This cannot be undone.
Argument | Required | Description |
---|---|---|
Id | required | The id of the record. |
Returns an object with a deleted parameter on success. If the record ID is not available, this call returns an error.
DELETE https://api.mapline.com/v1/records/rec_4505e7bd
{ "Id":"rec_4505e7bd", "Deleted":true }
Map object allows you to perform operations on maps associated with your account. The API allows you to create, delete, and update maps on your account. The API allows you to retrieve individual maps as well as a list of all your maps.
Attribute | Type | Description |
---|---|---|
Id | string | – |
Object | string, value is “map” | – |
Name | string | The name of the map. |
Layers | array, Layer object | List of all layers associated with the map. |
MapUrl | string | Url to access map. |
Owner | user object | Owner of the map |
DateCreated | datetime | Date when map is first created. |
DateModified | datetime | Date when map is last modified. |
CreatedBy | string | User who created map |
ModifiedBy | string | User by whom map is last modified |
Creates a new map.
Argument | Required | Description |
---|---|---|
Name | optional | The name of the map. If a name is not provided the new map will be created with the name “Untitled map”. |
Returns a map object if the map is created. Returns an error if something goes wrong.
POST https://api.mapline.com/v1/maps
{ "Name": "Area Sales Map" }
{ "Object": "Map", "Id": "map_40a57051", "Name": "Area Sales Map", "MapUrl": "https://app.mapline.com/map/map_40a57051", "DateCreated": "2021-07-13T22:22:04.07", "Owner": { "Email": "email@domain.com", "Name": "Owner Name" } }
Retrieves the details of an existing map.
Argument | Required | Description |
---|---|---|
id | required | The id of the map. |
Returns a map object if a valid identifier is provided.
GET https://api.mapline.com/v1/maps/map_40a57051
{ "Object": "Map", "Id": "map_40a57051", "Name": "Area Sales Map", "MapUrl": "https://app.mapline.com/map/map_40a57051", "DateCreated": "2021-07-13T22:22:04.07", "Owner": { "Email": "email@domain.com", "Name": "Owner Name" } }
Permanently deletes a map from the account. This cannot be undone.
Argument | Required | Description |
---|---|---|
id | required | The id of the map. |
Returns an object with a deleted parameter on success. If the map id is not available, this call returns an error.
DELETE https://api.mapline.com/v1/maps/map_64fedf4f
{ "Deleted": "true", "Id": "map_64fedf4" }
Returns a list of your maps sorted by DateCreated, with the most recent maps appearing first.
Returns a list object containing all your maps.
GET https://api.mapline.com/v1/maps
{ "Object": "List", "HasMore": false, "Data": [ { "Object": "Map", "Id": "map_525699dd", "Name": "My Area Sales", "MapUrl": "https://app.mapline.com/map/map_525699dd", "Owner": { "Email": "email@domain.com", "Name": "Owner Email" }, "DateCreated": "2021-07-08T02:40:26.08", "DateModified": "2021-07-09T02:43:37.043", "CreatedBy": "Owner Name", "ModifiedBy": "Modifier Name" }, { "Object": "Map", "Id": "map_660be3ad", "Name": "World Countries", "MapUrl": "https://app.mapline.com/map/map_660be3ad", "Owner": { "Email": "email@damin.com", "Name": "Owner Name" }, "DateCreated": "2021-06-04T04:12:43.207", "DateModified": "2021-06-11T14:12:23.467", "CreatedBy": "Owner Name", "ModifiedBy": "Modifier Name" } ] }
The Layer object represents a group of pins, line, route or territories on a map.
Attribute | Type | Description |
---|---|---|
Id | string | – |
Object | string | The type of layer returned. Can be PinGroup, Territory, Route, LineGroup, Segment, Folder. |
Name | string | The name of layer. |
Style | LayerStyle object | The style of the layer. |
Children | array, Layer | List of all children layer associated with this layer. |
DataSource | Dataset object, optional | Dataset associated with the layer. |
Filter | filter object | Filter settings applied on the layer. |
IsVisible | boolean | true if the layer is visible on map otherwise, false. |
IsCollapsed | boolean | true if the layer children are collapsed on the map sidebar otherwise, false |
The Children object represents a pin, route stop point, or shape (line, circle, or territory) on a map.
Attribute | Type | Description |
---|---|---|
Id | string | – |
Object | string | The type of children returned. Can be Pin, StopPoint, Shape |
Name | string | The name of children. |
Style | LayerStyle object, optional | The style associated with the children layer. |
IsVisible | boolean, optional | true if the layer is visible on map otherwise, false, not available with StopPoint. |
You can publish a map for public viewing using a published object.
The Publish Settings object allows the user to configure different settings when the map is made public and is viewed via the PublishedUrl property.
Attribute | Type | Description |
---|---|---|
IsPublished | boolean | true if the map is published, otherwise, false. |
PublishedUrl | string | The url to access the published map. This is a read only property and cannot be altered. |
ShowSidebar | boolean | This setting determines whether the sidebar will be shown or not when the map is viewed via the PublicUrl. Default is false. |
SearchPosition | string | This setting determines the position of the search box. Can be sidebar map |
LockPosition | boolean | true if the map pan and zoom is disabled, otherwise, false. |
Get a list of settings which would apply when the map is made public and is viewed via the PublicUrl.
Argument | Required | Description |
---|---|---|
Id | required | The id of the map. |
Returns an object containing all publish settings for the map referenced by the id argument.
GET https://api.mapline.com/maps/map_64fedf4/publish-settings
{ "ShowSidebar":false, }
Changes the Public Settings of a map.
Argument | Required | Description |
---|---|---|
Id | required | The id of the map. |
ShowSidebar | required | This flag determines whether the sidebar would be visible or not when the map is viewed via the PublicUrl property. |
Returns an object containing all publish settings for the map referenced by the id argument.
PUT https://api.mapline.com/maps/map_64fedf4/publish-settings
{ "ShowSidebar":true, }
{ "ShowSidebar":true, }
Users object provides information about the account users.
Attribute | Type | Description |
---|---|---|
Email | string | Email of the user |
Object | string, value is “user” | – |
Role | string | Role of the user(Owner, Admin, Creator, Collaborator or Billing Admin) |
CanAccessFinance | boolean | If true, the user has access to invoices. |
PreferredDistanceUnit | string | User preferred distance unit (Miles, Kilometers, Yards, or Meters). Default is “Miles”. |
DateCreated | timestamp | Date when the user was created. |
DateModified | timestamp | Date when user was last modified. |
Creates a new user.
Argument | Required | Description |
---|---|---|
Email | required | The email of the user. |
Name | required | Name of the user. |
Role | required | Role of the user. |
CanAccessFinance | optional | If true, the user has access to invoices. |
PreferredDistanceUnit | optional | User preferred distance unit (Miles, Kilometers, Yards, or Meters). |
Returns a user object if the user is created. Returns an error if something goes wrong.
POST https://api.mapline.com/v1/users
{ "Email": "useremail@domain.com", "Name": "User Name", "Role": "Owner" }
{ "Object": "user", "Email": "useremail@domain.com", "Name": "User Name", "Role": "Owner", "CanAccessFinance": true, "PreferredDistanceUnit": "Miles", "DateCreated": "2016-06-04T13:08:36.54", "DateModified": "2016-07-01T19:38:13.047" }
Retrieves the details of an existing user. Only the owner can retrieve details of all other account users.
Argument | Required | Description |
---|---|---|
Email | required | The email of the user. |
Returns a user object if a valid email is provided.
GET https://api.mapline.com/v1/users/useremail@domain.com/
{ "Object": "user", "Email": "useremail@domain.com", "Name": "User Name", "Role": "Owner", "CanAccessFinance": true, "PreferredDistanceUnit": "Miles", "DateCreated": "2016-06-04T13:08:36.54", "DateModified": "2016-07-01T19:38:13.047" }
Permanently deletes a user from the account. This cannot be undone.
Argument | Required | Description |
---|---|---|
Email | required | The email of the user. |
Returns an object with deleted parameter on success. If the email id is not available, this call returns an error.
DELETE https://api.mapline.com/v1/users/useremail@domain.com/
{ "Deleted": "true", "Id": "useremail@domain.com" }
Returns a list of all users on your account. This feature is only accessible to Account Owner.
Returns a list object containing all your users.
GET https://api.mapline.com/v1/users
{ "Object": "list", "HasMore": false, "Data": [{ "Object": "user", "Email": "user1email@domain.com", "Name": "User1 Name", "Role": "Owner", "CanAccessFinance": true, "PreferredDistanceUnit": "Meters", "DateCreated": "2015-06-04T13:08:36.54", "DateModified": "2015-07-01T19:38:13.047" }, { "Object": "user", "Email": "user2email@domain.com", "Name": "User2 Email", "Role": "Administrator", "CanAccessFinance": false, "PreferredDistanceUnit": "Meters", "DateCreated": "2016-01-13T13:44:52.697", "DateModified": "2016-01-20T11:26:04.307" }] }