Skip to content

CreateReplacementShipmentWithAutoMethod ​

Type: schema

Description ​

Replacement shipment payload when fulfilling through an integrated carrier.

TypeScript Definition ​

typescript
CreateReplacementShipmentWithAutoMethod: {{
            /**
             * @description Set to `delivery` when the replacement is shipped to the customer.
             * @constant
             */
            fulfillment_type?: "delivery";
            /** @description The warehouse from which the replacement items will be shipped. */
            warehouse_id: string;
            /** @description Omit to reuse the original shipment lines. */
            shipment_items?: components["schemas"]["ReplacementShipmentItem"][];
            /**
             * @description Set to `auto` to dispatch the shipment through an integrated carrier.
             * @enum {unknown}
             */
            shipping_option: "auto";
            /** @description The integrated shipping provider used to fulfill the replacement. */
            shipping_provider_id: string;
            /**
             * @description Use `manual` to specify boxes explicitly, or `auto` to let the system pack on your behalf.
             * @enum {unknown}
             */
            packing_option: "auto" | "manual";
            /** @description Box-wise packing breakdown. Required when `packing_option` is `manual`. */
            boxes?: components["schemas"]["ShipmentBox"][] | null;
            /** @description Total shipment weight in kilograms, with up to three decimal places. Required and nonzero when packing_option is manual. */
            total_weight?: number;
            /** @description Specific courier company to use. If omitted, the system selects the most suitable courier automatically. */
            courier_company_id?: string | null;
            /** @description The reason for the replacement shipment. */
            reason: string;
        } & unknown;
        /**
         * CreateReplacementShipmentWithManualMethod
         * @description Replacement shipment payload when fulfilling through a manual courier (no carrier integration).
         */
}

Component References ​

ReferenceResolves To
components["schemas"]["ReplacementShipmentItem"]ReplacementShipmentItem
components["schemas"]["ShipmentBox"]ShipmentBox

OpenAPI Schema ​

json
{
  "description": "Replacement shipment payload when fulfilling through an integrated carrier.",
  "type": "object",
  "properties": {
    "fulfillment_type": {
      "description": "Set to `delivery` when the replacement is shipped to the customer.",
      "type": "string",
      "const": "delivery"
    },
    "warehouse_id": {
      "description": "The warehouse from which the replacement items will be shipped.",
      "type": "string",
      "minLength": 1
    },
    "shipment_items": {
      "description": "Omit to reuse the original shipment lines.",
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ReplacementShipmentItem"
      }
    },
    "shipping_option": {
      "description": "Set to `auto` to dispatch the shipment through an integrated carrier.",
      "enum": [
        "auto"
      ]
    },
    "shipping_provider_id": {
      "description": "The integrated shipping provider used to fulfill the replacement.",
      "type": "string",
      "minLength": 1
    },
    "packing_option": {
      "description": "Use `manual` to specify boxes explicitly, or `auto` to let the system pack on your behalf.",
      "enum": [
        "auto",
        "manual"
      ]
    },
    "boxes": {
      "description": "Box-wise packing breakdown. Required when `packing_option` is `manual`.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/components/schemas/ShipmentBox"
      }
    },
    "total_weight": {
      "description": "Total shipment weight in kilograms, with up to three decimal places. Required and nonzero when packing_option is manual.",
      "type": "number",
      "exclusiveMaximum": 10000000,
      "exclusiveMinimum": -10000000
    },
    "courier_company_id": {
      "description": "Specific courier company to use. If omitted, the system selects the most suitable courier automatically.",
      "type": [
        "string",
        "null"
      ]
    },
    "reason": {
      "description": "The reason for the replacement shipment.",
      "type": "string",
      "minLength": 1
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "packing_option": {
            "const": "manual"
          }
        },
        "required": [
          "packing_option"
        ]
      },
      "then": {
        "required": [
          "total_weight",
          "boxes"
        ],
        "properties": {
          "total_weight": {
            "not": {
              "const": 0
            }
          },
          "boxes": {
            "type": "array",
            "minItems": 1
          }
        }
      }
    }
  ],
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/admin-pos/schemas/CreateReplacementShipmentWithAutoMethod"
  },
  "required": [
    "warehouse_id",
    "shipping_option",
    "shipping_provider_id",
    "packing_option",
    "reason"
  ],
  "title": "CreateReplacementShipmentWithAutoMethod",
  "x-tags": [
    "Shipping"
  ]
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: