Here's an example of a callback event, which would be POSTed to your callback URL.
In this case, it's a SENT status update on an outbound fax:
POST /callback.php?type=outbound HTTP/1.1 Host: your.callbackdomain.here Accept: */* Expect: 100-continue Content-Type: multipart/form-data; boundary=----------------------------e2bdba1d3cf0 Content-Length: 520 X-Forwarded-For: 52.200.252.64 ------------------------------e2bdba1d3cf0 Content-Disposition: form-data; name="json" {"Transaction":{"Guid":"[Fax GUID]","To":"14154847140","From":"14154847140","IsInbound":false,"IsDraft":false,"TypeCode":"F","StatusCode":"S","ErrorCode":null,"CreatedAt":"1505933982","UpdatedAt":"1505934022","Uri":"\/v1\/Accounts\/[Your Account GUID]\/Transmissions\/[Fax GUID]","NumPagesBilled":1}} ------------------------------e2bdba1d3cf0--
See the article on sending a fax using the for more information. Fax API
Here is an example of a callback process for an outbound fax with an error (in this case, it's a bad Recipient Fax Number):
{ "Transaction":{ "Guid":"[Fax GUID]", "To":"1214155555555", "From":"14155555555", "IsInbound":false, "IsDraft":false, "TypeCode":"F", "StatusCode":"E", "ErrorCode":"A", "CreatedAt":"1475766509", "UpdatedAt":"1475766550", "Uri":"\\/v1\\/Accounts\\/[Your Account GUID]\\/Transmissions\\/[Fax GUID]", "NumPagesBilled":0 } }
NOTE: we know of an issue where if you have an Account Callback URL profiled in the hellosign.com API Settings page, you'll receive Fax events similar to this:
{ "event":{ "event_type":"transmission_disconnected", "event_time":"1475766511", "event_hash":"9a306f1874007d9f40f946e21480dcb9a1688516776cbea6f471c4c1e0db1502", "event_metadata":{ "related_signature_id":null, "reported_for_account_id":"[Your Account GUID]", "reported_for_app_id":null, "event_message":null } }, "account_guid":"[Your Account GUID]", "client_id":null, "transmission":{ "test_mode":false, "title":"fillable w9 test doc", "original_title":"fillable w9 test doc", "subject":null, "message":null, "metadata":{ }, "from":"1415555555", "transmissions":[ { "status_code":"error_disconnected", "recipient":"12141555555" } ], "transmission_id":"[Transmission GUID - Different than Fax GUID]", "final_copy_uri":"\\/v3\\/transmission\\/final_copy\\/[Transmission GUID - Different than Fax GUID]", "files_url":"https:\\/\\/api.hellofax.com\\/v3\\/transmission\\/files\\/[Transmission GUID - Different than Fax GUID]" } }
You can choose to parse or ignore these events as needed - they're not strictly required. The
Fax callback Transaction is the one that's explicitly regarding the Fax faxing attempt.
Comments
0 comments
Article is closed for comments.