{"__v":2,"_id":"544910693acc37080099e66d","category":{"__v":2,"_id":"544821ae8d7af31a00dd41ce","pages":["544821f38d7af31a00dd41d0","544910693acc37080099e66d"],"project":"542dbe0ecb19820800c1f4d7","version":"542ecc0a6b0eb6080066ca77","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-10-22T21:29:18.651Z","from_sync":false,"order":5,"slug":"usage","title":"Usage"},"editedParams":true,"editedParams2":true,"is_link":false,"parentDoc":null,"project":"542dbe0ecb19820800c1f4d7","user":"542dc547cb19820800c1f4f1","version":{"__v":31,"_id":"542ecc0a6b0eb6080066ca77","forked_from":"542dbe0fcb19820800c1f4da","project":"542dbe0ecb19820800c1f4d7","createdAt":"2014-10-03T16:17:14.165Z","releaseDate":"2014-10-03T16:17:14.165Z","categories":["542ecc0a6b0eb6080066ca78","542ef44f6b0eb6080066cb24","543bf3e22a30961a00b66eb3","5446952b82bd7e08002768a0","544821ae8d7af31a00dd41ce","544a7885f1aefa08006efc69","544c758e11845f0e001ed8de","544e5565b80812080035be55","544e558dbd51b9080037f8ca","5450b045a66f020800dba73d","5450eb6aa66f020800dba945","5450f39ea66f020800dba989","5450f877a66f020800dba9cf","54510356a66f020800dbaa17","5451274514af501a00b50c99","54513345a66f020800dbab24","54513cc014af501a00b50d24","54515eec14af501a00b50db9","54519b1d14af501a00b50ea9","54519b2aa66f020800dbacb4","54524f9704160008005b1d27","54538d2308d1800800473d95","54538d420c09721000a06a03","54538e5608d1800800473d9a","5453ea9547c30114004fb375","5453eb12b077c31c00067bcb","5453eb27b077c31c00067bcd","5453ed5db077c31c00067bde","548075cbe291c51a00e7e096","5922fa475c48c70f00f21453","59244fd41e32eb190028ad8d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"2.0.0","version":"2"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-23T14:27:53.628Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"basic_auth":true,"examples":{"codes":[]},"method":"get","results":{"codes":[{"status":200,"language":"json","code":"{\n    \"page\": 0,\n    \"num_pages\": 0,\n    \"page_size\": 50,\n    \"total\": 3,\n    \"start\": 0,\n    \"end\": 3,\n    \"uri\": \"/v2/Accounts/{AccountSid}/Usages.json\",\n    \"first_page_uri\": \"/v2/Accounts/{AccountSid}/Usages.json?Page=0&PageSize=50\",\n    \"previous_page_uri\": null,\n    \"next_page_uri\": \"/v2/Accounts/{AccountSid}/Usages.json?Page=-1&PageSize=50\",\n    \"last_page_uri\": \"/v2/Accounts/{AccountSid}/Usages.json?Page=-1&PageSize=50\",\n    \"usages\": [\n\n    {\n  \"sid\" : \"{UsageSid}\",\n  \"product\" : \"Inbound Call\",\n  \"month\" : \"9\",\n  \"year\" : \"2012\",\n  \"quantity\" : \"2\",\n  \"average_cost\" : \"0.010000\",\n  \"total_cost\" : \"0.020000\",\n  \"uri\" : \"/v2/Accounts/{AccountSid}/Usages/{UsageSid}.json\"\n}\n\n    , \n    {\n  \"sid\" : \"{UsageSid}\",\n  \"product\" : \"Outbound SMS (Spoofed)\",\n  \"month\" : \"9\",\n  \"year\" : \"2012\",\n  \"quantity\" : \"4\",\n  \"average_cost\" : \"0.137500\",\n  \"total_cost\" : \"0.550000\",\n  \"uri\" : \"/v2/Accounts/{AccountSid}/Usages/{UsageSid}.json\"\n}\n\n    , \n    {\n  \"sid\" : \"{UsageSid}\",\n  \"product\" : \"Outbound SMS\",\n  \"month\" : \"9\",\n  \"year\" : \"2012\",\n  \"quantity\" : \"2\",\n  \"average_cost\" : \"0.010000\",\n  \"total_cost\" : \"0.020000\",\n  \"uri\" : \"/v2/Accounts/{AccountSid}/Usages/{UsageSid}.json\"\n}\n    ]\n}","name":""},{"status":404,"language":"json","code":"{\n    \"status\": 404,\n    \"message\": \"The requested resource was not found: /v2/Accounts/bad/bad_response.json\"\n}","name":""}]},"settings":"","try":true,"auth":"required","params":[{"_id":"544a585127b7fc140078db11","ref":"","in":"path","required":true,"desc":"Account SID.","default":"","type":"string","name":"AccountSid"},{"_id":"544a585127b7fc140078db10","ref":"","in":"query","required":false,"desc":"Filters usage by day of month. If no month is specified then defaults to current month. Allowed values are integers between 1 and 31 depending on the month. Leading 0s will be ignored.","default":"","type":"string","name":"Day"},{"_id":"544a585127b7fc140078db0f","ref":"","in":"query","required":false,"desc":"Filters usage by month. Allowed values are integers between 1 and 12. Leading 0s will be ignored.","default":"","type":"string","name":"Month"},{"_id":"544a585127b7fc140078db0e","ref":"","in":"query","required":false,"desc":"Filters usage by year. Allowed values are valid years in integer form such as \"2014\".","default":"","type":"string","name":"Year"},{"_id":"544a585127b7fc140078db0d","ref":"","in":"query","required":false,"desc":"Filters usage by a specific “product” of TelAPI. Each product is uniquely identified by an integer. For example: Product=1, would return all outbound call usage. The integer assigned to each product is listed below.","default":"","type":"string","name":"Product"},{"_id":"544a585127b7fc140078db0c","ref":"","in":"query","required":false,"desc":"Used to return a particular page within the list.","default":"","type":"string","name":"Page"},{"_id":"544a585127b7fc140078db0b","ref":"","in":"query","required":false,"desc":"Used to specify the amount of list items to return per page.","default":"","type":"string","name":"PageSize"}],"url":"/v2/Accounts/:AccountSid/Usages.json"},"isReference":false,"order":1,"body":"PRODUCTS\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Product\",\n    \"h-1\": \"Value\",\n    \"0-0\": \"Outbound Call\",\n    \"0-1\": \"1\",\n    \"1-0\": \"Inbound Call\",\n    \"1-1\": \"2\",\n    \"2-0\": \"Outbound SMS\",\n    \"2-1\": \"3\",\n    \"3-0\": \"Inbound SMS\",\n    \"3-1\": \"4\",\n    \"4-0\": \"Outbound SIP\",\n    \"4-1\": \"5\",\n    \"5-0\": \"Inbound SIP\",\n    \"5-1\": \"6\",\n    \"6-0\": \"Recording\",\n    \"6-1\": \"7\",\n    \"7-0\": \"Recurring DID\",\n    \"7-1\": \"8\",\n    \"8-0\": \"Recurring DID (Premium)\",\n    \"8-1\": \"9\",\n    \"9-0\": \"Transcription (Auto)\",\n    \"9-1\": \"12\",\n    \"10-0\": \"Transcription (Hybrid)\",\n    \"10-1\": \"14\",\n    \"11-0\": \"Recurring Inbound Channel\",\n    \"11-1\": \"17\",\n    \"12-0\": \"Inbound Call (Channel)\",\n    \"12-1\": \"18\",\n    \"13-0\": \"CNAM Dip\",\n    \"13-1\": \"19\",\n    \"14-0\": \"Carrier Lookup\",\n    \"14-1\": \"20\",\n    \"15-0\": \"Outbound Call (Spoofed)\",\n    \"15-1\": \"21\",\n    \"16-0\": \"Inbound Call (Channel Overage)\",\n    \"16-1\": \"22\",\n    \"17-0\": \"Recurring DID Unblock\",\n    \"17-1\": \"23\",\n    \"18-0\": \"Inbound Call Unblocked\",\n    \"18-1\": \"24\",\n    \"19-0\": \"Inbound Call Forwarded From\",\n    \"19-1\": \"25\"\n  },\n  \"cols\": 2,\n  \"rows\": 20\n}\n[/block]\n# **Response Parameters**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"first_page_uri\",\n    \"0-1\": \"URI for the first page of results.\",\n    \"1-0\": \"end\",\n    \"1-1\": \"Last result index.\",\n    \"2-0\": \"total\",\n    \"2-1\": \"Number of items.\",\n    \"3-0\": \"previous_page_uri\",\n    \"3-1\": \"URI for the previous page of results.\",\n    \"4-0\": \"num_pages\",\n    \"4-1\": \"Number of pages.\",\n    \"5-0\": \"uri\",\n    \"5-1\": \"The Uniform Resource Identifier to this resource.\",\n    \"6-0\": \"page_size\",\n    \"6-1\": \"Number of items on a single page.\",\n    \"7-0\": \"start\",\n    \"7-1\": \"Index of the first item on the current page.\",\n    \"8-0\": \"next_page_uri\",\n    \"8-1\": \"URI for the next page of the results.\",\n    \"9-0\": \"last_page_uri\",\n    \"9-1\": \"URI for the last page of the results.\",\n    \"10-0\": \"page\",\n    \"10-1\": \"Current page number.\",\n    \"11-0\": \"usages\",\n    \"11-1\": \"Array containing usages.\"\n  },\n  \"cols\": 2,\n  \"rows\": 12\n}\n[/block]\nResponse parameters for usages are equal to those on [\"View Usage\" API call](/v2/docs/view-usage).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"\\\"quantity\\\" and \\\"total\\\" are two separate measurements: \\\"quantity\\\" is the total number of individual units, such as minutes, whereas \\\"total\\\" is the total number of usages, such as calls.\",\n  \"title\": \"Response Params\"\n}\n[/block]\n# **Example cURL**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X GET 'https://api.zang.io/v2/Accounts/[AccountSid]/Usages.json' -u '[AccountSid]:[AuthToken]'\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","excerpt":"complete list of all usages of your account","slug":"list-usages","type":"endpoint","title":"List Usages"}

