Basket Buttons#

Basket buttons appear on the basket page. When clicked, they submit a POST request to a remote web service, passing the contents of the basket.

Create a Basket Button#

  1. Navigate to Admin and choose Basket Buttons.

  2. Click Create a new button, or Create your first button if no buttons exist.

  3. Fill out the form. See Extensible Buttons for a description of each field.

  4. Click Save.

To change or remove a button, click the Edit or Delete link next to it.

Web Service Requests#

Form POST#

The browser navigates to the specified URL, submitting an HTML form with a field named basketJson containing the same JSON document described below.

Javascript POST#

The web service will receive a POST with application/json content in the request body. The Citation property contains the basket’s citation information, with the basket name as the title. The ItemIdentifers property (note the spelling) contains the identifier of every item in the basket.

Request from the Basket page.#
 {
     "Citation": {
         "Title": { "en-US": "My Basket of Variables" }
     },
     "ItemIdentifers": [
         "example.org:0ccc5a26-25b2-4a36-9f05-08ed1e2fec24:2",
         "example.org:f14cbeac-e266-4335-bf7f-e329eaa5843d:1",
         "example.org:c074a069-4902-4634-8730-46b29455c9c8:1",
         "example.org:3fc89da3-f93a-4037-a879-b2478d895209:1"
     ]
 }

The web service should respond as described in Extensible Buttons.