Contact.ReferralCode in REST v1/v2

Using the XML-RPC API, I can read and write the ReferralCode field on contacts

Using the REST endpoints when I can retrieve a contact, and see the “ReferralCode” field listed as “referral_code”. It’s not documented in the API docs, but it is present in the response.

However, using the update contact endpoints, The “referral_code” property is not recognized.

I get the message: Unrecognized property: referral_code

Is this a bug in the update and create/update endpoints?

I have hundreds of clients using this field.

Hi @David_Bullock. In REST v2, the referral_code property is supported for contacts for read, create, and update operations. Below are example payloads:

Create contact (POST /v2/contacts) :

{
  "given_name": "Omar",
  "family_name": "Almonte",
  "referral_code": "Example123",
  "email_addresses": [
    {
      "email": "omar@test.com",
      "field": "EMAIL1"
    }
  ]
}

Update contact (PATCH /v2/contacts) :

{
  "referral_code": "Example123"
}

Hi Omar,

Thanks, that’s a partial answer.

I do not see that the v2 REST API supports CreateOrUpdate using PUT (with duplicate checking).

V2 only describes support for a create contact endpoint, and an update existing contact endpoint.

v1 docs here

https://developer.keap.com/docs/rest/#tag/Contact/operation/createOrUpdateContactUsingPUT

v2 docs here

https://developer.keap.com/docs/restv2/#tag/Contact/operation/createContactUsingPOST_1

Does v2 still not have support for CreateOrUpdate?

…or is the documentation outdated, and there’s a working endpoint that’s not documented?

…or?

Using v1 to create/update and v2 to re-update for a single field adds complexity and doubles the API usage.

Just for context, I DID try using the PUT on v2 in case it was just a case of missing/outdated documentation, but that does not work.

@David_Bullock CreateOrUpdate isn’t supported in REST v2 just yet. This is a known gap, the team is aware and looking into it. I’ll keep you updated as soon as I have more info.

1 Like

I’m sure you’ve heard this before, but it seems irrationally optimistic for management to be setting and publicizing API black out dates when the most fundamental implementation features are still missing and unimplemented.

1 Like

Thank you Omar,

– Dave

1 Like