nogrod / ebay-sell-fulfillment-php-sdk
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.
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
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.
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/nogrod/ebay-sell-fulfillment-php-sdk.git" } ], "require": { "nogrod/ebay-sell-fulfillment-php-sdk": "*@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 OAuth2 access token for authorization: api_auth $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 <b>getOrders</b> method in the <b>orders.orderId</b> field.<span class=\"tablenote\"><strong>Note:</strong> <b>getOrders</b> can return orders up to two years old. Do not provide the orderId for an order created more than two years in the past.</span> $field_groups = 'field_groups_example'; // string | The response type associated with the order. The only presently supported value is <code>TAX_BREAKDOWN</code>. 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; }
API Endpoints
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 |
PaymentDisputeApi | acceptPaymentDispute | POST /payment_dispute/{payment_dispute_id}/accept | Accept Payment Dispute |
PaymentDisputeApi | addEvidence | POST /payment_dispute/{payment_dispute_id}/add_evidence | Add an Evidence File |
PaymentDisputeApi | contestPaymentDispute | POST /payment_dispute/{payment_dispute_id}/contest | Contest Payment Dispute |
PaymentDisputeApi | fetchEvidenceContent | GET /payment_dispute/{payment_dispute_id}/fetch_evidence_content | Get Payment Dispute Evidence File |
PaymentDisputeApi | getActivities | GET /payment_dispute/{payment_dispute_id}/activity | Get Payment Dispute Activity |
PaymentDisputeApi | getPaymentDispute | GET /payment_dispute/{payment_dispute_id} | Get Payment Dispute Details |
PaymentDisputeApi | getPaymentDisputeSummaries | GET /payment_dispute_summary | Search Payment Dispute by Filters |
PaymentDisputeApi | updateEvidence | POST /payment_dispute/{payment_dispute_id}/update_evidence | Update evidence |
PaymentDisputeApi | uploadEvidenceFile | POST /payment_dispute/{payment_dispute_id}/upload_evidence_file | Upload an Evidence File |
ShippingFulfillmentApi | createShippingFulfillment | POST /order/{orderId}/shipping_fulfillment | |
ShippingFulfillmentApi | getShippingFulfillment | GET /order/{orderId}/shipping_fulfillment/{fulfillmentId} | |
ShippingFulfillmentApi | getShippingFulfillments | GET /order/{orderId}/shipping_fulfillment |
Models
- AcceptPaymentDisputeRequest
- AddEvidencePaymentDisputeRequest
- AddEvidencePaymentDisputeResponse
- Address
- Amount
- AppliedPromotion
- Buyer
- CancelRequest
- CancelStatus
- ContestPaymentDisputeRequest
- DeliveryCost
- DisputeAmount
- DisputeEvidence
- DisputeSummaryResponse
- EbayCollectAndRemitTax
- EbayCollectedCharges
- EbayFulfillmentProgram
- EbayInternationalShipping
- EbayShipping
- EbayTaxReference
- EbayVaultProgram
- Error
- ErrorParameter
- EvidenceRequest
- ExtendedContact
- FileEvidence
- FileInfo
- FulfillmentStartInstruction
- GiftDetails
- InfoFromBuyer
- IssueRefundRequest
- ItemLocation
- LegacyReference
- LineItem
- LineItemFulfillmentInstructions
- LineItemProperties
- LineItemReference
- LineItemRefund
- LinkedOrderLineItem
- MonetaryTransaction
- NameValuePair
- Order
- OrderLineItems
- OrderRefund
- OrderSearchPagedCollection
- Payment
- PaymentDispute
- PaymentDisputeActivity
- PaymentDisputeActivityHistory
- PaymentDisputeOutcomeDetail
- PaymentDisputeSummary
- PaymentHold
- PaymentSummary
- Phone
- PhoneNumber
- PickupStep
- PostSaleAuthenticationProgram
- PricingSummary
- Program
- Refund
- RefundItem
- ReturnAddress
- SellerActionsToRelease
- ShippingFulfillment
- ShippingFulfillmentDetails
- ShippingFulfillmentPagedCollection
- ShippingStep
- SimpleAmount
- Tax
- TaxAddress
- TaxIdentifier
- TrackingInfo
- UpdateEvidencePaymentDisputeRequest
Authorization
Authentication schemes defined for the API:
api_auth
- 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.payment.dispute: View and manage disputes and related details (including payment and order information).
- https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly: View your order fulfillments
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.20.0
- Package version:
0.0.1
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen