purchaseProductRequest

November 12, 2025 · View on GitHub

Type: object


Properties overview

PropertyTypeRequiredDescription
inputsobject
subscriberobject

Detailed Properties

  • inputs (object) - required

    • customer (customer) - optional
      A user that wishes to purchase a package
    • location (placeReference) - optional
      value: "GPS|gps|{datasource-prefix}|P:[a-zA-Z0-9-_.]+" this string references to information that can be found in the data sources. Enlist all prefixes (=rel) from the /collections/datasources/items that apply to a place/location. Default it matches already with 'GPS' (no entry required in the datasources). In case of a custom place (like home address), you can use the 'P:' prefix and add the address to the places list of the request/offer/package.
    • products (array[productReference]) - required
    • distribution (distribution) - optional
    • traveller (array[traveller]) - optional
      Array item properties:
      • type (string) - required
        value: "traveller"
      • id (string) - required
        default string, full names etc (length 0-200)
      • characteristics (object) - optional
      • requirements (object) - optional
      • profile (string) - optional
        default string, full names etc (length 0-200)
      • groupSize (number) - optional
        in case of a travelling party, specify the (sub)group size with equivalent attributes
  • subscriber (object) - optional

    • successUri (string (uri)) - optional
    • inProgressUri (string (uri)) - optional
    • failedUri (string (uri)) - optional

Example

{
  "inputs": {
    "products": [
      "example-string"
    ],
    "customer": {
      "id": "identifier",
      "initials": "example-string",
      "firstName": "example-string",
      "lastName": "example-string"
    },
    "location": "GPS|gps|{datasource-prefix}|P:[a-zA-Z0-9\\-_.]+",
    "distribution": {
      "accessType": "BARCODE",
      "distributionChannel": "example-string"
    }
  },
  "subscriber": {
    "successUri": "https://example.com",
    "inProgressUri": "https://example.com",
    "failedUri": "https://example.com"
  }
}