when I attempt to import historical data to seed the CRM, created_date is ignored and today's date/time is used instead. Using the API explorer, it looks like the date should be saved, but, when I do a subsequent get, it has today's date:
https://somewhere.com/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=create&api_key=userkey&key=sitekey&json={"contact_type":"Individual","created_date":"2018-01-01","first_name":"Peteww"}
returns: {
"is_error": 0,
"version": 3,
"count": 1,
"id": 288,
"values": {
"288": {
"id": "288",
"contact_type": "Individual",
"contact_sub_type": "",
"do_not_email": "",
"do_not_phone": "",
"do_not_mail": "",
"do_not_sms": "",
"do_not_trade": "",
"is_opt_out": "",
"legal_identifier": "",
"external_identifier": "",
"sort_name": "Peteww",
"display_name": "Peteww",
"nick_name": "",
"legal_name": "",
"image_URL": "",
"preferred_communication_method": "",
"preferred_language": "en_CA",
"preferred_mail_format": "",
"hash": "74c74a58f64681a6e3a4f8d9ccd32bfd",
"api_key": "",
"first_name": "Peteww",
"middle_name": "",
"last_name": "",
"prefix_id": "",
"suffix_id": "",
"formal_title": "",
"communication_style_id": "1",
"email_greeting_id": "1",
"email_greeting_custom": "",
"email_greeting_display": "",
"postal_greeting_id": "1",
"postal_greeting_custom": "",
"postal_greeting_display": "",
"addressee_id": "1",
"addressee_custom": "",
"addressee_display": "",
"job_title": "",
"gender_id": "",
"birth_date": "",
"is_deceased": "",
"deceased_date": "",
"household_name": "",
"primary_contact_id": "",
"organization_name": "",
"sic_code": "",
"user_unique_id": "",
"created_date": "20180101000000",
"modified_date": ""
}
}
}
but when I do:
https://somewhere.com/sites/all/modules/civicrm/extern/rest.php?entity=Contact&action=get&api_key=userkey&key=sitekey&json={"sequential":1,"return":"created_date","id":288}
I get: {
"is_error": 0,
"version": 3,
"count": 1,
"id": 288,
"values": [
{
"contact_id": "288",
"created_date": "2019-04-15 18:00:01",
"id": "288"
}
]
}