christian71-stack / kaufland-de_seller_api_v_2
2.0.0
2024-04-02 18:47 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
This package is not auto-updated.
Last update: 2025-04-30 00:13:13 UTC
README
This is the Kaufland.de Seller API v2. You can find more information on https://sellerapi.kaufland.com/
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 2.13.1
- Build package: io.swagger.codegen.v3.generators.php.PhpClientCodegen
Requirements
PHP 5.5 and later
Installation & Usage
Composer
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com/christian71-stack/kaufland-de_seller_api_v2.git"
}
],
"require": {
"christian71-stack/kaufland-de_seller_api_v2": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php
:
require_once('/path/to/kaufland_seller_api_v2/vendor/autoload.php');
Tests
To run the unit tests:
composer install
./vendor/bin/phpunit
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Kaufland\Seller\Api\OrderUnitsApi( // 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\OrderUnitCancelRequest(); // \Kaufland\Seller\Model\OrderUnitCancelRequest | Reason of the cancellation $id_order_unit = 789; // int | Order unit ID, unique across all order units try { $apiInstance->cancelOrderUnit($body, $id_order_unit); } catch (Exception $e) { echo 'Exception when calling OrderUnitsApi->cancelOrderUnit: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Kaufland\Seller\Api\OrderUnitsApi( // 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_order_unit = 789; // int | Order unit ID, unique across all order units try { $apiInstance->fulfilOrderUnit($id_order_unit); } catch (Exception $e) { echo 'Exception when calling OrderUnitsApi->fulfilOrderUnit: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Kaufland\Seller\Api\OrderUnitsApi( // 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_order_unit = 789; // int | Order unit ID, unique across all order units $embedded = array(new \Kaufland\Seller\Model\OrderUnitEmbeddable()); // \Kaufland\Seller\Model\OrderUnitEmbeddable[] | Additional data to be returned try { $result = $apiInstance->getOrderUnit($id_order_unit, $embedded); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderUnitsApi->getOrderUnit: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Kaufland\Seller\Api\OrderUnitsApi( // 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 | Locale of storefront $id_offer = "id_offer_example"; // string | Unique ID for offer(s) $status = array(new \Kaufland\Seller\Model\OrderUnitStatus()); // \Kaufland\Seller\Model\OrderUnitStatus[] | Get only order units which are in the given status $ts_created_from_iso = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Get only order units which were placed after this timestamp. Should be in YYYY-MM-ddTHH:mm:ssZ format $ts_updated_from_iso = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Get only order units which were updated after this timestamp. Should be in YYYY-MM-ddTHH:mm:ssZ format $fulfillment_type = array(new \Kaufland\Seller\Model\FulfillmentType()); // \Kaufland\Seller\Model\FulfillmentType[] | Get only order units which are fulfilled by the given type $sort = "ts_created:desc"; // string | Specify sorting $limit = 30; // int | Desired size of result set<br>max: 100, default: 30 $offset = 0; // int | Offset applied to result set<br>default: 0 try { $result = $apiInstance->getOrderUnits($storefront, $id_offer, $status, $ts_created_from_iso, $ts_updated_from_iso, $fulfillment_type, $sort, $limit, $offset); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrderUnitsApi->getOrderUnits: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Kaufland\Seller\Api\OrderUnitsApi( // 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\OrderUnitRefundRequest(); // \Kaufland\Seller\Model\OrderUnitRefundRequest | Request body containing amount and reason of the refund. $id_order_unit = 789; // int | Order unit ID, unique across all order units try { $apiInstance->refundOrderUnit($body, $id_order_unit); } catch (Exception $e) { echo 'Exception when calling OrderUnitsApi->refundOrderUnit: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Kaufland\Seller\Api\OrderUnitsApi( // 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\OrderUnitSendRequest(); // \Kaufland\Seller\Model\OrderUnitSendRequest | Request body containing tracking number(s) and carrier code of the shipment(s) $id_order_unit = 789; // int | Order unit ID, unique across all order units try { $apiInstance->sendOrderUnit($body, $id_order_unit); } catch (Exception $e) { echo 'Exception when calling OrderUnitsApi->sendOrderUnit: ', $e->getMessage(), PHP_EOL; } ?>
Documentation for API Endpoints
All URIs are relative to /v2
Class | Method | HTTP request | Description |
---|---|---|---|
OrderUnitsApi | cancelOrderUnit | PATCH /order-units/{id_order_unit}/cancel | Cancel an order unit |
OrderUnitsApi | fulfilOrderUnit | PATCH /order-units/{id_order_unit}/fulfil | Mark an order unit to be in fulfillment |
OrderUnitsApi | getOrderUnit | GET /order-units/{id_order_unit} | Get an order unit by ID |
OrderUnitsApi | getOrderUnits | GET /order-units | Get a list of order units |
OrderUnitsApi | refundOrderUnit | PATCH /order-units/{id_order_unit}/refund | Send a refund to a customer |
OrderUnitsApi | sendOrderUnit | PATCH /order-units/{id_order_unit}/send | Mark an order unit as sent |
OrdersApi | createPlaygroundOrder | POST /playground/orders | Creates a dummy order on the kaufland playground API environment. |
OrdersApi | getOrder | GET /orders/{id_order} | Get an order by ID |
OrdersApi | getOrders | GET /orders | Get a list of orders |
PlaygroundApi | createPlaygroundOrder | POST /playground/orders | Creates a dummy order on the kaufland playground API environment. |
ProductsApi | getProductByEan | GET /products/ean/{ean} | Get a product by EAN |
ShipmentsApi | addShipment | POST /shipments | Add a shipment to an order unit which is already marked as sent. |
ShippingGroupsApi | getShippingGroup | GET /shipping-groups/{id_shipping_group} | Get a shipping group by ID |
ShippingGroupsApi | getShippingGroups | GET /shipping-groups | Get the list of your predefined shipping groups |
StatusApi | ping | GET /status/ping | Ping the Marketplace Seller API by Kaufland |
SubscriptionsApi | addSubscription | POST /subscriptions | Subscribe for event |
SubscriptionsApi | deleteSubscription | DELETE /subscriptions/{id_subscription} | Unsubscribe from event |
SubscriptionsApi | getSubscription | GET /subscriptions/{id_subscription} | Get a push notification subscription by ID |
SubscriptionsApi | getSubscriptions | GET /subscriptions | Get a list of your push notification subscriptions |
SubscriptionsApi | updateSubscription | PATCH /subscriptions/{id_subscription} | Update subscription |
UnitsApi | bulkUpdateUnits | POST /units/bulk | Update some fields of a given set of units |
UnitsApi | createUnit | POST /units | Add a unit |
UnitsApi | deleteUnit | DELETE /units/{id_unit} | Delete a unit |
UnitsApi | getUnit | GET /units/{id_unit} | Get a unit by ID |
UnitsApi | getUnits | GET /units | Get a list of your units |
UnitsApi | patchUnit | PATCH /units/{id_unit} | Update some of the fields of a unit |
WarehousesApi | createWarehouse | POST /warehouses | Create a new Warehouse |
WarehousesApi | deleteWarehouse | DELETE /warehouses/{id_warehouse} | Delete a warehouse |
WarehousesApi | getWarehouse | GET /warehouses/{id_warehouse} | Get a warehouse by its ID |
WarehousesApi | getWarehouses | GET /warehouses | Get a list of your Warehouses |
WarehousesApi | updateWarehouse | PUT /warehouses/{id_warehouse} | Update a Warehouse |
Documentation For Models
- AddShipmentRequest
- AddShipmentRequestShipmentInformation
- Address
- AllOfDeliveryPickupLocation
- AllOfOrderDetailsBillingAddress
- AllOfOrderDetailsBuyer
- AllOfOrderDetailsOrderUnitsDeliveryTimeMin
- AllOfOrderDetailsOrderUnitsProduct
- AllOfOrderDetailsShippingAddress
- AllOfOrderUnitBillingAddress
- AllOfOrderUnitBuyer
- AllOfOrderUnitDeliveryTimeMax
- AllOfOrderUnitDeliveryTimeMin
- AllOfOrderUnitDetailsBillingAddress
- AllOfOrderUnitDetailsBuyer
- AllOfOrderUnitDetailsDeliveryTimeMax
- AllOfOrderUnitDetailsDeliveryTimeMin
- AllOfOrderUnitDetailsProduct
- AllOfOrderUnitDetailsReturnUnit
- AllOfOrderUnitDetailsShippingAddress
- AllOfOrderUnitProduct
- AllOfOrderUnitShippingAddress
- AllOfProductUnitEmbeddedSeller
- AllOfTicketIdBuyer
- AllOfTicketTopic
- AnyOfUnitRequestCondition
- AnyOfUnitsBulkUpdateResponseDataItems
- ApiResponseOrderDetails_
- ApiResponseOrderUnitDetails_
- ApiResponsePingMessage_
- ApiResponseProductWithEmbedded_
- ApiResponseShippingGroup_
- ApiResponseSubscription_
- ApiResponseUnit_
- ApiResponseWarehouse_
- BaseCollectionApiResponseCreatedOrder_
- Buyer
- Category
- CategoryBasic
- CollectionApiResponseOrderUnit_
- CollectionApiResponseOrder_
- CollectionApiResponseShippingGroup_
- CollectionApiResponseSubscription_
- CollectionApiResponseUnitEmbedded_
- CollectionApiResponseWarehouse_
- CreateCollectionInputUnitsDetails_
- CreateSubscriptionRequest
- CreatedOrder
- Currency
- Delivery
- ErrorDetails
- ErrorResponse
- FulfillmentType
- Integer
- LongInteger
- NotFoundResponse
- Order
- OrderDetails
- OrderDetailsOrderUnits
- OrderEmbeddable
- OrderInvoice
- OrderUnit
- OrderUnitCancelReason
- OrderUnitCancelRequest
- OrderUnitDetails
- OrderUnitEmbeddable
- OrderUnitRefundReason
- OrderUnitRefundRequest
- OrderUnitSendRequest
- OrderUnitStatus
- Pagination
- PartialPickSubscriptionCallbackUrlOrFallbackEmailOrEventNameOrIsActiveOrStorefront_
- PickSubscriptionCallbackUrlOrFallbackEmailOrEventName_
- PickupLocation
- PingMessage
- Product
- ProductEmbeddable
- ProductUnitEmbedded
- ProductUnitEmbeddedSeller
- ProductWithEmbedded
- ReturnReason
- ReturnUnit
- ReturnUnitStatus
- SellerApiShippingGroupRegionOptionNameEnum
- SellerApiShippingGroupType
- SellerApiWarehouseType
- ShippingGroup
- ShippingGroupOption
- ShippingGroupRegion
- Storefront
- Subscription
- SubscriptionEventName
- Ticket
- TicketID
- TicketReason
- TicketStatus
- TicketTopic
- Unit
- UnitCondition
- UnitEmbedded
- UnitEmbeddedEnum
- UnitPatchRequest
- UnitRequest
- UnitStatuses
- UnitsBulkUpdateErrorDetail
- UnitsBulkUpdateErrorDetails
- UnitsBulkUpdateInternalError
- UnitsBulkUpdateRequest
- UnitsBulkUpdateResponse
- UnitsBulkUpdatedUnit
- UnitsDetails
- UpdateSubscriptionRequest
- Warehouse
- WarehouseAddress
- WarehouseAddressRequest
- WarehouseBodyRequest
- WriteableUnitStatuses
Documentation For Authorization
All endpoints do not require authorization.