friends-of-ce/merchant-api-client-php

ChannelEngine API for merchants

2.14.0 2024-04-26 09:38 UTC

This package is auto-updated.

Last update: 2024-04-26 09:39:50 UTC


README

ChannelEngine API for merchants

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/friends-of-ce/merchant-api-client-php.git"
    }
  ],
  "require": {
    "friends-of-ce/merchant-api-client-php": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

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

Getting Started

Please follow the installation procedure and then run the following:

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



// Configure API key authorization: apiKey
$config = FriendsOfCE\Merchant\ApiClient\Configuration::getDefaultConfiguration()->setApiKey('apikey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = FriendsOfCE\Merchant\ApiClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('apikey', 'Bearer');


$apiInstance = new FriendsOfCE\Merchant\ApiClient\Api\CancellationApi(
    // 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
);
$merchantCancellationRequest = new \FriendsOfCE\Merchant\ApiClient\Model\MerchantCancellationRequest(); // \FriendsOfCE\Merchant\ApiClient\Model\MerchantCancellationRequest

try {
    $result = $apiInstance->cancellationCreate($merchantCancellationRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CancellationApi->cancellationCreate: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://demo.channelengine.net/api

Class Method HTTP request Description
CancellationApi cancellationCreate POST /v2/cancellations Creates a cancelation
CancellationApi cancellationGetForMerchant GET /v2/cancellations/merchant Gets cancelations
ChannelsApi channelPluginsGet GET /v2/channels Gets channels
CompetitionPriceApi competitionPricesGetBuyBoxPrices GET /v2/competitionprices/buyboxprices Gets the price from the buy box winner
FulfillmentStockApi fulfillmentStockGetFulfillementStockWithStockLocations GET /v2/fulfillmentstock Gets product stock across all warehouses with stock locations
ListedProductsApi listedProductGetByFilter GET /v2/channels/{channelId}/products Gets products listed by channel
NotificationApi notificationIndex GET /v2/notifications Gets notifications
OfferApi offerGetStock GET /v2/offer/stock Gets product stock across all warehouses
OfferApi offerStockPriceUpdate PUT /v2/offer Updates stock and price
OfferApi offerStockUpdate PUT /v2/offer/stock Updates stock
OrderApi orderAcknowledge POST /v2/orders/acknowledge Acknowledges orders
OrderApi orderGetByFilter GET /v2/orders Gets orders by filter
OrderApi orderGetNew GET /v2/orders/new Gets new orders
OrderApi orderInvoice GET /v2/orders/{merchantOrderNo}/invoice Generates an order invoice
OrderApi orderPackingSlip GET /v2/orders/{merchantOrderNo}/packingslip Generates a packing slip
OrderApi orderUpdate PUT /v2/orders/comment Updates an order comment
OrderApi orderUploadInvoice POST /v2/orders/{merchantOrderNo}/invoice Uploads an order invoice
OrderApi orderUploadInvoiceAsString POST /v2/orders/{merchantOrderNo}/invoice-base64 Uploads an order invoice PDF from Base64 string.
ProductApi productBulkDelete POST /v2/products/bulkdelete Deletes products
ProductApi productBulkPatch PATCH /v2/products Updates products attributes
ProductApi productBulkPatchExtraDataItems PATCH /v2/products/extra-data/bulk Adds, updates, or deletes custom attributes
ProductApi productCreate POST /v2/products Updates or creates products
ProductApi productDelete DELETE /v2/products/{merchantProductNo} Deletes a product
ProductApi productFreeze POST /v2/products/freeze Updates selected products and sets them either to frozen or not-frozen status.
ProductApi productGetByFilter GET /v2/products Gets products
ProductApi productGetByMerchantProductNo GET /v2/products/{merchantProductNo} Gets a product
ProductApi productPatch PATCH /v2/products/{merchantProductNo} Updates product attributes
ProductApi productPatchExtraDataItems PATCH /v2/products/extra-data Adds, updates, or deletes a custom attribute
ProductAttributeGroupApi productAttributeGroupAddProductExtraData PUT /v2/product-attribute-group/{groupName}/add Adds custom attributes to a group
ProductAttributeGroupApi productAttributeGroupCreate POST /v2/product-attribute-group Creates a custom attribute group
ProductAttributeGroupApi productAttributeGroupDelete DELETE /v2/product-attribute-group/{groupName} Deletes a custom attribute group
ProductAttributeGroupApi productAttributeGroupGetByFilter GET /v2/product-attribute-group Gets custom attribute groups
ProductAttributeGroupApi productAttributeGroupGetWithChannelsByFilter GET /v2/product-attribute-group/linked-channels Gets custom attribute groups and linked marketplaces
ProductAttributeGroupApi productAttributeGroupRemoveProductExtraData PUT /v2/product-attribute-group/{groupName}/remove Deletes custom attributes from a group
ProductAttributeGroupApi productAttributeGroupRenameProductAttributeGroup POST /v2/product-attribute-group/rename Renames custom attribute groups
ProductBundleApi productBundleGetByFilter GET /v2/productbundles Gets product bundles
PurchaseOrdersManagementApi purchaseOrdersManagementAcknowledge POST /v2/purchase-orders/lines/acknowledge Acknowledges lines of a purchase order
PurchaseOrdersManagementApi purchaseOrdersManagementCreateInvoice POST /v2/purchase-orders/invoice Creates a purchase order invoice
PurchaseOrdersManagementApi purchaseOrdersManagementCreateInvoices POST /v2/purchase-orders/invoice/bulk Creates a purchase order invoices in a bulk
PurchaseOrdersManagementApi purchaseOrdersManagementGetByFilter GET /v2/purchase-orders Gets purchase orders by filter
ReportApi reportCreateSettlementsReport POST /v2/reports/settlements Creates a settlement report
ReportApi reportGetReport GET /v2/reports/{reportId} Gets a settlement report
ReportApi reportGetStatus GET /v2/reports/{reportId}/status Gets the status of a settlement report
ReturnApi returnAcknowledge POST /v2/returns/merchant/acknowledge Acknowledges a return
ReturnApi returnDeclareForMerchant POST /v2/returns/merchant Creates merchant return
ReturnApi returnGetByMerchantOrderNo GET /v2/returns/merchant/{merchantOrderNo} Gets a return
ReturnApi returnGetDeclaredByChannel GET /v2/returns/merchant Gets marketplace returns
ReturnApi returnGetReturns GET /v2/returns Gets returns by filter
ReturnApi returnGetUnhandled GET /v2/returns/merchant/new Gets unhandled returns
ReturnApi returnUpdateForMerchant PUT /v2/returns Marks returns as received
SettingsApi settingsGet GET /v2/settings Gets settings
SettlementApi settlementGetByFilter GET /v2/settlements Gets settlements
SettlementApi settlementUploadSettlement POST /v2/settlements/upload Imports a settlement file.
ShipmentApi shipmentCreate POST /v2/shipments Creates shipments
ShipmentApi shipmentCreateForChannelMethod POST /v2/shipments/channelmethod Creates a shipment and initiates shipping label generation
ShipmentApi shipmentGetShipmentLabelCarriers POST /v2/carriers/{merchantOrderNo} Gets carriers providing shipping labels
ShipmentApi shipmentIndex GET /v2/shipments/merchant Gets shipments by filter
ShipmentApi shipmentShippingLabel GET /v2/orders/{merchantShipmentNo}/shippinglabel Gets a shipping label
ShipmentApi shipmentUpdate PUT /v2/shipments/{merchantShipmentNo} Updates a shipment
StockLocationApi stockLocationCreate POST /v2/stocklocations Creates a stock location
StockLocationApi stockLocationIndex GET /v2/stocklocations Gets stock locations
WebhookApi webhooksCreate POST /v2/webhooks Creates a webhook
WebhookApi webhooksDelete DELETE /v2/webhooks/{webhookName} Deletes a webhook
WebhookApi webhooksGetAll GET /v2/webhooks Gets webhooks
WebhookApi webhooksUpdate PUT /v2/webhooks Updates a webhook

Models

Authorization

Authentication schemes defined for the API:

apiKey

  • Type: API key
  • API key parameter name: apikey
  • Location: URL query string

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: 2.14.0
    • Package version: 2.14.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen