Discussion Forums

Two tasks being created

 
Lyncean
38 posts

I am trying a tasklist for a newly created contact using the API, but everytime I insert one I get two in return :-).

I only get a response mentioning a single task list and I’m pretty sure I’m only executing the request only once. When I look in the UI, it gives me two.

The request:

secure.solve360.com/contacts/task with body <request>PARENTID</parent><data><title>TITLE</title></data></request>

(obviously with placeholders filled in correctly).

Any clue?

By the way, I was wondering about the format for the lists I’m getting back when querying for a list of customers. Each contact element has the identifier embedded in the XML (id) element. This can never validate using a schema, can it? I would have expected something like this:

<contacts>
  <contact>
    <id>12345</id>
    <name>Alef Arendsen</name<
    ....
  </contact>
</contacts>

instead of

<id12345>
  <id>12345</id>
  <name>Alef Arendsen</name>
</id12345>

But that aside…

cheers,
Alef

p.s. decision made, after the import stuff is we’re going to move!

Lyncean
38 posts

The previous one was about tasklists by the way, not about tasks.

But now I’m stuck. I can’t seem to create tasks as children of task lists…

As soon as I execute the contacts/task request (a POST, using the data displayed below), I get a 403 forbidden. AFAICS there’s nothing wrong with the request. I’ve correctly filled in the tasklist identifier (that I just created in the previous request) as a parent identifier for the task. Other than the title, I’m leaving everything empty (the docs indicate there are no required fields other than parent).

Can you help me out?

thanks,
Alef

Data: <request>PARENTID</parent><data><title>TITLE</title></data></request>
with PARENTID being the ID one of the (accidentally, see previous query) two tasklists that I created

Lyncean
38 posts

Okay, apologies, scrap those two questions!

It seems the HttpClient (in Java) is somehow executing two requests afterall… I’m only issuing one, but it seems to do two somewhere in the background. Using curl it works as expected.

thanks,
Alef

Avatar
Administrator
3952 posts

It might have just happened when you typed up the example for the post but I noticed the

<parent

tag is missing.

We add the ID to the node so it is easy to look-up a specific record from a set e.g. $response->id12345->name;

Lyncean
38 posts

Thanks for the clarification!

Well no, it really was the crappy CommonsHttpClient (a Java client library that keeps on bugging me). It’s fixed now and I’m happily creating tasks and all that.

Now all I need to do is parse the CSV file from Zoho and I’m done.