Forum Academy Marketplace Showcase Pricing Features

Adding Cart Items to Order - showing all Cart Item's fields in API

Hey there!

I’m working on a pizza delivery app. I currently have a set up where users select items which become

thing = Cart Items

these cart items obviously have their own fields like price and whether the user has selected extras, i.e.

Cart Item 1
Name: Big Pizza
Price: 15.00
Extras: Double Cheese, Vegan Cheese

when they checkout, these Cart Items are added to

thing = Order as
set list of Cart Items

That’s fine, but in the API address of /object/order, the cart items show up as unique IDs e.g.

“Cart Items”: [
“1633969568297x922730653028974600”,
“1633969583834x487407626014687200”,
“1633969597909x707958147531931600”
],

In order to see the fields from those Cart Items, e.g. name, price etc, do I have to add them to the order in a different way, i.e.

Create Cart Item 1:

  • name: first Cart Item’s name
  • price: first Cart Item’s price
  • extras: first Cart Item’s extras

thanks in advance!

Which API are you using?

What is the setup in your app for sending the cart items to the API that is resulting in


Have you this checkbox checked in The settings- API tab @emma1 ?

yep, already ticked that little guy!

If you have an Order --> Cart Items hierarchy and an Order is a list of Carts (is that right?) then I think you’ll need to request the Cart Item itself to get the field data back.

You could use the ID’s supplied with that first call to retrieve each Cart via a GET for each. Or you could switch to a POST request and format a response that packages the fields that you need into one response.

Or I might have totally misunderstood the issue :thinking:

Have you enabled Data API for Cart items?

yes I have @moutsatsosantonis

What is the setup in your app for sending that data to the API?

not completely sure if i’ve understood your question, but -

A checkout button is clicked, which adds the user’s stored Cart Items (thing) to a new Order (thing) as a list of items.

And how are you sending the data to an api. Screen shots of your setup are helpful to understand how you currently have it setup to advise on necessary adjustments to resolve your issue.

Also what api are you sending the data to?