Parcel booking Sandbox
Menu
Powered byParcel2Go
Sandbox: test orders only. Nothing is shipped and payments are fake. Go to the live service.

Book a parcel, step by step

An assistant books a parcel in five calls. The price is only final at validation, and the user pays on the linked payment page. This service never takes payment.

  1. 1 Get quotes

    Send the sender and destination countries and postcodes, and each parcel's weight and size. Show the user a few options. Quotes are indicative. Tool: get_quotes.

    {
      "from": {
        "country": "GB",
        "postcode": "M1 1AE"
      },
      "to": {
        "country": "DE",
        "postcode": "10115"
      },
      "parcels": [
        {
          "weightKg": 2,
          "lengthCm": 30,
          "widthCm": 20,
          "heightCm": 15,
          "valueMinor": 2000
        }
      ]
    }
  2. 2 Check what the service needs

    Use the service slug and the from and to codes that get_quotes returned. Ask the user only for the fields it lists as required. Tool: get_booking_requirements.

    {
      "serviceSlug": "dpd-classic",
      "from": "GB",
      "to": "DE"
    }
  3. 3 Pick a drop-off shop (drop-off services only)

    Search the service's drop-off network near the sender, and let the user choose a shop. Tool: search_drop_shops.

    {
      "provider": "INPOST",
      "near": "M1 1AE",
      "purpose": "dropoff"
    }
  4. 4 Validate the order

    Send the full order. Fix any issues and validate again. Show the user the total, the breakdown and every warning, and get a clear yes. Tool: validate_order.

    {
      "serviceSlug": "dpd-collection",
      "from": {
        "name": "Sam Sender",
        "property": "1",
        "street": "Piccadilly",
        "town": "Manchester",
        "postcode": "M1 1AE",
        "country": "GB",
        "email": "sam@example.com",
        "phone": "01611234567"
      },
      "to": {
        "name": "Robin Receiver",
        "property": "10",
        "street": "Downing Street",
        "town": "London",
        "postcode": "SW1A 2AA",
        "country": "GB",
        "email": "robin@example.com",
        "phone": "02071234567"
      },
      "parcels": [
        {
          "weightKg": 2,
          "lengthCm": 30,
          "widthCm": 20,
          "heightCm": 15,
          "valueMinor": 2000,
          "description": "Books"
        }
      ]
    }
  5. 5 Create the order

    Send the confirmationToken from validate_order, once. Give the user the payment link. Nothing is booked until they pay. Tool: create_order.

    {
      "confirmationToken": "v1.<from validate_order>"
    }

Safe by design

Several parcels at once

Sending to several people? Price them together, then book them as one order with one payment link.

Same-day delivery

A dedicated motorcycle or van collects and delivers on the same day, within mainland Great Britain. Quotes leave it out unless includeSameDay: true.