Skip to content

pos-reject-shipment ​

Method: POST
Path: /pos/shipping/shipments/{reference_number}/reject

Tags: Shipments

Summary ​

Reject shipment

Description ​

Reject a shipment awaiting store review. Returns message and success.

Pos SDK Usage ​

SDK Method: pos.rejectShipment()

Example:

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

if (error) {
  console.error("Failed to reject shipment:", error.message);
} else {
  console.log("Shipment rejected:", data.message);
}

TypeScript Definition ​

typescript
"pos-reject-shipment": {
        parameters: {
            query?: never;
            header?: never;
            path: {
                /** @description Shipment reference number */
                reference_number: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description Success */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                    };
                };
            };
            400: components["responses"]["AdminBadRequest"];
            401: components["responses"]["AdminUnauthorized"];
            403: components["responses"]["Forbidden"];
            404: components["responses"]["AdminNotFound"];
            /** @description Unsupported method. Use POST. */
            405: components["responses"]["MethodNotAllowed"];
            500: components["responses"]["AdminInternalServerError"];
            504: components["responses"]["GatewayTimeout"];
        };
    };

Component References ​

ReferenceResolves To
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

Responses ​

200 ​

Success

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-reject-shipment",
  "summary": "Reject shipment",
  "description": "Reject a shipment awaiting store review. Returns message and success.",
  "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})$"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              }
            },
            "required": [
              "message",
              "success"
            ]
          }
        }
      }
    },
    "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 POST.",
      "$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-reject-shipment"
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    "Shipments"
  ],
  "x-speakeasy-group": "pos"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: