question

dsafonov avatar image
dsafonov asked dsafonov edited

Order created with REST API won't print ('printing failed') after adding modifiers

Hi,

I am creating orders through the Orders API (not Atomic Order, as the price and name may differ). I am able to submit the order and submit payment, and if I don't add any line item modifications, it prints fine.

I create a modifier group, create a modifier, and attach that modifier with the 'Apply modification to lineitem' API. I don't customize the modifier, I simply give it the `modifier: { id: ... }`.

The order shows up fine on my Station Solo dev kit and online (although the modifier groups names don't show). However, either through Reprint on the Station or through Print Event API, I get print failed. I get an email about the print failed, and I get a 'print failed, contact support' popup on the station.

The only difference between printing and not printing is attaching the modifiers. I can't seem to find any documentation that would elucidate on what I'm doing wrong -- the API is happily returning 200s, and does render the order almost as I intend -- everywhere except the printer.

Anyone have any advice?

REST APIPrintModifiers
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
dsafonov avatar image
dsafonov answered dsafonov edited

I did figure out the answer: you can't attach modifiers to purely synthetic items in Orders API. Previously, when we could not match an existing item in the merchant's inventory, we would push our version. Of course it wouldn't have the right tags and make a bit of a mess, but better than omitting it from the order. I was hoping to avoid that with Orders API, but it looks like I'll still have to inject hidden items into their inventory.

And modifier group name doesn't appear in any context when the modifier group is not associated with the item. This applies to Atomic Order, Orders API, synthetic items or pure unedited inventory items. The modification does not retain the modifier group of the modifier unless the modifier group is explicitly on that item. It seems strange, since I imagine modifier group name to be more like metadata associated with a modification at creation time rather than a persistent link.

This API could some documentation to explain all of these intricacies for those of us for whom details matter :) I am sure it is tribal knowledge internally.


10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community