Create new Lead with Address

Comments

2 comments

  • Avatar
    Rachel Harrigan

    Here is a sample CURL request to create a lead that has the formatting for address:

     

    curl --request POST \
    --header "Content-Type: application/json" \
    --header "X-PW-AccessToken:TOKEN" \
    --header "X-PW-Application: developer_api" \
    --header "X-PW-UserEmail:EMAIL" \
    https://api.prosperworks.com/developer_api/v1/leads \
    --data '{
    "first name": "Bob and Melinda",
    "last name": "Gates",
    "email":
    {
    "email": "mylead1001@gmail.test",
    "category": "work"
    },
    "phone_numbers":
    [
    {
    "number": "408-555-1212",
    "category": "mobile"
    },
    {
    "number": "415-555-1212",
    "category": "work"
    }
    ],
    "address":
    {
    "street":"123 Main Street",
    "city":"Savannah",
    "state":"Georgia",
    "postal_code":"31410",
    "country": "United States"
    },
    "details":"these are details",
    "tags":
    [
    "tag1",
    "tag2"
    ],
    "socials":
    [
    {
    "url": "https://www.linkedin.com",
    "category": "linkedin"
    }
    ],
    "status": "New",
    "customer_source_id": 209625,
    "custom_fields":
    [
    {
    "custom_field_definition_id": 72830,
    "value": "Text fields are 255 chars or less!\"\n },\n {\n \"custom_field_definition_id\": 103481,\n \"value\": \"Text area fields can have long text content\n"
    },
    {
    "custom_field_definition_id": 89602,
    "value": 3243
    }
    ]
    }'

  • Avatar
    Chris Ormiston

    You're the best!! thanks, that's exactly what I needed.

Please sign in to leave a comment.