CreateBills
Creates max 100 new billsInput Properties
CreateBillsRequest
Bill
Output Properties
CreateBillsResponse
BillResponse
Http Request
POST https://yourcompany-api.exigo.com/3.0/bills HTTP/1.1 Content-Type: application/json Authorization: Basic base64Encoded(yourlogin@yourcompany:yourpassword){ "bills": null }
Http Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length{ "bills": null, "result": null }
Soap Request
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /3.0/ExigoApi.asmx HTTP/1.1 Host: sandboxapi2.exigo.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "https://api.exigo.com/CreateBills" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <ApiAuthentication xmlns="http://api.exigo.com/"> <LoginName>string</LoginName> <Password>string</Password> <Company>string</Company> <Identity>string</Identity> <RequestTimeUtc>dateTime</RequestTimeUtc> <Signature>string</Signature> </ApiAuthentication> </soap:Header> <soap:Body> <CreateBillsRequest xmlns="http://api.exigo.com/"> <Bills> <Bill> <CustomerID>int</CustomerID> <CurrencyCode>string</CurrencyCode> <IsOtherIncome>boolean</IsOtherIncome> <DueDate>dateTime</DueDate> <Amount>decimal</Amount> <Reference>string</Reference> <Notes>string</Notes> <BillStatusTypeID>int</BillStatusTypeID> <PayableTypeIDOverride>int</PayableTypeIDOverride> <CustomerKey>string</CustomerKey> <TaxablePeriodTy>int</TaxablePeriodTy> <TaxablePeriodID>int</TaxablePeriodID> <WarehouseID>int</WarehouseID> </Bill> </Bills> </CreateBillsRequest> </soap:Body> </soap:Envelope>
Soap Response
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <CreateBillsResult xmlns="http://api.exigo.com/"> <Bills> <BillResponse> <BillID>int</BillID> <Errors> <string>string</string> </Errors> </BillResponse> </Bills> </CreateBillsResult> </soap:Body> </soap:Envelope>
C# Rest Client
Install Nuget package Exigo.Api.Client
try
{
//Create Api Client
var api = new ExigoApiClient("yourcmpany", "yourlogin", "yourpassword");
//Create Request
var req = new CreateBillsRequest();
//Add Bills
var bills = new List<Bill>();
var bill1 = new Bill();
bill1.CustomerID = 1;
bill1.CurrencyCode = "1";
bill1.IsOtherIncome = true;
bill1.DueDate = DateTime.Today;
bill1.Amount = 1;
bill1.Reference = "1";
bill1.Notes = "1";
bill1.BillStatusTypeID = 1;
bill1.PayableTypeIDOverride = 1;
bill1.CustomerKey = "1";
bill1.TaxablePeriodTy = 1;
bill1.TaxablePeriodID = 1;
bill1.WarehouseID = 1;
bills.Add(bill1);
var bill2 = new Bill();
bill2.CustomerID = 2;
bill2.CurrencyCode = "2";
bill2.IsOtherIncome = true;
bill2.DueDate = DateTime.Today;
bill2.Amount = 2;
bill2.Reference = "2";
bill2.Notes = "2";
bill2.BillStatusTypeID = 2;
bill2.PayableTypeIDOverride = 2;
bill2.CustomerKey = "2";
bill2.TaxablePeriodTy = 2;
bill2.TaxablePeriodID = 2;
bill2.WarehouseID = 2;
bills.Add(bill2);
//Now attach the list to the request
req.Bills = bills.ToArray();
//Send Request to Server and Get Response
var res = await api.CreateBillsAsync(req);
//Now examine the results:
foreach (var bill in res.Bills)
{
Console.WriteLine("BillID: {0}", bill.BillID);
Console.WriteLine("Errors: {0}", bill.Errors);
Console.WriteLine("CustomerID: {0}", bill.CustomerID);
Console.WriteLine("CurrencyCode: {0}", bill.CurrencyCode);
Console.WriteLine("IsOtherIncome: {0}", bill.IsOtherIncome);
Console.WriteLine("DueDate: {0}", bill.DueDate);
Console.WriteLine("Amount: {0}", bill.Amount);
Console.WriteLine("Reference: {0}", bill.Reference);
Console.WriteLine("Notes: {0}", bill.Notes);
Console.WriteLine("BillStatusTypeID: {0}", bill.BillStatusTypeID);
Console.WriteLine("PayableTypeIDOverride: {0}", bill.PayableTypeIDOverride);
Console.WriteLine("CustomerKey: {0}", bill.CustomerKey);
Console.WriteLine("TaxablePeriodTy: {0}", bill.TaxablePeriodTy);
Console.WriteLine("TaxablePeriodID: {0}", bill.TaxablePeriodID);
Console.WriteLine("WarehouseID: {0}", bill.WarehouseID);
}
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
C# Soap Client
try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.LoginName = "yourLoginName";
auth.Password = "yourPassword";
auth.Company = "yourCompany";
api.ApiAuthenticationValue = auth;
//Create Request
CreateBillsRequest req = new CreateBillsRequest();
//Add Bills
List<Bill> bills = new List<Bill>();
Bill bill1 = new Bill();
bill1.CustomerID = 1;
bill1.CurrencyCode = "1";
bill1.IsOtherIncome = true;
bill1.DueDate = DateTime.Today;
bill1.Amount = 1;
bill1.Reference = "1";
bill1.Notes = "1";
bill1.BillStatusTypeID = 1;
bill1.PayableTypeIDOverride = 1;
bill1.CustomerKey = "1";
bill1.TaxablePeriodTy = 1;
bill1.TaxablePeriodID = 1;
bill1.WarehouseID = 1;
bills.Add(bill1);
Bill bill2 = new Bill();
bill2.CustomerID = 2;
bill2.CurrencyCode = "2";
bill2.IsOtherIncome = true;
bill2.DueDate = DateTime.Today;
bill2.Amount = 2;
bill2.Reference = "2";
bill2.Notes = "2";
bill2.BillStatusTypeID = 2;
bill2.PayableTypeIDOverride = 2;
bill2.CustomerKey = "2";
bill2.TaxablePeriodTy = 2;
bill2.TaxablePeriodID = 2;
bill2.WarehouseID = 2;
bills.Add(bill2);
//Now attach the list to the request
req.Bills = bills.ToArray();
//Send Request to Server and Get Response
CreateBillsResponse res = api.CreateBills(req);
//Now examine the results:
foreach (BillResponse bill in res.Bills)
{
Console.WriteLine("BillID: {0}", bill.BillID);
Console.WriteLine("Errors: {0}", bill.Errors);
Console.WriteLine("CustomerID: {0}", bill.CustomerID);
Console.WriteLine("CurrencyCode: {0}", bill.CurrencyCode);
Console.WriteLine("IsOtherIncome: {0}", bill.IsOtherIncome);
Console.WriteLine("DueDate: {0}", bill.DueDate);
Console.WriteLine("Amount: {0}", bill.Amount);
Console.WriteLine("Reference: {0}", bill.Reference);
Console.WriteLine("Notes: {0}", bill.Notes);
Console.WriteLine("BillStatusTypeID: {0}", bill.BillStatusTypeID);
Console.WriteLine("PayableTypeIDOverride: {0}", bill.PayableTypeIDOverride);
Console.WriteLine("CustomerKey: {0}", bill.CustomerKey);
Console.WriteLine("TaxablePeriodTy: {0}", bill.TaxablePeriodTy);
Console.WriteLine("TaxablePeriodID: {0}", bill.TaxablePeriodID);
Console.WriteLine("WarehouseID: {0}", bill.WarehouseID);
}
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex.Message);
}
VB.Net
Try
'Create Main API Context Object
Dim api as new ExigoApi()
'Create Authentication Header
Dim auth as new ApiAuthentication()
auth.LoginName = "yourLoginName"
auth.Password = "yourPassword"
auth.Company = "yourCompany"
api.ApiAuthenticationValue = auth
'Create Request
Dim req as new CreateBillsRequest()
'Add Bills
Dim bills As New List(Of Bill)()
Dim bill1 as new Bill()
bill1.CustomerID = 1
bill1.CurrencyCode = "1"
bill1.IsOtherIncome = true
bill1.DueDate = DateTime.Today
bill1.Amount = 1
bill1.Reference = "1"
bill1.Notes = "1"
bill1.BillStatusTypeID = 1
bill1.PayableTypeIDOverride = 1
bill1.CustomerKey = "1"
bill1.TaxablePeriodTy = 1
bill1.TaxablePeriodID = 1
bill1.WarehouseID = 1
bills.Add(bill1)
Dim bill2 as new Bill()
bill2.CustomerID = 2
bill2.CurrencyCode = "2"
bill2.IsOtherIncome = true
bill2.DueDate = DateTime.Today
bill2.Amount = 2
bill2.Reference = "2"
bill2.Notes = "2"
bill2.BillStatusTypeID = 2
bill2.PayableTypeIDOverride = 2
bill2.CustomerKey = "2"
bill2.TaxablePeriodTy = 2
bill2.TaxablePeriodID = 2
bill2.WarehouseID = 2
bills.Add(bill2)
'Now attach the list to the request
req.Bills = bills.ToArray()
'Send Request to Server and Get Response
Dim res As CreateBillsResponse = api.CreateBills(req)
'Now examine the results:
For Each bill As BillResponse In res.Bills
Console.WriteLine("BillID: {0}", bill.BillID)
Console.WriteLine("Errors: {0}", bill.Errors)
Console.WriteLine("CustomerID: {0}", bill.CustomerID)
Console.WriteLine("CurrencyCode: {0}", bill.CurrencyCode)
Console.WriteLine("IsOtherIncome: {0}", bill.IsOtherIncome)
Console.WriteLine("DueDate: {0}", bill.DueDate)
Console.WriteLine("Amount: {0}", bill.Amount)
Console.WriteLine("Reference: {0}", bill.Reference)
Console.WriteLine("Notes: {0}", bill.Notes)
Console.WriteLine("BillStatusTypeID: {0}", bill.BillStatusTypeID)
Console.WriteLine("PayableTypeIDOverride: {0}", bill.PayableTypeIDOverride)
Console.WriteLine("CustomerKey: {0}", bill.CustomerKey)
Console.WriteLine("TaxablePeriodTy: {0}", bill.TaxablePeriodTy)
Console.WriteLine("TaxablePeriodID: {0}", bill.TaxablePeriodID)
Console.WriteLine("WarehouseID: {0}", bill.WarehouseID)
Next
Catch ex As Exception
Console.WriteLine("Error: " & ex.Message)
End Try
PHP
Note: PHP is not officially supported.<?php
try
{
//Setup the SoapClient and Authentication
$api = new SoapClient("http://api.exigo.com/3.0/ExigoApi.asmx?WSDL");
$ns = "http://api.exigo.com/";
$auth = array()
$auth["LoginName"] = new SoapVar("yourLoginName",XSD_STRING,null,null,null,$ns);
$auth["Password"] = new SoapVar("yourPassword",XSD_STRING,null,null,null,$ns);
$auth["Company"] = new SoapVar("yourCompany",XSD_STRING,null,null,null,$ns);
$headerBody = new SoapVar($auth, SOAP_ENC_OBJECT);
$header = new SoapHeader($ns, 'ApiAuthentication', $headerBody);
$api->__setSoapHeaders(array($header));
//Create Request
//Add Bills
$bill1->CustomerID = 1;
$bill1->CurrencyCode = "1";
$bill1->IsOtherIncome = 1;
$bill1->DueDate = 1;
$bill1->Amount = 1;
$bill1->Reference = "1";
$bill1->Notes = "1";
$bill1->BillStatusTypeID = 1;
$bill1->PayableTypeIDOverride = 1;
$bill1->CustomerKey = "1";
$bill1->TaxablePeriodTy = 1;
$bill1->TaxablePeriodID = 1;
$bill1->WarehouseID = 1;
$bill2->CustomerID = 2;
$bill2->CurrencyCode = "2";
$bill2->IsOtherIncome = 2;
$bill2->DueDate = 2;
$bill2->Amount = 2;
$bill2->Reference = "2";
$bill2->Notes = "2";
$bill2->BillStatusTypeID = 2;
$bill2->PayableTypeIDOverride = 2;
$bill2->CustomerKey = "2";
$bill2->TaxablePeriodTy = 2;
$bill2->TaxablePeriodID = 2;
$bill2->WarehouseID = 2;
//Now attach the list to the request
req.Bills = array(bill1,bill2);
//Send Request to Server and Get Response
$res = $api.CreateBills($req);
//Now examine the results:
}
catch (SoapFault $ex)
{
echo "Error: ", $ex->getMessage();
}
?>
Java
Note: Java is not officially supported.try
{
//Create Main API Context Object
ExigoApi api = new ExigoApi();
//Create Authentication Header
ApiAuthentication auth = new ApiAuthentication();
auth.setLoginName("yourLoginName");
auth.setPassword("yourPassword");
auth.setCompany("yourCompany");
api.setApiAuthenticationValue(auth);
//Create Request
CreateBillsRequest req = new CreateBillsRequest();
//Add Bills
ArrayOfBill bills = new ArrayOfBill();
Bill bill1 = new Bill();
bill1.setCustomerID(1);
bill1.setCurrencyCode("1");
bill1.setIsOtherIncome(1);
bill1.setDueDate(1);
bill1.setAmount(1);
bill1.setReference("1");
bill1.setNotes("1");
bill1.setBillStatusTypeID(1);
bill1.setPayableTypeIDOverride(1);
bill1.setCustomerKey("1");
bill1.setTaxablePeriodTy(1);
bill1.setTaxablePeriodID(1);
bill1.setWarehouseID(1);
bills.Add(bill1);
Bill bill2 = new Bill();
bill2.setCustomerID(2);
bill2.setCurrencyCode("2");
bill2.setIsOtherIncome(2);
bill2.setDueDate(2);
bill2.setAmount(2);
bill2.setReference("2");
bill2.setNotes("2");
bill2.setBillStatusTypeID(2);
bill2.setPayableTypeIDOverride(2);
bill2.setCustomerKey("2");
bill2.setTaxablePeriodTy(2);
bill2.setTaxablePeriodID(2);
bill2.setWarehouseID(2);
bills.Add(bill2);
//Now attach the list to the request
req.setBills(bills);
//Send Request to Server and Get Response
CreateBillsResponse res = api.getExigoApiSoap().createBills(req, auth);
//Now examine the results:
}
catch (Exception ex)
{
System.out.println("Error: " + ex.getMessage());
}