# Deliveries

## Retrieves a paginated list of delivery orders.

`deliveries.list_deliveries(DeliveryListDeliveriesParams**kwargs)  -> DeliveryListDeliveriesResponse`

**get** `/api/v2/public/orders/deliveries`

Retrieves a paginated list of delivery orders.

### Parameters

- `delivery_date: Optional[str]`

  Filter by delivery date.

- `group_code: Optional[str]`

  Filter by group code.

- `is_submitted: Optional[bool]`

  Filter by submission status.

- `last_modified_date: Optional[str]`

  Filter by last modified date.

- `order_number: Optional[str]`

  Filter by order number.

- `page_size: Optional[str]`

- `page_start: Optional[str]`

- `secondary_order_number: Optional[str]`

  Filter by secondary order number.

- `status: Optional[str]`

  Filter by order status.

- `store_number: Optional[str]`

  Filter by store number.

- `supplier_code: Optional[str]`

  Filter by supplier code.

- `supplier_name: Optional[str]`

  Filter by supplier name.

### Returns

- `class DeliveryListDeliveriesResponse: …`

  Generic paginated response wrapper.

  - `page_size: int`

    Maximum number of items returned per page.

  - `page_start: int`

    Current page number (1-based).

  - `total_count: int`

    Total number of records matching the query across all pages.

  - `list: Optional[List[List]]`

    Collection of items for the current page.

    - `datetime_created: datetime`

    - `datetime_expected: datetime`

    - `import_id: int`

    - `is_downloaded: bool`

    - `updated_on: datetime`

    - `external_reference_number: Optional[str]`

    - `no_of_containers: Optional[int]`

    - `order_lines: Optional[List[ListOrderLine]]`

      - `line_number: int`

      - `quantity: float`

      - `received_quantity: float`

      - `target_stock_pool: int`

      - `barcode: Optional[str]`

      - `base_unit: Optional[str]`

      - `category_code: Optional[str]`

      - `container_barcode: Optional[str]`

      - `customer_order_number: Optional[str]`

      - `customer_order_shipment_number: Optional[str]`

      - `customer_order_shipment_number_line_number: Optional[int]`

      - `description: Optional[str]`

      - `group_code: Optional[str]`

      - `product_number: Optional[str]`

      - `purchase_unit_barcode: Optional[str]`

      - `purchase_unit_product_number: Optional[str]`

      - `purchase_unit_quantity: Optional[float]`

      - `rounded_quantity: Optional[float]`

      - `secondary_order_number: Optional[str]`

    - `order_number: Optional[str]`

    - `order_type: Optional[str]`

    - `status: Optional[str]`

    - `store_gln: Optional[str]`

    - `store_number: Optional[str]`

    - `store_origin: Optional[str]`

    - `supplier_code: Optional[str]`

    - `supplier_name: Optional[str]`

    - `tracing_url: Optional[str]`

  - `list_body: Optional[Dict[str, Optional[object]]]`

    Additional body-level metadata for the list.

  - `list_filters: Optional[Dict[str, Optional[List[str]]]]`

    Active filter criteria applied to the result set, keyed by field name.

  - `next_page: Optional[int]`

    Next page number, or null when on the last page.

  - `previous_page: Optional[int]`

    Previous page number, or null when on the first page.

  - `project_last_modified_date: Optional[str]`

    Last modified date/time of the project.

  - `scroll_id: Optional[str]`

    Opaque scroll identifier for deep-pagination scenarios.

  - `server_time: Optional[str]`

    Server UTC date/time when the response was generated.

  - `sort_column: Optional[str]`

    Column name the results are sorted by.

  - `sort_order: Optional[str]`

    Sort direction (asc or desc).

  - `task_last_modified_date: Optional[str]`

    Last modified date/time of the task.

### Example

```python
import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.deliveries.list_deliveries()
print(response.scroll_id)
```

#### Response

```json
{
  "page_size": 0,
  "page_start": 0,
  "total_count": 0,
  "list": [
    {
      "datetime_created": "2019-12-27T18:11:19.117Z",
      "datetime_expected": "2019-12-27T18:11:19.117Z",
      "import_id": 0,
      "is_downloaded": true,
      "updated_on": "2019-12-27T18:11:19.117Z",
      "external_reference_number": "external_reference_number",
      "no_of_containers": 0,
      "order_lines": [
        {
          "line_number": 0,
          "quantity": 0,
          "received_quantity": 0,
          "target_stock_pool": 0,
          "barcode": "barcode",
          "base_unit": "base_unit",
          "category_code": "category_code",
          "container_barcode": "container_barcode",
          "customer_order_number": "customer_order_number",
          "customer_order_shipment_number": "customer_order_shipment_number",
          "customer_order_shipment_number_line_number": 0,
          "description": "description",
          "group_code": "group_code",
          "product_number": "product_number",
          "purchase_unit_barcode": "purchase_unit_barcode",
          "purchase_unit_product_number": "purchase_unit_product_number",
          "purchase_unit_quantity": 0,
          "rounded_quantity": 0,
          "secondary_order_number": "secondary_order_number"
        }
      ],
      "order_number": "order_number",
      "order_type": "order_type",
      "status": "status",
      "store_gln": "store_gln",
      "store_number": "store_number",
      "store_origin": "store_origin",
      "supplier_code": "supplier_code",
      "supplier_name": "supplier_name",
      "tracing_url": "tracing_url"
    }
  ],
  "list_body": {
    "foo": "bar"
  },
  "list_filters": {
    "foo": [
      "string"
    ]
  },
  "next_page": 0,
  "previous_page": 0,
  "project_last_modified_date": "project_last_modified_date",
  "scroll_id": "scroll_id",
  "server_time": "server_time",
  "sort_column": "sort_column",
  "sort_order": "sort_order",
  "task_last_modified_date": "task_last_modified_date"
}
```

