Cannot update orders in orderapi

The only way for it to have a line item is to pass in a note. If all the items in your Catalog have user_data then you can use that as a reference_id.

Basically your app is allowing the seller to select items you can use your own custom user_data of each item they’re selling and pass that in as a note. When the payment is processed your service can query the note for all the user_data. Then SearchCatalogObjects with:

{
  "object_types": [
    "ITEM", "ITEM_VARIATION"
  ],
  "query": {
    "prefix_query": {
      "attribute_name": "user_data",
      "attribute_prefix": "my_custom_reference_id"
    }
  },
  "limit": 100
}

You’ll get back the item_variation and can them make necessary inventory updates. :slightly_smiling_face:

1 Like