Skip to content

pos-update-shipment ​

Method: PUT
Path: /pos/shipping/shipments/{reference_number}/manual-update

Tags: Shipments

Summary ​

Update shipment detail

Description ​

Updates a shipment to delivered, or marks it ready_to_collect. Collect-in-store shipments become ready_to_collect from processing (after approval) and can be delivered from ready_to_collect. Supply delivered_date and a shipping date when marking it delivered.

Pos SDK Usage ​

SDK Method: pos.updateShipment()

Example:

typescript
const { data, error } = await pos.updateShipment(
  { reference_number: "SHIP-2024-001234" },
  {
    status: "ready_to_collect"
  }
);

if (error) {
  console.error("Failed to update shipment:", error.message);
} else {
  console.log("Shipment updated successfully");
  const shipment = data.shipment;
  console.log(`Updated shipment status:`, shipment.shipment_detail.status);
}

// Update delivery status
const { data: deliveryData, error: deliveryError } = await pos.updateShipment(
  { reference_number: "SHIP-2024-001234" },
  {
    status: "delivered",
    delivered_date: "2024-01-15T16:45:00Z"
  }
);

TypeScript Definition ​

typescript
"pos-update-shipment": {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Shipment reference number */
                reference_number: string;
            };
            cookie?: never;
        };
        requestBody: {
            content: {
                "application/json": {
                    /** @constant */
                    status: "ready_to_collect";
                } | {
                    /** @constant */
                    status: "delivered";
                    /** Format: date-time */
                    shipped_date?: string;
                    /** Format: date-time */
                    delivered_date: string;
                };
            };
        };
        responses: {
            /** @description OK */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                        content: {
                            shipment: components["schemas"]["ShipmentDetail"];
                        };
                    };
                };
            };
            400: components["responses"]["AdminBadRequest"];
            401: components["responses"]["AdminUnauthorized"];
            403: components["responses"]["Forbidden"];
            404: components["responses"]["AdminNotFound"];
            /** @description Unsupported method. Use PUT. */
            405: components["responses"]["MethodNotAllowed"];
            500: components["responses"]["AdminInternalServerError"];
            504: components["responses"]["GatewayTimeout"];
        };
    };

Component References ​

ReferenceResolves To
components["schemas"]["ShipmentDetail"]ShipmentDetail
components["responses"]["AdminBadRequest"]AdminBadRequest
components["responses"]["AdminUnauthorized"]AdminUnauthorized
components["responses"]["Forbidden"]Forbidden
components["responses"]["AdminNotFound"]AdminNotFound
components["responses"]["MethodNotAllowed"]MethodNotAllowed
components["responses"]["AdminInternalServerError"]AdminInternalServerError
components["responses"]["GatewayTimeout"]GatewayTimeout

Parameters ​

  • reference_number (path): Shipment reference number

Request Body ​

Content Types: application/json

Responses ​

200 ​

OK

400 ​

401 ​

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.

404 ​

405 ​

500 ​

504 ​

The request timed out.

OpenAPI Definition ​

json
{
  "operationId": "pos-update-shipment",
  "summary": "Update shipment detail",
  "description": "Updates a shipment to `delivered`, or marks it `ready_to_collect`. Collect-in-store shipments become `ready_to_collect` from `processing` (after approval) and can be delivered from `ready_to_collect`. Supply `delivered_date` and a shipping date when marking it delivered.",
  "parameters": [
    {
      "name": "reference_number",
      "in": "path",
      "description": "Shipment reference number",
      "required": true,
      "schema": {
        "type": "string",
        "maxLength": 128,
        "minLength": 1,
        "pattern": "^(?:[A-Za-z0-9_-]{1,128}|MS:[A-Za-z0-9_-]{1,125})$"
      }
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "ready_to_collect"
                }
              },
              "required": [
                "status"
              ]
            },
            {
              "type": "object",
              "properties": {
                "status": {
                  "type": "string",
                  "const": "delivered"
                },
                "shipped_date": {
                  "type": "string",
                  "format": "date-time"
                },
                "delivered_date": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "status",
                "delivered_date"
              ]
            }
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              },
              "content": {
                "properties": {
                  "shipment": {
                    "$ref": "#/components/schemas/ShipmentDetail"
                  }
                },
                "required": [
                  "shipment"
                ],
                "type": "object"
              }
            },
            "required": [
              "message",
              "success",
              "content"
            ]
          }
        }
      }
    },
    "400": {
      "$ref": "#/components/responses/AdminBadRequest"
    },
    "401": {
      "$ref": "#/components/responses/AdminUnauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/AdminNotFound"
    },
    "405": {
      "description": "Unsupported method. Use PUT.",
      "$ref": "#/components/responses/MethodNotAllowed"
    },
    "500": {
      "$ref": "#/components/responses/AdminInternalServerError"
    },
    "504": {
      "$ref": "#/components/responses/GatewayTimeout"
    }
  },
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-update-shipment"
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    "Shipments"
  ],
  "x-speakeasy-group": "pos"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: