Skip to content

PosFulfillmentPreference ​

Type: schema

Description ​

The pickup and delivery choices for a POS cart.

TypeScript Definition ​

typescript
PosFulfillmentPreference: {{
            /** @constant */
            fulfillment_type: "collect-in-store";
            pickup_location_id: string;
        } | {
            /** @constant */
            fulfillment_type: "partial-collect-and-delivery";
            collect_in_store: {
                pickup_location_id: string;
                items: components["schemas"]["PosFulfillmentItem"][];
            };
            delivery: {
                shipping_provider_id: string;
                courier_company_id?: string | null;
                items: components["schemas"]["PosFulfillmentItem"][];
            };
        };
        /** PosLocation */
}

Component References ​

ReferenceResolves To
components["schemas"]["PosFulfillmentItem"]PosFulfillmentItem

OpenAPI Schema ​

json
{
  "description": "The pickup and delivery choices for a POS cart.",
  "discriminator": {
    "propertyName": "fulfillment_type"
  },
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/admin-pos/schemas/PosFulfillmentPreference"
  },
  "oneOf": [
    {
      "type": "object",
      "required": [
        "fulfillment_type",
        "pickup_location_id"
      ],
      "properties": {
        "fulfillment_type": {
          "type": "string",
          "const": "collect-in-store"
        },
        "pickup_location_id": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "fulfillment_type",
        "collect_in_store",
        "delivery"
      ],
      "properties": {
        "fulfillment_type": {
          "type": "string",
          "const": "partial-collect-and-delivery"
        },
        "collect_in_store": {
          "type": "object",
          "properties": {
            "pickup_location_id": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PosFulfillmentItem"
              },
              "minItems": 1
            }
          },
          "required": [
            "pickup_location_id",
            "items"
          ]
        },
        "delivery": {
          "type": "object",
          "properties": {
            "shipping_provider_id": {
              "type": "string",
              "minLength": 1,
              "pattern": "\\S"
            },
            "courier_company_id": {
              "type": [
                "string",
                "null"
              ],
              "minLength": 1,
              "pattern": "\\S"
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/PosFulfillmentItem"
              },
              "minItems": 1
            }
          },
          "required": [
            "shipping_provider_id",
            "items"
          ]
        }
      }
    }
  ],
  "title": "PosFulfillmentPreference"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: