Fax Object
The fax object is a JSON object returned by the Phaxio API and represents a fax job in the system. Its properties are described in the table below.
Properties that are not always present look like this.
| Name | Description |
|---|---|
| id | The fax's id number. Can be used to retrieve the fax later. |
| direction | Either 'sent' or 'received'. States whether the fax is being sent or received. |
| num_pages | Number of pages in the fax |
| cost | The total cost of the fax in cents. This value may change depending on the success of the job. See the billing page. |
| status | The status of the job. See the statuses page for more information. |
| is_test | true or false. States whether the job is in test mode. |
| requested_at | Unix timestamp representing the time when the initial API call was made. |
| from_number | For received faxes, this holds the sender's 10 digit phone number. |
| to_number | For received faxes, this holds the Phaxio phone number that was used to receive the call. |
| recipients | For sent faxes, this holds an array of recipient objects. See below section on recipient objects. |
| error_type | One of the Phaxio error types. Will give you a general idea of what went wrong for a failed fax. (e.g. lineError) |
| error_code | A more detailed description of what went wrong for a failed fax. |
| completed_at | If the job is complete, this is a Unix timestamp representing the time the job was completed. |
Recipient Object
A JSON object describing a fax recipient
| Name | Description |
|---|---|
| number | A 10 digit phone number |
| status | The status of the job for this specific recipient. See the statuses page for more information. |
| completed_at | A Unix timestamp representing the time the job was completed for this recipient. |
Example fax object:
{
"id":123458,
"num_pages":1,
"cost":7,
"direction":"sent",
"status":"queued",
"is_test":false,
"requested_at":1294094700,
"recipients":[
{
"number":"4141234567",
"status":"queued"
}
]
}
"id":123458,
"num_pages":1,
"cost":7,
"direction":"sent",
"status":"queued",
"is_test":false,
"requested_at":1294094700,
"recipients":[
{
"number":"4141234567",
"status":"queued"
}
]
}
Phone Number Object
A JSON object describing a phone number
| Name | Description |
|---|---|
| number | A 10 digit phone number |
| city | The city for the area code of the number |
| state | The state for the area code of the number |
| cost | The monthly cost of the number in cents |
| last_billed_at | A timestamp representing the last time your account was billed for this number |
| provisioned_at | A timestamp representing the time you provisioned the number. |
Example phone number object:
{
"number":"8476661235",
"city":"Northbrook",
"state":"Illinois",
"cost":500,
"last_billed_at":"2013-05-19 03:15:32",
"provisioned_at":"2013-05-19 03:15:32"
}
"number":"8476661235",
"city":"Northbrook",
"state":"Illinois",
"cost":500,
"last_billed_at":"2013-05-19 03:15:32",
"provisioned_at":"2013-05-19 03:15:32"
}
