wpify/kaufland-api-php-sdk

这是Kaufland.de卖家API v2。更多详细信息请访问[https://sellerapi.kaufland.com/](https://sellerapi.kaufland.com/)

dev-master 2023-05-31 16:33 UTC

This package is auto-updated.

Last update: 2024-08-30 01:50:08 UTC


README

这是Kaufland.de卖家API v2。更多详细信息请访问https://sellerapi.kaufland.com/

安装与使用

要求

PHP 7.4及更高版本。也应与PHP 8.0兼容。

Composer

要使用Composer安装绑定,请将以下内容添加到composer.json

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/wpify/kaufland-api-php-sdk.git"
    }
  ],
  "require": {
    "wpify/kaufland-api-php-sdk": "*@dev"
  }
}

然后运行composer install

手动安装

下载文件并包含autoload.php

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

入门指南

请按照安装过程进行操作,然后运行以下命令

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




$apiInstance = new KauflandApiClient\Api\AttributesApi(
    // 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_attribute = 21; // int | The ID of the attribute
$storefront = new \KauflandApiClient\Model\Storefront(); // Storefront | Specifies the store by country
$locale = new \KauflandApiClient\Model\ProductDataLocale(); // ProductDataLocale | Allows clients to consume the data in languages that are different from the storefront-default locale

try {
    $result = $apiInstance->getAttribute($id_attribute, $storefront, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttributesApi->getAttribute: ', $e->getMessage(), PHP_EOL;
}

API端点

所有URI相对于/v2

方法HTTP请求描述
AttributesApigetAttributeGET /attributes/{id_attribute}通过ID获取属性
AttributesApigetAttributeByNameGET /attributes/by-name/{name}通过名称获取属性
AttributesApigetAttributeListGET /attributes获取属性列表
AttributesApigetAttributeListBySearchGET /attributes/search通过搜索词获取属性
CarriersApigetCarriersGET /carriers获取可用承运商列表
CategoriesApidecideCategoryPOST /categories/decide猜测分类
CategoriesApigetCategoriesListGET /categories通过搜索词获取分类列表
CategoriesApigetCategoryGET /categories/{id_category}通过ID获取分类
CategoriesApigetCategoryTreeGET /categories/tree获取完整的分类树
ImportFilesApicreateInventoryCommandImportFilePOST /import-files/inventory-command添加INVENTORY_COMMAND文件URL
ImportFilesApicreateInventoryFeedImportFilePOST /import-files/inventory-feed添加INVENTORY_FEED文件URL
ImportFilesApicreateOrderCommandImportFilePOST /import-files/order-command添加ORDER_COMMAND文件URL
ImportFilesApigetInventoryCommandImportFileGET /import-files/inventory-command/{id_import_file}通过ID获取库存命令导入文件
ImportFilesApigetInventoryCommandImportFilesGET /import-files/inventory-command获取您的库存命令导入文件列表
ImportFilesApigetInventoryFeedImportFileGET /import-files/inventory-feed/{id_import_file}通过ID获取库存导入文件
ImportFilesApigetInventoryFeedImportFilesGET /import-files/inventory-feed获取您的库存导入文件列表
ImportFilesApigetOrderCommandImportFileGET /import-files/order-command/{id_import_file}通过ID获取订单命令导入文件
ImportFilesApigetOrderCommandImportFilesGET /import-files/order-command获取您的订单命令导入文件列表
InfoApigetAllLocalesGET /info/locale获取'locale'参数的值
InfoApigetAllStorefrontsGET /info/storefront获取'storefront'参数的值
OrderInvoicesApideleteOrderInvoiceDELETE /order-invoices/{id_order}/{id_invoice}通过给定的订单ID和发票ID删除订单发票
OrderInvoicesApigetOrderInvoiceGET /order-invoices/{id_order}/{id_invoice}通过订单ID和发票ID获取订单发票
OrderInvoicesApigetOrderInvoicesGET /order-invoices获取订单发票列表
OrderInvoicesApiuploadOrderInvoicePOST /order-invoices/{id_order}将订单发票上传到指定的订单
订单单元API取消订单单元PATCH /order-units/{id_order_unit}/cancel取消订单单元
订单单元API履行订单单元PATCH /order-units/{id_order_unit}/fulfil标记订单单元为履行状态
订单单元API获取订单单元GET /order-units/{id_order_unit}通过ID获取订单单元
订单单元API获取订单单元列表GET /order-units获取订单单元列表
订单单元API退款订单单元PATCH /order-units/{id_order_unit}/refund向客户发送退款
订单单元API发送订单单元PATCH /order-units/{id_order_unit}/send标记订单单元为已发送
订单API获取订单GET /orders/{id_order}通过ID获取订单
订单API获取订单列表GET /orders获取订单列表
产品数据API创建产品数据PUT /product-data为EAN添加新产品数据或替换现有数据
产品数据API创建产品数据文件POST /product-data/import-files添加导入文件URL
产品数据API删除产品数据DELETE /product-data/{ean}删除EAN的产品数据
产品数据API获取产品数据GET /product-data/{ean}获取EAN的产品数据
产品数据API获取产品数据文件GET /product-data/import-files/{id_import_file}通过ID获取导入文件
产品数据API获取产品数据文件列表GET /product-data/import-files获取导入文件
产品数据API获取产品数据状态GET /product-data/status/{ean}获取产品数据处理状态
产品数据API更新产品数据PATCH /product-data更新EAN的现有产品数据
产品API获取产品GET /products/{id_product}通过ID获取产品
产品API通过EAN获取产品GET /products/ean/{ean}通过EAN获取产品
产品API获取产品列表GET /products/search通过搜索词获取产品列表
报告API获取报告GET /reports/{id_report}通过ID获取单个报告的元数据
报告API获取报告列表GET /reports获取报告列表
报告API请求账户清单报告POST /reports/account-listing排队库存报告
报告API请求带商店价格的账户清单报告POST /reports/account-listing-with-shop-price排队库存报告
报告API请求取消报告POST /reports/cancellations排队取消报告
报告API请求竞争对手比较报告POST /reports/competitors-comparer排队竞争对手比较报告
报告API请求未找到EAN的报告POST /reports/eans-not-found排队未找到EAN的报告
报告API请求新预订报告POST /reports/bookings-new排队预订报告
报告API请求新销售报告POST /reports/sales-new排队销售报告
报告API请求产品数据变更报告POST /reports/product-data-changes排队产品数据变更报告
报告API请求产品数据导入文件错误报告POST /reports/product-data-import-file-errors排队产品数据导入文件错误报告
退货单元API接受退货单元PATCH /return-units/{id_return_unit}/accept接受退货单元
退货单元API澄清退货单元PATCH /return-units/{id_return_unit}/clarify澄清退货单元
退货单元API通过ID获取退货单元GET /return-units/{id_return_unit}通过ID获取退货单元
退货单元API获取退货单元列表GET /return-units获取退货单元列表
退货单元API拒绝退货单元PATCH /return-units/{id_return_unit}/reject拒绝退货单元
退货单元API维修退货单元PATCH /return-units/{id_return_unit}/repair维修退货单元
退货API通过ID获取退货GET /returns/{id_return}通过ID获取退货
退货API获取退货列表GET /returns获取退货列表
退货API初始化退货POST /returns初始化退货
退货API更新退货PUT /returns/{id_return}向已存在的退货中添加一个或多个订单单元
ShipmentsApiaddShipmentPOST /shipments向已标记为已发送的订单单元添加一个发货
ShippingGroupsApigetShippingGroupGET /shipping-groups/{id_shipping_group}通过ID获取一个发货组
ShippingGroupsApigetShippingGroupsGET /shipping-groups获取预定义的发货组列表
StatusApipingGET /status/ping通过Kaufland的Marketplace Seller API进行ping
SubscriptionsApiaddSubscriptionPOST /subscriptions订阅事件
SubscriptionsApideleteSubscriptionDELETE /subscriptions/{id_subscription}取消订阅事件
SubscriptionsApigetSubscriptionGET /subscriptions/{id_subscription}通过ID获取推送通知订阅
SubscriptionsApigetSubscriptionsGET /subscriptions获取推送通知订阅列表
SubscriptionsApiupdateSubscriptionPATCH /subscriptions/{id_subscription}更新订阅
TicketsApicloseTicketPATCH /tickets/{id_ticket}/close通过ID关闭一个工单
TicketsApicreateTicketMessagePOST /tickets/{id_ticket}/messages为工单创建新消息
TicketsApigetTicketGET /tickets/{id_ticket}通过ID获取一个工单
TicketsApigetTicketMessagesGET /tickets/messages获取工单消息列表
TicketsApigetTicketsGET /tickets获取工单列表
TicketsApiopenTicketPOST /tickets打开一个工单
UnitsApicreateUnitPOST /units添加一个单元
UnitsApideleteUnitDELETE /units/{id_unit}删除一个单元
UnitsApigetUnitGET /units/{id_unit}通过ID获取一个单元
UnitsApigetUnitsGET /units获取你的单元列表
UnitsApipatchUnitPATCH /units/{id_unit}更新单元的一些字段
WarehousesApicreateWarehousePOST /warehouses创建一个新的仓库
WarehousesApideleteWarehouseDELETE /warehouses/{id_warehouse}删除一个仓库
WarehousesApigetWarehouseGET /warehouses/{id_warehouse}通过其ID获取一个仓库
WarehousesApigetWarehousesGET /warehouses获取你的仓库列表
WarehousesApiupdateWarehousePUT /warehouses/{id_warehouse}更新一个仓库

Models

Authorization

所有端点都不需要授权。

测试

要运行测试,请使用

composer install
vendor/bin/phpunit

作者

seller-api-support@kaufland-online.de

关于此包

此PHP包由OpenAPI Generator项目自动生成

  • API版本:2.10.1
  • 构建包:org.openapitools.codegen.languages.PhpClientCodegen