## Creates delivery orders for a specific store.

`deliveries.create_store_deliveries(strstore_number, DeliveryCreateStoreDeliveriesParams**kwargs)  -> DeliveryCreateStoreDeliveriesResponse`

**post** `/api/v2/public/stores/{store_number}/orders/deliveries`

Creates delivery orders for a specific store.

### Parameters

- `store_number: str`

- `orders: Optional[Iterable[Order]]`

  The list of delivery orders to create.

  - `datetime_expected: Union[str, datetime]`

    The expected delivery datetime.

  - `no_of_containers: int`

    The number of containers in the delivery.

  - `order_number: str`

    The unique order number.

  - `order_type: int`

    The order type identifier (e.g. 1 = purchase, 2 = transfer).

  - `datetime_created: Optional[Union[str, datetime, null]]`

    The datetime the order was created. Defaults to UTC now if omitted.

  - `description: Optional[str]`

    A description of the delivery order.

  - `order_lines: Optional[Iterable[OrderOrderLine]]`

    The order lines in this delivery.

    - `line_number: int`

      The order line number.

    - `product_number: str`

      The product number.

    - `quantity: float`

      The quantity being delivered.

    - `target_stock_pool: int`

      The target stock pool for the delivered goods.

    - `barcode: Optional[str]`

      The product barcode.

    - `container_barcode: Optional[str]`

      The barcode of the container this line belongs to.

    - `customer_order_line_number: Optional[int]`

      The line number on the customer order.

    - `customer_order_number: Optional[str]`

      The customer order number this line fulfills.

    - `customer_order_shipment_number: Optional[str]`

      The customer order shipment number.

    - `customer_order_shipment_number_line_number: Optional[int]`

      The line number on the customer order shipment.

    - `description: Optional[str]`

      A description of the order line.

    - `ordered_quantity: Optional[float]`

      The originally ordered quantity.

    - `product_description: Optional[str]`

      A description of the product.

    - `purchase_price: Optional[float]`

      The purchase price per unit.

    - `reference: Optional[str]`

      An external reference for the order line.

    - `secondary_order_line_number: Optional[int]`

      The line number on the secondary order.

    - `secondary_order_number: Optional[str]`

      A secondary/external order number.

  - `reason_code: Optional[int]`

    The reason code for the delivery.

  - `reference: Optional[str]`

    An external reference for the delivery order.

  - `store_origin: Optional[str]`

    The origin store number (for inter-store transfers).

  - `supplier_code: Optional[str]`

    The unique supplier code.

  - `supplier_name: Optional[str]`

    The name of the supplier.

  - `tracing_url: Optional[str]`

    URL for tracking the delivery shipment.

- `container_override: Optional[bool]`

### Returns

- `class DeliveryCreateStoreDeliveriesResponse: …`

  Standard success response returned by mutation endpoints.

  - `success: bool`

    Indicates whether the operation completed successfully.

  - `data: Optional[str]`

    Optional data payload returned by the operation.

  - `message: Optional[str]`

    Human-readable message describing the result.

### Example

```python
import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.deliveries.create_store_deliveries(
    store_number="store_number",
)
print(response.success)
```

#### Response

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

## Creates delivery orders across multiple stores.

`deliveries.create_multi_store_deliveries(DeliveryCreateMultiStoreDeliveriesParams**kwargs)  -> DeliveryCreateMultiStoreDeliveriesResponse`

**post** `/api/v2/public/orders/deliveries`

Creates delivery orders across multiple stores.

### Parameters

