Inserting Accented Letters

Hi All,

I’m trying to insert names with accented letters such as Sofía via the v3 API. I successfully inserted 14k contacts and only approx 30 failed, all have the accents so I’m pretty sure they are the problem.

Below is my request url (I XXed out the personal info and API key)

https://api.hubapi.com/crm/v3/objects/contacts/batch/create?hapikey=XXXXX

Content-Type

application/json

And Data

{“inputs”: [{ “properties”: { “company”: “”, “email”: “SXXXXX@gmail.com”, “firstname”: “Sofía”, “lastname”: “”, “phone”: “+6XXXXXXXXX”, “custom_lead_source”: “Mr Yum”, “marketing_guest_manual”: “true”, “website”: “” } }]}

And response

{“status”:“error”,“message”:“Invalid input JSON on line 1, column 225: Unexpected end-of-input: expected close marker for Object (start marker at [Source: (org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream); line: 1, column: 1])”,“correlationId”:“d042b22e-eee2-4584-9179-dc04459d1122”}

Any advice on how to handle these charachters would be much appreciated!

Many thanks

Lorinda :slightly_smiling_face:

Hi @Lorinda,

I’ll link to another post that seems to be linked to your issue.

Could you try using url encode, as suggested, and make that push again to see if that’s the reason why it’s failing ?

To url encode, either you can do it with javascript or php (or any other language that supports url encode) or you could simply try to use the tester on the aforelinked website.

Hope this helps !
If it does, please consider marking this answer as a solution :slightly_smiling_face:

Best,

Ludwig

Thanks Ludwig. This looks like it should help. I’ll have a go this week and let you know how I get on