All URIs are relative to /v2
Method | HTTP request | Description |
---|---|---|
bulkUpdateUnits | POST /units/bulk | Update some fields of a given set of units |
createUnit | POST /units | Add a unit |
deleteUnit | DELETE /units/{id_unit} | Delete a unit |
getUnit | GET /units/{id_unit} | Get a unit by ID |
getUnits | GET /units | Get a list of your units |
patchUnit | PATCH /units/{id_unit} | Update some of the fields of a unit |
\Kaufland\Seller\Model\UnitsBulkUpdateResponse bulkUpdateUnits($body, $storefront)
Update some fields of a given set of units
Update some fields of a given set of units. Please notice that you have to specify a listing price greater than zero.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Kaufland\Seller\Api\UnitsApi(
// 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()
);
$body = array(new \Kaufland\Seller\Model\UnitsBulkUpdateRequest()); // \Kaufland\Seller\Model\UnitsBulkUpdateRequest[] | Update Object
$storefront = new \Kaufland\Seller\Model\Storefront(); // \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront
try {
$result = $apiInstance->bulkUpdateUnits($body, $storefront);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UnitsApi->bulkUpdateUnits: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Kaufland\Seller\Model\UnitsBulkUpdateRequest[] | Update Object | |
storefront | \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront |
\Kaufland\Seller\Model\UnitsBulkUpdateResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Kaufland\Seller\Model\ApiResponseUnit_ createUnit($body, $storefront)
Add a unit
Add a new unit for an existing product. You must specify either an id_product
or an ean
(or both), to identify the product to which the unit belongs. Please notice that you have to specify a listing price greater than zero.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Kaufland\Seller\Api\UnitsApi(
// 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()
);
$body = new \Kaufland\Seller\Model\UnitRequest(); // \Kaufland\Seller\Model\UnitRequest | Information about the unit that will be generated
$storefront = new \Kaufland\Seller\Model\Storefront(); // \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront
try {
$result = $apiInstance->createUnit($body, $storefront);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UnitsApi->createUnit: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Kaufland\Seller\Model\UnitRequest | Information about the unit that will be generated | |
storefront | \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront |
\Kaufland\Seller\Model\ApiResponseUnit_
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteUnit($id_unit, $storefront)
Delete a unit
Delete a unit.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Kaufland\Seller\Api\UnitsApi(
// 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()
);
$id_unit = 789; // int | Internal ID of Unit, unique across all Units
$storefront = new \Kaufland\Seller\Model\Storefront(); // \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront
try {
$apiInstance->deleteUnit($id_unit, $storefront);
} catch (Exception $e) {
echo 'Exception when calling UnitsApi->deleteUnit: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id_unit | int | Internal ID of Unit, unique across all Units | |
storefront | \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Kaufland\Seller\Model\ApiResponseUnit_ getUnit($id_unit, $storefront, $embedded)
Get a unit by ID
Get a unit by its id_unit
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Kaufland\Seller\Api\UnitsApi(
// 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()
);
$id_unit = 789; // int | Internal ID of Unit, unique across all Units
$storefront = new \Kaufland\Seller\Model\Storefront(); // \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront
$embedded = array(new \Kaufland\Seller\Model\UnitEmbeddedEnum()); // \Kaufland\Seller\Model\UnitEmbeddedEnum[] |
try {
$result = $apiInstance->getUnit($id_unit, $storefront, $embedded);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UnitsApi->getUnit: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id_unit | int | Internal ID of Unit, unique across all Units | |
storefront | \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront | |
embedded | \Kaufland\Seller\Model\UnitEmbeddedEnum[] | [optional] |
\Kaufland\Seller\Model\ApiResponseUnit_
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Kaufland\Seller\Model\CollectionApiResponseUnitEmbedded_ getUnits($storefront, $limit, $offset, $id_offer, $id_product, $ean, $embedded, $fulfillment_type)
Get a list of your units
Get a list of your units. Note that there may a delay of up to several minutes between adding a new unit and when it will be available through this endpoint.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Kaufland\Seller\Api\UnitsApi(
// 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()
);
$storefront = new \Kaufland\Seller\Model\Storefront(); // \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront
$limit = 30; // int | Desired size of result set, maximum is 100
$offset = 0; // int | Offset applied to result set
$id_offer = "id_offer_example"; // string | Provided ID of your stock
$id_product = 789; // int | Our internal id_product
$ean = "ean_example"; // string | EAN, 13 or 14 digits
$embedded = array(new \Kaufland\Seller\Model\UnitEmbeddedEnum()); // \Kaufland\Seller\Model\UnitEmbeddedEnum[] |
$fulfillment_type = array(new \Kaufland\Seller\Model\FulfillmentType()); // \Kaufland\Seller\Model\FulfillmentType[] | Get only units which are fulfilled by the given type
try {
$result = $apiInstance->getUnits($storefront, $limit, $offset, $id_offer, $id_product, $ean, $embedded, $fulfillment_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UnitsApi->getUnits: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
storefront | \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront | |
limit | int | Desired size of result set, maximum is 100 | [optional] [default to 30] |
offset | int | Offset applied to result set | [optional] [default to 0] |
id_offer | string | Provided ID of your stock | [optional] |
id_product | int | Our internal id_product | [optional] |
ean | string | EAN, 13 or 14 digits | [optional] |
embedded | \Kaufland\Seller\Model\UnitEmbeddedEnum[] | [optional] | |
fulfillment_type | \Kaufland\Seller\Model\FulfillmentType[] | Get only units which are fulfilled by the given type | [optional] [default to ["fulfilled_by_merchant"]] |
\Kaufland\Seller\Model\CollectionApiResponseUnitEmbedded_
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Kaufland\Seller\Model\ApiResponseUnit_ patchUnit($body, $storefront, $id_unit)
Update some of the fields of a unit
Update some of the fields of a unit. Please notice that you have to specify a listing price greater than zero.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Kaufland\Seller\Api\UnitsApi(
// 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()
);
$body = new \Kaufland\Seller\Model\UnitPatchRequest(); // \Kaufland\Seller\Model\UnitPatchRequest | Update Object
$storefront = new \Kaufland\Seller\Model\Storefront(); // \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront
$id_unit = 789; // int | Internal ID of Unit, unique across all Units
try {
$result = $apiInstance->patchUnit($body, $storefront, $id_unit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UnitsApi->patchUnit: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Kaufland\Seller\Model\UnitPatchRequest | Update Object | |
storefront | \Kaufland\Seller\Model\Storefront | Parameter to select the affected storefront | |
id_unit | int | Internal ID of Unit, unique across all Units |
\Kaufland\Seller\Model\ApiResponseUnit_
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]