0

Creating contacts with a Job Title

Hi,

I'm able to read and write contacts from the API but I've run into a few issues:

- if I try and create a contact that has a 'jobtitle' element, I always get a 404, regardless of the value
- there is not obvious way to fully update a contact, only doing it field by field or deleteding, recreating
- despite what the documentation says, having a space in a category name is not an issue
- if anyone is having strange errors while trying to post XML, make sure your content type is set to 'application/xml; charset="utf-8"'
- the documentation for the creation of categories is wrong, instead of

<categories>
<name>Yahoo!</name>
</categories>

it has to be

<category>
<name>Yahoo!</name>
</category>

If you have any tips or suggestion regarding the first 2 items, please let me know.

Tiago Macedo

by
7 Replies
  • for an easier means of updating contacts, look into the PUT /contacts endpoint
    http://developer.yahoo.com/social/rest_api...g.html#sync-put

    try jobTitle instead of jobtitle.


    QUOTE (Tiago @ Feb 18 2010, 09:15 AM) <{POST_SNAPBACK}>
    Hi,

    I'm able to read and write contacts from the API but I've run into a few issues:

    - if I try and create a contact that has a 'jobtitle' element, I always get a 404, regardless of the value
    - there is not obvious way to fully update a contact, only doing it field by field or deleteding, recreating
    - despite what the documentation says, having a space in a category name is not an issue
    - if anyone is having strange errors while trying to post XML, make sure your content type is set to 'application/xml; charset="utf-8"'
    - the documentation for the creation of categories is wrong, instead of

    <categories>
    <name>Yahoo!</name>
    </categories>

    it has to be

    <category>
    <name>Yahoo!</name>
    </category>

    If you have any tips or suggestion regarding the first 2 items, please let me know.

    Tiago Macedo
    0
  • QUOTE (Nick @ Feb 18 2010, 09:48 AM) <{POST_SNAPBACK}>
    for an easier means of updating contacts, look into the PUT /contacts endpoint
    http://developer.yahoo.com/social/rest_api...g.html#sync-put

    try jobTitle instead of jobtitle.


    Thanks :)Thanks for the tip on the jobtitle, I went for the lowercase since that's what the API outputs, I'll try that now.
    0
  • QUOTE (Tiago @ Feb 18 2010, 09:15 AM) <{POST_SNAPBACK}>
    Hi,

    I'm able to read and write contacts from the API but I've run into a few issues:


    Could you please paste the code?

    BR
    0
  • ooops, perhaps it would be a good idea to change the title of the topic :\
    0
  • jobTitle works fine!
    0
  • I'm now using the Sync API but I'm running into an issue and I can't find the proper documentation.

    Can you please tell what's the maximum request size for Sync API PUT?

    Depending on how many contacts and how big they are sometimes I can post something like 100 in one requests and sometimes only 30 (might have something to do with the number of categories though) without getting a 413 Entity Too Large response.

    Is that limit documented somewhere? I can probably figure out the number of bytes by spamming your API but perhaps I'm doing something wrong as these seem awfully small requests.
    0
  • Tiago,

    The maximum size of a PUT body is 65536 bytes. We may increase in the future, however it will never decrease. This is also the maximum size of a POST body.

    Thanks,
    nt

    QUOTE (Tiago @ Apr 1 2010, 02:50 PM) <{POST_SNAPBACK}>
    I'm now using the Sync API but I'm running into an issue and I can't find the proper documentation.

    Can you please tell what's the maximum request size for Sync API PUT?

    Depending on how many contacts and how big they are sometimes I can post something like 100 in one requests and sometimes only 30 (might have something to do with the number of categories though) without getting a 413 Entity Too Large response.

    Is that limit documented somewhere? I can probably figure out the number of bytes by spamming your API but perhaps I'm doing something wrong as these seem awfully small requests.
    0

Recent Posts

in Contacts