16. The trolley_remove method

This method takes a “trolley_token” plus a list of orders to remove, specified by their item numbers, and produces a trolley with those items removed from it. More than one item may be removed at a time, and an item may be removed more than once without error. As item numbers are not re-used within a trolley then it is not necessary to check that item numbers are actually present in the trolley, as the end result is a trolley absent of those items. As with all other trolley manipulation methods, it is possible to ask the method to produce a full description of the altered trolley in the output XML tree.

16.1. Required inputs

A “crypto_block” from “start_session” method must be present. This may come from the original “start_session” or may be one of the crypto blocks produced from any of the other methods which are documented as generating a “start_session” compatible block. A “trolley_token” holding the trolley from which the items are to be removed must also be present. The items are then specified by zero or more “remove_item” elements, each containing an integer specifying the item number of the order to be removed.

An optional “describe_trolley” element may be present to indicate that the output data should contain the full trolley description.

16.1.1. Example input


16.2. Output data

The output contains a “crypto_block”marked as coming from “start_session” for use in any subsequent calls, together with the modified trolley in a “trolley_token” element. The number of items in the modified trolley is present as “trolley_order_count”. If the “describe_trolley” element was present at the input then a “trolley” element will be produced in the output containing the description of the new trolley as documented for the “trolley_describe” method.

16.2.1. Example output


16.3. Potential failure codes

  • 1 - the supplied crypto block was not generated by
  • 2 - the requested “mime_text_type” was not a supported value
  • 801 - no “trolley_token” has been supplied
  • 802 - the supplied “trolley_token” is corrupt
  • 803 - the trolley has already been purchased
  • 804 - the trolley has already been reserved