Skip to content

pos-get-shipment-detail ​

Method: GET
Path: /pos/shipping/shipments/{reference_number}

Tags: Shipments

Summary ​

Retrieve shipment detail

Description ​

Retrieves a shipment's details. Staff can retrieve shipments across all store locations.

Pos SDK Usage ​

SDK Method: pos.getShipment()

Example:

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

if (error) {
  console.error("Failed to get shipment:", error.message);
} else {
  const shipment = data.shipment;
  const detail = shipment.shipment_detail;
  console.log(`Order: ${shipment.order_number}`);
  console.log(`Shipment: ${detail.shipment_number} - Status: ${detail.status}`);
  console.log(`AWB: ${detail.awb_no} - Courier: ${detail.courier_company_name}`);
  console.log(`Items:`, detail.shipment_items);
  console.log(`Allowed Actions:`, shipment.allowed_actions);
}

TypeScript Definition ​

typescript
"pos-get-shipment-detail": {
        parameters: {
            query?: {
                /** @description Refresh tracking for eligible automatic shipments before retrieving details. Any nonempty value, including false, requests a refresh. */
                refresh?: string;
            };
            header?: never;
            path: {
                /** @description Shipment reference number */
                reference_number: string;
            };
            cookie?: never;
        };
        requestBody?: never;
        responses: {
            /** @description OK */
            200: {
                headers: {
                    [name: string]: unknown;
                };
                content: {
                    "application/json": {
                        message: string;
                        success: boolean;
                        content: {
                            shipment: components["schemas"]["ShipmentDetail"];
                        };
                    };
                };
            };
            400: components["responses"]["BadRequest"];
            401: components["responses"]["AdminUnauthorized"];
            403: components["responses"]["Forbidden"];
            404: components["responses"]["AdminNotFound"];
            500: components["responses"]["AdminInternalServerError"];
            504: components["responses"]["GatewayTimeout"];
        };
    };

Component References ​

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

Parameters ​

  • reference_number (path): Shipment reference number
  • refresh (query): Refresh tracking for eligible automatic shipments before retrieving details. Any nonempty value, including false, requests a refresh.

Responses ​

200 ​

OK

400 ​

Bad request

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 ​

500 ​

504 ​

The request timed out.

OpenAPI Definition ​

json
{
  "operationId": "pos-get-shipment-detail",
  "summary": "Retrieve shipment detail",
  "description": "Retrieves a shipment's details. Staff can retrieve shipments across all store locations.",
  "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})$"
      }
    },
    {
      "name": "refresh",
      "in": "query",
      "description": "Refresh tracking for eligible automatic shipments before retrieving details. Any nonempty value, including false, requests a refresh.",
      "schema": {
        "type": "string"
      }
    }
  ],
  "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/BadRequest"
    },
    "401": {
      "$ref": "#/components/responses/AdminUnauthorized"
    },
    "403": {
      "$ref": "#/components/responses/Forbidden"
    },
    "404": {
      "$ref": "#/components/responses/AdminNotFound"
    },
    "500": {
      "$ref": "#/components/responses/AdminInternalServerError"
    },
    "504": {
      "$ref": "#/components/responses/GatewayTimeout"
    }
  },
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/admin-pos/operations/pos-get-shipment-detail"
  },
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    "Shipments"
  ],
  "x-speakeasy-group": "pos"
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: