Export accessible records as a JSON document or an Excel workbook

Exports the selected type's filtered and sorted records with their readable embedded descendants from one consistent workspace snapshot. Maximum 5,000 records and 50,000 candidate links; with page and pageSize (up to 500) json returns one page of top-level records with their descendants and links, plus total and nextPage, so larger lists can be exported page by page. format json (default) returns a document with stable type, field, relationship and record IDs, readable outbound links and the current schema revision; restricted values remain marked restricted, and import accepts it. format xlsx returns an Excel workbook with one sheet per exported list: readable fields in field order headed by their labels, then relationship columns with linked record names, assignees, timestamps and a hidden record ID. Dates are spreadsheet dates, numbers and money are numbers with the currency in the header, multiple choice and links are comma-separated names, and formatted text is plain text. A field the caller cannot read on any exported record is left out. Incoming links from records outside the selection are not included.

Requires: read access to the list.

POST
/v1/records/export

Authorization

apiKeyAuth
x-api-key<token>

API key authentication. Create an API key in your user profile and include it in the x-api-key header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://customermates.com/api/v1/records/export" \  -H "Content-Type: application/json" \  -d '{    "typeId": "0b6f3c1e-8a52-4c39-9d7e-2f4a6b8c1d01",    "search": "Acme",    "filters": [],    "relationships": [],    "sort": [      {        "fieldId": "9a4c2e61-3b5d-4f7a-8c9e-1d2b3a4c5e21",        "direction": "asc"      }    ],    "format": "xlsx"  }'
{
  "format": "customermates-records",
  "version": 1,
  "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
  "schemaRevision": 9007199254740991,
  "exportedAt": "2019-08-24T14:15:22Z",
  "records": [
    {
      "ref": {
        "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
        "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"
      },
      "version": 9007199254740991,
      "schemaRevision": -9007199254740991,
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z",
      "fields": [
        {
          "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
          "result": {
            "state": "value",
            "value": {
              "kind": "text",
              "value": "string"
            }
          }
        }
      ],
      "assignedUserIds": [
        "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
      "assignedUsers": [],
      "memberUsers": [],
      "relationships": [],
      "relationshipPaths": [
        {
          "records": [
            {
              "ref": {
                "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
                "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"
              },
              "title": {
                "state": "value",
                "value": {
                  "kind": "text",
                  "value": "string"
                }
              },
              "pictureUrl": "string"
            }
          ],
          "readableCount": 9007199254740991,
          "hasMore": true,
          "pathId": "fdfc0ab2-49fe-4a01-b8e7-363fd2ea9121"
        }
      ],
      "identities": [
        {
          "provider": "google",
          "value": "string",
          "messagingId": "string",
          "displayName": "string",
          "profileUrl": "string",
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "aliases": [
            "string"
          ],
          "channelClass": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "updatedAt": "2019-08-24T14:15:22Z"
        }
      ],
      "files": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "mimeType": "string",
          "size": 9007199254740991,
          "uploadedAt": "2019-08-24T14:15:22Z",
          "uploadedById": "e4e90afa-33ee-4f3f-ba8f-3fb33b13c87d",
          "pageCount": 9007199254740991
        }
      ]
    }
  ],
  "links": [
    {
      "relationId": "4b4bc808-5132-481f-afc2-e3872bf12049",
      "source": {
        "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
        "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"
      },
      "target": {
        "typeId": "caab7c42-4ce7-4bd5-bbab-6017cec730b7",
        "recordId": "0470cfd4-dcf3-4d8c-ac28-58c6deeff25f"
      }
    }
  ],
  "total": 9007199254740991,
  "nextPage": 9007199254740991
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
{
  "error": {
    "kind": "validation",
    "issues": [
      {
        "code": "string",
        "path": [
          "string"
        ],
        "message": "string",
        "customCode": "recordNotFound",
        "entitlement": "string"
      }
    ],
    "retryable": true
  }
}
Empty