Skip to content

Account Service

Jamie Thompson edited this page Dec 4, 2020 · 3 revisions

http://api.despatchbay.com/soap/v16/account?wsdl

Changes: No changes to the Account Service have been introduced between v15 and v16.

The Account Service returns some basic information relating to your account. Currently you can use the Account Service to determine your account ID, name and available balance.

Methods

GetAccount

The GetAccount method returns account information, including the account balance, for the currently authenticated account.

<message name="GetAccountRequest"/>
<message name="GetAccountResponse">
  <part name="return" type="tns:AccountType"/>
</message>

...

<operation name="GetAccount">
  <documentation>Returns your account information</documentation>
  <input message="tns:GetAccountRequest"/>
  <output message="tns:GetAccountResponse"/>
</operation>
Input Output
none AccountType

GetAccountBalance

The GetAccountBalance method returns the account balance for the currently authenticated account.

<message name="GetAccountBalanceRequest"/>
<message name="GetAccountBalanceResponse">
  <part name="return" type="tns:AccountBalanceType"/>
</message>

...

<operation name="GetAccountBalance">
  <documentation>
    Returns your current account balance and available balance
  </documentation>
  <input message="tns:GetAccountBalanceRequest"/>
  <output message="tns:GetAccountBalanceResponse"/>
</operation>
Input Output
none AccountBalanceType

GetSenderAddresses

The GetSenderAddresses method returns a list of sender addresses relating to the account.

<message name="GetSenderAddressesRequest"/>
<message name="GetSenderAddressesResponse">
  <part name="return" type="tns:ArrayOfSenderAddressType"/>
</message>

...

<operation name="GetSenderAddresses">
  <documentation>
    Returns your currently active collection / sender addresses
  </documentation>
  <input message="tns:GetSenderAddressesRequest"/>
  <output message="tns:GetSenderAddressesResponse"/>
</operation>
Input Output
none ArrayOfSenderAddressType

GetServices

The GetServices method returns a list of shipping services which are available to your account. Warning: This is a utility method intended to communicate all possible shipping services available for use. Service capability must be checked using the methods in the Shipping Service before attempting to utilise a shipping service.

<message name="GetServicesRequest"></message>
<message name="GetServicesResponse">
  <part name="return" type="tns:ArrayOfServiceType" />
</message>

...

<operation name="GetServices">
  <documentation>Returns services available (allowed and enabled) for use</documentation>
  <input message="tns:GetServicesRequest"/>
  <output message="tns:GetServicesResponse"/>
</operation>
Input Output
none ArrayOfServiceType

Types

AccountType

<xsd:complexType name="AccountType">
  <xsd:all>
    <xsd:element name="AccountID" type="xsd:int"/>
    <xsd:element name="AccountName" type="xsd:string"/>
    <xsd:element name="AccountBalance" type="tns:AccountBalanceType"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
AccountID Integer The Despatch Bay account ID
AccountName String The account name
AccountBalance AccountBalanceType An object representing the current balance of the account

AccountBalanceType

<xsd:complexType name="AccountBalanceType">
  <xsd:all>
    <xsd:element name="Balance" type="xsd:float"/>
    <xsd:element name="AvailableBalance" type="xsd:float"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
Balance Float The current balance of credits on the account
AvailableBalance Float The current available balance (taking into account any overdraft limit)

AddressType

The AddressType object represents a postal address. Addresses returned by GetSenderAddresses are always UK addresses (ISO 3166-1 alpha-2 code GB)

<xsd:complexType name="AddressType">
  <xsd:all>
    <xsd:element name="CompanyName" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="Street" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="Locality" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="TownCity" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="County" type="xsd:string" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="PostalCode" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="CountryCode" type="xsd:string" minOccurs="1" maxOccurs="1"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
CompanyName String Company/Organisation name
Street String First line of street address
Locality String Second line of street address
TownCity String Town or city name
County String County
PostalCode String Postcode
CountryCode String ISO 3166-1 alpha-2 code. Always GB for addresses returned by GetSenderAddresses

CourierType

The CourierType object represents a shipping courier

<xsd:complexType name="CourierType">
  <xsd:all>
    <xsd:element name="CourierID" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="CourierName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
CourierID String An ID representing the courier
CourierName String The display name of the courier (eg. "Parcelforce")

SenderAddressType

<xsd:complexType name="SenderAddressType">
  <xsd:all>
    <xsd:element name="SenderName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="SenderTelephone" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="SenderEmail" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="SenderAddress" type="tns:AddressType" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="SenderAddressID" type="xsd:int" minOccurs="0" maxOccurs="1"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
SenderName String Name of contact person
SenderTelephone String Telephone number of contact person
SenderEmail String Email address of contact person
SenderAddress AddressType Object representing the address
SenderAddressID Integer The ID of this address

ArrayOfSenderAddressType

ArrayOfSenderAddressType is an array of SenderAddressType objects

<xsd:complexType name="ArrayOfSenderAddressType">
  <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:SenderAddressType[]"/>
    </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>

ServiceType

<xsd:complexType name="ServiceType">
  <xsd:all>
    <xsd:element name="ServiceID" type="xsd:int" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="Format" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="Name" type="xsd:string" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="Cost" type="xsd:float" minOccurs="0" maxOccurs="1"/>
    <xsd:element name="Courier" type="tns:CourierType" minOccurs="1" maxOccurs="1"/>
  </xsd:all>
</xsd:complexType>
Element Name Type Description
ServiceID Integer An ID representing the service
Format String Either PARCEL, PACKET, LARGE_LETTER or PALLET
Name String The name of the service
Cost String Within the Account Service the Cost field is never populated
Courier CourierType The courier which provides this service

ArrayOfServiceType

ArrayOfServiceType is an array of ServiceType objects

<xsd:complexType name="ArrayOfServiceType">
  <xsd:complexContent>
    <xsd:restriction base="SOAP-ENC:Array">
      <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:ServiceType[]"/>
    </xsd:restriction>
  </xsd:complexContent>
</xsd:complexType>
Clone this wiki locally