Storing lineitem metadata?

I’m trying to store data in the metadata field for lineitems to keep track of where each item is in terms of fulfillment as our orders are typically made up of many items that are individually prepared. I can update an open order and don’t receive any errors, but when I look at the response (or get the orders from the api again) no metadata is present in the lineitem results.

Here’s the body I’m sending, what am I missing?
locationId: ‘locationid’,
version: version_num,
line_items: [ { quantity: ‘1’, metadata: { “state”: “inprocess” }, uid: ‘line_item_uid’ } ]


Are these paid for orders? If so updating the line items of a paid order isn’t currently available and adding additional metadata won’t show on the order. :slightly_smiling_face:

Yes, paid for but open.

If I can’t modify the lineitems once the order is paid, is there a way to track the fulfillment status of each lineitem separately from the full order? Kind of like how the KDS works - I want to be able to mark each item as “complete” then the full order.

I’m hoping I’m missing the obvious answer, and don’t have to build a whole data structure in the order metadata :slight_smile:

At this time with orders the fulfillment is scoped to the entire order. Currently there isn’t a way to track the fulfillment status of each line item in a Square order. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

1 Like

Got it. Whole data structure in order metadata it is, then!

Thanks for the quick replies!

Just had a thought - Can I use custom attributes for lineitems, and could that work for this type of scenario? Or will I run into the same problem as I did with metadata?

Yes, you can update the custom attribute value after the order has been paid for. :slightly_smiling_face:

For line items? Or only for the full order?

It’s for the full order. :slightly_smiling_face: