zvps / ebay-sell-account-php-client
The Account API gives sellers the ability to configure their eBay seller accounts, including the seller's policies (the Fulfillment Policy, Payment Policy, and Return Policy), opt in and out of eBay seller programs, configure sales tax tables, and get account information. For details on the availabi
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
This package is auto-updated.
Last update: 2025-03-01 00:35:43 UTC
README
The Account API gives sellers the ability to configure their eBay seller accounts, including the seller's policies (the Fulfillment Policy, Payment Policy, and Return Policy), opt in and out of eBay seller programs, configure sales tax tables, and get account information. For details on the availability of the methods in this API, see Account API requirements and restrictions.
Installation & Usage
Requirements
PHP 7.2 and later.
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github/zvps/ebay-sell-account-php-client.git" } ], "require": { "zvps/ebay-sell-account-php-client": "*@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: Authorization Code $config = Ebay\Sell\Account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN'); $apiInstance = new Ebay\Sell\Account\Api\FulfillmentPolicyApi( // 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 ); $body = new \Ebay\Sell\Account\Model\FulfillmentPolicyRequest(); // \Ebay\Sell\Account\Model\FulfillmentPolicyRequest | Request to create a seller account fulfillment policy. try { $result = $apiInstance->createFulfillmentPolicy($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling FulfillmentPolicyApi->createFulfillmentPolicy: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.ebay.com/sell/account/v1
Class | Method | HTTP request | Description |
---|---|---|---|
FulfillmentPolicyApi | createFulfillmentPolicy | POST /fulfillment_policy | |
FulfillmentPolicyApi | deleteFulfillmentPolicy | DELETE /fulfillment_policy/{fulfillmentPolicyId} | |
FulfillmentPolicyApi | getFulfillmentPolicies | GET /fulfillment_policy | |
FulfillmentPolicyApi | getFulfillmentPolicy | GET /fulfillment_policy/{fulfillmentPolicyId} | |
FulfillmentPolicyApi | getFulfillmentPolicyByName | GET /fulfillment_policy/get_by_policy_name | |
FulfillmentPolicyApi | updateFulfillmentPolicy | PUT /fulfillment_policy/{fulfillmentPolicyId} | |
KycApi | getKYC | GET /kyc | |
OnboardingApi | getPaymentsProgramOnboarding | GET /payments_program/{marketplace_id}/{payments_program_type}/onboarding | |
PaymentPolicyApi | createPaymentPolicy | POST /payment_policy | |
PaymentPolicyApi | deletePaymentPolicy | DELETE /payment_policy/{payment_policy_id} | |
PaymentPolicyApi | getPaymentPolicies | GET /payment_policy | |
PaymentPolicyApi | getPaymentPolicy | GET /payment_policy/{payment_policy_id} | |
PaymentPolicyApi | getPaymentPolicyByName | GET /payment_policy/get_by_policy_name | |
PaymentPolicyApi | updatePaymentPolicy | PUT /payment_policy/{payment_policy_id} | |
PaymentsProgramApi | getPaymentsProgram | GET /payments_program/{marketplace_id}/{payments_program_type} | |
PrivilegeApi | getPrivileges | GET /privilege | |
ProgramApi | getOptedInPrograms | GET /program/get_opted_in_programs | |
ProgramApi | optInToProgram | POST /program/opt_in | |
ProgramApi | optOutOfProgram | POST /program/opt_out | |
RateTableApi | getRateTables | GET /rate_table | |
ReturnPolicyApi | createReturnPolicy | POST /return_policy | |
ReturnPolicyApi | deleteReturnPolicy | DELETE /return_policy/{return_policy_id} | |
ReturnPolicyApi | getReturnPolicies | GET /return_policy | |
ReturnPolicyApi | getReturnPolicy | GET /return_policy/{return_policy_id} | |
ReturnPolicyApi | getReturnPolicyByName | GET /return_policy/get_by_policy_name | |
ReturnPolicyApi | updateReturnPolicy | PUT /return_policy/{return_policy_id} | |
SalesTaxApi | createOrReplaceSalesTax | PUT /sales_tax/{countryCode}/{jurisdictionId} | |
SalesTaxApi | deleteSalesTax | DELETE /sales_tax/{countryCode}/{jurisdictionId} | |
SalesTaxApi | getSalesTax | GET /sales_tax/{countryCode}/{jurisdictionId} | |
SalesTaxApi | getSalesTaxes | GET /sales_tax |
Models
- Amount
- CategoryType
- Deposit
- Error
- ErrorParameter
- FulfillmentPolicy
- FulfillmentPolicyRequest
- FulfillmentPolicyResponse
- InternationalReturnOverrideType
- KycCheck
- KycResponse
- PaymentMethod
- PaymentPolicy
- PaymentPolicyRequest
- PaymentPolicyResponse
- PaymentsProgramOnboardingResponse
- PaymentsProgramOnboardingSteps
- PaymentsProgramResponse
- Program
- Programs
- RateTable
- RateTableResponse
- RecipientAccountReference
- Region
- RegionSet
- ReturnPolicy
- ReturnPolicyRequest
- ReturnPolicyResponse
- SalesTax
- SalesTaxBase
- SalesTaxes
- SellingLimit
- SellingPrivileges
- SetFulfillmentPolicyResponse
- SetPaymentPolicyResponse
- SetReturnPolicyResponse
- ShippingOption
- ShippingService
- TimeDuration
Authorization
Authorization Code
- Type:
OAuth
- Flow:
accessCode
- Authorization URL:
https://auth.ebay.com/oauth2/authorize
- Scopes:
- https://api.ebay.com/oauth/api_scope/sell.account.readonly: View your account settings
- https://api.ebay.com/oauth/api_scope/sell.account: View and manage your account settings
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.6.3
- Package version:
5.0.0
- Package version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen