Skip to content

API reference

API: Entity mappings

Markdown version

MethodPathWhat it doesScope
GET/v1/entity-mappingsNames and domains from sources mapped (or proposed to map) to accounts. Approve a proposal once and every later item with that value goes there.records:read
POST/v1/entity-mappingsMap a value a source uses (an email domain, an import's company name) to an account yourselfrecords:write
POST/v1/entity-mappings/:id/approveApprove a proposal (or pick another account). Later items with this value map there; the account made for it meanwhile is merged in unless merge_created is false.records:write
POST/v1/entity-mappings/:id/rejectNot the same: the value stays its own account and isn't proposed againrecords:write

Examples

GET /v1/entity-mappings

Names and domains from sources mapped (or proposed to map) to accounts. Approve a proposal once and every later item with that value goes there.

curl -s "https://api.closefinch.com/v1/entity-mappings" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/entity-mappings`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

POST /v1/entity-mappings

Map a value a source uses (an email domain, an import's company name) to an account yourself

curl -s -X POST "https://api.closefinch.com/v1/entity-mappings" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/entity-mappings`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/entity-mappings/$ID/approve

Approve a proposal (or pick another account). Later items with this value map there; the account made for it meanwhile is merged in unless merge_created is false.

curl -s -X POST "https://api.closefinch.com/v1/entity-mappings/$ID/approve" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/entity-mappings/${id}/approve`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/entity-mappings/$ID/reject

Not the same: the value stays its own account and isn't proposed again

curl -s -X POST "https://api.closefinch.com/v1/entity-mappings/$ID/reject" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/entity-mappings/${id}/reject`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.