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: 2024-10-01 21:31:14 UTC
README
这是 Kaufland.de 卖家 API v2。您可以在 https://sellerapi.kaufland.com/ 找到更多信息。
此 PHP 包由 Swagger Codegen 项目自动生成。
- API 版本:2.13.1
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上版本
安装与使用
Composer
要使用 Composer 安装绑定,请将以下内容添加到 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"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/kaufland_seller_api_v2/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请遵循 安装过程,然后运行以下命令
<?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; } ?>
API 端点文档
所有 URI 都是相对于 /v2
模型文档
- 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
- 单元嵌入
- 单元枚举
- 单元修复请求
- 单元请求
- 单元状态
- 批量更新单元错误详情
- 批量更新单元错误详情列表
- 批量更新内部错误
- 批量更新单元请求
- 批量更新单元响应
- 批量更新后的单元
- 单元详情
- 更新订阅请求
- 仓库
- 仓库地址
- 仓库地址请求
- 仓库主体请求
- 可写单元状态
授权文档
所有端点均不需要授权。