ShippingMethodState
Type: schema
Description
A store's shipping method as its events carry it, with the warehouses it ships from for each marketplace.
TypeScript Definition
typescript
ShippingMethodState: {{
id: string;
name: string;
/** @enum {string} */
status: "active" | "inactive";
description: string | null;
/** @description Whether the method ships orders to customers. */
is_forward_shipping: boolean;
/** @description Whether the method carries returns back. */
is_return_shipping: boolean;
/** @enum {string} */
shipping_method_type: "manual" | "local-pickup";
shipping_rate_name: string;
/** @description The flat rate; `null` when `shipping_rate_condition` sets the rate. */
shipping_rate_fixed_price: number | null;
/** @description The rate by order value or by item weight; `null` when the rate is flat. */
shipping_rate_condition: Record<string, never> | null;
enable_shipping_rate: boolean;
/** @description In days. */
delivery_leadtime_minimum: number;
/** @description In days. */
delivery_leadtime_maximum: number;
/** @description `null` when there is no weight limit. */
maximum_weight: number | null;
/** @enum {string} */
fulfillment_type: "delivery" | "collect-in-store";
is_default: boolean;
/** @description The marketplaces the method ships for: those its warehouses sell on. */
marketplace_listing: {
marketplace_id: string;
}[];
/** @description The warehouses the method ships from, by marketplace id. */
warehouses: {
[key: string]: {
id: string;
name: string;
address_line1: string;
address_line2: string | null;
landmark: string | null;
pincode: string | null;
city: string | null;
state: string | null;
country: string | null;
contact_email: string | null;
contact_phone: string | null;
country_code: string | null;
gstin: string | null;
is_default: boolean;
image_url: string | null;
seller_warehouse_id: string | null;
active: boolean;
/** @enum {string} */
warehouse_type: "retail-store" | "distribution-center";
can_collect: boolean;
can_ship_parcel: boolean;
can_receive_stock: boolean;
accepts_returns: boolean;
is_checkout_point: boolean;
opening_hours: Record<string, never> | null;
}[];
};
};
/** ShippingOption */
}OpenAPI Schema
json
{
"title": "ShippingMethodState",
"description": "A store's shipping method as its events carry it, with the warehouses it ships from for each marketplace.",
"type": "object",
"externalDocs": {
"url": "https://llm-docs.commercengine.io/storefront/schemas/ShippingMethodState",
"description": "API reference for the ShippingMethodState schema"
},
"required": [
"id",
"name",
"status",
"description",
"is_forward_shipping",
"is_return_shipping",
"shipping_method_type",
"shipping_rate_name",
"shipping_rate_fixed_price",
"shipping_rate_condition",
"enable_shipping_rate",
"delivery_leadtime_minimum",
"delivery_leadtime_maximum",
"maximum_weight",
"fulfillment_type",
"is_default",
"marketplace_listing",
"warehouses"
],
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"active",
"inactive"
]
},
"description": {
"type": [
"string",
"null"
]
},
"is_forward_shipping": {
"description": "Whether the method ships orders to customers.",
"type": "boolean"
},
"is_return_shipping": {
"description": "Whether the method carries returns back.",
"type": "boolean"
},
"shipping_method_type": {
"type": "string",
"enum": [
"manual",
"local-pickup"
]
},
"shipping_rate_name": {
"type": "string"
},
"shipping_rate_fixed_price": {
"description": "The flat rate; `null` when `shipping_rate_condition` sets the rate.",
"type": [
"number",
"null"
]
},
"shipping_rate_condition": {
"description": "The rate by order value or by item weight; `null` when the rate is flat.",
"type": [
"object",
"null"
]
},
"enable_shipping_rate": {
"type": "boolean"
},
"delivery_leadtime_minimum": {
"description": "In days.",
"type": "integer"
},
"delivery_leadtime_maximum": {
"description": "In days.",
"type": "integer"
},
"maximum_weight": {
"description": "`null` when there is no weight limit.",
"type": [
"integer",
"null"
]
},
"fulfillment_type": {
"type": "string",
"enum": [
"delivery",
"collect-in-store"
]
},
"is_default": {
"type": "boolean"
},
"marketplace_listing": {
"description": "The marketplaces the method ships for: those its warehouses sell on.",
"type": "array",
"items": {
"type": "object",
"properties": {
"marketplace_id": {
"type": "string"
}
},
"required": [
"marketplace_id"
]
}
},
"warehouses": {
"description": "The warehouses the method ships from, by marketplace id.",
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"address_line1": {
"type": "string"
},
"address_line2": {
"type": [
"string",
"null"
]
},
"landmark": {
"type": [
"string",
"null"
]
},
"pincode": {
"type": [
"string",
"null"
]
},
"city": {
"type": [
"string",
"null"
]
},
"state": {
"type": [
"string",
"null"
]
},
"country": {
"type": [
"string",
"null"
]
},
"contact_email": {
"type": [
"string",
"null"
]
},
"contact_phone": {
"type": [
"string",
"null"
]
},
"country_code": {
"type": [
"string",
"null"
]
},
"gstin": {
"type": [
"string",
"null"
]
},
"is_default": {
"type": "boolean"
},
"image_url": {
"type": [
"string",
"null"
]
},
"seller_warehouse_id": {
"type": [
"string",
"null"
]
},
"active": {
"type": "boolean"
},
"warehouse_type": {
"type": "string",
"enum": [
"retail-store",
"distribution-center"
]
},
"can_collect": {
"type": "boolean"
},
"can_ship_parcel": {
"type": "boolean"
},
"can_receive_stock": {
"type": "boolean"
},
"accepts_returns": {
"type": "boolean"
},
"is_checkout_point": {
"type": "boolean"
},
"opening_hours": {
"type": [
"object",
"null"
]
}
},
"required": [
"id",
"name",
"address_line1",
"address_line2",
"landmark",
"pincode",
"city",
"state",
"country",
"contact_email",
"contact_phone",
"country_code",
"gstin",
"is_default",
"image_url",
"seller_warehouse_id",
"active",
"warehouse_type",
"can_collect",
"can_ship_parcel",
"can_receive_stock",
"accepts_returns",
"is_checkout_point",
"opening_hours"
]
}
}
}
}
}Auto-generated from OpenAPI spec and TypeScript definitions