logo   HOME

Billing

This page lists the optional parameters, request data and reponse in xml

Retrieve inbox messages for billing [HTTP GET]

https://appapi.dlangemobile.com/xml/billing/{api_key}/inbox?type={type}&unread={unread}&start_date={start_date}&end_date={end_date}&page_size={page_size}&page_number={page_number}&client_username={client_username}&group_name={group_name}&subgroup_name={subgroup_name}

URL Parameters

  • api_key (Required) - Your API application key.

Query string Parameters

  • type (Optional) - Default value if not provided is all.
    • all - return both SMTP-SMS and long-code messages
    • smtp-sms - return messages sent using SMTP-SMS
    • long-code - return messages sent using long-code
  • unread (Optional) - Default value if not provided is all
    • all - return both read and unread inbox items
    • true - return unread inbox items
    • false - return read inbox items
  • start_date (Optional) - Value should be in mm/dd/yyyy format. Returns messages received on or after the date specified. There will be no start date filter if this parameter is not specified.
  • end_date (Optional) - Value should be in mm/dd/yyyy format. Returns messages received on or before the date specified. There will be no end date filter if this parameter is not specified.
  • page_size (Optional) - Value should be an integer. Defines the number of items per page. Value is required if page_number is defined. Default value if not provided is to return all items.
  • page_number (Optional) - Value should be an integer. Defines the page number to return if page_size is defined. Default value if not provided is to return all items.
  • client_username (Optional) - For resellers only. Returns data of the client username defined.
  • group_name (Optional) - For resellers with groups enabled. Returns data of all clients under the group defined.
  • subgroup_name (Optional) - For resellers with groups enabled. {group_name} should also have a valid value. Returns data of all clients under the group and sub-group defined.

Example XML Response

<BillingInboxMessages>
   <BillingInbox>
   <Type>long-code</Type>
    <DateReceived>2011-05-31T11:20:00</DateReceived>
    <RecipientNumber>+14045676157</RecipientNumber>
    <SenderNumber>+18354232834</SenderNumber>
    <SenderFirstName>Ed</SenderFirstName>
    <SenderLastName>Doe</SenderLastName>
    <Message>my first message</Message>
    <ClientUsername>Client1</ClientUsername>
  </BillingInbox>
  <BillingInbox>
   <Type>smtp-sms</Type>
    <DateSent>2011-05-31T11:20:00</DateSent>
    <RecipientNumber>+14045676157</RecipientNumber>
    <SenderNumber>+18359232834</SenderNumber>
    <SenderFirstName>John</SenderFirstName>
    <SenderLastName>Doe</SenderLastName>
    <Message>my second message</Message>
    <ClientUsername>Client1</ClientUsername>
  </BillingInbox>
</BillingInboxMessages>

Error Codes

  • 001 - API key is required.
  • 002 - Invalid API key.
  • 003 - Define the page size for paged queries.
  • 004 - Define the page number for paged queries.
  • 401 - Invalid message type.
  • 402 - Invalid start or end date. Dates must be in mm/dd/yyyy format.
  • 403 - Start date should be earlier than end date.
  • 405 - Group name required.
  • 406 - client_username, group_name and subgroup_name are applicable only to reseller with grouping enabled.
  • 407 - reseller_group_id is invalid.

Retrieve inbox messages total count for billing [HTTP GET]

https://appapi.dlangemobile.com/xml/billing/{api_key}/inbox/count?type={type}&unread={unread}&start_date={start_date}&end_date={end_date}&client_username={client_username}&group_name={group_name}&subgroup_name={subgroup_name}

URL Parameters

  • api_key (Required) - Your API application key.

Query string Parameters

  • type (Optional) - Default value if not provided is all.
    • all - return both SMTP-SMS and long-code messages
    • smtp-sms - return messages sent using SMTP-SMS
    • long-code - return messages sent using long-code
  • unread (Optional) - Default value if not provided is all
    • all - return both read and unread inbox items
    • true - return unread inbox items
    • false - return read inbox items
  • start_date (Optional) - Value should be in mm/dd/yyyy format. Returns messages received on or after the date specified. There will be no start date filter if this parameter is not specified.
  • end_date (Optional) - Value should be in mm/dd/yyyy format. Returns messages received on or before the date specified. There will be no end date filter if this parameter is not specified.

Example XML Response

<int>500</int>

Error Codes

  • 001 - API key is required.
  • 002 - Invalid API key.
  • 401 - Invalid Message type.
  • 405 - Group name required.
  • 406 - client_username, group_name and subgroup_name are applicable only to reseller with grouping enabled.
  • 407 - reseller_group_id is invalid.
  • client_username (Optional) - For resellers only. Returns data of the client username defined.
  • group_name (Optional) - For resellers with groups enabled. Returns data of all clients under the group defined.
  • subgroup_name (Optional) - For resellers with groups enabled. {group_name} should also have a valid value. Returns data of all clients under the group and sub-group defined.