Home > Cloud Cruiser 4 > REST API reference > Customers > Get a customer by account ID

Get a customer by account ID

Retrieves the information of a customer specified by its accountId. 

Resource URL

In version 4.0: GET http://<ccServerURL>/rest/v2/customers/accountId/<accountId>

In version 4.1 and later: GET http://<ccServerURL>/rest/v2/customers?accountId=<accountId>

Request

Parameters
Version 4.0
Version 4.1 and later

For Cloud Cruiser 4.1 and later, use the following parameters:

  Name Type Description
URL query parameters (required) accountId string The account ID of the customer to retrieveUse a pipe (|) to separate the fields for each account level.
Body

None

Response

Content-Type

application/xml

Body

Details for the specified customer, as XML text with the root element customerList or JAXB type com.cloudcruiser.server.webservices.v2.dto.customer.CustomerList.

Schema

Version 4.0
Version 4.1 and later

For Cloud Cruiser 4.1 and later, this XML schema describes a customer or list of customers.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.cloudcruiser.com/webservices/v2/Common" xmlns:tns="http://www.cloudcruiser.com/webservices/v2/Customer" attributeFormDefault="unqualified"elementFormDefault="qualified" targetNamespace="http://www.cloudcruiser.com/webservices/v2/Customer">
  <xs:import namespace="http://www.cloudcruiser.com/webservices/v2/Common"/>
  <xs:import/>
  <xs:element name="customer" type="tns:Customer"/>
  <xs:element name="customerList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" ref="tns:customer"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="customerSummaryList">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" name="customerSummary" type="tns:CustomerSummary"/>
      </xs:sequence>
      <xs:attribute name="totalCount" type="xs:int" use="required"/>
      <xs:attribute name="retrievedCount" type="xs:int" use="required"/>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="CustomerSummary">
    <xs:sequence>
      <xs:element name="accountId" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int" use="required"/>
  </xs:complexType>
  <xs:complexType name="Customer">
    <xs:sequence>
      <xs:element name="accountId" type="xs:string"/>
      <xs:element name="active" type="xs:boolean"/>
      <xs:element default="1" name="accountingDay" type="xs:short"/>
      <xs:element default="1" name="fiscalStartMonth" type="xs:short"/>
      <xs:element minOccurs="0" name="altAccountId" type="xs:string"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element minOccurs="0" name="flag1" type="xs:string"/>
      <xs:element minOccurs="0" name="flag2" type="xs:string"/>
      <xs:element minOccurs="0" name="flag3" type="xs:string"/>
      <xs:element minOccurs="0" name="flag4" type="xs:string"/>
      <xs:element minOccurs="0" name="flag5" type="xs:string"/>
      <xs:element name="ratePlan">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="transactions">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" name="transaction" type="tns:Transaction"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="discountInstances">
        <xs:complexType>
          <xs:sequence>
            <xs:element maxOccurs="unbounded" name="discountInstance" type="tns:DiscountInstance"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element minOccurs="0" name="contacts" type="tns:Contacts"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType abstract="true" name="Transaction">
    <xs:sequence>
      <xs:element name="service" type="ns1:Service"/>
      <xs:element default="true" name="active" type="xs:boolean"/>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element default="MONEY_AMOUNT" name="amountType" type="xs:string"/>
      <xs:element name="amount" type="xs:double"/>
      <xs:element minOccurs="0" name="lastProcessedDate" type="ns1:Date"/>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="NonRecurringTransaction">
    <xs:complexContent>
      <xs:extension base="tns:Transaction">
        <xs:sequence>
          <xs:element name="transactionDate" type="ns1:Date"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="RecurringTransaction">
    <xs:complexContent>
      <xs:extension base="tns:Transaction">
        <xs:sequence>
          <xs:element name="frequencyType" type="xs:string"/>
          <xs:element name="startDate" type="ns1:StartOfDay"/>
          <xs:element name="endDate" type="ns1:EndOfDay"/>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="DiscountInstance">
    <xs:sequence>
      <xs:element name="active" type="xs:boolean"/>
      <xs:element name="startDate" type="ns1:StartOfDay"/>
      <xs:element name="endDate" type="ns1:EndOfDay"/>
      <xs:element name="discount">
        <xs:complexType>
          <xs:sequence/>
          <xs:attribute name="name" type="xs:string" use="required"/>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
  <xs:complexType name="Contacts">
    <xs:sequence>
      <xs:element minOccurs="0" name="description" type="xs:string"/>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="emailContact">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="emailAddress" type="xs:string"/>
            <xs:element minOccurs="0" name="description" type="xs:string"/>
            <xs:element default="false" name="receiveAlerts" type="xs:boolean"/>
          </xs:sequence>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
      <xs:element maxOccurs="unbounded" minOccurs="0" name="postalContact">
        <xs:complexType>
          <xs:sequence>
            <xs:element minOccurs="0" name="description" type="xs:string"/>
            <xs:element name="address1" type="xs:string"/>
            <xs:element minOccurs="0" name="address2" type="xs:string"/>
            <xs:element minOccurs="0" name="address3" type="xs:string"/>
            <xs:element minOccurs="0" name="address4" type="xs:string"/>
            <xs:element minOccurs="0" name="address5" type="xs:string"/>
          </xs:sequence>
          <xs:attribute name="id" type="xs:int"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="id" type="xs:int"/>
  </xs:complexType>
</xs:schema>

Example

URL invocation

GET http://localhost:8080/rest/v2/customers?accountId=B|BB|KKKK|11​

Java invocation
Response body
<customerList xmlns="http://www.cloudcruiser.com/webservices/v2/Customer">
  <customer id="138">
    <accountId>B|BB|KKKK|11</accountId>
    <active>true</active>
    <accountingDay>1</accountingDay>
    <fiscalStartMonth>1</fiscalStartMonth>
    <description>Cust B-BB-KKKK-11</description>
    <ratePlan name="Default" id="1"/>
    <contacts id="10100"/>
  </customer>
</customerList>
Last modified

Tags

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP