Skip to content
Taylorz CRM Developers
Esc
↑↓navigate↵open⌘Jpreview

Convert a lead

Writes the lead into an account, a contact and an opportunity in one step. Needs all three objects available, and refuses a caller whose field access is narrowed anywhere.

POST/api/v1/objects/{objectId}/records/{recordId}/actions/convert
Authorization
AuthorizationOAuth2 access token · headerrequired

Authorization-code grant with PKCE. Clients are public and hold no secret. Discovery is published at /.well-known/oauth-authorization-server/api/auth.

Scopes:api.access
Path parameters
objectIdstringrequired

An object's id

min length 1 · max length 255
recordIdstringrequired

A record's id

min length 1 · max length 255
Header parameters
Idempotency-Keystringrequired

Replays the first answer for a repeated request

min length 8 · max length 128
Request body
requiredapplication/json
accountobjectrequired
Show properties
idstring
min length 1 · max length 255
modestringrequired
Allowed:newexisting
namestring
min length 1 · max length 500
acknowledgedMatchesboolean
default: false
contactobjectrequired
Show properties
firstNamestring
max length 200
idstring
min length 1 · max length 255
lastNamestring
min length 1 · max length 200
modestringrequired
Allowed:newexistingskip
opportunityobjectrequired
Show properties
amountstring
matches ^-?(?:0|[1-9]\d{0,15})(?:\.\d{1,8})?$
closeDatestring<date>
matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
createboolean
default: false
namestring
min length 1 · max length 500
stagestring
default: "01-商談見極め"
Allowed:01-商談見極め02-課題の合意03-担当者合意04-決裁者合意05-価格とスケジュール合意06-契約手続き中07-ペンディング(事務手続きのやり取り)08-受注09-失注
Responses
201

The records the conversion wrote

accountIdstringrequired
min length 1 · max length 255
contactIdstring | nullrequired
Show properties
Any of:
string
string
null
null
opportunityIdstring | nullrequired
Show properties
Any of:
string
string
null
null
unmappedstring[]required
400

The request body, query or parameters were refused

codestringrequired
Allowed:invalid_inputnot_foundconflictforbidden
detailany
errorstringrequired
reasonstring
401

The access token is missing, invalid or revoked

errorstringrequired
403

The tenant's module is off, or the token's scope or the member's role does not permit the action

codestringrequired
Allowed:invalid_inputnot_foundconflictforbidden
detailany
errorstringrequired
reasonstring
404

No such record, or none the caller may read

codestringrequired
Allowed:invalid_inputnot_foundconflictforbidden
detailany
errorstringrequired
reasonstring
409

The operation conflicts with the current state

codestringrequired
Allowed:invalid_inputnot_foundconflictforbidden
detailany
errorstringrequired
reasonstring
413

The request exceeds the route's body limit

errorstringrequired
500

An unexpected failure

errorstringrequired
Request
curl -X POST '/api/v1/api/v1/objects/string/records/string/actions/convert' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Idempotency-Key: stringst' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "account": {
    "id": "string",
    "mode": "new",
    "name": "string"
  },
  "acknowledgedMatches": false,
  "contact": {
    "firstName": "string",
    "id": "string",
    "lastName": "string",
    "mode": "new"
  },
  "opportunity": {
    "amount": "string",
    "closeDate": "2019-08-24",
    "create": false,
    "name": "string",
    "stage": "01-商談見極め"
  }
}'
Response
{
  "accountId": "string",
  "contactId": "string",
  "opportunityId": "string",
  "unmapped": [
    "string"
  ]
}

Was this page helpful?