Mapline API Documentation

Explore the possibilities.

  • INTRODUCTION

    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.

  • API KEYS

    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.

    ADD API KEY

    Follow the below steps to add an API key to your account:

    1. Click on API Keys button (Available only for Account Owners on and API accessible plan.)
    2. Click On Add API Key Button.
    3. Provide a description and click save to generate a new API Key.
    4. A new, secret API key will be generated.
  • AUTHENTICATION

    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.

  • AUTHORIZATION

    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.

  • ERRORS

    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).

    The Error Object
    Attributes
    ATTRIBUTESTYPEREQUIREDDESCRIPTION
    Typestring 

    The type of error returned. Can be:
    ApiError,
    AuthenticationError,
    InvalidRequestError,
    UserAccessDenied,
    RateLimitError

    MessagestringoptionalA human-readable message providing more details about the error.
    CodeintegeroptionalCode providing additional information associated with the Error. See Error codes.
    Error Types
    ErrorDescription
    ApiErrorAPI Errors cover any type of problem on Mapline’s end.
    AuthenticationErrorFailure to properly authenticate yourself
    InvalidRequestErrorInvalid request error arises when your request has invalid parameters or when your request is not accepted.
    UserAccessDeniedThe user doesn’t have access to the requested resource.
    RateLimitErrorRate 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 Codes
    Error CodeDescription
    101Datasets limit reached.
    102Dataset records limit reached.
    103Daily location processing limit reached.
    106Maps limit reached.
    108Route limit reached.
    109Views limit reached.
    111Reports limit reached.
    112Charts limit reached.
    113Survey limit reached.
    114Collection limit reached.
    116Visualization limit reached.
    HTTP Response Codes
    HTTP Response CodeDescription
    200 – OKEverything worked as expected.
    400 – BadThe request was unacceptable, often due to a missing required field.
    401 – UnauthorizedNo valid API key provided or user doesn’t have access to the resource.
    403 – ForbiddenUser doesn’t have access to lookup maps or datasets.
    404 – Not foundThe requested resource doesn’t exist.
    429 – Too many requestsToo many requests hit the API too quickly.
    500,502,503,504Something went wrong on Mapline’s end.
  • USAGE LIMITS

    Api calls are calculated on the basis of the number of operations done. 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.

  • LIST

    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.

    The List Object
    Attributes
    AttributeTypeDescription
    Objectstring, value is “dataset”
    DataarrayAn array containing the actual response elements, paginated by any request parameters.
    HasMorebooleanWhether or not there are more elements available after this set. If false, this set comprises the end of the list.
  • FILTER

    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.

    • PredicateList
    • FieldPredicate

    Combination of predicate objects allows you to create more complex filter conditions and supports nested conditions.

    The PREDICATELIST Object

    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.

    Attributes
    AttributeTypeDescription
    Allarray, FieldPredicate or PredicateList objectA list of filter predicates where all of the predicates in the list needs to be true.
    Anyarray, FieldPredicate or PredicateList objectA 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.
    The FieldPredicate Object

    FieldPredicate object allows you to define the filtering conditions on the resource’s data column.

    Attributes
    AttributeTypeDescription
    FieldField objectSpecifies the left hand side filtering condition of the Filter.
    OperatorstringThe type of comparison operator. Can be
    Equal
    NotEqual
    Contain
    NotContain
    BeginWith
    EndWith
    Empty
    NotEmpty
    GreaterThan
    GreaterEqual
    LessThan
    LessThanEqual
    ExpressionExpression objectSpecifies the right hand side filtering condition of the Filter. Not required in case operator is of type Empty and Not Empty
    The Field Object

    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.

    AttributeTypeDescription
    ColumnIdstringSpecifies the Id of the field of your data on which the filter will be applied.
    ConvertTostring, optionalIf 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 be
    Year
    Quarter
    Month
    Date
    WeekOfYear
    DayOfMonth
    DayOfWeek
    Hour
    Minute
    Trimester
    The Expression Object

    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.

    AttributeTypeDescription
    ColumnIdstringSpecifies the Id of the field of your data on which the filter will be applied.
    Valuestring or arraySpecifies the right hand side value of the predicate. Can be
    string
    list of strings, or
    special strings $today and $now.
    CalculationCalculation object, OptionalCalculation 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.
    The Calculation Object

    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.

    AttributeTypeDescription
    OperatorstringThe 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.
    UnitstringOptional, specifies the type of datetime unit to be used in the calculation. Can be
    Minutes
    Hours
    Days
    Weeks
    Months
    Quarters
    Years
    Trimesters
    ExpressionExpression objectSpecifies 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.
    Set a Filter

    Saves a new filter or updates an existing filter on a Mapline resource.

    Arguments
    ArgumentRequiredDescription
    All or AnyrequiredThe list of predicates.
    Returns

    Returns a filter object if the filter is created or updated. Returns an error if something goes wrong.

    Definition

    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

    Example Request Object
    {
      "All": [
        {
          "Field": {
            "ColumnId": "hdr_1d41e2de"
          },
          "Operator": "GreaterThan",
          "Expression": {
            "Value": "$180.00"
          }
        }
      ]
    }
    Example Response Object
    {
      "All": [
        {
          "Field": {
            "ColumnId": "hdr_1d41e2de"
          },
          "Operator": "GreaterThan",
          "Expression": {
            "Value": "$180.00"
          }
        }
      ]
    }
    Retrieve a Filter

    Retrieves the filter setting of a mapline resource.

    Returns

    Returns a filter object if the filter is created or updated. Returns an error if something goes wrong.

    Definition

    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

    Example Response Object
    {
      "All": [
        {
          "Field": {
            "ColumnId": "hdr_1d41e2de"
          },
          "Operator": "GreaterThan",
          "Expression": {
            "Value": "$180.00"
          }
        }
      ]
    }
    Delete a filter

    Permanently deletes a filter setting from the requested Mapline resource. This cannot be undone.

    Returns

    Returns an object with a deleted parameter on success or returns an error.

    Definition

    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

    Example Response Object
    {
    	"Deleted": "true",
    	"Message": "Filter Deleted"
    }
  • DATASET

    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.

    The Dataset Object
    Attributes
    AttributeTypeDescription
    Idstring
    Objectstring, value is “dataset”
    NamestringThe name of dataset.
    Headersarray, header objectList of all column headers associated with the dataset.
    Recordsarray, record objectList of all records associated with the dataset.
    RecordCountintegerCount of records associated with the dataset.
    Owneruser objectOwner of the dataset
    DateCreateddatetimeDate when dataset is first created.
    DateModifieddatetimeDate when dataset is last modified.
    CreatedBystringUser who created dataset
    ModifiedBystringUser by whom dataset is last modified
    Create a Dataset

    Creates a new dataset.

    Arguments
    ArgumentRequiredDescription
    NamerequiredThe name of the dataset.
    HeadersrequiredList of column header names associated with the dataset.
    RecordsrequiredList of all records associated with the dataset.
    Returns

    Returns a dataset object if the dataset is created. Returns an error if something goes wrong.

    Definition

    POST https://api.mapline.com/v1/datasets

    Example Request Object
    {
    	"Name": "My Sales",
    	"Headers": [
    		"NAME",
    		"POSTAL CODE",
    		"SALES"
    	],
    	"Records": [{
    		"Values": [
    			"Mike",
    			"01005",
    			"$290"
    		]
    	}, {
    		"Values": [
    			"John",
    			"01010",
    			"$180"
    		]
    	}]
    }
    Example Response Object
    {
      "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
    }
    Retrieve a Dataset

    Retrieves the details of an existing dataset.

    Arguments
    ArgumentRequiredDescription
    IdrequiredThe id of the dataset.
    Returns

    Returns a dataset object if a valid identifier is provided.

    Definition

    GET https://api.mapline.com/v1/datasets/ds_351ab18c

    Example Response Object
    {
      "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
    }
    Replace a Dataset

    Deletes an existing dataset and replaces it with a new version.

    Arguments
    ArgumentRequiredDescription
    IdrequiredThe id of the dataset.
    HeadersrequiredHeaders for the dataset fields.
    ValuesrequiredCollection of values associated with the record.
    Returns

    Returns a dataset object if the dataset is replaced. Returns an error if something goes wrong.

    Definition

    PUT https://api.mapline.com/v1/datasets/ds_12499c73

    Example Request Object
    {
    	"Name": "Area Sales",
    	"Headers": [
    		"NAME",
    		"CITY",
    		"SALES"
    	],
    	"Records": [{
    		"Values": [
    			"Mike",
    			"NEWYORK",
    			"$290"
    		]
    	}, {
    		"Values": [
    			"John",
    			"CHICAGO",
    			"$180"
    		]
    	}]
    }
    Example Response Object
    {
      "Object": "Dataset",
      "Id": "ds_351ab18c",
      "Name": "Test Dataset",
      "Headers": [
        {
          "Object": "Header",
          "Id": "hdr_262fa8ba",
          "Name": "NAME",
          "DateCreated": "2021-07-13T10:11:36.837",
          "DateModified": "2021-07-13T11:00:52.997",
          "Ordinal": 0,
          "CreatedBy": "Creator Name",
          "ModifiedBy": "Modifier Name"
        },
        {
          "Object": "Header",
          "Id": "hdr_44e99167",
          "Name": "CITY",
          "DateCreated": "2021-07-13T11:00:52.997",
          "AddressComponent": "City",
          "Ordinal": 1,
          "CreatedBy": "Creator Name"
        },
        {
          "Object": "Header",
          "Id": "hdr_59e62e88",
          "Name": "SALES",
          "DateCreated": "2021-07-13T10:11:36.837",
          "DateModified": "2021-07-13T11:00:52.997",
          "Ordinal": 2,
          "CreatedBy": "Creator Name",
          "ModifiedBy": "Modifier Name"
        }
      ],
      "Records": [
        {
          "Object": "Record",
          "Id": "rec_21991c3",
          "DateCreated": "2021-07-13T11:00:53.043",
          "DateModified": "2021-07-13T11:00:53.043",
          "CreatedBy": "Creator Name",
          "ModifiedBy": "Modifier Name",
          "Values": [
            "Mike",
            "NEWYORK",
            "$290.00"
          ],
          "DatasetId": "ds_351ab18c"
        },
        {
          "Object": "Record",
          "Id": "rec_293dd4aa",
          "DateCreated": "2021-07-13T11:00:53.043",
          "DateModified": "2021-07-13T11:00:53.043",
          "CreatedBy": "Creator Name",
          "ModifiedBy": "Modifier Name",
          "Values": [
            "John",
            "CHICAGO",
            "$180.00"
          ],
          "DatasetId": "ds_351ab18c"
        }
      ],
      "Owner": {
        "Email": "email@domain.com",
        "Name": "Owner Name"
      },
      "DateCreated": "2021-07-13T10:11:36.837",
      "DateModified": "2021-07-13T11:00:52.997",
      "CreatedBy": "Creator Name",
      "ModifiedBy": "Modifier Name",
      "RecordCount": 2
    }
    Delete a Dataset

    Permanently deletes a dataset from the account. This cannot be undone.

    Arguments
    ArgumentRequiredDescription
    IdrequiredThe id of the dataset.
    Returns

    Returns an object with a deleted parameter on success. If the dataset Id is not available, this call returns an error.

    Definition

    DELETE https://api.mapline.com/v1/datasets/ds_351ab18c

    Example Response Object
    {
    	"Deleted": "true",
    	"Id": "ds_351ab18c"
    }
    List All Datasets

    Returns a list of your datasets sorted by DateModified, with the most recent modified dataset appearing first.

    Returns

    Returns a list object containing all your datasets.

    Definition

    GET https://api.mapline.com/v1/datasets

    Example Response Object
    {
      "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
        }
      ]
    }
  • HEADER

    The Header object allows you to define the components of a header

    Header Object
    Attributes
    AttributeTypeDescription
    Idstring
    Objectstring, value is “Header”.
    NamestringThe name of the header.
    OrdinalintegerPosition of the header in the dataset.
    AddressComponentstringType of address. This is available only if the header represents an address type. Allowed values are:
    Address,
    City,
    County,
    State,
    Country,
    PostalCode,
    Latitude,
    Longitude
    DateCreateddatetimeDate when header is first created.
    DateModifieddatetimeDate when header is last modified.
    CreatedBystringUser who created header
    ModifiedBystringUser by whom header is last modified
  • RECORD

    The record object provides information about a single record within a dataset associated with your account.

    The Record Object
    Attributes
    AttributeTypeDescription
    Idstring
    Objectstring, value is “record”
    DatasetIdstringThe ID of the dataset the record belongs to.
    Headersarray, Header objectCollection of headers associated with the record.
    Valuesarray, stringInformation for record.
    DateCreateddatetimeDate when record is created.
    CreatedBystringUser who created record.
    DateModifieddatetimeDate when record was last modified.
    ModifiedBystringUser by whom record is last modified
    Create a Record

    Creates a new record in a dataset.

    Arguments
    ArgumentRequiredDescription
    DatasetIdrequiredDataset to which the record will be added.
    ValuesrequiredCollection of values associated with the record.
    Returns

    Returns a record object if the record is created. Returns an error if something goes wrong.

    Definition

    POST https://api.mapline.com/v1/records

    Example Request Object
    {
    	"Values": [
    		"Jhon",
    		"10022",
    		"$100"
    	],
    	"DatasetId": "ds_149305c6"
    }
    Example Response Object
    {
      "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"
    }
    Retrieve a Record

    Retrieves the details of an existing record.

    Arguments
    ArgumentRequiredDescription
    IdrequiredThe id of the record.
    Returns

    Returns a record object if a valid identifier is provided.

    Definition

    GET https://api.mapline.com/v1/records/rec_58eb94a1

    Example Response Object
    {
      "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"
    }
    Update a Record’s Information

    Updates information about a record in a dataset.

    Arguments
    ArgumentRequiredDescription
    IdrequiredID of the record to be edited.
    ValuesrequiredCollection of values associated with the record.
    Returns

    Returns a record object if the record is created. Returns an error if something goes wrong.

    Definition

    PUT https://api.mapline.com/v1/records/rec_58eb94a1

    Example Request Object
    {
    	"Values":[
    		"Sally",
    		"60563",
    		"$500"
    	]
    }
    Example Response Object
    {
      "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"
    }
    Delete a Record

    Permanently deletes a record from the account. This cannot be undone.

    Arguments
    ArgumentRequiredDescription
    IdrequiredThe id of the record.
    Returns

    Returns an object with a deleted parameter on success. If the record ID is not available, this call returns an error.

    Definition

    DELETE https://api.mapline.com/v1/records/rec_4505e7bd

    Example Response Object
    {
    	"Id":"rec_4505e7bd",
    	"Deleted":true
    }
  • MAP

    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.

    The Map Object
    Attributes
    AttributeTypeDescription
    Idstring
    Objectstring, value is “map”
    NamestringThe name of the map.
    Layersarray, Layer objectList of all layers associated with the map.
    MapUrlstringUrl to access map.
    Owneruser objectOwner of the map
    DateCreateddatetimeDate when map is first created.
    DateModifieddatetimeDate when map is last modified.
    CreatedBystringUser who created map
    ModifiedBystringUser by whom map is last modified
    Create a Map

    Creates a new map.

    Arguments
    ArgumentRequiredDescription
    NameoptionalThe name of the map. If a name is not provided the new map will be created with the name “Untitled map”.
    Returns

    Returns a map object if the map is created. Returns an error if something goes wrong.

    Definition

    POST https://api.mapline.com/v1/maps

    Example Request Object
    {
      "Name": "Area Sales Map" 
    }
    Example Response Object
    {
      "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"
      }
    }
    Retrieve a Map

    Retrieves the details of an existing map.

    Arguments
    ArgumentRequiredDescription
    idrequiredThe id of the map.
    Returns

    Returns a map object if a valid identifier is provided.

    Definition

    GET https://api.mapline.com/v1/maps/map_40a57051

    Example Response Object
    {
      "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"
      }
    }
    Delete a Map

    Permanently deletes a map from the account. This cannot be undone.

    Arguments
    ArgumentRequiredDescription
    idrequiredThe id of the map.
    Returns

    Returns an object with a deleted parameter on success. If the map id is not available, this call returns an error.

    Definition

    DELETE https://api.mapline.com/v1/maps/map_64fedf4f

    Example Response Object
    {
    	"Deleted": "true",
    	"Id": "map_64fedf4"
    }
    List All Maps

    Returns a list of your maps sorted by DateCreated, with the most recent maps appearing first.

    Returns

    Returns a list object containing all your maps.

    Definition

    GET https://api.mapline.com/v1/maps

    Example Response Object
    {
      "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"
        }
      ]
    }
  • LAYER

    The Layer object represents a group of pins, line, route or territories on a map.

    Layer Object
    Attributes
    AttributeTypeDescription
    Idstring
    ObjectstringThe type of layer returned. Can be
    PinGroup,
    Territory,
    Route,
    LineGroup,
    Segment,
    Folder.
    NamestringThe name of layer.
    StyleLayerStyle objectThe style of the layer.
    Childrenarray, LayerList of all children layer associated with this layer.
    DataSourceDataset object, optionalDataset associated with the layer.
    Filterfilter objectFilter settings applied on the layer.
    IsVisiblebooleantrue if the layer is visible on map otherwise, false.
    IsCollapsedbooleantrue if the layer children are collapsed on the map sidebar otherwise, false
  • CHILDREN

    The Children object represents a pin, route stop point, or shape (line, circle, or territory) on a map.

    Children Object
    Attributes
    AttributeTypeDescription
    Idstring
    ObjectstringThe type of children returned. Can be
    Pin,
    StopPoint,
    Shape
    NamestringThe name of children.
    StyleLayerStyle object, optionalThe style associated with the children layer.
    IsVisibleboolean, optionaltrue if the layer is visible on map otherwise, false, not available with StopPoint.
  • PUBLISHED MAP

    You can publish a map for public viewing using a published object.

    Publish Settings 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.

    Attributes
    AttributeTypeDescription
    IsPublishedbooleantrue if the map is published, otherwise, false.
    PublishedUrlstringThe url to access the published map. This is a read only property and cannot be altered.
    ShowSidebarbooleanThis setting determines whether the sidebar will be shown or not when the map is viewed via the PublicUrl. Default is false.
    SearchPositionstringThis setting determines the position of the search box. Can be
    sidebar
    map
    LockPositionbooleantrue if the map pan and zoom is disabled, otherwise, false.
    Get the Publish Settings of a Map

    Get a list of settings which would apply when the map is made public and is viewed via the PublicUrl.

    Arguments
    ArgumentRequiredDescription
    IdrequiredThe id of the map.
    Returns

    Returns an object containing all publish settings for the map referenced by the id argument.

    Definition
    GET https://api.mapline.com/maps/map_64fedf4/publish-settings
    Example Response Object
    {  
       "ShowSidebar":false,
    }
    
    Change the Publish Settings of a Map

    Changes the Public Settings of a map.

    Arguments
    ArgumentRequiredDescription
    IdrequiredThe id of the map.
    ShowSidebarrequiredThis flag determines whether the sidebar would be visible or not when the map is viewed via the PublicUrl property.
    Returns

    Returns an object containing all publish settings for the map referenced by the id argument.

    Definition
    PUT https://api.mapline.com/maps/map_64fedf4/publish-settings
    Example Request Object
    {  
       "ShowSidebar":true,
    }
    
    Example Response Object
    {  
       "ShowSidebar":true,
    }
    
  • USERS

    Users object provides information about the account users.

    The User Object
    Attributes
    AttributeTypeDescription
    EmailstringEmail of the user
    Objectstring, value is “user”
    RolestringRole of the user(Owner, Admin, User or Billing Admin)
    CanAccessFinancebooleanIf true, the user has access to invoices.
    PreferredDistanceUnitstringUser preferred distance unit (Miles, Kilometers, Yards, or Meters). Default is “Miles”.
    DateCreatedtimestampDate when the user was created.
    DateModifiedtimestampDate when user was last modified.
    Create a User

    Creates a new user.

    Arguments
    ArgumentRequiredDescription
    EmailrequiredThe email of the user.
    NamerequiredName of the user.
    RolerequiredRole of the user.
    CanAccessFinanceoptionalIf true, the user has access to invoices.
    PreferredDistanceUnitoptionalUser preferred distance unit (Miles, Kilometers, Yards, or Meters).
    Returns

    Returns a user object if the user is created. Returns an error if something goes wrong.

    Definition

    POST https://api.mapline.com/v1/users

    Example Request Object
    {
    	"Email": "useremail@domain.com",
    	"Name": "User Name",
    	"Role": "Owner"
    }
    Example Response Object
    {
    	"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"
    }
    Retrieve a User

    Retrieves the details of an existing user. Only the owner can retrieve details of all other account users.

    Arguments
    ArgumentRequiredDescription
    EmailrequiredThe email of the user.
    Returns

    Returns a user object if a valid email is provided.

    Definition

    GET https://api.mapline.com/v1/users/useremail@domain.com/

    Example Response Object
    {
    	"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"
    }
    Delete a User

    Permanently deletes a user from the account. This cannot be undone.

    Arguments
    ArgumentRequiredDescription
    EmailrequiredThe email of the user.
    Returns

    Returns an object with deleted parameter on success. If the email id is not available, this call returns an error.

    Definition

    DELETE https://api.mapline.com/v1/users/useremail@domain.com/

    Example Response Object
    {
    	"Deleted": "true",
    	"Id": "useremail@domain.com"
    }
    List All Users

    Returns a list of all users on your account. This feature is only accessible to Account Owner.

    Returns

    Returns a list object containing all your users.

    Definition

    GET https://api.mapline.com/v1/users

    Example Response Object
    {
    	"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"
    	}]
    }