Get Order LineItem custom_options field type

custom_options field in Order LineItem is defined as string type on the documentation.

However, when we get the data, it doesn’t look like string.


“request_id”: “61eebc6d83a35df05997fbc9”

What is the actual type of custom_options field? We’re having an issue to deserialize a response from Shiphero API due to the unmatched type.

Hello @heyjess!

I was just updating our documentation regarding that field!

Please refer to the following announcement: UPDATE: We refactored custom_options field for line_items

Let me know if you have any trouble implementing it.

Have a nice day!

Hi @tomasfd

Thanks for the rapid response!
I’m just wondering what those custom options key and values mean?

“__Added with Frequently Bought Together button”: “”
“_ZapietId”: “M=S”

Who set these custom options? customers?

Unlike other fields, custom options filed’s keys are dynamic.
Sometimes, custom_options: null, sometimes it has “__Added with Frequently Bought Together button”: “” or “_ZapietId”: “M=S” or both.
It is difficult to make a class for that.

Hello @heyjess!

when working with the API, you can use that to add any king of additional information:

custom_options: {size:"M", color:"blue", giftwrapped:"yes"}

They are read-only. They won’t affect the picking or packing process.

If you have an order with custom options you don’t recognize, please share the order id (the number you find in the URL), and I can take a look at it.

Have a nice day!

Thanks @tomasfd

The custom_options examples above are from order id T3JkZXI6MjQ0MjgyNjU1
When we pull the order data, custom_options are always either null, or “__Added with Frequently Bought Together button”: “” ot “_ZapietId”: “M=S” or both and the keys and values are ununderstandable.

So, I’m trying to figure it out that the custom_options is needed to us or not.

I’d appreciate your support!

Hello @heyjess!

There is a field in Shopify called properties inside of line_items, that has a value that works ina similar way:


We poll that field to fill our custom_options field.

I hope this clears it out. If not, please let me know.

Kind regards,