- `orders: Optional[Iterable[Order]]`

  The list of multi-store delivery orders to create.

  - `datetime_expected: Union[str, datetime]`

    The expected delivery datetime.

  - `no_of_containers: int`

    The number of containers.

  - `order_number: str`

    The unique order number.

  - `order_type: int`

    The order type identifier.

  - `store_number: str`

    The target store number.

  - `supplier_name: str`

    The name of the supplier.

  - `datetime_created: Optional[Union[str, datetime, null]]`

    The datetime the order was created.

  - `description: Optional[str]`

    A description of the delivery order.

  - `order_lines: Optional[Iterable[OrderOrderLine]]`

    The order lines in this delivery.

    - `line_number: int`

      The order line number.

    - `quantity: float`

      The quantity being delivered.

    - `target_stock_pool: int`

      The target stock pool for the delivered goods.

    - `barcode: Optional[str]`

      The product barcode.

    - `container_barcode: Optional[str]`

      The barcode of the container this line belongs to.

    - `customer_order_line_number: Optional[int]`

      The line number on the customer order.

    - `customer_order_number: Optional[str]`

      The customer order number this line fulfills.

    - `customer_order_shipment_number: Optional[str]`

      The customer order shipment number.

    - `customer_order_shipment_number_line_number: Optional[int]`

      The line number on the customer order shipment.

    - `description: Optional[str]`

      A description of the order line.

    - `product_number: Optional[str]`

      The product number.

    - `secondary_order_line_number: Optional[int]`

      The line number on the secondary order.

    - `secondary_order_number: Optional[str]`

      A secondary/external order number.

  - `reason_code: Optional[int]`

    The reason code for the delivery.

  - `supplier_code: Optional[str]`

    The unique supplier code.

  - `tracing_url: Optional[str]`

    URL for tracking the delivery shipment.

- `container_override: Optional[bool]`

### Returns

- `class DeliveryCreateMultiStoreDeliveriesResponse: …`

  Standard success response returned by mutation endpoints.

  - `success: bool`

    Indicates whether the operation completed successfully.

  - `data: Optional[str]`

    Optional data payload returned by the operation.

  - `message: Optional[str]`

    Human-readable message describing the result.

### Example

```python
import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.deliveries.create_multi_store_deliveries()
print(response.success)
```

#### Response

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

## Domain Types

### Delivery List Deliveries Response

- `class DeliveryListDeliveriesResponse: …`

  Generic paginated response wrapper.

  - `page_size: int`

    Maximum number of items returned per page.

  - `page_start: int`

    Current page number (1-based).

  - `total_count: int`

    Total number of records matching the query across all pages.

  - `list: Optional[List[List]]`

    Collection of items for the current page.

    - `datetime_created: datetime`

    - `datetime_expected: datetime`

    - `import_id: int`

    - `is_downloaded: bool`

    - `updated_on: datetime`

    - `external_reference_number: Optional[str]`

    - `no_of_containers: Optional[int]`

    - `order_lines: Optional[List[ListOrderLine]]`

      - `line_number: int`

      - `quantity: float`

      - `received_quantity: float`

      - `target_stock_pool: int`

      - `barcode: Optional[str]`

      - `base_unit: Optional[str]`

      - `category_code: Optional[str]`

      - `container_barcode: Optional[str]`

      - `customer_order_number: Optional[str]`

      - `customer_order_shipment_number: Optional[str]`

      - `customer_order_shipment_number_line_number: Optional[int]`

      - `description: Optional[str]`

      - `group_code: Optional[str]`

      - `product_number: Optional[str]`

      - `purchase_unit_barcode: Optional[str]`

      - `purchase_unit_product_number: Optional[str]`

      - `purchase_unit_quantity: Optional[float]`

      - `rounded_quantity: Optional[float]`

      - `secondary_order_number: Optional[str]`

    - `order_number: Optional[str]`

    - `order_type: Optional[str]`

    - `status: Optional[str]`

    - `store_gln: Optional[str]`

    - `store_number: Optional[str]`

    - `store_origin: Optional[str]`

    - `supplier_code: Optional[str]`

    - `supplier_name: Optional[str]`

    - `tracing_url: Optional[str]`

  - `list_body: Optional[Dict[str, Optional[object]]]`

    Additional body-level metadata for the list.

  - `list_filters: Optional[Dict[str, Optional[List[str]]]]`

    Active filter criteria applied to the result set, keyed by field name.

  - `next_page: Optional[int]`

    Next page number, or null when on the last page.

  - `previous_page: Optional[int]`

    Previous page number, or null when on the first page.

  - `project_last_modified_date: Optional[str]`

    Last modified date/time of the project.

  - `scroll_id: Optional[str]`

    Opaque scroll identifier for deep-pagination scenarios.

  - `server_time: Optional[str]`

    Server UTC date/time when the response was generated.

  - `sort_column: Optional[str]`

    Column name the results are sorted by.

  - `sort_order: Optional[str]`

    Sort direction (asc or desc).

  - `task_last_modified_date: Optional[str]`

    Last modified date/time of the task.

### Delivery Create Store Deliveries Response

- `class DeliveryCreateStoreDeliveriesResponse: …`

  Standard success response returned by mutation endpoints.

  - `success: bool`

    Indicates whether the operation completed successfully.

  - `data: Optional[str]`

    Optional data payload returned by the operation.

  - `message: Optional[str]`

    Human-readable message describing the result.

### Delivery Create Multi Store Deliveries Response

- `class DeliveryCreateMultiStoreDeliveriesResponse: …`

  Standard success response returned by mutation endpoints.

  - `success: bool`

    Indicates whether the operation completed successfully.

  - `data: Optional[str]`

    Optional data payload returned by the operation.

  - `message: Optional[str]`

    Human-readable message describing the result.
