Sent by eBay to request that you add an eBay member to your subscription database. eBay sends this request after a user completes the subscription flow. The subscription flow is accessible from the Selling Applications Directory. Your application must use a subscription listener to receive addSubscriber requests from eBay. When you receive an addSubscriber request, your application responds with a status value, indicating the subscription status of the user in your database.
See User Guide for information about a subscription listener.
| Output Samples Change History |
The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).
See also Samples.
<?xml version="1.0" encoding="utf-8"?> <addSubscriberRequest xmlns="http://www.ebay.com/marketplace/services"> <!-- Standard Input Fields --> <credentials appId="string"> OpeneBayRequestCredentialsType <token type="OpeneBayTokenType"> OpeneBaySecurityTokenType <signature> string </signature> <tokenValue> string </tokenValue> </token> </credentials> <!-- Call-specific Input Fields --> <subscriptionInfo> OpeneBaySubscriptionInfoType <externalPlanId> string </externalPlanId> <planId> string </planId> <planName> string </planName> <subscriptionId> string </subscriptionId> </subscriptionInfo> <userInfo> OpeneBaySubscriberInfoType <userName> string </userName> </userInfo> </addSubscriberRequest>
| Argument | Type | Occurrence | Meaning |
|---|
| Standard Input Fields [Jump to call-specific fields] |
| credentials | OpeneBayRequestCredentialsType | Required | Container for signature and tokenValue. |
| credentials [ attribute appId ] |
string | Required | The AppID of the receiving application. When you upload a deployment descriptor for your Selling Manager application, you provide a value (as myapp.mycompany.com) that becomes your AppID in the keys that are issued for your application. For information about uploading a deployment descriptor, see the User's Guide. |
| credentials.token | OpeneBaySecurityTokenType | Required | Container for signature and tokenValue. |
| credentials.token [ attribute type ] |
OpeneBayTokenType | Required |
The base type for tokens. For a list of possible enumeration values, see OpeneBayTokenType. |
| credentials.token.signature | string | Required |
An RSA-encrypted string by which you can verify that the request is from eBay. You decrypt this string with the public eBay key. For more information, and the location of the public key, see the link below.
See User Guide for instructions on using signature. |
| credentials.token.tokenValue | string | Required |
A base64-encoded string that you must decrypt before extracting values. In the case of addSubscriber, the values that you extract include the following for the user to be added as a subscriber to your application: the user name and the user Auth token (that is, the Auth and Auth token used in the Trading API). In the case of removeSubscriber, values that you extract (for the user to remove) include the user name. Max length: 2000. See User Guide for values contained in tokenValue, and instructions on decrypting and parsing tokenValue. |
| Call-specific Input Fields | |||
| subscriptionInfo | OpeneBaySubscriptionInfoType | Required | Container for subscription-related information. |
|
subscriptionInfo .externalPlanId |
string | Required |
When you create a subscription plan, you provide a Developer Plan ID. That Developer Plan ID is contained in this externalPlanId field. (For users to subscribe to your application, you must create at least one subscription plan.) In this call, the externalPlanId identifies the plan to which a user has subscribed. Note that if you are running an application in the sandbox, a subscription plan, and an associated value for the Developer Plan ID, are created for you. You can create others plans, if desired, with different Developer Plan IDs. Max length: 128. |
| subscriptionInfo.planId | string | Optional |
A planId is assigned by eBay to each subscription plan. Your application often uses this value in calls to the Open eBay Application Integration Service. Note that the planId is diffrent from the externalPlanId. In contrast to the planId, the externalPlanId is the value that you provide, as a "Developer Plan ID," when you create a subscription plan. Max length: 38. |
| subscriptionInfo.planName | string | Required |
The plan name that you provided for your subscription plan when you created the plan. This plan name is provided in the call request to help you read log files, during debugging. Instead of using this value for programmatically identifying the subscription plan, use value in the externalPlanId field. Max length: 128. |
|
subscriptionInfo .subscriptionId |
string | Required |
For a particular application, the subscriptionId uniquely identifies a user's subscription. Max length: 38. |
| userInfo | OpeneBaySubscriberInfoType | Required | Container for a field that indicates the user name of an eBay user. |
| userInfo.userName | string | Required |
The user name of an eBay user, provided for convenience. Instead of using this value for the user name, use the value in tokenValue. Max length: 64. |
| Input Samples Change History |
The box below lists all fields that might be returned in the response. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).
See also Samples.
<?xml version="1.0" encoding="utf-8"?> <addSubscriberResponse xmlns="http://www.ebay.com/marketplace/services"> <!-- Standard Output Fields --> <ack> AckValueType </ack> <errorMessage> string </errorMessage> <errorSeverity> ErrorSeverityType </errorSeverity> <timestamp> dateTime </timestamp> <!-- Call-specific Output Fields --> <message> string </message> <status> OpeneBaySubscriptionStatusType </status> <subscriptionId> string </subscriptionId> </addSubscriberResponse>
| Return Value | Type | Occurrence | Meaning |
|---|
| Standard Output Fields [Jump to call-specific fields] |
| ack | AckValueType | Always |
Indicates whether there are any errors or warnings associated with the processing of the request.
Applicable values: • Failure (out) The request that triggered the error was not processed successfully. When a serious application-level error occurs, an error is returned instead of business data. • PartialFailure (out) The request that triggered the error was processed successfully but with some warnings. • Success (out) The request was processed successfully, but something occurred that may affect your application or the user. • Warning (out) The request that triggered the error was processed successfully but with some warnings. |
| errorMessage | string | Conditionally | After you decide how your implementation of this service will define errors, you can decide whether to use this container. eBay does not inspect the value of this errorMessage field. |
| errorSeverity | ErrorSeverityType | Conditionally |
Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.
Applicable values: • Error (out) The request that triggered the error was not processed successfully. When a serious application-level error occurs, the error is returned instead of the business data. • Warning (out) The request was processed successfully, but something occurred that may affect your application or the user. For example, eBay may have changed a value the user sent in. In this case, eBay returns a normal, successful response and also returns the warning. |
| timestamp | dateTime | Always | The date and time the request was processed. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM- DDTHH:MM:SS.SSSZ). See Time Values in the eBay Web Services guide for information about this time format and converting to and from the GMT time zone. |
| Call-specific Output Fields | |||
| message | string | Always | Message about the subscription status. |
| status | OpeneBaySubscriptionStatusType | Always |
The status of the subscription, according to your application. For example, when you receive an addSubscriber request, your application's response includes this field to indicate the latest subscription status of the user, according to your database. This status value initially is set by your application, unlike the subscriptionStateChangeInfo.newState value, which is set by eBay. When eBay receives this status value from your application, eBay sets the subscription to Active, Pending, or Rejected, depending on the status value you send in the response.
Applicable values: • Approved (out) Subscription status is approved, according to your application. If you specify this value, eBay sets the user's subscription to Active. • Pending (out) Subscription status is pending, according to your application. If you specify this value, eBay takes no action. • Rejected (out) Subscription status is rejected, according to your application. If you specify this value in an addSubscriber response, it means that, for whatever reason, your application is not accepting the subscription specified by eBay in the addSubscriber request. If eBay receives an addSubscriber response with a status of Rejected, eBay will set the user's subscription status to Rejected. |
| subscriptionId | string | Conditionally | For a particular application, the subscriptionId uniquely identifies a user's subscription. |
| Input Output Change History |
New to making API calls? Please see Making an API Call.
Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.
Requests addition of a subscriber to a Selling Manager application.
Description
Selling Manager Applications is requesting that a third-party application add the user magicalbookseller to the third-party application's subscription database.
Input
Your application must decrypt the string in the tokenValue field to determine the username. Your application should add that user as a subscriber to your application's database. For more information, see the User Guide. For convenience, the userName input field specifies the name of the eBay user, magicalbookseller, who should be added. However, you should use the string in tokenValue to determine the user name.
XML format (HTTP POST). Also available is the .txt version of this XML. <?xml version="1.0" encoding="UTF-8"?> <addSubscriberRequest xmlns="http://www.ebay.com/marketplace/services"> <credentials appId="your_app_id"> <token type="Value"> <tokenValue>token_value</tokenValue> <signature>signature_value</signature> </token> </credentials> <userInfo> <userName>magicalbookseller</userName> </userInfo> <subscriptionInfo> <subscriptionId>5000004267</subscriptionId> <planId>5000000627</planId> <planName>EasyBill</planName> <externalPlanId>ARKLS3</externalPlanId> </subscriptionInfo> </addSubscriberRequest>
Output
The third-party application responds with a status of Approved, indicating that the user was added as a subscriber to the third-party application's subscription database.
XML format. Also available is the .txt version of this XML. <?xml version="1.0" encoding="UTF-8"?> <addSubscriberResponse xmlns="http://www.ebay.com/marketplace/services"> <ack>Success</ack> <timestamp>2009-05-18T16:34:09.423-0700</timestamp> <status>Approved</status> <message>Subscription Approved</message> <subscriptionId>5000004267</subscriptionId> </addSubscriberResponse>
| Input Output Samples |
| Version | Description |
|---|---|
| 1.3.0 2009-09-30 |
|
| 1.2.0 2009-06-24 |
|
| 1.1.0 2009-04-01 |
|
This document was generated with a customized version of the apireferencedocs tool.
© 2009 eBay, Inc. All rights reserved. This documentation and the API may only be used in accordance with the eBay Developers Program and API License Agreement.