Difference between revisions of "Freeside:1.9:Documentation:Developer:SelfService:Reseller"

From Freeside
Jump to: navigation, search
(Parameters)
(Parameters)
Line 64: Line 64:
 
* state: Customer State or Province, 2 letter code
 
* state: Customer State or Province, 2 letter code
 
* zip: Customer ip or Postal code
 
* zip: Customer ip or Postal code
 +
* country: Customer country, 2 letter code
 
* daytime: Customer daytime phone number (optional)
 
* daytime: Customer daytime phone number (optional)
 
* night: Customer nighttime phone number (optional)
 
* night: Customer nighttime phone number (optional)

Revision as of 14:50, 12 November 2010

Introduction

This reseller API allows you to perform various functions on your reseller account, such as checking usernames, creating new customers, listing your existing customers, suspending and unsuspending, and so on.

The API is accessed as an XML-RPC web service and can be used from any programming language or platform. More information on XML-RPC may be found at http://www.xmlrpc.com/ and client libraries for various languages may be found at http://www.xmlrpc.com/directory/1568/implementations.

Access

Your vendor will provide you with a URL for access to your self-service API. All API calls are made to this URL.

Authentication

Your vendor will provide you with a username/password for authentication. To begin an API session, first you must login with your credentials and receive a session key. The session key is used in all subsequent API calls for the duration of your session. Once you are done making API calls, you can logout explicitly, or your session will automatically expire after one hour.

Available methods

All methods names are prefixed with "FS.SelfService.XMLRPC.", for example, "FS.SelfService.XMLRPC.agent_login"

agent_login

Parameters: <struct>

  • username
  • password

Returns: <struct>

  • error: Error message if an error, or empty on successful login.
  • session_id: Session ID on successful login, or empty on errors.

agent_logout

Paramters: <struct>

  • sesison_id

Returns: <struct>

  • error: Error message if an error, or empty on successful logout.

check_username

Parameters: <struct>

  • session_id
  • username
  • domain

Returns: <struct>

  • error: Error message if an error, or empty on successful availability check (not necessarily indicating the username is available)
  • available: 0 if username is taken, or 1 if username is available

new_customer

Parameters

<struct>

  • session_id

Customer information

  • first: Customer first name
  • last: Customer last name
  • company: Customer company name (optional)
  • address1: Customer address
  • address2: Customer address line 2 (optional)
  • city: Customer city
  • state: Customer State or Province, 2 letter code
  • zip: Customer ip or Postal code
  • country: Customer country, 2 letter code
  • daytime: Customer daytime phone number (optional)
  • night: Customer nighttime phone number (optional)
  • fax: Customer fax number (optional)
  • invoicing_list: Email address(es), comma-separated

Billing information

  • payby: CARD for credit card payment, CHEK for electronic check payment or PREPAY for prepaid card payment
  • payinfo: credit card number, echeck information in format account_number@routing+number, or prepaid card number
  • paycvv: credit card CVV code or blank
  • paydate: credit card expiration date (mm/yyyy, m/yyyy, mm/yy or m/yy) or blank
  • payname: exact name on credit card, bank name for electronic checks, or blank

Package information

  • pkgpart: Product number. Your vendor will provide a list of your available packages.
  • username: Customer username
  • _password; Customer password

(This list is not exhaustive; see the base API documentation for more details on other fields.)

Returns

<struct>

  • error: Error message if an error, or empty on successful customer creation. The special value "_decline" indicates a billing decline.
  • custnum: Customer number on successful customer creation
  • signup_service
  • svcnum

suspend_username

Paramters: <struct>

  • session_id
  • username
  • domain

Returns: <struct>

  • error: Error message if an error, or empty on successful suspension

unsuspend_username

Paramters: <struct>

  • session_id
  • username
  • domain

Returns: <struct>

  • error: Error message if an error, or empty on successful unsuspension