Skip to main content
Open

Orders API-partial orders

  • March 30, 2023
  • 4 replies
  • 1026 views

Forum|alt.badge.img+5

When using “partial delivery” I would like to see which items failed explicitly.

In other words, the orders API response includes a list of the files delivered, which have the item IDs in them. Comparing that against the input IDs should show which were not successfully delivered.

I would like to have an explicit list of failed_items within the API

4 replies

Forum|alt.badge.img+3

Agreed! In the short term, you can probably get around this using try/except. Here’s what I have done in Python. Hope this helps!

# Place the order

answer = input("Enter 'Buy!Buy!Buy!'")



if answer == "Buy!Buy!Buy!":

    for order_request in orders_to_submit:

        try:

            async with Session() as sess:

                cl = OrdersClient(sess)

                order = await cl.create_order(order_request)

            submitted_orders.append(order)

        except Exception as e:

            submitted_orders.append('bad order')

            print(f'Error submitting order {order_request}: {e}')



else:

    print("Your pipelines were not created")

 


Forum|alt.badge.img+1
  • ‎‎ 🌱
  • May 15, 2023

thanks for the reply!

would be a better solution from our point of view, to have the order fulfilment logic implemented in the API as such. 
and not to develop a work around on the customer implementation. 

regards

Norbert 


elyhienrich
Community Manager 🌎
Forum|alt.badge.img+17
  • Community Manager 🌎
  • June 24, 2024
NewOpen

elyhienrich
Community Manager 🌎
Forum|alt.badge.img+17
  • Community Manager 🌎
  • June 24, 2024

Thank you for submitting an idea, it is under review and open for discussion and voting. This is the investigation stage when we gather more information.