All URIs are relative to https://api.ebay.com/sell/account/v1.
Method | HTTP request | Description |
---|---|---|
createFulfillmentPolicy() | POST /fulfillment_policy | |
deleteFulfillmentPolicy() | DELETE /fulfillment_policy/{fulfillmentPolicyId} | |
getFulfillmentPolicies() | GET /fulfillment_policy | |
getFulfillmentPolicy() | GET /fulfillment_policy/{fulfillmentPolicyId} | |
getFulfillmentPolicyByName() | GET /fulfillment_policy/get_by_policy_name | |
updateFulfillmentPolicy() | PUT /fulfillment_policy/{fulfillmentPolicyId} |
createFulfillmentPolicy($body): \Ebay\Sell\Account\Model\SetFulfillmentPolicyResponse
This method creates a new fulfillment policy where the policy encapsulates seller's terms for fulfilling item purchases. Fulfillment policies include the shipment options that the seller offers to buyers. Each policy targets a marketplaceId and categoryTypes.name combination and you can create multiple policies for each combination. Be aware that some marketplaces require a specific fulfillment policy for vehicle listings. A successful request returns the URI to the new policy in the Location response header and the ID for the new policy is returned in the response payload. Tip: For details on creating and using the business policies supported by the Account API, see eBay business policies. Marketplaces and locales Policy instructions can be localized by providing a locale in the Accept-Language HTTP request header. For example, the following setting displays field values from the request body in German: Accept-Language: de-DE. Target the specific locale of a marketplace that supports multiple locales using the Content-Language request header. For example, target the French locale of the Canadian marketplace by specifying the fr-CA locale for Content-Language. Likewise, target the Dutch locale of the Belgium marketplace by setting Content-Language: nl-BE. Tip: For details on headers, see HTTP request headers.
<?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;
}
Name | Type | Description | Notes |
---|---|---|---|
body | \Ebay\Sell\Account\Model\FulfillmentPolicyRequest | Request to create a seller account fulfillment policy. |
\Ebay\Sell\Account\Model\SetFulfillmentPolicyResponse
[Authorization Code](../../README.md#Authorization Code)
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteFulfillmentPolicy($fulfillment_policy_id)
This method deletes a fulfillment policy. Supply the ID of the policy you want to delete in the fulfillmentPolicyId path parameter. Note that you cannot delete the default fulfillment policy.
<?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
);
$fulfillment_policy_id = 'fulfillment_policy_id_example'; // string | This path parameter specifies the ID of the fulfillment policy to delete.
try {
$apiInstance->deleteFulfillmentPolicy($fulfillment_policy_id);
} catch (Exception $e) {
echo 'Exception when calling FulfillmentPolicyApi->deleteFulfillmentPolicy: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
fulfillment_policy_id | string | This path parameter specifies the ID of the fulfillment policy to delete. |
void (empty response body)
[Authorization Code](../../README.md#Authorization Code)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getFulfillmentPolicies($marketplace_id): \Ebay\Sell\Account\Model\FulfillmentPolicyResponse
This method retrieves all the fulfillment policies configured for the marketplace you specify using the marketplace_id query parameter. Marketplaces and locales Get the correct policies for a marketplace that supports multiple locales using the Content-Language request header. For example, get the policies for the French locale of the Canadian marketplace by specifying fr-CA for the Content-Language header. Likewise, target the Dutch locale of the Belgium marketplace by setting Content-Language: nl-BE. For details on header values, see HTTP request headers.
<?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
);
$marketplace_id = 'marketplace_id_example'; // string | This query parameter specifies the eBay marketplace of the policies you want to retrieve. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum
try {
$result = $apiInstance->getFulfillmentPolicies($marketplace_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FulfillmentPolicyApi->getFulfillmentPolicies: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
marketplace_id | string | This query parameter specifies the eBay marketplace of the policies you want to retrieve. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum |
\Ebay\Sell\Account\Model\FulfillmentPolicyResponse
[Authorization Code](../../README.md#Authorization Code)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getFulfillmentPolicy($fulfillment_policy_id): \Ebay\Sell\Account\Model\FulfillmentPolicy
This method retrieves the complete details of a fulfillment policy. Supply the ID of the policy you want to retrieve using the fulfillmentPolicyId path parameter.
<?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
);
$fulfillment_policy_id = 'fulfillment_policy_id_example'; // string | This path parameter specifies the ID of the fulfillment policy you want to retrieve.
try {
$result = $apiInstance->getFulfillmentPolicy($fulfillment_policy_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FulfillmentPolicyApi->getFulfillmentPolicy: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
fulfillment_policy_id | string | This path parameter specifies the ID of the fulfillment policy you want to retrieve. |
\Ebay\Sell\Account\Model\FulfillmentPolicy
[Authorization Code](../../README.md#Authorization Code)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getFulfillmentPolicyByName($marketplace_id, $name): \Ebay\Sell\Account\Model\FulfillmentPolicy
This method retrieves the complete details for a single fulfillment policy. In the request, supply both the policy name and its associated marketplace_id as query parameters. Marketplaces and locales Get the correct policy for a marketplace that supports multiple locales using the Content-Language request header. For example, get a policy for the French locale of the Canadian marketplace by specifying fr-CA for the Content-Language header. Likewise, target the Dutch locale of the Belgium marketplace by setting Content-Language: nl-BE. For details on header values, see HTTP request headers.
<?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
);
$marketplace_id = 'marketplace_id_example'; // string | This query parameter specifies the eBay marketplace of the policy you want to retrieve. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum
$name = 'name_example'; // string | This query parameter specifies the user-defined name of the fulfillment policy you want to retrieve.
try {
$result = $apiInstance->getFulfillmentPolicyByName($marketplace_id, $name);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FulfillmentPolicyApi->getFulfillmentPolicyByName: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
marketplace_id | string | This query parameter specifies the eBay marketplace of the policy you want to retrieve. For implementation help, refer to eBay API documentation at https://developer.ebay.com/api-docs/sell/account/types/ba:MarketplaceIdEnum | |
name | string | This query parameter specifies the user-defined name of the fulfillment policy you want to retrieve. |
\Ebay\Sell\Account\Model\FulfillmentPolicy
[Authorization Code](../../README.md#Authorization Code)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateFulfillmentPolicy($fulfillment_policy_id, $body): \Ebay\Sell\Account\Model\SetFulfillmentPolicyResponse
This method updates an existing fulfillment policy. Specify the policy you want to update using the fulfillment_policy_id path parameter. Supply a complete policy payload with the updates you want to make; this call overwrites the existing policy with the new details specified in the payload.
<?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
);
$fulfillment_policy_id = 'fulfillment_policy_id_example'; // string | This path parameter specifies the ID of the fulfillment policy you want to update.
$body = new \Ebay\Sell\Account\Model\FulfillmentPolicyRequest(); // \Ebay\Sell\Account\Model\FulfillmentPolicyRequest | Fulfillment policy request
try {
$result = $apiInstance->updateFulfillmentPolicy($fulfillment_policy_id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FulfillmentPolicyApi->updateFulfillmentPolicy: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
fulfillment_policy_id | string | This path parameter specifies the ID of the fulfillment policy you want to update. | |
body | \Ebay\Sell\Account\Model\FulfillmentPolicyRequest | Fulfillment policy request |
\Ebay\Sell\Account\Model\SetFulfillmentPolicyResponse
[Authorization Code](../../README.md#Authorization Code)
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]