EmailmoversMyDataHub docs
Browse the docs

Reference / MCP tool reference

Reference

Fetch order records

fetch_order_records: Returns a page of an order's delivered records (50 by default, up to 100) with the licence block on every page, as JSON or, on request, as CSV.

Generated from the contractsView as Markdown

Returns a page of an order's delivered records (50 by default, up to 100) with the licence block on every page, as JSON or, on request, as CSV. Pages stay under about 8,000 tokens, with approx_tokens on each; pass next_cursor to continue. Fetching again under licence costs 0 credits; it needs records:read. Call check_suppression before any send, and get_compliance_receipt for proof of screening. Lawful basis is UK GDPR Article 6(1)(f) legitimate interests; email audiences include corporate subscribers only by default (PECR), so sole traders and ordinary partnerships are left out unless the toggle is changed.

PropertyValue
Tool namefetch_order_records
Position in tools/list16 of 22
CostFree under licence
Scoperecords:read
AnnotationsreadOnlyHint true, destructiveHint false, idempotentHint true, openWorldHint false
KindRead only; idempotent, not destructive, closed world
REST equivalentGET /v1/orders/{id}/records

Input

The schema sets additionalProperties to false, so a member that is not listed is refused.

MemberTypeRequiredDescription
order_idstringyesThe order whose records to fetch. It must be ready.
cursorstringnoAn opaque cursor from next_cursor. Pass it back unchanged.
limitinteger (1 to 100)noRecords per page, 1 to 100 over MCP so a result stays under about 8,000 tokens. Default 50. Default 50.
formatenum: json, csvnojson (default) or csv. Default json.
fieldsarray of stringnoColumns to return; default the order's field set.

Example call

The params of a tools/call request:

{
  "name": "fetch_order_records",
  "arguments": {
    "order_id": "ord_01JB4N9S3W2X6Y7Z8A1B2C3D4E"
  }
}

Output

The result carries structuredContent that matches this schema, and one line of text that leads with the number.

RecordsPage

MemberTypeAlways presentDescription
order_idstringyesFormat: an order id: ord_ followed by a 26 character ULID in upper case Crockford base32, such as ord_01JB4N9S3W2X6Y7Z8A1B2C3D4E.
formatjsonyes
fieldsarray of stringyesThe field set's columns in this page.
dataarray of ContactRecordyes
data[].idstringyesThe record id, pushed to CRMs as mydatahub_record_id.
data[].dataset_versionstringyesThe immutable weekly build a count is bound to, such as 2026-W39. The last 52 stay queryable.
data[].contactobjectyes
data[].emailobject or nullyes
data[].phoneobject or nullyesPresent when the field set includes telephone and a number is held.
data[].companyobjectyes
data[].siteobjectyes
data[].complianceComplianceObjectyesCarried by every preview row, order record, lookup and enrichment, and repeated as CSV columns and as the MyDataHub property group on CRM push.
data[].licence_expires_atstring (date) or nullyes
has_morebooleanyes
next_cursorstring or nullyes
remaininginteger (0 or more)yesRecords after this page.
approx_tokensinteger (0 or more)noA rough token size of this page; pages stay under about 8,000 tokens.
licenceLicenceyesLicence terms as data, on every quote, order, records page and receipt. Records stay usable, pushable and re-downloadable free until reuse_until.
licence.typeenum: multi_use_12m, outrightyesmulti_use_12m (12 month multi-use, every plan) or outright (1.8 credits a record, proposed).
licence.reuse_untilstring (date) or nullyesOrder date plus 12 months; null for outright.
licence.resale_prohibitedbooleanyes
licence.permitted_channelsarray of enum: email, telephone, postyesemail, telephone and post on standard terms.
licence.warranty_urlstring (uri)yes
licence.terms_versionstringyesThe version of the Data Licence and Sharing Agreement the licence is under, such as 1.0.
licence.terms_urlstring (uri)noWhere that version of the Data Licence and Sharing Agreement is published.

RecordsCsvPage

MemberTypeAlways presentDescription
order_idstringyesFormat: an order id: ord_ followed by a 26 character ULID in upper case Crockford base32, such as ord_01JB4N9S3W2X6Y7Z8A1B2C3D4E.
formatcsvyes
fieldsarray of stringyesThe columns, in the order of the header.
rowsinteger (0 or more)yesRecords in this page, not counting the header.
csvstringyesThe page as CSV with a header row and compliance fields as columns: the text GET /v1/orders/{id}/records returns with format=csv.
has_morebooleanyes
next_cursorstring or nullyes
remaininginteger (0 or more)yesRecords after this page.
approx_tokensinteger (0 or more)no
licenceLicenceyesLicence terms as data, on every quote, order, records page and receipt. Records stay usable, pushable and re-downloadable free until reuse_until.
licence.typeenum: multi_use_12m, outrightyesmulti_use_12m (12 month multi-use, every plan) or outright (1.8 credits a record, proposed).
licence.reuse_untilstring (date) or nullyesOrder date plus 12 months; null for outright.
licence.resale_prohibitedbooleanyes
licence.permitted_channelsarray of enum: email, telephone, postyesemail, telephone and post on standard terms.
licence.warranty_urlstring (uri)yes
licence.terms_versionstringyesThe version of the Data Licence and Sharing Agreement the licence is under, such as 1.0.
licence.terms_urlstring (uri)noWhere that version of the Data Licence and Sharing Agreement is published.

Errors

A failed call returns isError true. The text content leads with the sentence a person acts on, then the whole problem as JSON, with code, detail, next_step and did_you_mean. A 401 and a step-up 403 are answered at HTTP level so the client can start authorisation. See Errors.