# Vend202601\ConsignmentProductsApi



All URIs are relative to https://example.retail.lightspeed.app/api/2026-01, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**createConsignmentProduct()**](ConsignmentProductsApi.md#createConsignmentProduct) | **POST** /consignments/{consignment_id}/products | Add a product to a consignment |
| [**createOrUpdateConsignmentProducts()**](ConsignmentProductsApi.md#createOrUpdateConsignmentProducts) | **POST** /consignments/{consignment_id}/bulk | Bulk update consignment products |
| [**deleteProductFromConsignment()**](ConsignmentProductsApi.md#deleteProductFromConsignment) | **DELETE** /consignments/{consignment_id}/products/{product_id} | Delete an item from a consignment |
| [**listProductsByConsignmentID()**](ConsignmentProductsApi.md#listProductsByConsignmentID) | **GET** /consignments/{consignment_id}/products | List all products for a specific consignment |
| [**updateProductInConsignment()**](ConsignmentProductsApi.md#updateProductInConsignment) | **PUT** /consignments/{consignment_id}/products/{product_id} | Update a product in a consignment |


## `createConsignmentProduct()`

```php
createConsignmentProduct($consignment_id, $consignment_product_request): \Vend202601\Model\InventoryCountItemResponse
```

Add a product to a consignment

Add a product to the given consignment.  If the type is SUPPLIER then:  - Cannot add a product to a `RECEIVED` or `CANCELLED` order - Cannot add a composite product to the order - If a received value is provided for a consignment product for a SENT Supplier Order - the order will be automatically marked as DISPATCHED  If the type is OUTLET then:  - If a cost value is not provided for a consignment product on an OPEN Outlet order - the cost will be automatically populated after the fact using the most accurate average cost of the product at the time of marking the consignment as sent.  🔒 Requires: One of the following scopes: - `consignments:write:stock_order` scope for `SUPPLIER` and `RETURN` consignments - `consignments:write:stock_transfer` scope for `OUTLET` consignments - `consignments:write:inventory_count` scope for `STOCKTAKE` consignments

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\ConsignmentProductsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$consignment_id = 'consignment_id_example'; // string | The consignment id
$consignment_product_request = new \Vend202601\Model\ConsignmentProductRequest(); // \Vend202601\Model\ConsignmentProductRequest

try {
    $result = $apiInstance->createConsignmentProduct($consignment_id, $consignment_product_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsignmentProductsApi->createConsignmentProduct: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **consignment_id** | **string**| The consignment id | |
| **consignment_product_request** | [**\Vend202601\Model\ConsignmentProductRequest**](../Model/ConsignmentProductRequest.md)|  | [optional] |

### Return type

[**\Vend202601\Model\InventoryCountItemResponse**](../Model/InventoryCountItemResponse.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `createOrUpdateConsignmentProducts()`

```php
createOrUpdateConsignmentProducts($consignment_id, $consignment_product)
```

Bulk update consignment products

Add or update the products in a consignment in bulk.  **Note**: Must include either count or received for each product.  **Note**: It is not recommended to update more than 500 products at a time, as this may lead to server timeouts.  **Note**:  If the type is SUPPLIER then:  - Cannot add a composite product by this api - Cannot update products if the consignment has a status of RECEIVED or CANCELLED - If status is OPEN or SENT, the count value will be accumulated - If status is DISPATCHED, the received quantity will be accumulated - If status is OPEN, SENT or DISPATCHED, the cost will be updated - If a received field is provided for consignment products in an OPEN or SENT Supplier Order - the order will be automatically marked as DISPATCHED. Remove the received field if you don't intend to dispatch the OPEN or SENT purchase order  🔒 Requires: One of the following scopes: - `consignments:write:stock_order` scope for `SUPPLIER` and `RETURN` consignments - `consignments:write:stock_transfer` scope for `OUTLET` consignments - `consignments:write:inventory_count` scope for `STOCKTAKE` consignments

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\ConsignmentProductsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$consignment_id = 'consignment_id_example'; // string | The consignment id
$consignment_product = array(new \Vend202601\Model\ConsignmentProduct()); // \Vend202601\Model\ConsignmentProduct[]

try {
    $apiInstance->createOrUpdateConsignmentProducts($consignment_id, $consignment_product);
} catch (Exception $e) {
    echo 'Exception when calling ConsignmentProductsApi->createOrUpdateConsignmentProducts: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **consignment_id** | **string**| The consignment id | |
| **consignment_product** | [**\Vend202601\Model\ConsignmentProduct[]**](../Model/ConsignmentProduct.md)|  | |

### Return type

void (empty response body)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `Example`, `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `deleteProductFromConsignment()`

```php
deleteProductFromConsignment($consignment_id, $product_id)
```

Delete an item from a consignment

Removes the specific product from the consignment.  For `SUPPLIER` workflow:  - Cannot delete a product from a consignment with a status of `DISPATCHED`, `RECEIVED` or `CANCELLED`  For consignment type `OUTLET`:  - Cannot delete a product if the consignment has a status of `SENT` or `RECEIVED`  For consignment type `RETURN`:  - Cannot delete a product if the consignment has a status of `SENT`  🔒 Requires: One of the following scopes: - `consignments:write:stock_order` scope for `SUPPLIER` and `RETURN` consignments - `consignments:write:stock_transfer` scope for `OUTLET` consignments - `consignments:write:inventory_count` scope for `STOCKTAKE` consignments

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\ConsignmentProductsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$consignment_id = 'consignment_id_example'; // string | The consignment id to be updated.
$product_id = 'product_id_example'; // string | The product id of the product to be added to the consignment.

try {
    $apiInstance->deleteProductFromConsignment($consignment_id, $product_id);
} catch (Exception $e) {
    echo 'Exception when calling ConsignmentProductsApi->deleteProductFromConsignment: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **consignment_id** | **string**| The consignment id to be updated. | |
| **product_id** | **string**| The product id of the product to be added to the consignment. | |

### Return type

void (empty response body)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `listProductsByConsignmentID()`

```php
listProductsByConsignmentID($consignment_id, $after, $before, $page_size): \Vend202601\Model\ConsignmentProductCollection
```

List all products for a specific consignment

Returns a collection of consignment products associated with the specified consignment.  🔒 Requires: `consignments:read` scope

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\ConsignmentProductsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$consignment_id = 'consignment_id_example'; // string | The consignment id
$after = 56; // int | The lower limit for the version numbers to be included in the response.
$before = 56; // int | The upper limit for the version numbers to be included in the response.
$page_size = 56; // int | The maximum number of items to be returned in the response.

try {
    $result = $apiInstance->listProductsByConsignmentID($consignment_id, $after, $before, $page_size);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsignmentProductsApi->listProductsByConsignmentID: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **consignment_id** | **string**| The consignment id | |
| **after** | **int**| The lower limit for the version numbers to be included in the response. | [optional] |
| **before** | **int**| The upper limit for the version numbers to be included in the response. | [optional] |
| **page_size** | **int**| The maximum number of items to be returned in the response. | [optional] |

### Return type

[**\Vend202601\Model\ConsignmentProductCollection**](../Model/ConsignmentProductCollection.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `updateProductInConsignment()`

```php
updateProductInConsignment($consignment_id, $product_id, $consignment_product_request): \Vend202601\Model\ConsignmentProductResponse
```

Update a product in a consignment

Updates the specific product within the consignment.  **Notes**:  - If the type is SUPPLIER then:   * If status is OPEN or SENT, the count value will be updated   * If status is DISPATCHED, the received quantity will be updated   * If status is OPEN, SENT or DISPATCHED, the cost can be updated   * Cannot update a product in RECEIVED or CANCELLED status   * Any updates to the received quantity field on a product in a `SENT` consignment, will set the consignment status to `DISPATCHED` - If the type is OUTLET then:   * If the status is OPEN and there is a cost the cost will be updated.   * If the status is SENT or DISPATCHED and received is not null the received quantity will be updated.   * If the status is OPEN or SENT and count is not null then the count quantity will be updated. - If the type is RETURN and the status is OPEN or SENT and count is not null then the count quantity will be updated. - If the type is STOCKTAKE and the status is STATUS\\_STOCKTAKE\\_IN\\_PROGRESS or STATUS\\_STOCKTAKE\\_IN\\_PROCESS\\_PROCESSED and received is not null then the received quantity will be updated.  🔒 Requires: One of the following scopes: - `consignments:write:stock_order` scope for `SUPPLIER` and `RETURN` consignments - `consignments:write:stock_transfer` scope for `OUTLET` consignments - `consignments:write:inventory_count` scope for `STOCKTAKE` consignments

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer authorization: bearerAuth
$config = Vend202601\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Vend202601\Api\ConsignmentProductsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$consignment_id = 'consignment_id_example'; // string | The consignment id to be updated.
$product_id = 'product_id_example'; // string | The product id of the product to be added to the consignment.
$consignment_product_request = new \Vend202601\Model\ConsignmentProductRequest(); // \Vend202601\Model\ConsignmentProductRequest

try {
    $result = $apiInstance->updateProductInConsignment($consignment_id, $product_id, $consignment_product_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ConsignmentProductsApi->updateProductInConsignment: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **consignment_id** | **string**| The consignment id to be updated. | |
| **product_id** | **string**| The product id of the product to be added to the consignment. | |
| **consignment_product_request** | [**\Vend202601\Model\ConsignmentProductRequest**](../Model/ConsignmentProductRequest.md)|  | [optional] |

### Return type

[**\Vend202601\Model\ConsignmentProductResponse**](../Model/ConsignmentProductResponse.md)

### Authorization

[bearerAuth](../../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: `application/json`
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
