All URIs are relative to https://api.ebay.com/sell/account/v1
Method | HTTP request | Description |
---|---|---|
getOptedInPrograms | GET /program/get_opted_in_programs | |
optInToProgram | POST /program/opt_in | |
optOutOfProgram | POST /program/opt_out |
\macropage\SDKs\ebay\rest\account\Model\Programs getOptedInPrograms()
This method gets a list of the seller programs that the seller has opted-in to.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: api_auth
$config = macropage\SDKs\ebay\rest\account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new macropage\SDKs\ebay\rest\account\Api\ProgramApi(
// 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
);
try {
$result = $apiInstance->getOptedInPrograms();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProgramApi->getOptedInPrograms: ', $e->getMessage(), PHP_EOL;
}
?>
This endpoint does not need any parameter.
\macropage\SDKs\ebay\rest\account\Model\Programs
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object optInToProgram($program)
This method opts the seller in to an eBay seller program. Currently available programs include the Out of Stock Control and the Selling Policy Management program. When you opt-in to the SELLING_POLICY_MANAGEMENT, eBay can associate the business policies you create with the items you list. Note: It can take up to 24-hours for eBay to process your request to opt-in to a Seller Program. Use the getOptedInPrograms call to check the status of your request after a processing period has passed.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: api_auth
$config = macropage\SDKs\ebay\rest\account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new macropage\SDKs\ebay\rest\account\Api\ProgramApi(
// 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
);
$program = new \macropage\SDKs\ebay\rest\account\Model\Program(); // \macropage\SDKs\ebay\rest\account\Model\Program | Program being opted-in to.
try {
$result = $apiInstance->optInToProgram($program);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProgramApi->optInToProgram: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
program | \macropage\SDKs\ebay\rest\account\Model\Program | Program being opted-in to. |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object optOutOfProgram($program)
This method opts the seller out of a seller program to which you have previously opted-in to. Get a list of the seller programs you have opted-in to using the getOptedInPrograms call.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure OAuth2 access token for authorization: api_auth
$config = macropage\SDKs\ebay\rest\account\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new macropage\SDKs\ebay\rest\account\Api\ProgramApi(
// 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
);
$program = new \macropage\SDKs\ebay\rest\account\Model\Program(); // \macropage\SDKs\ebay\rest\account\Model\Program | Program being opted-out of.
try {
$result = $apiInstance->optOutOfProgram($program);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProgramApi->optOutOfProgram: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
program | \macropage\SDKs\ebay\rest\account\Model\Program | Program being opted-out of. |
object
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]