Skip to content

Warehouse

Type: schema

Description

Validations:

  1. Either 'can_receive_stock' or 'accepts_returns' must be set to true.
  2. 'can_receive_stock' cannot be set to false while the warehouse has existing inventory.
  3. 'is_checkout_point' must be true when the warehouse type is 'retail-store'.
  4. If 'can_receive_stock' is false then 'can_ship_parcel' and 'can_collect' fields should be false.

TypeScript Definition

typescript
Warehouse: {{
            /** @description warehouse id */
            readonly id?: string;
            /** @description legal name */
            name: string;
            /** @enum {unknown} */
            warehouse_type: "retail-store" | "distribution-center";
            /** @default true */
            active: boolean;
            gstin?: string | null;
            city: string;
            address_line1: string;
            address_line2?: string | null;
            landmark?: string | null;
            pincode: string;
            state: string;
            country: string;
            /** @default +91 */
            country_code: string;
            /** @description 10 digit number without country code. */
            contact_phone: number;
            contact_email: string;
            is_default?: boolean;
            image_url?: string | null;
            seller_warehouse_id?: string | null;
            can_receive_stock: boolean;
            can_ship_parcel: boolean;
            can_collect: boolean;
            /** @description this field will be always true for warehouse_type = retail-store. */
            is_checkout_point: boolean;
            accepts_returns: boolean;
            opening_hours?: components["schemas"]["OpeningHours"];
        };
        /** WarehouseBasicDetail */
}

Component References

ReferenceResolves To
components["schemas"]["OpeningHours"]OpeningHours

OpenAPI Schema

json
{
  "description": "Validations:\n\n1) Either 'can_receive_stock' or 'accepts_returns' must be set to true.\n2) 'can_receive_stock' cannot be set to false while the warehouse has existing inventory.\n3) 'is_checkout_point' must be true when the warehouse type is 'retail-store'.\n4) If 'can_receive_stock' is false then 'can_ship_parcel' and 'can_collect' fields should be false.",
  "type": "object",
  "properties": {
    "id": {
      "description": "warehouse id",
      "type": "string",
      "readOnly": true
    },
    "name": {
      "description": "legal name",
      "type": "string"
    },
    "warehouse_type": {
      "enum": [
        "retail-store",
        "distribution-center"
      ]
    },
    "active": {
      "type": "boolean",
      "default": true
    },
    "gstin": {
      "type": [
        "string",
        "null"
      ]
    },
    "city": {
      "type": "string"
    },
    "address_line1": {
      "type": "string"
    },
    "address_line2": {
      "type": [
        "string",
        "null"
      ]
    },
    "landmark": {
      "type": [
        "string",
        "null"
      ]
    },
    "pincode": {
      "type": "string"
    },
    "state": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
    "country_code": {
      "type": "string",
      "default": "+91"
    },
    "contact_phone": {
      "description": "10 digit number without country code.",
      "type": "number"
    },
    "contact_email": {
      "type": "string"
    },
    "is_default": {
      "type": "boolean"
    },
    "image_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "seller_warehouse_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "can_receive_stock": {
      "type": "boolean"
    },
    "can_ship_parcel": {
      "type": "boolean"
    },
    "can_collect": {
      "type": "boolean"
    },
    "is_checkout_point": {
      "description": "this field will be always true for warehouse_type = retail-store.",
      "type": "boolean"
    },
    "accepts_returns": {
      "type": "boolean"
    },
    "opening_hours": {
      "$ref": "#/components/schemas/OpeningHours"
    }
  },
  "required": [
    "name",
    "warehouse_type",
    "city",
    "address_line1",
    "pincode",
    "state",
    "country",
    "contact_phone",
    "contact_email",
    "can_receive_stock",
    "can_ship_parcel",
    "can_collect",
    "is_checkout_point",
    "accepts_returns"
  ],
  "title": "Warehouse"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: