friends-of-ce / merchant-api-client-php
ChannelEngine API for merchants
Installs: 6 789
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/friends-of-ce/merchant-api-client-php
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
 
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\CancellationsApi( // 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 CancellationsApi->cancellationCreate: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://demo.channelengine.net/api
| Class | Method | HTTP request | Description | 
|---|---|---|---|
| CancellationsApi | cancellationCreate | POST /v2/cancellations | Creates a cancelation | 
| CancellationsApi | cancellationGetForMerchant | GET /v2/cancellations/merchant | Gets cancelations | 
| ChannelsApi | channelPluginsGet | GET /v2/channels | Gets channels | 
| CompetitionPricesApi | 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 | 
| NotificationsApi | notificationIndex | GET /v2/notifications | Gets notifications | 
| OffersApi | offerGetStock | GET /v2/offer/stock | Gets product stock across all warehouses | 
| OffersApi | offerStockPriceUpdate | PUT /v2/offer | Updates stock and price | 
| OffersApi | offerStockUpdate | PUT /v2/offer/stock | Updates stock | 
| OrdersApi | orderAcknowledge | POST /v2/orders/acknowledge | Acknowledges orders | 
| OrdersApi | orderGetByFilter | GET /v2/orders | Gets orders by filter | 
| OrdersApi | orderGetNew | GET /v2/orders/new | Gets new orders | 
| OrdersApi | orderInvoice | GET /v2/orders/{merchantOrderNo}/invoice | Generates an order invoice | 
| OrdersApi | orderPackingSlip | GET /v2/orders/{merchantOrderNo}/packingslip | Generates a packing slip | 
| OrdersApi | orderUpdate | PUT /v2/orders/comment | Updates an order comment | 
| OrdersApi | orderUploadInvoice | POST /v2/orders/{merchantOrderNo}/invoice | Uploads an order invoice | 
| OrdersApi | orderUploadInvoiceAsString | POST /v2/orders/{merchantOrderNo}/invoice-base64 | Uploads an order invoice PDF from Base64 string. | 
| ProductAttributesApi | productAttributeGroupAddProductExtraData | PUT /v2/product-attribute-group/{groupName}/add | Adds custom attributes to a group | 
| ProductAttributesApi | productAttributeGroupCreate | POST /v2/product-attribute-group | Creates a custom attribute group | 
| ProductAttributesApi | productAttributeGroupDelete | DELETE /v2/product-attribute-group/{groupName} | Deletes a custom attribute group | 
| ProductAttributesApi | productAttributeGroupGetByFilter | GET /v2/product-attribute-group | Gets custom attribute groups | 
| ProductAttributesApi | productAttributeGroupGetWithChannelsByFilter | GET /v2/product-attribute-group/linked-channels | Gets custom attribute groups and linked marketplaces | 
| ProductAttributesApi | productAttributeGroupRemoveProductExtraData | PUT /v2/product-attribute-group/{groupName}/remove | Deletes custom attributes from a group | 
| ProductAttributesApi | productAttributeGroupRenameProductAttributeGroup | POST /v2/product-attribute-group/rename | Renames custom attribute groups | 
| ProductBundlesApi | productBundleGetByFilter | GET /v2/productbundles | Gets product bundles | 
| ProductsApi | productBulkDelete | POST /v2/products/bulkdelete | Deletes products | 
| ProductsApi | productBulkPatch | PATCH /v2/products | Updates products attributes | 
| ProductsApi | productBulkPatchExtraDataItems | PATCH /v2/products/extra-data/bulk | Adds, updates, or deletes custom attributes | 
| ProductsApi | productCreate | POST /v2/products | Updates or creates products | 
| ProductsApi | productDelete | DELETE /v2/products/{merchantProductNo} | Deletes a product | 
| ProductsApi | productFreeze | POST /v2/products/freeze | Updates selected products and sets them either to frozen or not-frozen status. | 
| ProductsApi | productGetByFilter | GET /v2/products | Gets products | 
| ProductsApi | productGetByMerchantProductNo | GET /v2/products/{merchantProductNo} | Gets a product | 
| ProductsApi | productPatch | PATCH /v2/products/{merchantProductNo} | Updates product attributes | 
| ProductsApi | productPatchExtraDataItems | PATCH /v2/products/extra-data | Adds, updates, or deletes a custom attribute | 
| PurchaseOrdersApi | acknowledge | POST /v2/purchase-orders/lines/acknowledge | Acknowledges lines of a purchase order | 
| PurchaseOrdersApi | create | POST /v2/purchase-orders/shipments | Create a purchase order shipment. | 
| PurchaseOrdersApi | getByFilter | GET /v2/purchase-orders/shipments/merchant | Gets purchase order shipments by filter | 
| PurchaseOrdersApi | getByFilter_0 | GET /v2/purchase-orders | Gets purchase orders by filter | 
| PurchaseOrdersApi | purchaseOrdersCreateInvoice | POST /v2/purchase-orders/invoice | Creates a purchase order invoice | 
| PurchaseOrdersApi | purchaseOrdersCreateInvoices | POST /v2/purchase-orders/invoice/bulk | Creates a purchase order invoices in a bulk | 
| PurchaseOrdersApi | update | PUT /v2/purchase-orders/shipments | Update a purchase order shipment. | 
| RefundsApi | refundAcknowledge | POST /v2.1/refunds/merchant/acknowledge | [CLOSED BETA] Acknowledge a refund | 
| RefundsApi | refundCreate | POST /v2.1/refunds/merchant | [CLOSED BETA] Create a refund | 
| RefundsApi | refundGet | GET /v2.1/refunds/merchant/{identifier} | [CLOSED BETA] Get refund by identifier | 
| RefundsApi | refundGetByFilter | GET /v2.1/refunds/merchant | [CLOSED BETA] Get refunds by filter | 
| ReportsApi | reportCreateSettlementsReport | POST /v2/reports/settlements | Creates a settlement report | 
| ReportsApi | reportGetReport | GET /v2/reports/{reportId} | Gets a settlement report | 
| ReportsApi | reportGetStatus | GET /v2/reports/{reportId}/status | Gets the status of a settlement report | 
| ReturnsApi | returnAcknowledge | POST /v2.1/returns/merchant/acknowledge | [CLOSED BETA] Acknowledge a return | 
| ReturnsApi | returnAcknowledge_0 | POST /v2/returns/merchant/acknowledge | Acknowledges a return | 
| ReturnsApi | returnCreate | POST /v2.1/returns/merchant | [CLOSED BETA] Create a return | 
| ReturnsApi | returnDeclareForMerchant | POST /v2/returns/merchant | Creates merchant return | 
| ReturnsApi | returnGet | GET /v2.1/returns/merchant/{identifier} | [CLOSED BETA] Get return by identifier | 
| ReturnsApi | returnGetByFilter | GET /v2.1/returns/merchant | [CLOSED BETA] Get returns by filter | 
| ReturnsApi | returnGetByMerchantOrderNo | GET /v2/returns/merchant/{merchantOrderNo} | Gets a return | 
| ReturnsApi | returnGetDeclaredByChannel | GET /v2/returns/merchant | Gets marketplace returns | 
| ReturnsApi | returnGetReturns | GET /v2/returns | Gets returns by filter | 
| ReturnsApi | returnGetUnhandled | GET /v2/returns/merchant/new | Gets unhandled returns | 
| ReturnsApi | returnHandle | POST /v2.1/returns/merchant/handle | [CLOSED BETA] Handle a return | 
| ReturnsApi | returnUpdateForMerchant | PUT /v2/returns | Marks returns as received | 
| SettingsApi | settingsGet | GET /v2/settings | Gets settings | 
| SettlementsApi | settlementGetByFilter | GET /v2/settlements | Gets settlements | 
| SettlementsApi | settlementUploadSettlement | POST /v2/settlements/upload | Imports a settlement file. | 
| ShipmentsApi | shipmentCreate | POST /v2/shipments | Creates shipments | 
| ShipmentsApi | shipmentCreateForChannelMethod | POST /v2/shipments/channelmethod | Creates a shipment and initiates shipping label generation | 
| ShipmentsApi | shipmentGetShipmentLabelCarriers | POST /v2/carriers/{merchantOrderNo} | Gets carriers providing shipping labels | 
| ShipmentsApi | shipmentIndex | GET /v2/shipments/merchant | Gets shipments by filter | 
| ShipmentsApi | shipmentShippingLabel | GET /v2/orders/{merchantShipmentNo}/shippinglabel | Gets a shipping label | 
| ShipmentsApi | shipmentUpdate | PUT /v2/shipments/{merchantShipmentNo} | Updates a shipment | 
| StockLocationsApi | stockLocationCreate | POST /v2/stocklocations | Creates a stock location | 
| StockLocationsApi | stockLocationIndex | GET /v2/stocklocations | Gets stock locations | 
| WebhooksApi | webhooksCreate | POST /v2/webhooks | Creates a webhook | 
| WebhooksApi | webhooksDelete | DELETE /v2/webhooks/{webhookName} | Deletes a webhook | 
| WebhooksApi | webhooksGetAll | GET /v2/webhooks | Gets webhooks | 
| WebhooksApi | webhooksUpdate | PUT /v2/webhooks | Updates a webhook | 
Models
- AddProductExtraDataRequests
 - AdvanceSettingsResponse
 - ApiResponse
 - BulkMerchantCreatePurchaseOrderInvoicesRequest
 - ChangePurchaseOrderShipmentLine
 - ChannelCarrierCollectionMethodApi
 - ChannelCarrierRecommendationApi
 - ChannelChannelResponse
 - ChannelExportStatus
 - ChannelGlobalChannelResponse
 - ChannelListedProductResponse
 - CollectionOfChannelGlobalChannelResponse
 - CollectionOfChannelListedProductResponse
 - CollectionOfIPurchaseOrderByFilter
 - CollectionOfIPurchaseOrderShipmentByFilter
 - CollectionOfMerchantCancellationResponse
 - CollectionOfMerchantFulfillmentStockStockLocationsResponse
 - CollectionOfMerchantNotificationResponse
 - CollectionOfMerchantOfferGetStockResponse
 - CollectionOfMerchantOrderResponse
 - CollectionOfMerchantProductAttributeGroupWithLinkedChannelsResponse
 - CollectionOfMerchantProductAttributeGroupWithProductExtraDataResponse
 - CollectionOfMerchantProductBundleResponse
 - CollectionOfMerchantProductResponse
 - CollectionOfMerchantProductWithBuyBoxPrice
 - CollectionOfMerchantReturnResponse
 - CollectionOfMerchantSettlementReportsResponse
 - CollectionOfMerchantShipmentLabelCarrierResponse
 - CollectionOfMerchantShipmentResponse
 - CollectionOfMerchantSingleOrderReturnResponse
 - CollectionOfMerchantStockLocationWithCountryIsoResponse
 - CollectionOfMerchantWebhookResponse
 - Condition
 - CreatePurchaseOrderShipment
 - CreatedByType
 - CreatorFilter
 - CreatorType
 - ExtraDataType
 - FreezeProductRequest
 - FreezingActionRequest
 - FulfillmentType
 - Gender
 - IImportInformation
 - IPurchaseOrderByFilter
 - IPurchaseOrderLineByFilter
 - IPurchaseOrderShipmentByFilter
 - IPurchaseOrderShipmentLineByFilter
 - IRefund
 - IRefundCurrency
 - IRefundLine
 - IReturn
 - IReturnLine
 - IReturnLineHandlingResult
 - IVendorParty
 - ListedProductChannelStatus
 - ListedProductExportStatus
 - MancoReason
 - MerchantAcknowledgePurchaseOrder
 - MerchantAcknowledgePurchaseOrderLine
 - MerchantAcknowledgeRefund
 - MerchantAcknowledgeReturn
 - MerchantAddressResponse
 - MerchantCancellationLineRequest
 - MerchantCancellationLineResponse
 - MerchantCancellationRequest
 - MerchantCancellationResponse
 - MerchantChannelLabelShipmentRequest
 - MerchantCreateRefund
 - MerchantCreateRefundLine
 - MerchantCreateReportResponse
 - MerchantCreateReturn
 - MerchantCreateReturnLine
 - MerchantCreateSettlementsReportRequest
 - MerchantFulfillmentStockLocationItemResponse
 - MerchantFulfillmentStockStockLocationsResponse
 - MerchantGetReportStatusResponse
 - MerchantHandleReturn
 - MerchantInvoiceUploadRequest
 - MerchantNotificationResponse
 - MerchantOfferGetStockResponse
 - MerchantOfferStockUpdateRequest
 - MerchantOrderAcknowledgementRequest
 - MerchantOrderCommentUpdateRequest
 - MerchantOrderLineExtraDataResponse
 - MerchantOrderLineResponse
 - MerchantOrderResponse
 - MerchantProductAttributeGroupChannelInfoResponse
 - MerchantProductAttributeGroupWithLinkedChannelsResponse
 - MerchantProductAttributeGroupWithProductExtraDataResponse
 - MerchantProductBundlePartResponse
 - MerchantProductBundleResponse
 - MerchantProductExtraDataItemRequest
 - MerchantProductExtraDataItemResponse
 - MerchantProductExtraDataRequest
 - MerchantProductExtraDataResponse
 - MerchantProductRequest
 - MerchantProductResponse
 - MerchantProductWithBuyBoxPrice
 - MerchantPurchaseOrderInvoice
 - MerchantPurchaseOrderInvoiceLine
 - MerchantReturnAcknowledgeRequest
 - MerchantReturnLineRequest
 - MerchantReturnLineResponse
 - MerchantReturnLineUpdateRequest
 - MerchantReturnRequest
 - MerchantReturnResponse
 - MerchantReturnUpdateRequest
 - MerchantSettingsResponse
 - MerchantSettlementReportsResponse
 - MerchantShipmentLabelCarrierRequest
 - MerchantShipmentLabelCarrierResponse
 - MerchantShipmentLineRequest
 - MerchantShipmentLineResponse
 - MerchantShipmentPackageDimensionsRequest
 - MerchantShipmentPackageWeightRequest
 - MerchantShipmentRequest
 - MerchantShipmentResponse
 - MerchantShipmentTrackingRequest
 - MerchantSingleOrderReturnLineResponse
 - MerchantSingleOrderReturnResponse
 - MerchantStockLocationAddressRequest
 - MerchantStockLocationCreateRequest
 - MerchantStockLocationResponse
 - MerchantStockLocationUpdateRequest
 - MerchantStockLocationWithCountryIsoResponse
 - MerchantStockPriceUpdateRequest
 - MerchantVendorParty
 - MerchantWebhookRequest
 - MerchantWebhookResponse
 - ModuleFulfillmentType
 - ModuleReturnReason
 - ModuleReturnStatus
 - ModulesAdditionalDetailsType
 - ModulesAllowanceDetailsType
 - ModulesChargeDetailsType
 - ModulesPurchaseOrderInvoiceType
 - ModulesPurchaseOrderStatus
 - ModulesPurchaseOrderType
 - ModulesTaxRegistrationType
 - ModulesTaxType
 - NotificationType
 - Operation
 - OrderIdentifier
 - OrderLineIdentifier
 - OrderStatusView
 - OrderSupport
 - PackageDimensionsUnit
 - PackageWeightUnit
 - PatchMerchantProductDto
 - ProductAttributeGroupRequest
 - ProductCreationResult
 - ProductExtraDataRequest
 - ProductMessage
 - PurchaseOrderAcknowledgementCode
 - PurchaseOrderIdentifierType
 - PurchaseOrderInvoiceAdditionalDetails
 - PurchaseOrderInvoiceAllowanceDetails
 - PurchaseOrderInvoiceChargeDetails
 - PurchaseOrderInvoiceTaxDetails
 - PurchaseOrderLineIdentifierType
 - PurchaseOrderLineUnitOfMeasure
 - PurchaseOrderRejectionReason
 - PurchaseOrderRelatedItemExportStatus
 - PurchaseOrderShipmentIdentifierTypeValue
 - RefundByFilterIdentifier
 - RefundIdentifier
 - RefundReason
 - RemoveProductExtraDataRequests
 - RenameProductAttributeGroupRequests
 - ReportStatus
 - ReportType
 - ReturnByFilterIdentifier
 - ReturnHandlingAction
 - ReturnIdentifier
 - ReturnLineIdentifier
 - ReturnReason
 - ReturnStatus
 - SettingsResponse
 - ShipmentFulfillmentType
 - ShipmentLineStatus
 - ShipmentSettingsResponse
 - ShipmentType
 - SingleMerchantAcknowledgePurchaseOrderLinesRequest
 - SingleMerchantAcknowledgeRefundRequest
 - SingleMerchantAcknowledgeReturnRequest
 - SingleMerchantCreatePurchaseOrderInvoiceRequest
 - SingleMerchantCreatePurchaseOrderShipmentRequest
 - SingleMerchantCreateRefundRequest
 - SingleMerchantCreateReturnRequest
 - SingleMerchantHandleReturnRequest
 - SingleMerchantUpdatePurchaseOrderShipmentRequest
 - SingleOfApiResponse
 - SingleOfDictionaryOfStringAndListOfString
 - SingleOfIRefund
 - SingleOfIReturn
 - SingleOfMerchantProductResponse
 - SingleOfMerchantSettingsResponse
 - SingleOfProductCreationResult
 - UpdatePurchaseOrderShipment
 - VatRateType
 - VatSettingsResponse
 - VolumeUnitOfMeasure
 - WebhookEventType
 - WeightUnitOfMeasure
 
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.15.0- Package version: 
2.15.0.1 - Generator version: 
7.7.0 
 - Package version: 
 - Build package: 
org.openapitools.codegen.languages.PhpClientCodegen