v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Deals

Convert a deal

Converts a deal to a customer

post/v2/deals/{deal_key}/convert

Path parameters

deal_keystring required

Unique identifier of deal.

Request body

customer_keystring

Unique identifier to be used for customer. If no value is passed email of deal being converted will be used as customer_key.

emailstring email required

The customers email, must be a valid email.

Example request

{
  "customer_key": "cus_1234",
  "email": "johnsmith@gmail.com"
}

Response

Converts a deal to a customer

messagestring required
statusinteger required

Example response

{
  "data": {
    "created_at": 1574181282399,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "customer_key": "123435",
    "email": "johnsmith@gmail.com",
    "fields": [
      {
        "field_key": "field_fjkdlrh9i32nfew",
        "name": "Company Address"
      }
    ],
    "mdata": {
      "api_key": "value"
    },
    "meta": {
      "field": "value"
    },
    "name": "John Smith",
    "partner_key": "bertramgilfoyle",
    "partnership_key": "part_A7nGc9pKnx8xEW",
    "provider_key": "cus_AJ6bvXbVofMpsW",
    "shared_id": "fake_shared_id",
    "source_key": "deal_987us345r2",
    "source_type": "deal",
    "submitted_by": "johndoe@gmail.com",
    "submitted_by_email": "johndoe@gmail.com",
    "team": {
      "color": "blue",
      "logo": "file12345.png",
      "name": "Team Whippets"
    },
    "test": true
  }
}