getList Usages

complete list of all usages of your account

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

AccountSid:
required
string
Account SID.

Query Params

Day:
string
Filters usage by day of month. If no month is specified then defaults to current month. Allowed values are integers between 1 and 31 depending on the month. Leading 0s will be ignored.
Month:
string
Filters usage by month. Allowed values are integers between 1 and 12. Leading 0s will be ignored.
Year:
string
Filters usage by year. Allowed values are valid years in integer form such as "2014".
Product:
string
Filters usage by a specific “product” of TelAPI. Each product is uniquely identified by an integer. For example: Product=1, would return all outbound call usage. The integer assigned to each product is listed below.
Page:
string
Used to return a particular page within the list.
PageSize:
string
Used to specify the amount of list items to return per page.

Result Format


Documentation

PRODUCTS [block:parameters] { "data": { "h-0": "Product", "h-1": "Value", "0-0": "Outbound Call", "0-1": "1", "1-0": "Inbound Call", "1-1": "2", "2-0": "Outbound SMS", "2-1": "3", "3-0": "Inbound SMS", "3-1": "4", "4-0": "Outbound SIP", "4-1": "5", "5-0": "Inbound SIP", "5-1": "6", "6-0": "Recording", "6-1": "7", "7-0": "Recurring DID", "7-1": "8", "8-0": "Recurring DID (Premium)", "8-1": "9", "9-0": "Transcription (Auto)", "9-1": "12", "10-0": "Transcription (Hybrid)", "10-1": "14", "11-0": "Recurring Inbound Channel", "11-1": "17", "12-0": "Inbound Call (Channel)", "12-1": "18", "13-0": "CNAM Dip", "13-1": "19", "14-0": "Carrier Lookup", "14-1": "20", "15-0": "Outbound Call (Spoofed)", "15-1": "21", "16-0": "Inbound Call (Channel Overage)", "16-1": "22", "17-0": "Recurring DID Unblock", "17-1": "23", "18-0": "Inbound Call Unblocked", "18-1": "24", "19-0": "Inbound Call Forwarded From", "19-1": "25" }, "cols": 2, "rows": 20 } [/block] # **Response Parameters** [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "first_page_uri", "0-1": "URI for the first page of results.", "1-0": "end", "1-1": "Last result index.", "2-0": "total", "2-1": "Number of items.", "3-0": "previous_page_uri", "3-1": "URI for the previous page of results.", "4-0": "num_pages", "4-1": "Number of pages.", "5-0": "uri", "5-1": "The Uniform Resource Identifier to this resource.", "6-0": "page_size", "6-1": "Number of items on a single page.", "7-0": "start", "7-1": "Index of the first item on the current page.", "8-0": "next_page_uri", "8-1": "URI for the next page of the results.", "9-0": "last_page_uri", "9-1": "URI for the last page of the results.", "10-0": "page", "10-1": "Current page number.", "11-0": "usages", "11-1": "Array containing usages." }, "cols": 2, "rows": 12 } [/block] Response parameters for usages are equal to those on ["View Usage" API call](/v2/docs/view-usage). [block:callout] { "type": "info", "body": "\"quantity\" and \"total\" are two separate measurements: \"quantity\" is the total number of individual units, such as minutes, whereas \"total\" is the total number of usages, such as calls.", "title": "Response Params" } [/block] # **Example cURL** [block:code] { "codes": [ { "code": "curl -X GET 'https://api.zang.io/v2/Accounts/[AccountSid]/Usages.json' -u '[AccountSid]:[AuthToken]'", "language": "shell" } ] } [/block]