friends-of-ce / merchant-api-client-php
ChannelEngine API for merchants
Installs: 2 508
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
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\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
- AddProductExtraDataRequests
- AdvanceSettingsResponse
- ApiResponse
- BulkMerchantCreatePurchaseOrderInvoicesRequest
- ChannelCarrierCollectionMethodApi
- ChannelCarrierRecommendationApi
- ChannelChannelResponse
- ChannelGlobalChannelResponse
- ChannelListedProductResponse
- CollectionOfChannelGlobalChannelResponse
- CollectionOfChannelListedProductResponse
- CollectionOfIPurchaseOrderByFilter
- CollectionOfMerchantCancellationResponse
- CollectionOfMerchantFulfillmentStockGetStockLocationsRequest
- CollectionOfMerchantNotificationResponse
- CollectionOfMerchantOfferGetStockResponse
- CollectionOfMerchantOrderResponse
- CollectionOfMerchantProductAttributeGroupWithLinkedChannelsResponse
- CollectionOfMerchantProductAttributeGroupWithProductExtraDataResponse
- CollectionOfMerchantProductBundleResponse
- CollectionOfMerchantProductResponse
- CollectionOfMerchantProductWithBuyBoxPrice
- CollectionOfMerchantReturnResponse
- CollectionOfMerchantSettlementReportsResponse
- CollectionOfMerchantShipmentLabelCarrierResponse
- CollectionOfMerchantShipmentResponse
- CollectionOfMerchantSingleOrderReturnResponse
- CollectionOfMerchantStockLocationWithCountryIsoResponse
- CollectionOfMerchantWebhookResponse
- Condition
- CreatorFilter
- ExtraDataType
- FreezeProductRequest
- FreezingActionRequest
- FulfillmentType
- Gender
- IImportInformation
- IPurchaseOrderByFilter
- IPurchaseOrderLineByFilter
- IVendorParty
- ListedProductChannelStatus
- ListedProductExportStatus
- MancoReason
- MerchantAcknowledgePurchaseOrder
- MerchantAcknowledgePurchaseOrderLine
- MerchantAddressResponse
- MerchantCancellationLineRequest
- MerchantCancellationLineResponse
- MerchantCancellationRequest
- MerchantCancellationResponse
- MerchantChannelLabelShipmentRequest
- MerchantCreateReportResponse
- MerchantCreateSettlementsReportRequest
- MerchantFulfillmentStockGetStockLocationsRequest
- MerchantGetReportStatusResponse
- 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
- ModulesAdditionalDetailsType
- ModulesAllowanceDetailsType
- ModulesChargeDetailsType
- ModulesPurchaseOrderInvoiceType
- ModulesPurchaseOrderStatus
- ModulesPurchaseOrderType
- ModulesTaxRegistrationType
- ModulesTaxType
- NotificationType
- Operation
- OrderStatusView
- OrderSupport
- PackageDimensionsUnit
- PackageWeightUnit
- PatchMerchantProductDto
- ProductAttributeGroupRequest
- ProductCreationResult
- ProductExtraDataRequest
- ProductMessage
- PurchaseOrderAcknowledgementCode
- PurchaseOrderIdentifierType
- PurchaseOrderInvoiceAdditionalDetails
- PurchaseOrderInvoiceAllowanceDetails
- PurchaseOrderInvoiceChargeDetails
- PurchaseOrderInvoiceTaxDetails
- PurchaseOrderLineIdentifierType
- PurchaseOrderLineUnitOfMeasure
- PurchaseOrderRejectionReason
- RemoveProductExtraDataRequests
- RenameProductAttributeGroupRequests
- ReportStatus
- ReportType
- ReturnReason
- ReturnStatus
- SettingsResponse
- ShipmentFulfillmentType
- ShipmentLineStatus
- ShipmentSettingsResponse
- SingleMerchantAcknowledgePurchaseOrderLinesRequest
- SingleMerchantCreatePurchaseOrderInvoiceRequest
- SingleOfApiResponse
- SingleOfDictionaryOfStringAndListOfString
- SingleOfMerchantProductResponse
- SingleOfMerchantSettingsResponse
- SingleOfProductCreationResult
- SingleOfStockUpdateResponse
- StockUpdateResponse
- VatRateType
- VatSettingsResponse
- WebhookEventType
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
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen