# Movement

## Moves product stock between locations within a store.

`client.movement.createMovement(stringstoreNumber, MovementCreateMovementParamsparams?, RequestOptionsoptions?): MovementCreateMovementResponse`

**post** `/api/v2/public/stores/{store_number}/storeproductlocation/movement`

Deprecated. Moves product stock between two locations within a single store.

### Parameters

- `storeNumber: string`

- `params: MovementCreateMovementParams`

  - `AppUserName?: string`

    Query param: The app user performing the movement.

  - `body?: Array<Body>`

    Body param

    - `quantity: number`

      The quantity to move.

    - `allow_overage?: boolean | null`

      Whether to allow moving more than available stock.

    - `from_location?: FromLocation`

      The source location for the product movement.

      - `customer_order_line_number?: number | null`

        The customer order line number at the source.

      - `customer_order_number?: string | null`

        The customer order number at the source.

      - `customer_order_shipment_line_number?: number | null`

        The customer order shipment line number at the source.

      - `customer_order_shipment_number?: string | null`

        The customer order shipment number at the source.

      - `location_code?: string | null`

        The source location code.

      - `stock_pool?: number | null`

        The stock pool at the source location.

    - `product_number?: string | null`

      The product number to move.

    - `reason_code?: string | null`

      The reason code for the movement.

    - `reference?: string | null`

      A reference identifier for the movement.

    - `source?: string | null`

      The source system initiating the movement.

    - `to_location?: ToLocation`

      The destination location for the product movement.

      - `customer_order_line_number?: number | null`

        The customer order line number at the destination.

      - `customer_order_number?: string | null`

        The customer order number at the destination.

      - `customer_order_shipment_line_number?: number | null`

        The customer order shipment line number at the destination.

      - `customer_order_shipment_number?: string | null`

        The customer order shipment number at the destination.

      - `location_code?: string | null`

        The destination location code.

      - `stock_pool?: number | null`

        The stock pool at the destination location.

### Returns

- `MovementCreateMovementResponse`

  Standard success response returned by mutation endpoints.

  - `success: boolean`

    Indicates whether the operation completed successfully.

  - `data?: string | null`

    Optional data payload returned by the operation.

  - `message?: string | null`

    Human-readable message describing the result.

### Example

```typescript
import Colleqtive from '@colleqtive/sdk';

const client = new Colleqtive({
  bearerToken: process.env['COLLEQTIVE_BEARER_TOKEN'], // This is the default and can be omitted
});

const response = await client.movement.createMovement('store_number');

console.log(response.success);
```

#### Response

```json
{
  "success": true,
  "data": "data",
  "message": "message"
}
```

## Domain Types

### Movement Create Movement Response

- `MovementCreateMovementResponse`

  Standard success response returned by mutation endpoints.

  - `success: boolean`

    Indicates whether the operation completed successfully.

  - `data?: string | null`

    Optional data payload returned by the operation.

  - `message?: string | null`

    Human-readable message describing the result.
