> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# base-orders

> Base Orders - manage orders, returns, invoices, and payments

**Server path:** `/base-orders` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                      | Description                                                          |
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| [`base_orders_add_invoice`](#base_orders_add_invoice)                                     | Issue an invoice for an order.                                       |
| [`base_orders_add_order`](#base_orders_add_order)                                         | Create a new order in Base.                                          |
| [`base_orders_add_order_product`](#base_orders_add_order_product)                         | Add a product to an existing order.                                  |
| [`base_orders_add_order_return`](#base_orders_add_order_return)                           | Create a new order return.                                           |
| [`base_orders_delete_order_product`](#base_orders_delete_order_product)                   | Remove a product from an order.                                      |
| [`base_orders_delete_orders`](#base_orders_delete_orders)                                 | Delete multiple orders by their IDs.                                 |
| [`base_orders_get_invoice_file`](#base_orders_get_invoice_file)                           | Download an invoice PDF file (returned as base64-encoded content).   |
| [`base_orders_get_invoices`](#base_orders_get_invoices)                                   | Retrieve invoices. Returns up to 100 per call.                       |
| [`base_orders_get_journal_list`](#base_orders_get_journal_list)                           | Retrieve order event journal. Returns a log of order-related events. |
| [`base_orders_get_order_extra_fields`](#base_orders_get_order_extra_fields)               | Retrieve custom extra field definitions for orders.                  |
| [`base_orders_get_order_payments_history`](#base_orders_get_order_payments_history)       | Retrieve payment history for an order.                               |
| [`base_orders_get_order_return_reasons_list`](#base_orders_get_order_return_reasons_list) | Retrieve the list of order return reasons.                           |
| [`base_orders_get_order_return_status_list`](#base_orders_get_order_return_status_list)   | Retrieve the list of order return statuses.                          |
| [`base_orders_get_order_returns`](#base_orders_get_order_returns)                         | Retrieve order returns. Returns up to 100 per call.                  |
| [`base_orders_get_order_sources`](#base_orders_get_order_sources)                         | Retrieve the list of order sources (e.g., shop, marketplace).        |
| [`base_orders_get_order_status_list`](#base_orders_get_order_status_list)                 | Retrieve the list of order statuses.                                 |
| [`base_orders_get_order_transaction_data`](#base_orders_get_order_transaction_data)       | Retrieve transaction details for an order.                           |
| [`base_orders_get_orders`](#base_orders_get_orders)                                       | Retrieve orders from Base. Returns up to 100 orders per call.        |
| [`base_orders_get_orders_by_email`](#base_orders_get_orders_by_email)                     | Search for orders by customer email address.                         |
| [`base_orders_get_orders_by_phone`](#base_orders_get_orders_by_phone)                     | Search for orders by customer phone number.                          |
| [`base_orders_get_series`](#base_orders_get_series)                                       | Retrieve invoice/receipt numbering series.                           |
| [`base_orders_set_order_fields`](#base_orders_set_order_fields)                           | Update fields of an existing order.                                  |
| [`base_orders_set_order_payment`](#base_orders_set_order_payment)                         | Record a payment for an order.                                       |
| [`base_orders_set_order_product_fields`](#base_orders_set_order_product_fields)           | Update fields of a product within an order.                          |
| [`base_orders_set_order_return_fields`](#base_orders_set_order_return_fields)             | Update fields of an order return.                                    |
| [`base_orders_set_order_return_status`](#base_orders_set_order_return_status)             | Change the status of an order return.                                |
| [`base_orders_set_order_status`](#base_orders_set_order_status)                           | Change the status of a single order.                                 |
| [`base_orders_set_order_statuses`](#base_orders_set_order_statuses)                       | Change the status of multiple orders at once.                        |

***

## base\_orders\_add\_invoice

Issue an invoice for an order.

**Parameters:**

| Parameter   | Type   | Required | Default | Description                |
| ----------- | ------ | -------- | ------- | -------------------------- |
| `order_id`  | number | Yes      | —       | Order identifier.          |
| `series_id` | number | Yes      | —       | Invoice series identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      },
      "series_id": {
        "type": "number",
        "description": "Invoice series identifier."
      }
    },
    "required": [
      "PCID",
      "order_id",
      "series_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_add\_order

Create a new order in Base.

**Parameters:**

| Parameter               | Type      | Required | Default | Description                                                                                                                                             |
| ----------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `order_status_id`       | string    | Yes      | —       | Order status identifier.                                                                                                                                |
| `date_add`              | number    | No       | —       | Unix timestamp for order creation date.                                                                                                                 |
| `currency`              | string    | No       | —       | ISO 4217 currency code (e.g., USD, EUR).                                                                                                                |
| `email`                 | string    | Yes      | —       | Customer email address.                                                                                                                                 |
| `phone`                 | string    | No       | —       | Customer phone number.                                                                                                                                  |
| `user_login`            | string    | No       | —       | Customer username.                                                                                                                                      |
| `user_comments`         | string    | No       | —       | Customer notes.                                                                                                                                         |
| `admin_comments`        | string    | No       | —       | Seller internal notes.                                                                                                                                  |
| `payment_method`        | string    | No       | —       | Payment method name.                                                                                                                                    |
| `payment_method_cod`    | boolean   | No       | —       | Cash on delivery flag.                                                                                                                                  |
| `paid`                  | boolean   | No       | —       | Whether order is paid.                                                                                                                                  |
| `delivery_method`       | string    | No       | —       | Delivery method name.                                                                                                                                   |
| `delivery_price`        | number    | No       | —       | Shipping cost.                                                                                                                                          |
| `delivery_fullname`     | string    | No       | —       | Recipient full name.                                                                                                                                    |
| `delivery_company`      | string    | No       | —       | Recipient company.                                                                                                                                      |
| `delivery_address`      | string    | No       | —       | Delivery street address.                                                                                                                                |
| `delivery_city`         | string    | No       | —       | Delivery city.                                                                                                                                          |
| `delivery_state`        | string    | No       | —       | Delivery state/province.                                                                                                                                |
| `delivery_postcode`     | string    | No       | —       | Delivery postal code.                                                                                                                                   |
| `delivery_country_code` | string    | No       | —       | ISO country code for delivery.                                                                                                                          |
| `invoice_fullname`      | string    | No       | —       | Invoice recipient name.                                                                                                                                 |
| `invoice_company`       | string    | No       | —       | Invoice company name.                                                                                                                                   |
| `invoice_nip`           | string    | No       | —       | Tax identification number.                                                                                                                              |
| `invoice_address`       | string    | No       | —       | Invoice address.                                                                                                                                        |
| `invoice_city`          | string    | No       | —       | Invoice city.                                                                                                                                           |
| `invoice_postcode`      | string    | No       | —       | Invoice postal code.                                                                                                                                    |
| `invoice_country_code`  | string    | No       | —       | Invoice country code.                                                                                                                                   |
| `want_invoice`          | boolean   | No       | —       | Whether to issue an invoice.                                                                                                                            |
| `extra_field_1`         | string    | No       | —       | Custom extra field 1.                                                                                                                                   |
| `extra_field_2`         | string    | No       | —       | Custom extra field 2.                                                                                                                                   |
| `products`              | object\[] | Yes      | —       | Array of product objects. Each should have: storage, storage\_id, product\_id, variant\_id, name, sku, ean, price\_brutto, tax\_rate, quantity, weight. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_status_id": {
        "type": "string",
        "description": "Order status identifier."
      },
      "date_add": {
        "type": "number",
        "description": "Unix timestamp for order creation date."
      },
      "currency": {
        "type": "string",
        "description": "ISO 4217 currency code (e.g., USD, EUR)."
      },
      "email": {
        "type": "string",
        "description": "Customer email address."
      },
      "phone": {
        "type": "string",
        "description": "Customer phone number."
      },
      "user_login": {
        "type": "string",
        "description": "Customer username."
      },
      "user_comments": {
        "type": "string",
        "description": "Customer notes."
      },
      "admin_comments": {
        "type": "string",
        "description": "Seller internal notes."
      },
      "payment_method": {
        "type": "string",
        "description": "Payment method name."
      },
      "payment_method_cod": {
        "type": "boolean",
        "description": "Cash on delivery flag."
      },
      "paid": {
        "type": "boolean",
        "description": "Whether order is paid."
      },
      "delivery_method": {
        "type": "string",
        "description": "Delivery method name."
      },
      "delivery_price": {
        "type": "number",
        "description": "Shipping cost."
      },
      "delivery_fullname": {
        "type": "string",
        "description": "Recipient full name."
      },
      "delivery_company": {
        "type": "string",
        "description": "Recipient company."
      },
      "delivery_address": {
        "type": "string",
        "description": "Delivery street address."
      },
      "delivery_city": {
        "type": "string",
        "description": "Delivery city."
      },
      "delivery_state": {
        "type": "string",
        "description": "Delivery state/province."
      },
      "delivery_postcode": {
        "type": "string",
        "description": "Delivery postal code."
      },
      "delivery_country_code": {
        "type": "string",
        "description": "ISO country code for delivery."
      },
      "invoice_fullname": {
        "type": "string",
        "description": "Invoice recipient name."
      },
      "invoice_company": {
        "type": "string",
        "description": "Invoice company name."
      },
      "invoice_nip": {
        "type": "string",
        "description": "Tax identification number."
      },
      "invoice_address": {
        "type": "string",
        "description": "Invoice address."
      },
      "invoice_city": {
        "type": "string",
        "description": "Invoice city."
      },
      "invoice_postcode": {
        "type": "string",
        "description": "Invoice postal code."
      },
      "invoice_country_code": {
        "type": "string",
        "description": "Invoice country code."
      },
      "want_invoice": {
        "type": "boolean",
        "description": "Whether to issue an invoice."
      },
      "extra_field_1": {
        "type": "string",
        "description": "Custom extra field 1."
      },
      "extra_field_2": {
        "type": "string",
        "description": "Custom extra field 2."
      },
      "products": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Array of product objects. Each should have: storage, storage_id, product_id, variant_id, name, sku, ean, price_brutto, tax_rate, quantity, weight."
      }
    },
    "required": [
      "PCID",
      "order_status_id",
      "email",
      "products"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_add\_order\_product

Add a product to an existing order.

**Parameters:**

| Parameter      | Type   | Required | Default | Description                            |
| -------------- | ------ | -------- | ------- | -------------------------------------- |
| `order_id`     | number | Yes      | —       | Order identifier.                      |
| `storage`      | string | Yes      | —       | Storage type (e.g., 'db' for catalog). |
| `storage_id`   | number | No       | —       | Storage identifier.                    |
| `product_id`   | string | Yes      | —       | Product identifier.                    |
| `variant_id`   | number | No       | —       | Product variant ID.                    |
| `name`         | string | Yes      | —       | Product display name.                  |
| `sku`          | string | No       | —       | Stock keeping unit.                    |
| `ean`          | string | No       | —       | European article number.               |
| `attributes`   | string | No       | —       | Product attributes string.             |
| `price_brutto` | number | Yes      | —       | Gross price.                           |
| `tax_rate`     | number | No       | —       | Tax rate percentage.                   |
| `quantity`     | number | Yes      | —       | Quantity.                              |
| `weight`       | number | No       | —       | Product weight.                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      },
      "storage": {
        "type": "string",
        "description": "Storage type (e.g., 'db' for catalog)."
      },
      "storage_id": {
        "type": "number",
        "description": "Storage identifier."
      },
      "product_id": {
        "type": "string",
        "description": "Product identifier."
      },
      "variant_id": {
        "type": "number",
        "description": "Product variant ID."
      },
      "name": {
        "type": "string",
        "description": "Product display name."
      },
      "sku": {
        "type": "string",
        "description": "Stock keeping unit."
      },
      "ean": {
        "type": "string",
        "description": "European article number."
      },
      "attributes": {
        "type": "string",
        "description": "Product attributes string."
      },
      "price_brutto": {
        "type": "number",
        "description": "Gross price."
      },
      "tax_rate": {
        "type": "number",
        "description": "Tax rate percentage."
      },
      "quantity": {
        "type": "number",
        "description": "Quantity."
      },
      "weight": {
        "type": "number",
        "description": "Product weight."
      }
    },
    "required": [
      "PCID",
      "order_id",
      "storage",
      "product_id",
      "name",
      "price_brutto",
      "quantity"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_add\_order\_return

Create a new order return.

**Parameters:**

| Parameter               | Type      | Required | Default | Description                        |
| ----------------------- | --------- | -------- | ------- | ---------------------------------- |
| `order_id`              | number    | Yes      | —       | Original order identifier.         |
| `status_id`             | number    | Yes      | —       | Return status identifier.          |
| `reference_number`      | string    | No       | —       | Return reference number.           |
| `date_add`              | number    | No       | —       | Unix timestamp for return date.    |
| `currency`              | string    | No       | —       | ISO currency code.                 |
| `admin_comments`        | string    | No       | —       | Internal notes.                    |
| `email`                 | string    | No       | —       | Customer email.                    |
| `phone`                 | string    | No       | —       | Customer phone.                    |
| `delivery_fullname`     | string    | No       | —       | Recipient name.                    |
| `delivery_address`      | string    | No       | —       | Return address.                    |
| `delivery_city`         | string    | No       | —       | City.                              |
| `delivery_postcode`     | string    | No       | —       | Postal code.                       |
| `delivery_country_code` | string    | No       | —       | Country code.                      |
| `products`              | object\[] | Yes      | —       | Array of returned product objects. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Original order identifier."
      },
      "status_id": {
        "type": "number",
        "description": "Return status identifier."
      },
      "reference_number": {
        "type": "string",
        "description": "Return reference number."
      },
      "date_add": {
        "type": "number",
        "description": "Unix timestamp for return date."
      },
      "currency": {
        "type": "string",
        "description": "ISO currency code."
      },
      "admin_comments": {
        "type": "string",
        "description": "Internal notes."
      },
      "email": {
        "type": "string",
        "description": "Customer email."
      },
      "phone": {
        "type": "string",
        "description": "Customer phone."
      },
      "delivery_fullname": {
        "type": "string",
        "description": "Recipient name."
      },
      "delivery_address": {
        "type": "string",
        "description": "Return address."
      },
      "delivery_city": {
        "type": "string",
        "description": "City."
      },
      "delivery_postcode": {
        "type": "string",
        "description": "Postal code."
      },
      "delivery_country_code": {
        "type": "string",
        "description": "Country code."
      },
      "products": {
        "type": "array",
        "items": {
          "type": "object"
        },
        "description": "Array of returned product objects."
      }
    },
    "required": [
      "PCID",
      "order_id",
      "status_id",
      "products"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_delete\_order\_product

Remove a product from an order.

**Parameters:**

| Parameter          | Type   | Required | Default | Description                 |
| ------------------ | ------ | -------- | ------- | --------------------------- |
| `order_id`         | number | Yes      | —       | Order identifier.           |
| `order_product_id` | number | Yes      | —       | Order line item identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      },
      "order_product_id": {
        "type": "number",
        "description": "Order line item identifier."
      }
    },
    "required": [
      "PCID",
      "order_id",
      "order_product_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_delete\_orders

Delete multiple orders by their IDs.

**Parameters:**

| Parameter   | Type      | Required | Default | Description                   |
| ----------- | --------- | -------- | ------- | ----------------------------- |
| `order_ids` | string\[] | Yes      | —       | Array of order IDs to delete. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Array of order IDs to delete."
      }
    },
    "required": [
      "PCID",
      "order_ids"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_invoice\_file

Download an invoice PDF file (returned as base64-encoded content).

**Parameters:**

| Parameter    | Type   | Required | Default | Description         |
| ------------ | ------ | -------- | ------- | ------------------- |
| `invoice_id` | number | Yes      | —       | Invoice identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "invoice_id": {
        "type": "number",
        "description": "Invoice identifier."
      }
    },
    "required": [
      "PCID",
      "invoice_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_invoices

Retrieve invoices. Returns up to 100 per call.

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                |
| ------------ | ------ | -------- | ------- | ---------------------------------------------------------- |
| `date_from`  | number | Yes      | —       | Unix timestamp. Retrieve invoices created after this date. |
| `invoice_id` | number | No       | —       | Retrieve a specific invoice by ID.                         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "date_from": {
        "type": "number",
        "description": "Unix timestamp. Retrieve invoices created after this date."
      },
      "invoice_id": {
        "type": "number",
        "description": "Retrieve a specific invoice by ID."
      }
    },
    "required": [
      "PCID",
      "date_from"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_journal\_list

Retrieve order event journal. Returns a log of order-related events.

**Parameters:**

| Parameter     | Type      | Required | Default | Description                                                 |
| ------------- | --------- | -------- | ------- | ----------------------------------------------------------- |
| `last_log_id` | number    | No       | —       | Last event ID for pagination. Returns events after this ID. |
| `logs_types`  | string\[] | No       | —       | Array of event type IDs to filter by.                       |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "last_log_id": {
        "type": "number",
        "description": "Last event ID for pagination. Returns events after this ID."
      },
      "logs_types": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Array of event type IDs to filter by."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_extra\_fields

Retrieve custom extra field definitions for orders.

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_payments\_history

Retrieve payment history for an order.

**Parameters:**

| Parameter  | Type   | Required | Default | Description       |
| ---------- | ------ | -------- | ------- | ----------------- |
| `order_id` | number | Yes      | —       | Order identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      }
    },
    "required": [
      "PCID",
      "order_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_return\_reasons\_list

Retrieve the list of order return reasons.

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_return\_status\_list

Retrieve the list of order return statuses.

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_returns

Retrieve order returns. Returns up to 100 per call.

**Parameters:**

| Parameter                | Type    | Required | Default | Description                                                 |
| ------------------------ | ------- | -------- | ------- | ----------------------------------------------------------- |
| `date_confirmed_from`    | number  | Yes      | —       | Unix timestamp. Retrieve returns confirmed after this date. |
| `get_unconfirmed_orders` | boolean | No       | —       | Include unconfirmed returns.                                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "date_confirmed_from": {
        "type": "number",
        "description": "Unix timestamp. Retrieve returns confirmed after this date."
      },
      "get_unconfirmed_orders": {
        "type": "boolean",
        "description": "Include unconfirmed returns."
      }
    },
    "required": [
      "PCID",
      "date_confirmed_from"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_sources

Retrieve the list of order sources (e.g., shop, marketplace).

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_status\_list

Retrieve the list of order statuses.

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_order\_transaction\_data

Retrieve transaction details for an order.

**Parameters:**

| Parameter  | Type   | Required | Default | Description       |
| ---------- | ------ | -------- | ------- | ----------------- |
| `order_id` | number | Yes      | —       | Order identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      }
    },
    "required": [
      "PCID",
      "order_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_orders

Retrieve orders from Base. Returns up to 100 orders per call.

**Parameters:**

| Parameter                     | Type    | Required | Default | Description                                                 |
| ----------------------------- | ------- | -------- | ------- | ----------------------------------------------------------- |
| `date_confirmed_from`         | number  | Yes      | —       | Unix timestamp. Retrieve orders confirmed after this date.  |
| `date_confirmed_to`           | number  | No       | —       | Unix timestamp. Retrieve orders confirmed before this date. |
| `order_id`                    | number  | No       | —       | Retrieve a specific order by ID.                            |
| `get_unconfirmed_orders`      | boolean | No       | —       | Include unconfirmed orders (default: false).                |
| `include_custom_extra_fields` | boolean | No       | —       | Include custom extra field values.                          |
| `status_id`                   | number  | No       | —       | Filter by order status ID.                                  |
| `filter_email`                | string  | No       | —       | Filter orders by customer email.                            |
| `filter_order_source`         | string  | No       | —       | Filter by order source.                                     |
| `filter_order_source_id`      | number  | No       | —       | Filter by order source account ID.                          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "date_confirmed_from": {
        "type": "number",
        "description": "Unix timestamp. Retrieve orders confirmed after this date."
      },
      "date_confirmed_to": {
        "type": "number",
        "description": "Unix timestamp. Retrieve orders confirmed before this date."
      },
      "order_id": {
        "type": "number",
        "description": "Retrieve a specific order by ID."
      },
      "get_unconfirmed_orders": {
        "type": "boolean",
        "description": "Include unconfirmed orders (default: false)."
      },
      "include_custom_extra_fields": {
        "type": "boolean",
        "description": "Include custom extra field values."
      },
      "status_id": {
        "type": "number",
        "description": "Filter by order status ID."
      },
      "filter_email": {
        "type": "string",
        "description": "Filter orders by customer email."
      },
      "filter_order_source": {
        "type": "string",
        "description": "Filter by order source."
      },
      "filter_order_source_id": {
        "type": "number",
        "description": "Filter by order source account ID."
      }
    },
    "required": [
      "PCID",
      "date_confirmed_from"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_orders\_by\_email

Search for orders by customer email address.

**Parameters:**

| Parameter | Type   | Required | Default | Description                   |
| --------- | ------ | -------- | ------- | ----------------------------- |
| `email`   | string | Yes      | —       | Customer email to search for. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "email": {
        "type": "string",
        "description": "Customer email to search for."
      }
    },
    "required": [
      "PCID",
      "email"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_orders\_by\_phone

Search for orders by customer phone number.

**Parameters:**

| Parameter | Type   | Required | Default | Description                          |
| --------- | ------ | -------- | ------- | ------------------------------------ |
| `phone`   | string | Yes      | —       | Customer phone number to search for. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "phone": {
        "type": "string",
        "description": "Customer phone number to search for."
      }
    },
    "required": [
      "PCID",
      "phone"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_get\_series

Retrieve invoice/receipt numbering series.

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_set\_order\_fields

Update fields of an existing order.

**Parameters:**

| Parameter               | Type    | Required | Default | Description                             |
| ----------------------- | ------- | -------- | ------- | --------------------------------------- |
| `order_id`              | number  | Yes      | —       | Order identifier.                       |
| `admin_comments`        | string  | No       | —       | Seller internal notes.                  |
| `user_comments`         | string  | No       | —       | Customer notes.                         |
| `payment_method`        | string  | No       | —       | Payment method name.                    |
| `payment_method_cod`    | boolean | No       | —       | Cash on delivery flag.                  |
| `delivery_method`       | string  | No       | —       | Delivery method name.                   |
| `delivery_price`        | number  | No       | —       | Shipping cost.                          |
| `delivery_fullname`     | string  | No       | —       | Recipient full name.                    |
| `delivery_company`      | string  | No       | —       | Recipient company.                      |
| `delivery_address`      | string  | No       | —       | Delivery street address.                |
| `delivery_city`         | string  | No       | —       | Delivery city.                          |
| `delivery_postcode`     | string  | No       | —       | Delivery postal code.                   |
| `delivery_country_code` | string  | No       | —       | Delivery country code.                  |
| `email`                 | string  | No       | —       | Customer email.                         |
| `phone`                 | string  | No       | —       | Customer phone.                         |
| `extra_field_1`         | string  | No       | —       | Custom extra field 1.                   |
| `extra_field_2`         | string  | No       | —       | Custom extra field 2.                   |
| `custom_extra_fields`   | object  | No       | —       | Custom extra fields as key-value pairs. |
| `want_invoice`          | boolean | No       | —       | Whether to issue an invoice.            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      },
      "admin_comments": {
        "type": "string",
        "description": "Seller internal notes."
      },
      "user_comments": {
        "type": "string",
        "description": "Customer notes."
      },
      "payment_method": {
        "type": "string",
        "description": "Payment method name."
      },
      "payment_method_cod": {
        "type": "boolean",
        "description": "Cash on delivery flag."
      },
      "delivery_method": {
        "type": "string",
        "description": "Delivery method name."
      },
      "delivery_price": {
        "type": "number",
        "description": "Shipping cost."
      },
      "delivery_fullname": {
        "type": "string",
        "description": "Recipient full name."
      },
      "delivery_company": {
        "type": "string",
        "description": "Recipient company."
      },
      "delivery_address": {
        "type": "string",
        "description": "Delivery street address."
      },
      "delivery_city": {
        "type": "string",
        "description": "Delivery city."
      },
      "delivery_postcode": {
        "type": "string",
        "description": "Delivery postal code."
      },
      "delivery_country_code": {
        "type": "string",
        "description": "Delivery country code."
      },
      "email": {
        "type": "string",
        "description": "Customer email."
      },
      "phone": {
        "type": "string",
        "description": "Customer phone."
      },
      "extra_field_1": {
        "type": "string",
        "description": "Custom extra field 1."
      },
      "extra_field_2": {
        "type": "string",
        "description": "Custom extra field 2."
      },
      "custom_extra_fields": {
        "type": "object",
        "description": "Custom extra fields as key-value pairs."
      },
      "want_invoice": {
        "type": "boolean",
        "description": "Whether to issue an invoice."
      }
    },
    "required": [
      "PCID",
      "order_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_set\_order\_payment

Record a payment for an order.

**Parameters:**

| Parameter         | Type   | Required | Default | Description                |
| ----------------- | ------ | -------- | ------- | -------------------------- |
| `order_id`        | number | Yes      | —       | Order identifier.          |
| `payment_done`    | number | Yes      | —       | Amount paid.               |
| `payment_date`    | number | No       | —       | Unix timestamp of payment. |
| `payment_comment` | string | No       | —       | Payment notes.             |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      },
      "payment_done": {
        "type": "number",
        "description": "Amount paid."
      },
      "payment_date": {
        "type": "number",
        "description": "Unix timestamp of payment."
      },
      "payment_comment": {
        "type": "string",
        "description": "Payment notes."
      }
    },
    "required": [
      "PCID",
      "order_id",
      "payment_done"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_set\_order\_product\_fields

Update fields of a product within an order.

**Parameters:**

| Parameter          | Type   | Required | Default | Description                 |
| ------------------ | ------ | -------- | ------- | --------------------------- |
| `order_id`         | number | Yes      | —       | Order identifier.           |
| `order_product_id` | number | Yes      | —       | Order line item identifier. |
| `name`             | string | No       | —       | Product name.               |
| `sku`              | string | No       | —       | Stock keeping unit.         |
| `ean`              | string | No       | —       | European article number.    |
| `attributes`       | string | No       | —       | Product attributes.         |
| `price_brutto`     | number | No       | —       | Gross price.                |
| `tax_rate`         | number | No       | —       | Tax rate.                   |
| `quantity`         | number | No       | —       | Quantity.                   |
| `weight`           | number | No       | —       | Weight.                     |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      },
      "order_product_id": {
        "type": "number",
        "description": "Order line item identifier."
      },
      "name": {
        "type": "string",
        "description": "Product name."
      },
      "sku": {
        "type": "string",
        "description": "Stock keeping unit."
      },
      "ean": {
        "type": "string",
        "description": "European article number."
      },
      "attributes": {
        "type": "string",
        "description": "Product attributes."
      },
      "price_brutto": {
        "type": "number",
        "description": "Gross price."
      },
      "tax_rate": {
        "type": "number",
        "description": "Tax rate."
      },
      "quantity": {
        "type": "number",
        "description": "Quantity."
      },
      "weight": {
        "type": "number",
        "description": "Weight."
      }
    },
    "required": [
      "PCID",
      "order_id",
      "order_product_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_set\_order\_return\_fields

Update fields of an order return.

**Parameters:**

| Parameter             | Type   | Required | Default | Description                             |
| --------------------- | ------ | -------- | ------- | --------------------------------------- |
| `return_id`           | number | Yes      | —       | Return identifier.                      |
| `admin_comments`      | string | No       | —       | Internal notes.                         |
| `extra_field_1`       | string | No       | —       | Custom extra field 1.                   |
| `extra_field_2`       | string | No       | —       | Custom extra field 2.                   |
| `custom_extra_fields` | object | No       | —       | Custom extra fields as key-value pairs. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "return_id": {
        "type": "number",
        "description": "Return identifier."
      },
      "admin_comments": {
        "type": "string",
        "description": "Internal notes."
      },
      "extra_field_1": {
        "type": "string",
        "description": "Custom extra field 1."
      },
      "extra_field_2": {
        "type": "string",
        "description": "Custom extra field 2."
      },
      "custom_extra_fields": {
        "type": "object",
        "description": "Custom extra fields as key-value pairs."
      }
    },
    "required": [
      "PCID",
      "return_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_set\_order\_return\_status

Change the status of an order return.

**Parameters:**

| Parameter   | Type   | Required | Default | Description            |
| ----------- | ------ | -------- | ------- | ---------------------- |
| `return_id` | number | Yes      | —       | Return identifier.     |
| `status_id` | number | Yes      | —       | New status identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "return_id": {
        "type": "number",
        "description": "Return identifier."
      },
      "status_id": {
        "type": "number",
        "description": "New status identifier."
      }
    },
    "required": [
      "PCID",
      "return_id",
      "status_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_set\_order\_status

Change the status of a single order.

**Parameters:**

| Parameter   | Type   | Required | Default | Description            |
| ----------- | ------ | -------- | ------- | ---------------------- |
| `order_id`  | number | Yes      | —       | Order identifier.      |
| `status_id` | number | Yes      | —       | New status identifier. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_id": {
        "type": "number",
        "description": "Order identifier."
      },
      "status_id": {
        "type": "number",
        "description": "New status identifier."
      }
    },
    "required": [
      "PCID",
      "order_id",
      "status_id"
    ]
  }
  ```
</Expandable>

***

## base\_orders\_set\_order\_statuses

Change the status of multiple orders at once.

**Parameters:**

| Parameter   | Type      | Required | Default | Description                    |
| ----------- | --------- | -------- | ------- | ------------------------------ |
| `order_ids` | string\[] | Yes      | —       | Array of order IDs.            |
| `status_id` | number    | Yes      | —       | Status to apply to all orders. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_ids": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Array of order IDs."
      },
      "status_id": {
        "type": "number",
        "description": "Status to apply to all orders."
      }
    },
    "required": [
      "PCID",
      "order_ids",
      "status_id"
    ]
  }
  ```
</Expandable>
