Use the Fulfillment API to complete the process of packaging, addressing, handling, and shipping each order on behalf of the seller, in accordance with the payment method and timing specified at checkout.
PHP 7.2 and later.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github/zvps/ebay-sell-fulfillment-php-client.git"
}
],
"require": {
"zvps/ebay-sell-fulfillment-php-client": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: Authorization Code
$config = Ebay\Sell\Fulfillment\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Ebay\Sell\Fulfillment\Api\OrderApi(
// 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
);
$order_id = 'order_id_example'; // string | The unique identifier of the order. Order ID values are shown in My eBay/Seller Hub, and are also returned by the getOrders method in the orders.orderId field. Note: A new order ID format was introduced to all eBay APIs (legacy and REST) in June 2019. In REST APIs that return Order IDs, including the Fulfillment API, all order IDs are returned in the new format, but the getOrder method will accept both the legacy and new format order ID. The new format is a non-parsable string, globally unique across all eBay marketplaces, and consistent for both single line item and multiple line item orders. These order identifiers will be automatically generated after buyer payment, and unlike in the past, instead of just being known and exposed to the seller, these unique order identifiers will also be known and used/referenced by the buyer and eBay customer support.
$field_groups = 'field_groups_example'; // string | The response type associated with the order. The only presently supported value is TAX_BREAKDOWN. This type returns a breakdown of tax and fee values associated with the order.
try {
$result = $apiInstance->getOrder($order_id, $field_groups);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrderApi->getOrder: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://api.ebay.com/sell/fulfillment/v1
Class | Method | HTTP request | Description |
---|---|---|---|
OrderApi | getOrder | GET /order/{orderId} | |
OrderApi | getOrders | GET /order | |
OrderApi | issueRefund | POST /order/{order_id}/issue_refund | Issue Refund |
ShippingFulfillmentApi | createShippingFulfillment | POST /order/{orderId}/shipping_fulfillment | |
ShippingFulfillmentApi | getShippingFulfillment | GET /order/{orderId}/shipping_fulfillment/{fulfillmentId} | |
ShippingFulfillmentApi | getShippingFulfillments | GET /order/{orderId}/shipping_fulfillment |
- Address
- Amount
- AppliedPromotion
- Buyer
- CancelRequest
- CancelStatus
- DeliveryCost
- EbayCollectAndRemitTax
- EbayFulfillmentProgram
- EbayTaxReference
- Error
- ErrorParameter
- ExtendedContact
- FulfillmentStartInstruction
- GiftDetails
- IssueRefundRequest
- ItemLocation
- LegacyReference
- LineItem
- LineItemFulfillmentInstructions
- LineItemProperties
- LineItemReference
- LineItemRefund
- Order
- OrderRefund
- OrderSearchPagedCollection
- Payment
- PaymentHold
- PaymentSummary
- PhoneNumber
- PickupStep
- PostSaleAuthenticationProgram
- PricingSummary
- Program
- Refund
- RefundItem
- SellerActionsToRelease
- ShippingFulfillment
- ShippingFulfillmentDetails
- ShippingFulfillmentPagedCollection
- ShippingStep
- SimpleAmount
- Tax
- TaxAddress
- TaxIdentifier
- Type:
OAuth
- Flow:
accessCode
- Authorization URL:
https://auth.ebay.com/oauth2/authorize
- Scopes:
- https://api.ebay.com/oauth/api_scope/sell.fulfillment: View and manage your order fulfillments
- https://api.ebay.com/oauth/api_scope/sell.finances: View and manage your payment and order information to display this information to you and allow you to initiate refunds using the third party application
- https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly: View your order fulfillments
To run the tests, use:
composer install
vendor/bin/phpunit
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
v1.19.7
- Package version:
5.0.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen