Import

ImportMappingMasks.batch_create_or_update

Creates or updates ImportMappingMask records in one request: an item with an id updates that record, an item without one creates a new record.

post/entities/ImportMappingMasks/batch-modify

Request

Query parameters

validation-levelinteger

Bit mask that relaxes validation on this write. 0 (the default) validates everything. Bits: 2 skip unchanged fields, 4 skip admin-defined validations, 8 allow read-only fields, 16 skip relation checks, 32 skip value checks, 64 skip invalid recalculations, 128 skip step-checklist gates, 256 add conditional field requirements, 512 skip uniqueness checks. Add bits together (20 = 4 + 16); member names and comma lists such as 4,16 work too. A value with an internal-only bit is refused with HTTP 400, code 117.

rollback-method0 | 1

0, the default: one failed item fails the whole batch (HTTP 422, or 404 for an unknown id) and nothing is written. 1: the valid items are written and the call answers 200 with success false and one result per item, an id or an error, in input order. Check every item.

Request body

entity_api_namestring

API name of the entity this mask is configured for (e.g. "Account", "Contact", a custom entity's API name).

entity_type1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Entity the mask imports records into, such as leads, accounts, users or product prices. For custom entities, entity_api_name identifies the custom entity.

Integer enum value: 1 - Lead, 2 - Opportunity, 3 - Account, 4 - Contact, 5 - Client, 6 - Product, 7 - ProductPriceListPrice, 8 - CustomEntity

mappingobject

How the import file fills each field, as a JSON array of objects conforming to the ImportMappingMaskItem type: field_id, mapping_type (ColumnIndex, UseDefaultValues or CalculateValue) and, for ColumnIndex, column_index. Validated on write.

namestring

Display name of the mask.

owner_idstring uuid

Id of the owning user.

relation_typesobject

Record type selected for each mapped relation field, as a JSON array of objects conforming to the ImportMappingRelationType type, each with field_id and entity_type_id. Validated on write.

share_mode0 | 1 | 2

Who besides the owner can use the import mapping mask: nobody (Private, the default), the users and sales units in sharing_clients and sharing_units, or all users.

Integer enum value: 1 - Private, 2 - Public, 0 - SelectedUnitsAndUsers

revisioninteger

Revision when entity was lastly changed.

idstring uuid

ID of object to update.

Example request

[
  {
    "entity_api_name": "string",
    "entity_type": 1,
    "name": "string",
    "owner_id": "01234567-abcd-dcba-ffff-000000000000",
    "revision": 1
  }
]

Response

Result per item, in request order: the id of the created or updated record, or the error.

successboolean

True when the request succeeded; false on error.

Example response

{
  "success": true,
  "data": [
    {
      "http_status": 400,
      "code": 117,
      "name": "ERROR_PARAMETER_INVALID"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.