定制 macropage/sdk-ebay-rest-marketing 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

macropage/sdk-ebay-rest-marketing

Composer 安装命令:

composer require macropage/sdk-ebay-rest-marketing

包简介

<p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:</p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i> for the products they want to promote. eBay displays the ads in search results and

README 文档

README

Important Notice

Before using this SDK, you must modify the OpenAPI specification file (sell_marketing_v1_oas3.yaml) to remove duplicate Content-Type headers. Run the fix_openapi_schema_file script to apply these changes and review the fixed file carefully. If the output is correct, update the original specification file accordingly.

sdk-ebay-rest-marketing

The Marketing API offers two platforms that sellers can use to promote and advertise their products:

  • Promoted Listings is an eBay ad service that lets sellers set up ad campaigns for the products they want to promote. eBay displays the ads in search results and in other marketing modules as SPONSORED listings. If an item in a Promoted Listings campaign sells, the seller is assessed a Promoted Listings fee, which is a seller-specified percentage applied to the sales price. For complete details, refer to the Promoted Listings playbook.
  • Promotions Manager gives sellers a way to offer discounts on specific items as a way to attract buyers to their inventory. Sellers can set up discounts (such as \"20% off\" and other types of offers) on specific items or on an entire customer order. To further attract buyers, eBay prominently displays promotion teasers throughout buyer flows. For complete details, see Promotions Manager.

Marketing reports, on both the Promoted Listings and Promotions Manager platforms, give sellers information that shows the effectiveness of their marketing strategies. The data gives sellers the ability to review and fine tune their marketing efforts.

Store Email Campaign allows sellers to create and send email campaigns to customers who have signed up to receive their newsletter. For more information on email campaigns, see Store Email Campaigns.

Important! Sellers must have an active eBay Store subscription, and they must accept the Terms and Conditions before they can make requests to these APIs in the Production environment. There are also site-specific listings requirements and restrictions associated with these marketing tools, as listed in the \"requirements and restrictions\" sections for Promoted Listings and Promotions Manager.

The table below lists all the Marketing API calls grouped by resource.

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/macropage/sdk-ebay-rest-marketing.git"
    }
  ],
  "require": {
    "macropage/sdk-ebay-rest-marketing": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/sdk-ebay-rest-marketing/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure OAuth2 access token for authorization: api_auth
$config = macropage\SDKs\ebay\rest\marketing\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new macropage\SDKs\ebay\rest\marketing\Api\AdApi(
    // 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
);
$campaignId = 'campaignId_example'; // string | This path parameter specifies the unique eBay-assigned identifier of the ad campaign for which to associated the ads being created.<br><br> Use the <a href=\"/api-docs/sell/marketing/resources/campaign/methods/getCampaigns\" target=\"_blank\">getCampaigns</a> method to retrieve campaign IDs.
$bulkCreateAdsByInventoryReferenceRequest = new \macropage\SDKs\ebay\rest\marketing\Model\BulkCreateAdsByInventoryReferenceRequest(); // \macropage\SDKs\ebay\rest\marketing\Model\BulkCreateAdsByInventoryReferenceRequest | The container for the bulk request to create ads for eBay inventory reference IDs. eBay inventory reference IDs are seller-defined IDs used by theInventory API.

try {
    $result = $apiInstance->bulkCreateAdsByInventoryReference($campaignId, $bulkCreateAdsByInventoryReferenceRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdApi->bulkCreateAdsByInventoryReference: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://api.ebay.com/sell/marketing/v1

Class Method HTTP request Description
AdApi bulkCreateAdsByInventoryReference POST /ad_campaign/{campaign_id}/bulk_create_ads_by_inventory_reference
AdApi bulkCreateAdsByListingId POST /ad_campaign/{campaign_id}/bulk_create_ads_by_listing_id
AdApi bulkDeleteAdsByInventoryReference POST /ad_campaign/{campaign_id}/bulk_delete_ads_by_inventory_reference
AdApi bulkDeleteAdsByListingId POST /ad_campaign/{campaign_id}/bulk_delete_ads_by_listing_id
AdApi bulkUpdateAdsBidByInventoryReference POST /ad_campaign/{campaign_id}/bulk_update_ads_bid_by_inventory_reference
AdApi bulkUpdateAdsBidByListingId POST /ad_campaign/{campaign_id}/bulk_update_ads_bid_by_listing_id
AdApi bulkUpdateAdsStatus POST /ad_campaign/{campaign_id}/bulk_update_ads_status
AdApi bulkUpdateAdsStatusByListingId POST /ad_campaign/{campaign_id}/bulk_update_ads_status_by_listing_id
AdApi createAdByListingId POST /ad_campaign/{campaign_id}/ad
AdApi createAdsByInventoryReference POST /ad_campaign/{campaign_id}/create_ads_by_inventory_reference
AdApi deleteAd DELETE /ad_campaign/{campaign_id}/ad/{ad_id}
AdApi deleteAdsByInventoryReference POST /ad_campaign/{campaign_id}/delete_ads_by_inventory_reference
AdApi getAd GET /ad_campaign/{campaign_id}/ad/{ad_id}
AdApi getAds GET /ad_campaign/{campaign_id}/ad
AdApi getAdsByInventoryReference GET /ad_campaign/{campaign_id}/get_ads_by_inventory_reference
AdApi updateBid POST /ad_campaign/{campaign_id}/ad/{ad_id}/update_bid
AdGroupApi createAdGroup POST /ad_campaign/{campaign_id}/ad_group
AdGroupApi getAdGroup GET /ad_campaign/{campaign_id}/ad_group/{ad_group_id}
AdGroupApi getAdGroups GET /ad_campaign/{campaign_id}/ad_group
AdGroupApi suggestBids POST /ad_campaign/{campaign_id}/ad_group/{ad_group_id}/suggest_bids
AdGroupApi suggestKeywords POST /ad_campaign/{campaign_id}/ad_group/{ad_group_id}/suggest_keywords
AdGroupApi updateAdGroup PUT /ad_campaign/{campaign_id}/ad_group/{ad_group_id}
AdReportApi getReport GET /ad_report/{report_id}
AdReportMetadataApi getReportMetadata GET /ad_report_metadata
AdReportMetadataApi getReportMetadataForReportType GET /ad_report_metadata/{report_type}
AdReportTaskApi createReportTask POST /ad_report_task
AdReportTaskApi deleteReportTask DELETE /ad_report_task/{report_task_id}
AdReportTaskApi getReportTask GET /ad_report_task/{report_task_id}
AdReportTaskApi getReportTasks GET /ad_report_task
CampaignApi cloneCampaign POST /ad_campaign/{campaign_id}/clone
CampaignApi createCampaign POST /ad_campaign
CampaignApi deleteCampaign DELETE /ad_campaign/{campaign_id}
CampaignApi endCampaign POST /ad_campaign/{campaign_id}/end
CampaignApi findCampaignByAdReference GET /ad_campaign/find_campaign_by_ad_reference
CampaignApi getCampaign GET /ad_campaign/{campaign_id}
CampaignApi getCampaignByName GET /ad_campaign/get_campaign_by_name
CampaignApi getCampaigns GET /ad_campaign
CampaignApi launchCampaign POST /ad_campaign/{campaign_id}/launch
CampaignApi pauseCampaign POST /ad_campaign/{campaign_id}/pause
CampaignApi resumeCampaign POST /ad_campaign/{campaign_id}/resume
CampaignApi setupQuickCampaign POST /ad_campaign/setup_quick_campaign
CampaignApi suggestBudget GET /ad_campaign/suggest_budget
CampaignApi suggestItems GET /ad_campaign/{campaign_id}/suggest_items
CampaignApi suggestMaxCpc POST /ad_campaign/suggest_max_cpc
CampaignApi updateAdRateStrategy POST /ad_campaign/{campaign_id}/update_ad_rate_strategy
CampaignApi updateBiddingStrategy POST /ad_campaign/{campaign_id}/update_bidding_strategy
CampaignApi updateCampaignBudget POST /ad_campaign/{campaign_id}/update_campaign_budget
CampaignApi updateCampaignIdentification POST /ad_campaign/{campaign_id}/update_campaign_identification
EmailCampaignApi createEmailCampaign POST /email_campaign
EmailCampaignApi deleteEmailCampaign DELETE /email_campaign/{email_campaign_id}
EmailCampaignApi getAudiences GET /email_campaign/audience
EmailCampaignApi getEmailCampaign GET /email_campaign/{email_campaign_id}
EmailCampaignApi getEmailCampaigns GET /email_campaign
EmailCampaignApi getEmailPreview GET /email_campaign/{email_campaign_id}/email_preview
EmailCampaignApi getEmailReport GET /email_campaign/report
EmailCampaignApi updateEmailCampaign PUT /email_campaign/{email_campaign_id}
ItemPriceMarkdownApi createItemPriceMarkdownPromotion POST /item_price_markdown
ItemPriceMarkdownApi deleteItemPriceMarkdownPromotion DELETE /item_price_markdown/{promotion_id}
ItemPriceMarkdownApi getItemPriceMarkdownPromotion GET /item_price_markdown/{promotion_id}
ItemPriceMarkdownApi updateItemPriceMarkdownPromotion PUT /item_price_markdown/{promotion_id}
ItemPromotionApi createItemPromotion POST /item_promotion
ItemPromotionApi deleteItemPromotion DELETE /item_promotion/{promotion_id}
ItemPromotionApi getItemPromotion GET /item_promotion/{promotion_id}
ItemPromotionApi updateItemPromotion PUT /item_promotion/{promotion_id}
KeywordApi bulkCreateKeyword POST /ad_campaign/{campaign_id}/bulk_create_keyword
KeywordApi bulkUpdateKeyword POST /ad_campaign/{campaign_id}/bulk_update_keyword
KeywordApi createKeyword POST /ad_campaign/{campaign_id}/keyword
KeywordApi getKeyword GET /ad_campaign/{campaign_id}/keyword/{keyword_id}
KeywordApi getKeywords GET /ad_campaign/{campaign_id}/keyword
KeywordApi updateKeyword PUT /ad_campaign/{campaign_id}/keyword/{keyword_id}
NegativeKeywordApi bulkCreateNegativeKeyword POST /bulk_create_negative_keyword
NegativeKeywordApi bulkUpdateNegativeKeyword POST /bulk_update_negative_keyword
NegativeKeywordApi createNegativeKeyword POST /negative_keyword
NegativeKeywordApi getNegativeKeyword GET /negative_keyword/{negative_keyword_id}
NegativeKeywordApi getNegativeKeywords GET /negative_keyword
NegativeKeywordApi updateNegativeKeyword PUT /negative_keyword/{negative_keyword_id}
PromotionApi getListingSet GET /promotion/{promotion_id}/get_listing_set
PromotionApi getPromotions GET /promotion
PromotionApi pausePromotion POST /promotion/{promotion_id}/pause
PromotionApi resumePromotion POST /promotion/{promotion_id}/resume
PromotionReportApi getPromotionReports GET /promotion_report
PromotionSummaryReportApi getPromotionSummaryReport GET /promotion_summary_report

Models

Authorization

Authentication schemes defined for the API:

api_auth

api_auth

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: v1.22.0
    • Package version: 1.22.0
    • Generator version: 7.11.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

macropage/sdk-ebay-rest-marketing 适用场景与选型建议

macropage/sdk-ebay-rest-marketing 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 04 月 17 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「rest」 「api」 「sdk」 「openapi」 「openapitools」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 macropage/sdk-ebay-rest-marketing 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 macropage/sdk-ebay-rest-marketing 我们能提供哪些服务?
定制开发 / 二次开发

基于 macropage/sdk-ebay-rest-marketing 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: unlicense
  • 更新时间: 2024-04-17