Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd test customer API sandbox
    primarykey
    data
    text
    <p>Folks,</p> <p>I registered with Alacrity Direct Operator Billing API, I make user for sandbox environment.</p> <p>This example in its documentation for add test customer</p> <blockquote> <p>Provision</p> <p>This operation creates test customers in the sandbox environment and loads some initial credit. Request</p> <p>See the REST Request Format for general guidelines including authentication and content-type headers.</p> <p>POST /1.0/sandbox</p> <p>The following parameters are supplied in JSON or XML format within a provision-request container.</p> </blockquote> <p>and here is example request in its documentation</p> <pre><code>&lt;provision-request&gt; &lt;customer uri="tel:640000000" currency="NZD"&gt; &lt;credit&gt;10&lt;/credit&gt; &lt;/customer&gt; &lt;/provision-request&gt; </code></pre> <p>I written an application to connect by RESTful API with my username and password but the api request doesn't work. I need to understand how to use it please here is my code.</p> <pre><code>NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys: @"tel:0000000000", @"uri",@"EUR",@"currency", nil]; NSDictionary *params1 = [NSDictionary dictionaryWithObjectsAndKeys: params, @"customer", nil]; [[SBAPIManager sharedManager] setUsername:@"username" andPassword:@"password"]; [[SBAPIManager sharedManager] getPath:@"/1.0/sandbox" parameters:params1 success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"%@",responseObject); NSLog(@"Succes"); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { // error stuff here NSLog(@"Error"); }]; </code></pre> <p>the SBAPIManager API url code like below</p> <pre><code>+ (SBAPIManager *)sharedManager { static dispatch_once_t pred; static SBAPIManager *_sharedManager = nil; dispatch_once(&amp;pred, ^{ _sharedManager = [[self alloc] initWithBaseURL:[NSURL URLWithString:@"https://api.hackathon.sla-alacrity.com/"]]; }); // You should probably make this a constant somewhere return _sharedManager; } </code></pre> <p>Any feedback please ?</p> <p>UPDATE</p> <p>error information</p> <p>**</p> <blockquote> <p>Error Domain=com.alamofire.networking.error Code=-1016 "Expected content type {( "text/json", "application/json", "text/javascript" )}, got application/vnd.ms-excel" UserInfo=0x9a96480 {NSErrorFailingURLKey=<a href="https://api.hackathon.sla-alacrity.com/1.0/sandbox?customer%5Buri%5D=tel%3A96590088275&amp;customer%5Bcurrency%5D=EUR" rel="nofollow">https://api.hackathon.sla-alacrity.com/1.0/sandbox?customer%5Buri%5D=tel%3A96590088275&amp;customer%5Bcurrency%5D=EUR</a>, NSLocalizedDescription=Expected content type {( "text/json", "application/json", "text/javascript" )}, got application/vnd.ms-excel}</p> </blockquote> <p>**</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload