2

I already asked this question in the Podio Partners workspace. As StackOverflow is the official Podio developer forum, it makes sense to post it here, too.

We experienced a strange behavior of the Podio API. In short, when fetching references via API, the returned list of references is not up to date in some cases.

We have two apps, "Products" and "Orders". "Products" contains an app field "order", which references the order the product belongs to.

Our process looks like this:

  • Create new order (POST /item/app/{order_app_id})
  • Reference order in several products (add order_id to product and save product via PUT /item/{product_id})
  • Get all references of order to generate some files (GET /item/{order_id}/reference/)

In some cases (when getting the references immediately after adding the order to the products), the list of references does not contain all products. If we fetch the references again later, all references are returned like expected.

Is there some delay until the references are available on the referenced item? Is there another way of fetching references, which is more deterministic?

Thanks in advance!

stefan_mdt
  • 21
  • 1

1 Answers1

2

I am using Podio APIs a lot and never seen such issues but giving some thoughts/troubleshooting steps

1) The issue might be you are getting references in reverse direction and indexes are not refreshed. If you add product reference field in Order app and trying to get the forward reference then I am sure it will not have any issue at all. Also as an app designing perspective, it is good to have Product reference in Order app. I think this itself can solve the purpose.

2) You can try to add a wait of few seconds before making API call.

Hopefully, this helps.

Bajarang
  • 47
  • 4
  • I changed the example a bit to keep it simple. Our "Product" is a "Production", that can only appear once in only one Order. Thinking of a RDS, you would expect the reference to appear on the side of the Production, of course. – stefan_mdt Dec 03 '18 at 10:03