pos-get-fulfillment-options
Method: POST
Path: /pos/carts/fulfillment-options
Tags: Fulfillment
Summary
Retrieve fulfillment options
Description
Returns available fulfillment options for a cart and delivery pincode. The summary object indicates collect_available, deliver_available, and recommended_fulfillment_type. Use the collect array for Click & Collect store locations and deliver for delivery details. Requires a signed-in POS staff session with permission for this operation.
Pos SDK Usage
SDK Method: pos.getFulfillmentOptions()
Example:
const { data, error } = await pos.getFulfillmentOptions({
cart_id: "01H9CART12345ABCDE"
});
if (error) {
console.error("Failed to get fulfillment options:", error.message);
} else {
console.log("Recommended:", data.summary.recommended_fulfillment_type);
console.log("Delivery serviceable:", data.deliver.is_serviceable);
data.collect.forEach(store => {
console.log(`Collect at ${store.name} (${store.distance_km} km)`);
});
}TypeScript Definition
"pos-get-fulfillment-options": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody: {
content: {
"application/json": components["schemas"]["CartBasedFulfillmentOption"];
};
};
responses: {
/** @description OK */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": {
message: string;
success: boolean;
content: {
summary: {
collect_available: boolean;
deliver_available: boolean;
/** @enum {unknown} */
recommended_fulfillment_type: "collect-in-store" | "delivery" | "partial-collect-and-delivery";
recommended_store: components["schemas"]["CollectInStore"] | null;
};
collect: components["schemas"]["CollectInStore"][];
deliver: components["schemas"]["DeliveryOption"];
};
};
};
};
/** @description The cart is missing or inactive, or the request is invalid. */
400: components["responses"]["BadRequest"];
401: components["responses"]["Unauthorized"];
403: components["responses"]["Forbidden"];
500: components["responses"]["InternalServerError"];
504: components["responses"]["GatewayTimeout"];
};
};Component References
| Reference | Resolves To |
|---|---|
components["schemas"]["CartBasedFulfillmentOption"] | CartBasedFulfillmentOption |
components["schemas"]["CollectInStore"] | CollectInStore |
components["schemas"]["DeliveryOption"] | DeliveryOption |
components["responses"]["BadRequest"] | BadRequest |
components["responses"]["Unauthorized"] | Unauthorized |
components["responses"]["Forbidden"] | Forbidden |
components["responses"]["InternalServerError"] | InternalServerError |
components["responses"]["GatewayTimeout"] | GatewayTimeout |
Request Body
Content Types: application/json
Responses
200
OK
400
Bad request
401
Authentication failed. Codes include token-required, token-expired and token_not_valid for an invalid or expired token.
403
Access denied. token-required requires an authenticated session; permission-denied means the caller cannot access this resource. On POS, session-expired requires signing in again.
500
The request failed because of an unexpected error.
504
The request timed out.
OpenAPI Definition
{
"operationId": "pos-get-fulfillment-options",
"summary": "Retrieve fulfillment options",
"description": "Returns available fulfillment options for a cart and delivery pincode. The `summary` object indicates `collect_available`, `deliver_available`, and `recommended_fulfillment_type`. Use the `collect` array for Click & Collect store locations and `deliver` for delivery details. Requires a signed-in POS staff session with permission for this operation.",
"parameters": [],
"requestBody": {
"description": "",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CartBasedFulfillmentOption"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"success": {
"type": "boolean"
},
"content": {
"properties": {
"summary": {
"type": "object",
"properties": {
"collect_available": {
"type": "boolean"
},
"deliver_available": {
"type": "boolean"
},
"recommended_fulfillment_type": {
"enum": [
"collect-in-store",
"delivery",
"partial-collect-and-delivery"
]
},
"recommended_store": {
"oneOf": [
{
"$ref": "#/components/schemas/CollectInStore"
},
{
"type": "null"
}
]
}
},
"required": [
"collect_available",
"deliver_available",
"recommended_fulfillment_type",
"recommended_store"
]
},
"collect": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CollectInStore"
}
},
"deliver": {
"$ref": "#/components/schemas/DeliveryOption"
}
},
"required": [
"summary",
"collect",
"deliver"
],
"type": "object"
}
},
"required": [
"message",
"success",
"content"
]
}
}
}
},
"400": {
"description": "The cart is missing or inactive, or the request is invalid.",
"$ref": "#/components/responses/BadRequest"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"500": {
"$ref": "#/components/responses/InternalServerError"
},
"504": {
"$ref": "#/components/responses/GatewayTimeout"
}
},
"externalDocs": {
"url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-get-fulfillment-options"
},
"security": [
{
"Authorization": []
}
],
"tags": [
"Fulfillment"
],
"x-speakeasy-group": "pos",
"x-speakeasy-name-override": "fulfillmentOptions"
}Auto-generated from OpenAPI spec and TypeScript definitions