Billing
This page lists the optional parameters, request data and reponse in xml
Retrieve outbox messages for billing [HTTP GET]
https://appapi.dlangemobile.com/xml/billing/{api_key}/outbox?type={type}&status={status}&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
- status (Optional) - Default value if not provided is all.
- all - return both sent and failed messages
- sent - return sent messages
- failed - return failed messages
- start_date (Optional) - Value should be in mm/dd/yyyy format. Returns messages sent 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 sent 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
<BillingOutboxMessages>
<BillingOutbox>
<Type>long-code</Type>
<DateSent>2011-05-31T11:20:00</DateSent>
<SenderNumber>+14045676157</SenderNumber>
<RecipientNumber>+18354232834</RecipientNumber>
<RecipientFirstName>Ed</RecipientFirstName>
<RecipientLastName>Doe</RecipientLastName>
<Message>my first message</Message>
<ClientUsername>Client1</ClientUsername>
<Status>Sent</Status>
<MessageCount>1</MessageCount>
<DetailedStatus>000 - DELIVRD</DetailedStatus>
</BillingOutbox>
<BillingOutbox>
<Type>smtp-sms</Type>
<DateSent>2011-05-31T11:20:00</DateSent>
<SenderNumber>+14045676157</SenderNumber>
<RecipientNumber>+18359232834</RecipientNumber>
<RecipientFirstName>John</RecipientFirstName>
<RecipientLastName>Doe</RecipientLastName>
<Message>my second message</Message>
<Status>Failed</Status>
<ClientUsername>Client1</ClientUsername>
<MessageCount>1</MessageCount>
<DetailedStatus>024 - UNDELIV</DetailedStatus>
</BillingOutbox>
</BillingOutboxMessages>
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.
- 404 - Invalid message status.
- 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 outbox messages total count for billing [HTTP GET]
https://appapi.dlangemobile.com/xml/billing/{api_key}/outbox/count?type={type}&status={status}&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
- status (Optional) - Default value if not provided is all.
- all - return both sent and failed messages
- sent - return sent messages
- failed - return failed messages
- start_date (Optional) - Value should be in mm/dd/yyyy format. Returns messages sent 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 sent on or before the date specified. There will be no end date filter if this parameter is not specified.
- 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
<int>500</int>
Error Codes
- 001 - API key is required.
- 002 - Invalid API key.
- 401 - Invalid Message type.
- 404 - Invalid message status.
- 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.