When booking shipments through the Shiptheory API, users now have more flexibility to determine if an order should match with a rule or not. Alongside the other criteria for rules explained here, users now have a new field to use for custom text which can then be used as rule criteria.


When sending an order to the Shiptheory API, you can specify the field "rules_metadata" in the "shipment_detail" array:


For some more information on sending this through, please see API documentation here.


This is a custom text field in which you can enter a maximum of 50 characters, this will then pull through to Shiptheory and can be used as criteria in your shipping rules:


This means that so long as what you've entered through the API matches exactly with what's in the rule, this will then meet the criteria. This can be used to allow greater control over what an order should match to. 


For example, if you want to specify which printer an order should send to through the API, you could use this field to match up to a rule for the needed printer. If you're wanting to be able to print per user with this process, you could ensure that each user has a rule with this criteria added to allow you to specify which user it's going to and therefore, which printer it should print to.


See here how that may look:



As you can see above, we have the Rules Metadata field set to match to the text string "Luke's Printer", and we then have the automatic printer "ZDesigner GK420d on ship@LUKE-SHIPTHEORY" selected to automatically print to. This will then mean that if the order is sent from the API with that text string in the Rules Metadata field, it will match to that rule and print to that specific printer.


For some more information about rule specific printing options, please see the full guide here.



If you have any issues here, please feel free to Contact Support