Hi,
I’m using this method https://developers.klaviyo.com/en/v2024-06-15/reference/create_or_update_profile and I’m having a problem when passing null
to a field. It does not clear it out as stated in the documentation.
I also tried the latest stable version v2025-01-05, but the results are the same.
Here’s an example of Request and Response.
Request:
{
"RequestMethod": "POST",
"RequestUrl": "https://a.klaviyo.com/api/profile-import/",
"RequestBody": {
"data": {
"type": "profile",
"attributes": { "properties": {}, "organization": null },
"id": "01JMZ3P5VQQ7778PT1CWMEDB0K"
}
}
}
Response:
{
"ResponseStatusCode": 200,
"ResponseHeaders": {
},
"ResponseBody": {
"data": {
"type": "profile",
"id": "01JMZ3P5VQQ7778PT1CWMEDB0K",
"attributes": {
"email": "aaaaa@example.net",
"phone_number": null,
"external_id": null,
"anonymous_id": null,
"first_name": null,
"last_name": null,
"organization": "test organization",
"locale": null,
"title": null,
"image": null,
"created": "2025-02-25T17:50:15+00:00",
"updated": "2025-02-25T19:16:10+00:00",
"last_event_date": null,
"location": {
"address1": null,
"city": null,
"address2": null,
"longitude": null,
"country": null,
"latitude": null,
"region": null,
"zip": null,
"timezone": null,
"ip": null
},
"properties": {}
},
"relationships": {
"lists": {
"links": {
"self": "https://a.klaviyo.com/api/profiles/01JMZ3P5VQQ7778PT1CWMEDB0K/relationships/lists/",
"related": "https://a.klaviyo.com/api/profiles/01JMZ3P5VQQ7778PT1CWMEDB0K/lists/"
}
},
"segments": {
"links": {
"self": "https://a.klaviyo.com/api/profiles/01JMZ3P5VQQ7778PT1CWMEDB0K/relationships/segments/",
"related": "https://a.klaviyo.com/api/profiles/01JMZ3P5VQQ7778PT1CWMEDB0K/segments/"
}
},
"conversation": {
"links": {
"self": "https://a.klaviyo.com/api/profiles/01JMZ3P5VQQ7778PT1CWMEDB0K/relationships/conversation/",
"related": "https://a.klaviyo.com/api/profiles/01JMZ3P5VQQ7778PT1CWMEDB0K/conversation/"
}
}
},
"links": {
"self": "https://a.klaviyo.com/api/profiles/01JMZ3P5VQQ7778PT1CWMEDB0K/"
}
},
"links": {
"self": "https://a.klaviyo.com/api/profile-import/"
}
}
}