Search

Page tree
Skip to end of metadata
Go to start of metadata

The interworks.cloud Billing API is designed to enable 3rd party application to apply several billing actions available through interworks.cloud BSS by simple RESTFul calls.

Table of contents


API Responses


Currently Billing API supports JSON format as output and uses standard HTTP status codes to indicate success or failure of API calls.

The following table contains some common HTTP status codes.

 

HTTP Code
Message
Description
200OKThe request was processed and returned successfully. Nothing was changed.
201CreatedThe new resource was created successfully
400Bad RequestProblem with the request, such as a missing, invalid or type mismatched parameter
401UnauthorizedThe request did not have valid authorization credentials
403ForbiddenPrivate data you are not allowed to access, or you've hit a rate limit.
404Not FoundYour URL is wrong, or the requested resource doesn't exist
500Server ErrorWe call this the "crap code" error. Basically we've got a problem on our side. If this persists please contact support. We log and review all errors but your help often helps us fix it quicker.
503Service UnavailableOur API is down. Please try again. We work hard to make this rare.

Authorization / Authentication

Check Authorization & Authentication for Billing and BSS API for details

Pagination / Pagination metadata

Check interworks.cloud Billing API for details

API Methods

All API methods are related to a given organization which should be determined in every call using the appropriate parameter.

Invoices

Get Invoices By Created Date

This API call returns all invoices of an organization for a given creation date.

API Call:

GET: https://<host_name>/api/invoices/?createdDate=<created_date>&sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
created_date
The create date of the invoicestringrequired
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices which were created at 18/01/2016.

GET: https://<host_name>/api/invoices/?createdDate=2016-01-18


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Invoices By Due Date

This API call returns all invoices of an organization for a given due date.

API Call:

GET: https://<host_name>/api/invoices/?dueDate=<due_date>&sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
due_date
The due date of the invoicestringrequired
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices which due at 18/01/2016.

GET: https://<host_name>/api/invoices/?dueDate=2016-01-18


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Invoices Overdue

This API call returns all invoices of an organization which are overdue.

API Call:

GET: https://<host_name>/api/invoices/overdue/?sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices which are overdue.

GET: https://<host_name>/api/invoices/overdue


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Invoices Outstanding

This API call returns all invoices of an organization which are outstanding.

API Call:

GET: https://<host_name>/api/invoices/outstanding/?sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices which are outstanding.

GET: https://<host_name>/api/invoices/outstanding


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Invoices Paid

This API call returns all invoices of an organization which are paid.

API Call:

GET: https://<host_name>/api/invoices/paid/?sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices which are paid.

GET: https://<host_name>/api/invoices/paid


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Invoices By Account Name

This API call returns the invoices for an account name.

API Call:

GET: https://<host_name>/api/invoices/accounts/{accountName}/?sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
accountName
The name of the accountstringrequired
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices of an account name "COMPANY S.A.".

GET: https://<host_name>/api/invoices/accounts/COMPANY S.A.


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Invoices By Product Name

This API call returns the invoices for a product with a given name.

API Call:

GET: https://<host_name>/api/invoices/products/{productName}/?sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
productName
The name of the productstringrequired
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices of a product with name "product test".

GET: https://<host_name>/api/invoices/products/product test


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Invoices By Product Category

This API call returns the invoices for a product with a given category name.

API Call:

GET: https://<host_name>/api/invoices/?productCategory=<product_category>&sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
product_category
The category name of the productstringrequired
column_name
The column name for ordering the results (default: invoiceDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoices of a product category with name "GPS/GNSS".

GET: https://<host_name>/api/invoices/?productCategory=GPS/GNSS


Response:

This API call will return a list of invoices:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Get Items By Invoice Code 

This API call returns the invoice items for a given invoice code.


To get this specific response X-Api-Version header should be 2.1 . For previous versions go here.


API Call:

GET: https://<host_name>/api/invoices/?invoiceCode=<invoice_code>&sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
invoice_code
The code of the invoicestringrequired
column_name
The column name for ordering the results (default: positionInList)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the invoice items of an invoice with code "000628".

GET: https://<host_name>/api/invoices/?invoiceCode=000628


Response:

This API call will return a list of invoice items:

[{
    // Basic information of the invoice item
    "id": "71cfd403-de73-44ce-94cb-eb0262e2fc9c",
    "name": null,
    "position": 1,
    "usage": null,
    "unit": "Month",
    "quantity": 1.0000000000,
    "unitPrice": 0.0000000000,
    "costPrice": 0.0,
    "discount": 10.0000000000,
    "discountType": "Percent",
    "vatPercent": 0.0,
    "finalPrice": 0.0000000000,
    "dueDate": "2016-08-06T00:00:00+03:00",   
    "billingPeriodStart": "2016-07-04T00:00:00-07:00",
    "billingPeriodEnd": "2016-08-03T23:59:00-07:00",

    //Invoice Billing Account information 
    "billingAccount": {
        "id": 152509,
        "name": "BSS439SofOffice2",
        "code": "5418"
    },

    // Promotion information 
    "promotion": {
        "name": null,
        "discount": 0.0,
        "end": "0001-01-01T00:00:00+00:00"
    },

    // Contract information 
    "contract": {
        "name": null,
        "start": "0001-01-01T00:00:00+00:00",
        "end": "0001-01-01T00:00:00+00:00",
        "comments": null
    },

    // Product information grouped (the product is the same in every related subscription, so it appears only here)
    "product": {
        "id": "86577723-f2aa-4dfd-9d63-cf0189436071",
        "code": "azure",
        "name": "MS Azure CheckBillingService"
    },

    // Only for azure items, this collection holds the usage records as they appear in the invoice
    "usageRecords": [{
        "id": "97c8f0f5-66b2-463c-94f0-6f8f4b78ad97",
        "name": "DC2ndSub",
        "position": 3,
        "unit": "Hours",
        "quantity": 39.8333500000,
        "unitPrice": 0.1087857000,
        "costPrice": 0.0,
        "discount": 10.0000000000,
        "discountType": "Percent",
        "vatPercent": 0.0,
        "finalPrice": 0.0979071300,
        "usageStart": "2016-07-08T00:00:00+00:00",
        "usageEnd": "2016-07-11T00:00:00+00:00",
        "comments": null
    }, {
        "id": "af6494d5-4a62-4adf-acf4-f817350e1a45",
        "name": "DC2ndSub",
        "position": 4,
        "unit": "Hours",
        "quantity": 157.9000180000,
        "unitPrice": 0.1087857000,
        "costPrice": 0.0,
        "discount": 10.0000000000,
        "discountType": "Percent",
        "vatPercent": 0.0,
        "finalPrice": 0.0979071300,
        "usageStart": "2016-07-15T00:00:00+00:00",
        "usageEnd": "2016-07-23T00:00:00+00:00",
        "comments": null
    }],

    // Related subscriptions to the invoice item (will include 1 or more subscriptions here, if the line item groups more than one)
    "subscriptions": [{
        "id": "739281817-98b4-413a-9130-1a7444944b13",
        "externalId": null,
        "addonId": "739281817-98b4-413a-9130-1a7444944b13",
        "addonExternalId": null, 
        "name": "SUBSCRIPTION ONE",
        "startDate": "2016-12-01T00:00:00+01:00", // billing period start (line item)
        "endDate": "2016-12-31T23:59:00+01:00", // billing period end
        "activationDate": "2016-10-01T00:00:00+01:00", // from the subscription
        "createdDate": "2016-10-12T23:06:51.59+01:00", // from the subscription
        "status": "Active",
        "quantity": 1, 
        "unit": "Month",
        "isTrial": false,
        "billingOption": "OnSubscriptionStart",
		"description": "",
		"isRenewAutomatically": true,

		 // Invoice item's Account Information
        "account": {
            "id": 52,
            "externalId": "956ab311-4ff5-4a55-82cb-0a64b57d2b89",
            "name": "CUSTOMER ONE",
            "code": null
        }
    }]
}]


Cancel Invoice

This API call cancels an invoice with a given id returns the cancelled invoice.

API Call:

PUT: https://<host_name>/api/invoices/<invoice_id>/cancel


Parameters:

ParameterDescriptionTypeConstraints
invoice_id
The ID for the invoice to be cancelledintegerrequired


Call Examples:

Call example to cancel the invoice with Id ea136fe2-aba2-4c7a-bcb5-59ace5d80c1e.

GET: https://<host_name>/api/invoices/ea136fe2-aba2-4c7a-bcb5-59ace5d80c1e/cancel

Response:

This API call will return the cancelled invoice:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Cancelled",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Mark Invoice As Paid

This API call marks as paid an invoice with a given id and returns the paid invoice.

API Call:

PUT: https://<host_name>/api/invoices/<invoice_id>/markpaid


Parameters:

ParameterDescriptionTypeConstraints
invoice_id
The ID for the invoice to be marked as paidintegerrequired


Call Examples:

Call example to mark as paid the invoice with Id 83fb860c-4229-44b0-9370-9a7a0e294e86.

GET: https://<host_name>/api/invoices/83fb860c-4229-44b0-9370-9a7a0e294e86/markpaid

Response:

This API call will return the paid invoice:

[
   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Paid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
]

Accounts

Get Accounts

This API call returns all available accounts.

API Call:

GET: https://<host_name>/api/accounts/?include=<include_name>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
include_name

The include parameter is used to include extra information about the account.

The only value that is supported right now is customfields. (default: empty string)

stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Example 1 - Without Parameters

Call example to get all accounts without custom fields.

GET: https://<host_name>/api/accounts


Response:

This API call will return all accounts without custom fields:

{
	"data": [{
		"id": 1,
		"name": "tsikEXL352R",
		"code": null,
		"phone": "",
		"fax": "",
		"registrationNumber": "N/A",
		"taxAuthority": "-",
		"businessActivity": "-",
		"enableOrdering": true,
		"email": "tsikEXL352R@test.gr",
		"billToAccountId": null,
		"type": null,
		"industry": null,
		"webSite": "",
		"source": null,
		"tradingName": "-",
		"prorateBillingEnabled": false,
		"prorateBillingDate": null,
		"creditLimit": "Unlimited",
		"partialChargesInvoicing": "0",
		"separateInvoicesEnabled": true,
		"enableReselling": true,
		"description": "",
		"isLead": false,
		"autoInvoiceNotificationEnabled": false,
		"isTaxable": true,
		"paymentMethod": "Net 15",
		"currency": "Euro",
		"currencyCode": "978",
		"addresses": [{
			"id": "f2dd886a-80d3-4a44-b801-d269dd80d208",
			"name": null,
			"address1": null,
			"address2": null,
			"city": null,
			"region": "Alabama",
			"postCode": null,
			"country": "United States",
			"countryCode": "US",
			"state": "Alabama",
			"stateCode": "AL",
			"isBilling": true
		}]
	}, {
		"id": 2,
		"name": "tsikEXL352C",
		"code": null,
		"phone": "",
		"fax": null,
		"registrationNumber": null,
		"taxAuthority": null,
		"businessActivity": null,
		"enableOrdering": true,
		"email": "tsikEXL352C@test.gr",
		"billToAccountId": 1,
		"type": null,
		"industry": null,
		"webSite": null,
		"source": null,
		"tradingName": null,
		"prorateBillingEnabled": false,
		"prorateBillingDate": "",
		"creditLimit": "1500.0000000000",
		"partialChargesInvoicing": "OnOrderDay",
		"separateInvoicesEnabled": true,
		"enableReselling": false,
		"description": null,
		"isLead": false,
		"autoInvoiceNotificationEnabled": false,
		"isTaxable": true,
		"paymentMethod": null,
		"currency": "Euro",
		"currencyCode": "978",
		"addresses": []
	}],
	"paging": {
		"page": 1,
		"size": 25,
		"offset": 0,
		"totalCount": 2,
		"pageCount": 1
	},
	"links": {
		"self": {
			"uri": "http://<host_name>/api/Accounts?page=1&size=25",
			"method": "GET",
			"headers": {
				"x-Api-Version": "1"
			}
		},
		"first": {
			"uri": "http://<host_name>/api/Accounts?page=1&size=25",
			"method": "GET",
			"headers": {
				"x-Api-Version": "1"
			}
		},
		"last": {
			"uri": "http://<host_name>/api/Accounts?page=1&size=25",
			"method": "GET",
			"headers": {
				"x-Api-Version": "1"
			}
		},
		"next": null,
		"previous": null
	}
}

Example 2 - With Parameters

Call example to get all accounts with custom fields.

GET: https://<host_name>/api/accounts/?include=customfields&page=1&size=2


Response:

This API call will return all accounts with custom fields:

{
	"data": [{
		"id": 1,
		"name": "tsikEXL352R",
		"code": null,
		"phone": "",
		"fax": "",
		"registrationNumber": "N/A",
		"taxAuthority": "-",
		"businessActivity": "-",
		"enableOrdering": true,
		"email": "tsikEXL352R@test.gr",
		"billToAccountId": null,
		"type": null,
		"industry": null,
		"webSite": "",
		"source": null,
		"tradingName": "-",
		"prorateBillingEnabled": false,
		"prorateBillingDate": null,
		"creditLimit": "Unlimited",
		"partialChargesInvoicing": "0",
		"separateInvoicesEnabled": true,
		"enableReselling": true,
		"description": "",
		"isLead": false,
		"autoInvoiceNotificationEnabled": false,
		"isTaxable": true,
		"paymentMethod": "Net 15",
		"currency": "Euro",
		"currencyCode": "978",
		"addresses": [{
			"id": "f2dd886a-80d3-4a44-b801-d269dd80d208",
			"name": null,
			"address1": null,
			"address2": null,
			"city": null,
			"region": "Alabama",
			"postCode": null,
			"country": "United States",
			"countryCode": "US",
			"state": "Alabama",
			"stateCode": "AL",
			"isBilling": true
		}],
		"customFields": [{
			"id": 3,
			"name": "test",
			"group": {
				"id": 0,
				"name": "Additional Information"
			},
			"kind": "SimpleValue",
			"dataType": "Text",
			"required": false,
			"decimals": 0,
			"values": {
				"id": "",
				"value": ""
			},
			"readOnly": false,
			"apiField": "apitest"
		}]
	}, {
		"id": 2,
		"name": "tsikEXL352C",
		"code": null,
		"phone": "",
		"fax": null,
		"registrationNumber": null,
		"taxAuthority": null,
		"businessActivity": null,
		"enableOrdering": true,
		"email": "tsikEXL352C@test.gr",
		"billToAccountId": 1,
		"type": null,
		"industry": null,
		"webSite": null,
		"source": null,
		"tradingName": null,
		"prorateBillingEnabled": false,
		"prorateBillingDate": "",
		"creditLimit": "10.0000000000",
		"partialChargesInvoicing": "OnOrderDay",
		"separateInvoicesEnabled": true,
		"enableReselling": false,
		"description": null,
		"isLead": false,
		"autoInvoiceNotificationEnabled": false,
		"isTaxable": true,
		"paymentMethod": null,
		"currency": "Euro",
		"currencyCode": "978",
		"addresses": [],
		"customFields": [{
			"id": 3,
			"name": "test",
			"group": {
				"id": 0,
				"name": "Additional Information"
			},
			"kind": "SimpleValue",
			"dataType": "Text",
			"required": false,
			"decimals": 0,
			"values": {
				"id": "",
				"value": ""
			},
			"readOnly": false,
			"apiField": "apitest"
		}]
	}],
	"paging": {
		"page": 1,
		"size": 2,
		"offset": 0,
		"totalCount": 16,
		"pageCount": 8
	},
	"links": {
		"self": {
			"uri": "http://<host_name>/api/Accounts?include=customfields&page=1&size=2",
			"method": "GET",
			"headers": {
				"x-Api-Version": "1"
			}
		},
		"first": {
			"uri": "http://<host_name>/api/Accounts?include=customfields&page=1&size=2",
			"method": "GET",
			"headers": {
				"x-Api-Version": "1"
			}
		},
		"last": {
			"uri": "http://<host_name>/api/Accounts?include=customfields&page=8&size=2",
			"method": "GET",
			"headers": {
				"x-Api-Version": "1"
			}
		},
		"next": {
			"uri": "http://<host_name>/api/Accounts?include=customfields&page=2&size=2",
			"method": "GET",
			"headers": {
				"x-Api-Version": "1"
			}
		},
		"previous": null
	}
}

Get Account By Id

This API call returns an account by a given Id.

API Call:

GET: https://<host_name>/api/accounts/<account_id>/?include=<include_name>

Parameters:

ParameterDescriptionTypeConstraints
account_id
The ID for the accountintegerrequired
include_name

The include parameter is used to include extra information about the account.

The only value that is supported right now is customfields. (default: empty string)

stringoptional

Call Examples:

Example 1 - Without Optional Parameter

Call example to get information about account with id 4538.

GET: https://<host_name>/api/accounts/4538


Response:

This API call will return account information:

{
	"id": 1,
	"name": "tsikEXL352R",
	"code": null,
	"phone": "",
	"fax": "",
	"registrationNumber": "N/A",
	"taxAuthority": "-",
	"businessActivity": "-",
	"enableOrdering": true,
	"email": "tsikEXL352R@test.gr",
	"billToAccountId": null,
	"type": null,
	"industry": null,
	"webSite": "",
	"source": null,
	"tradingName": "-",
	"prorateBillingEnabled": false,
	"prorateBillingDate": null,
	"creditLimit": "Unlimited",
	"partialChargesInvoicing": "0",
	"separateInvoicesEnabled": true,
	"enableReselling": true,
	"description": "",
	"isLead": false,
	"autoInvoiceNotificationEnabled": false,
	"isTaxable": true,
	"paymentMethod": "Net 15",
	"currency": "Euro",
	"currencyCode": "978",
	"addresses": [{
		"id": "f2dd886a-80d3-4a44-b801-d269dd80d208",
		"name": null,
		"address1": null,
		"address2": null,
		"city": null,
		"region": "Alabama",
		"postCode": null,
		"country": "United States",
		"countryCode": "US",
		"state": "Alabama",
		"stateCode": "AL",
		"isBilling": true
	}]
}

Example 2 - With Optional Parameter

Call example to get information about account with id 4538 with any custom field that are available.

GET: https://<host_name>/api/accounts/4538/?include=customfields


Response:

This API call will return account information:

{
	"id": 1,
	"name": "tsikEXL352R",
	"code": null,
	"phone": "",
	"fax": "",
	"registrationNumber": "N/A",
	"taxAuthority": "-",
	"businessActivity": "-",
	"enableOrdering": true,
	"email": "tsikEXL352R@test.gr",
	"billToAccountId": null,
	"type": null,
	"industry": null,
	"webSite": "",
	"source": null,
	"tradingName": "-",
	"prorateBillingEnabled": false,
	"prorateBillingDate": null,
	"creditLimit": "Unlimited",
	"partialChargesInvoicing": "0",
	"separateInvoicesEnabled": true,
	"enableReselling": true,
	"description": "",
	"isLead": false,
	"autoInvoiceNotificationEnabled": false,
	"isTaxable": true,
	"paymentMethod": "Net 15",
	"currency": "Euro",
	"currencyCode": "978",
	"addresses": [{
		"id": "f2dd886a-80d3-4a44-b801-d269dd80d208",
		"name": null,
		"address1": null,
		"address2": null,
		"city": null,
		"region": "Alabama",
		"postCode": null,
		"country": "United States",
		"countryCode": "US",
		"state": "Alabama",
		"stateCode": "AL",
		"isBilling": true
	}],
	"customFields": [{
		"id": 3,
		"name": "test",
		"group": {
			"id": 0,
			"name": "Additional Information"
		},
		"kind": "SimpleValue",
		"dataType": "Text",
		"required": false,
		"decimals": 0,
		"values": {
			"id": "",
			"value": ""
		},
		"readOnly": false,
		"apiField": "apitest"
	}]
}

Get Account Billing Options

This API call returns the billing options for a given account.

API Call:

GET: https://<host_name>/api/accounts/<account_id>/billingOptions

 

Parameters:

 

ParameterDescriptionTypeConstraints
account_id
The ID for the accountintegerrequired


Call Examples:

Call example to get the billing options for the account with Id 94568.

GET: https://<host_name>/api/accounts/94568/billingOptions


Response:

This API call will return the billing options for the given account:

{
   "id":10,
   "name":"Billing API - Test Account",
   "accountingNo": "BILLAPTSTACC",
   "enableOrdering":true,
   "billToAccountId":0,
   "billToAccountName":null,
   "countryCode":"GR",
   "countryName":"Greece",
   "stateCode":"001",
   "stateName":"Chalkidiki",
   "currency":"Euro",
   "currencyCode":"978",
   "paymentMethod":"Bank Deposit",
   "taxAuthority":"Tax Authority 1",
   "tradingName":"Trading name 1",
   "businessActivity":"Business Activity 1",
   "registrationNumber":null,
   "autoInvoiceNotificationEnabled":false,
   "separateInvoicesEnabled":false,
   "enableReselling":false,
   "isTaxable":true,
   "isNetworkReseller":false,
   "prorateBillingEnabled":true,
   "prorateBillingDate":"FirstOrderDay",
   "creditLimit": "Unlimited",
   "partialChargesInvoicing":"OnOrderDay"
}

Get Account Balance

This API call returns the balance for a given account.

API Call:

GET: https://<host_name>/api/accounts/<account_id>/balance


Parameters:

ParameterDescriptionTypeConstraints
account_id
The ID for the accountintegerrequired


Call Examples:

Call example to get the balance for the account with Id 94568.

GET: https://<host_name>/api/accounts/94568/balance


Response:

This API call will return the balance for the given account:

{
   "id":10,
   "balance":-60.480000000000004,
   "debitInvoicesTotal":84.52,
   "debitInvoicesCount":4,
   "creditInvoicesTotal":0.0,
   "creditInvoicesCount":0,
   "paymentsTotal":145.0,
   "paymentsCount":5,
   "refundsTotal":0.0,
   "refundsCount":0
}


Get Account Billing Information

This API call returns the billing information for a given account.

API Call:

GET: https://<host_name>/api/accounts/<account_id>/billingInfo


Parameters:

ParameterDescriptionTypeConstraints
account_id
The ID for the accountintegerrequired


Call Examples:

Call example to get the billing information for the account with Id 101976.

GET: https://<host_name>/api/accounts/101976/billingInfo


Response:

This API call will return the balance for the given account:

{
   "id":101976,
   "nextInvoiceDate":"2016-10-06T00:00:00+02:00",
   "lastInvoiceDate":"2016-10-03T00:00:00+02:00",
   "dueInvoiceAmount":4631.5000000000,
   "overduePayments":4631.5000000000,
   "balanceAmount":4631.5000000000,
   "annualSubscriptionValue":0.0,
   "monthlyRunRate":7440.000000,
   "activeSubscriptionsCount":62,
   "openCasesCount":0,
   "availableCredit":0.0
}

Get Account Azure Subscriptions Estimated Amount

This API call returns Azure subscriptions estimated amount of a given account.

API Call:

GET: https://<host_name>/api/accounts/{account_code}/azure/subscriptions/estimate?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
account_code
The account codestringrequired
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the Azure subscriptions of the account with code TESTACC.

GET: https://<host_name>/api/accounts/TESTACC/azure/subscriptions/estimate


Response:

This API call will return a list of subscriptions:

[
   {
      "subscriptionId":"9bf3a7d3-145b-4b1e-ab99-0ee861559369",
      "accountId":157200,
      "estimatedAmount":118.3300000000
   }
]

Get Account Custom Fields

This API call returns the custom fields for a given account.

API Call:

GET: https://<host_name>/api/accounts/<account_id>/customFields


Parameters:

ParameterDescriptionTypeConstraints
account_id
The ID for the accountintegerrequired


Call Examples:

Call example to get the billing information for the account with Id 101976.

GET: https://<host_name>/api/accounts/101976/customFields


Response:

This API call will return the balance for the given account:

[
    {
        "id": 60139,
        "name": "MyCustomField",
        "group": {
            "id": 0,
            "name": "Additional Information"
        },
        "kind": "SimpleValue",
        "dataType": "Text",
        "required": false,
        "decimals": 0,
        "values": {
            "id": "",
            "value": ""
        },
        "readOnly": false,
        "apiField": "mycf"
    },
    {
        "id": 60140,
        "name": "MyCustomFieldList",
        "group": {
            "id": 0,
            "name": "Additional Information"
        },
        "kind": "List",
        "dataType": "Text",
        "required": false,
        "decimals": 0,
        "values": {
            "id": "",
            "value": ""
        },
        "readOnly": false,
        "apiField": "mycflist"
    },
    {
        "id": 60141,
        "name": "My Custom Field 1",
        "group": {
            "id": 9816,
            "name": "MyCustomGroup"
        },
        "kind": "ListMultiSelect",
        "dataType": "Text",
        "required": false,
        "decimals": 0,
        "values": {
            "id": "",
            "value": ""
        },
        "readOnly": false,
        "apiField": "mycf1"
    }
]

Update Account

This API call updates the data of a given account.

API Call:

PUT: https://<host_name>/api/accounts/


PUT Parameters:

Required:

ParameterDescriptionType
IdThe Id of the accountinteger
Name
The name of the accountstring

Optional:

ParameterDescriptionType
CodeThe code of the account (accounting no.)string
PhoneThe phone of the accountstring
FaxThe fax of the accountstring
RegistrationNumberThe vat number of the accountstring
TaxAuthorityThe tax authority of the accountstring
BusinessActivity
The BusinessActivity of the accountstring
EnableOrderingIf the account is customerboolean
EmailThe email of the accountstring
BillToAccountId
The id of the account for billinginteger
TypeThe type of the accountstring
IndustryThe industry of the accountstring
WebSiteThe website of the accountstring
SourceThe source of the accountstring
TradingNameThe company name of the accountstring
ProrateBillingEnabledIf prorate billing is enabledboolean
ProrateBillingDateProrate billing date, can be "FirstMonthDay", "LastMonthDay", "FirstOrderDay" or "2-30"string
CreditLimit"Unlimited", 0 or amount of Credit Limitstring
PartialChargesInvoicingIf partial charges are enabled. Can be "OnBillingDay" or "OnOrderDay" .string
SeparateInvoicesEnabledIf multiple invoices generation is enabledboolean
EnableResellingIf the account is light resellerboolean
DescriptionThe description of the accountstring
IsLeadThe flag lead of the accountboolean
AutoInvoiceNotificationEnabledIf automativ invoice notification is enabledboolean
IsTaxableThe flag is taxable of the accountboolean
PaymentMethodThe payment method of the accountstring
CurrencyThe currency of the accountstring
CurrencyCodeThe currency code of the accountstring
AddressThe address of the accountobject
CustomFieldsThe custom fields of the accountobjects array

Address object:

ParameterDescriptionTypeConstraint
IdThe Id of the addressintegeroptional
NameThe name of the addressstringoptional
Address1The first line of the addressstringoptional
Address2The second line of the addressstringoptional
CityThe city of the addressstringoptional
RegionThe region of the addressstringoptional
PostCodeThe postal code of the addressstringoptional
CountryThe country of the addressstringoptional
CountryCodeThe country code of the addressstringoptional
StateThe state of the addressstringoptional
StateCodeThe state code of the addressstringoptional
IsBillingThe flag billing of the addressbooleanoptional

Custom field object:

ParameterDescriptionTypeConstraint
APIFieldThe special name of the fieldstringoptional
ValueThe value of the fieldstringoptional

 

Response:

This API call will return OK (200) if the account was updated successfully.

Create Account

This API call creates an account with the given the data.

API Call:

POST: https://<host_name>/api/accounts/

POST Parameters:

Required:

ParameterDescriptionType
Name
The name of the accountstring

Optional:

ParameterDescriptionType
CodeThe code of the account (accounting no.)string
PhoneThe phone of the accountstring
FaxThe fax of the accountstring
RegistrationNumberThe vat number of the accountstring
TaxAuthorityThe tax authority of the accountstring
BusinessActivity
The BusinessActivity of the accountstring
EnableOrderingIf the account is customerboolean
EmailThe email of the accountstring
BillToAccountId
The id of the account for billinginteger
TypeThe type of the accountstring
IndustryThe industry of the accountstring
WebSiteThe website of the accountstring
SourceThe source of the accountstring
TradingNameThe company name of the accountstring
ProrateBillingEnabledIf prorate billing is enabledboolean
ProrateBillingDateProrate billing date, can be "FirstMonthDay", "LastMonthDay", "FirstOrderDay" or "2-30"string
CreditLimit"Unlimited", 0 or amount of Credit Limitstring
PartialChargesInvoicingIf partial charges are enabled. Can be "OnBillingDay" or "OnOrderDay" .string
SeparateInvoicesEnabledIf multiple invoices generation is enabledboolean
EnableResellingIf the account is light resellerboolean
DescriptionThe description of the accountstring
IsLeadThe flag lead of the accountboolean
AutoInvoiceNotificationEnabledIf automativ invoice notification is enabledboolean
IsTaxableThe flag is taxable of the accountboolean
PaymentMethodThe payment method of the accountstring
CurrencyThe currency of the accountstring
CurrencyCodeThe currency code of the accountstring
AddressThe address of the accountstructure
CustomFieldsThe custom fields of the accountarray

Address structure:

ParameterDescriptionTypeConstraint
IdThe Id of the addressintegeroptional
NameThe name of the addressstringoptional
Address1The first line of the addressstringoptional
Address2The second line of the addressstringoptional
CityThe city of the addressstringoptional
RegionThe region of the addressstringoptional
PostCodeThe postal code of the addressstringoptional
CountryThe country of the addressstringoptional
CountryCodeThe country code of the addressstringoptional
StateThe state of the addressstringoptional
StateCodeThe state code of the addressstringoptional
IsBillingThe flag billing of the addressbooleanoptional

Address structure:

Custom field structure:

ParameterDescriptionTypeConstraint
APIFieldThe special name of the fieldstringoptional
ValueThe value of the fieldstringoptional

 Response:

This API call will return 200 if the account was created successfully, the account id is returned as well.

Generate Invoices by Account Name

This API generates all invoices for a given account name.

API Call:

GET: https://<host_name>/api/accounts/{accountName}/invoices/generate


Parameters:

ParameterDescriptionTypeConstraints
accountName
The name of the account for generating the invoicesstringrequired


Call Examples:

Call example to generate the invoices for an account name "Company Name". 

GET: https://<host_name>/api/accounts/Company Name/invoices/generate

Response:

This API call will return OK (200) if the invoices were generated successfully.

Save Account Synchronization Options

This API call sets the synchronization options of a given account for specific external system.

API Call:

POST:https://<host_name>/api/accounts/{account_id}/syncoptions/

Parameters

ParameterDescriptionTypeConstraints
accountIdthe id of the account to set synchronization optionsintrequired
SystemCodethe code of the external system (e.g. OSS, WSP)stringrequired
SystemNamethe name of the external systemstringrequired
CustomFieldsthe list of custom fieldsList<CustomField>required

Custom Field

Parameters

ParameterDescriptionTypeConstraints
APIFieldThe special name of the fieldstringrequired
ValueThe value of the fieldstringrequired

Response:

This API call will return status OK if the synchronization options of the specific account were saved successfully.

Get Account External Id

This API call gets the id of the external value

API Call:

GET: https://<host_name>/api/accounts/<account_id>/externalSystemName/<external_system_name>

Parameters

ParameterDescriptionTypeConstraints
accountIdthe id of the account related to the external systemintrequired
externalSystemNamethe name of the external systemstringrequired

Call Examples:

Call example to get the id of the external system value:

GET: https://<host_name>/api/accounts/2716/externalSystemName/WebSitePanel

 

 

Set Account External Id

This API call sets the data to external system

API Call:

POST:https://<host_name>/api/accounts/<account_id>/externalsystem/

Parameters

ParameterDescriptionTypeConstraints
accountIdthe id of the account related to the external systemintrequired
systemNameexternal system namestringrequired
externalIdthe id to the external systemstringrequired

Response:

This API call will return OK (200) if the data saved successfully to the external system.

Payments

Get Payments By Account Name

This API call returns the payments for an account name.

API Call:

GET: https://<host_name>/api/payments/accounts/{accountName}/?sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
accountName
The name of the accountstringrequired
column_name
The column name for ordering the results (default: paymentDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the payments of an account name "Popey".

GET: https://<host_name>/api/payments/accounts/Popey/


Response:

This API call will return a list of payments:

[
   {
      "id":"2332ce4b-5882-4495-ac75-35ab9c2a3d5a",
      "code":null,
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "type":"Cash",
      "date":"2016-01-14T00:00:00+02:00",
      "amount":99.0000000000,
      "transactionFee":0.9900000000,
      "chequeNo":null,
      "chequePayTo":null,
      "chequeBank":null,
      "paymentGateway":null,
      "creditCardId":null,
      "transactionId":"tID",
      "status":"Completed",
      "transactionStatus":2,
      "transactionComments":null,
      "comments":"",
      "createdDate":"2016-01-14T15:45:14.04+00:00",
      "updatedDate":"2016-01-14T15:45:14.04+00:00"
   }
]


Get Payments By Payment Type

This API call returns the payments for a payment type.

API Call:

GET: https://<host_name>/api/payments/?paymentType=<payment_type>&sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
payment_type
The payment type of the payment (e.g. Cash)stringrequired
column_name
The column name for ordering the results (default: paymentDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the payments of a payment type "cash"

.

GET: https://<host_name>/api/payments/?paymentType=Cash


Response:

This API call will return a list of payments:

[
   {
      "id":"2332ce4b-5882-4495-ac75-35ab9c2a3d5a",
      "code":null,
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "type":"Cash",
      "date":"2016-01-14T00:00:00+02:00",
      "amount":99.0000000000,
      "transactionFee":0.9900000000,
      "chequeNo":null,
      "chequePayTo":null,
      "chequeBank":null,
      "paymentGateway":null,
      "creditCardId":null,
      "transactionId":"tID",
      "status":"Completed",
      "transactionStatus":2,
      "transactionComments":null,
      "comments":"",
      "createdDate":"2016-01-14T15:45:14.04+00:00",
      "updatedDate":"2016-01-14T15:45:14.04+00:00"
   }
]

 

Get Payments By Create Date

This API call returns the payments for a given create date.

API Call:

GET: https://<host_name>/api/payments/?createdDate=<created_date>&sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
created_date
The create date of the paymentstringrequired
column_name
The column name for ordering the results (default: paymentDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the payments which were created at 14/01/2016.

GET: https://<host_name>/api/payments/?createdDate=2016-01-14


Response:

This API call will return a list of payments:

[
   {
      "id":"2332ce4b-5882-4495-ac75-35ab9c2a3d5a",
      "code":null,
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "type":"Cash",
      "date":"2016-01-14T00:00:00+02:00",
      "amount":99.0000000000,
      "transactionFee":0.9900000000,
      "chequeNo":null,
      "chequePayTo":null,
      "chequeBank":null,
      "paymentGateway":null,
      "creditCardId":null,
      "transactionId":"tID",
      "status":"Completed",
      "transactionStatus":2,
      "transactionComments":null,
      "comments":"",
      "createdDate":"2016-01-14T15:45:14.04+00:00",
      "updatedDate":"2016-01-14T15:45:14.04+00:00"
   }
]


Get Payments By Status

This API call returns the payments for a given status.

API Call:

GET: https://<host_name>/api/payments/status/<status>?sort=<column_name>&order=<order_direction>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
status
The status of the payment (canceled or l, pending or p and completed or c)stringrequired
column_name
The column name for ordering the results (default: paymentDate)stringoptional
order_direction
The order direction for the ordered results (asc,desc, dafault: asc)stringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the payments which have status "completed".

GET: https://<host_name>/api/payments/status/completed


Response:

This API call will return a list of payments:

[
   {
      "id":"2332ce4b-5882-4495-ac75-35ab9c2a3d5a",
      "code":null,
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "type":"Cash",
      "date":"2016-01-14T00:00:00+02:00",
      "amount":99.0000000000,
      "transactionFee":0.9900000000,
      "chequeNo":null,
      "chequePayTo":null,
      "chequeBank":null,
      "paymentGateway":null,
      "creditCardId":null,
      "transactionId":"tID",
      "status":"Completed",
      "transactionStatus":2,
      "transactionComments":null,
      "comments":"",
      "createdDate":"2016-01-14T15:45:14.04+00:00",
      "updatedDate":"2016-01-14T15:45:14.04+00:00"
   }
]

Add Payment

This API call adds a payment with the given data.

API Call:

POST: https://<host_name>/api/payments/add

POST Parameters:

Required:

ParameterDescriptionType
AccountIdThe Id of the accountstring
InvoiceIdThe invoice id of the paymentstring
PaymentMethod
The method of the paymentstring
PaymentDateThe date of the paymentstring
DueDateThe due date of the paymentstring
AmountThe amount of the paymentstring
TransactionFeeThe transaction fee of the paymentstring
ChequeNoThe cheque number of the paymentstring
ChequePayToThe pay to of the paymentstring
ChequeBankThe bank name of the paymentstring
TransactionIdThe transaction ID of the paymentstring
ResponsibleUserThe responsible user of the paymentstring
CommentsThe comments of the paymentstring

 Response:

This API call will return OK (200) if the payment was added successfully.

 

Batch Import of Payments

This API call adds a set of payments with the given data.

API Call:

POST: https://<host_name>/api/payments/import

POST Parameters:

A collection of payments with the following structure: 

Required:

ParameterDescriptionType
AccountIdThe Id of the accountstring
InvoiceIdThe invoice id of the paymentstring
PaymentMethod
The method of the paymentstring
PaymentDateThe date of the paymentstring
DueDateThe due date of the paymentstring
AmountThe amount of the paymentstring
TransactionFeeThe transaction fee of the paymentstring
ChequeNoThe cheque number of the paymentstring
ChequePayToThe pay to of the paymentstring
ChequeBankThe bank name of the paymentstring
TransactionIdThe transaction ID of the paymentstring
ResponsibleUserThe responsible user of the paymentstring
CommentsThe comments of the paymentstring

 

 Response:

This API call will return OK (200) if the payments were imported successfully or a <list of failed payments> if one or more of the payments fails, the response is a collection with the failed payments.

Contacts

Create Contact

This API call creates a new contact

API Call:

POST: https://<host_name>/api/contacts/

POST Parameters:

Required:

ParameterDescriptionType
LastNamecontact's last namestring
Emailcontact's emailstring

Optional:

ParameterDescriptionType
AccountIdrelated account idint
FirstNamecontact's first namestring
Phonecontact's phonestring
MobilePhonecontact's mobile phonestring
IsPrimarycontact is account's primary contactbool
IsBillToset contact to be the billing entitybool
IsStorefrontUserenable storefront access for contactbool
Passwordset storefront user password. Random generation triggered while empty.string
Languageset storefront user language (e.g. EN, GR)string
DateFormatset storefront user date format(e.g. mm/dd/yyyystring

Response:

This API call will return 200 if the contact was created successfully, the contact id is returned as well.


Update Contact

This API call updates an existing contact

API Call:

PUT: https://<host_name>/api/contacts/

PUT Parameters:

Required:

ParameterDescriptionType
ContactIdID of the contactint
LastNamecontact's last namestring
Emailcontact's emailstring

Optional:

ParameterDescriptionType
AccountIdrelated account idint
FirstNamecontact's first namestring
Phonecontact's phonestring
MobilePhonecontact's mobile phonestring
IsPrimarycontact is account's primary contactbool
IsBillToset contact to be the billing entitybool
IsStorefrontUserenable storefront access for contactbool
Passwordset storefront user password. Random generation triggered while empty.string
Languageset storefront user language (e.g. EN, GR)string
DateFormatset storefront user date format(e.g. mm/dd/yyyystring

Response:

This API call will return 200 if the contact was updated successfully, the contact id is returned as well.

Subscriptions

Create Subscription

This API call creates a new subscription

API Call:

POST: https://<host_name>/api/subscriptions/

POST Parameters

Required:

ParameterDescriptionType
StartDatestart date of subscriptionDateTimeOffset
Accountaccount idobject
BillingAccountbilling account idobject
Quantityproduct quantityinteger
ProductIdsubscription's productGuid


Optional:

ParameterDescriptionType
Namesubscription namestring
EffectiveDateeffective date of subscriptionsDateTimeOffset
Stagesubscription statusLeaseStage
AutoRenewsubscription is autorenewbool
IsTrialtrial subscription.bool
ContactIdcontact idint
ExpirationNoticeexpiration notice date of the subscriptionint
BillingOptionbilling option of the subscription. True On Subscription Start and false On Subscription Endbool
Unitproduct unit idstring
DataMigrationprevent provisioningbool

Add Addon To Subscription

This API call adds addon to existing subscription

API Call:

POST: https://<host_name>/api/<subscriptionId>/addon

POST Parameters:

Required:

ParameterDescriptionType
SubscriptionIdThe id of the subscription to add addonstring
AddonIdThe id of the addonstring
SignupDateactivation datestring
Quantityaddon quantityint
Unitaddon unit name (e.g. "Month")string

Response:

This API call will return 200 if the addon was added successfully to the subscription provided.

Get Azure Subscription Usage Records

This API call returns the usage records of a given Azure subscription.

API Call:

GET: https://<host_name>/api/subscriptions/{subscription_id}/azureusagerecords?startDate=<start_date>&endDate=<end_date>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
subscription_id
The unique ID of the subscriptionstringrequired
start_date
Start date of the period for the usage recordsdaterequired
end_date
End date of the period for the usage recordsdaterequired
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Examples:

Call example to get all the usage records for the subscription id between 01/01/2016 and 31/01/2016.

GET: https://<host_name>/api/subscriptions/9bf3a7d3-145b-4b1e-ab99-0ee861559369/azureusagerecords?startDate=2016-01-09&endDate=2016-01-31


Response:

This API call will return a list of subscription's usage records:

[
   {
      "meterName":"movedandnewdiag530 - Standard IO - Block Blob Write Operation Units (in 10,000s)",
      "meterCategory":"Data Management",
      "meterSubCategory":"",
      "meterRegion":"",
      "unit":"10,000s",
      "resourceGroup":"MOVEDANDNEW",
      "totalQuantity":0.7373000000,
      "resourceName":"movedandnewdiag530"
   }
]

Get Subscriptions By Status

This API call returns the subscriptions of a given status and optionally of an account with a given Id.

This API call is not supported in previous versions

API Call:

GET: https://<host_name>/api/subscriptions/?status=<status>&accountId=<account_id>&include=<include_name>&page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraint
statusThe status of the subscription (valid values: active, inactive, suspended, cancelled, pendingCancellation). More than one values may be passed, comma separated.stringrequired
accountIdThe subscription account Id (default: 0)intoptional
include

The include parameter is used to include extra information about the subscription.

The only value that is supported right now is addons. (default: empty string)

stringoptional
pageThe number of the page to be displayed (default: 1)intoptional
sizeThe number of items per page (default: 25)intoptional

Call Example:

Call example to get all the subscriptions with status 'active' or 'suspended' for account with accountId=171155, including subscription's addons.

GET: https://<host_name>/api/subscriptions/?status=active,suspended&accountId=171155&include=addons

Response:

This API call will return 200 if subscriptions were found, with a list of subscriptions as well:

[  
   {  
      "id":"a0aa4060-2f14-4bed-93b4-78a93438b983",
      "externalId":"/c330bfe0-c146-44ca-9321-91c4354b5b4b/subscriptions/2def95a2-9b03-46ea-9214-76c9ade5d660",
      "name":"QADimiP4 - MS Office Business Essentials",
      "startDate":"2017-02-07T00:00:00+02:00",
      "endDate":"2017-02-28T23:59:00+02:00",
      "activationDate":"2017-02-07T00:00:00+02:00",
      "createdDate":"2017-02-07T14:54:16.223+02:00",
      "status":"Ολοκληρωμένη",
      "quantity":1,
      "unit":"Month",
      "isTrial":false,
      "billingOption":"OnSubscriptionStart",
      "description":"",
      "isRenewAutomatically":true,
      "account":{  
         "id":171155,
         "externalId":"2494f156-49e0-41ef-bb4a-db87d0c40cc5",
         "name":"QADimiP4",
         "code":null
      },
      "billingAccount":{  },
      "contact":{  },
      "product":{  
         "id":"940407a2-3560-45d3-944e-d4ddc632825c",
         "code":"0365",
         "name":"MS Office Business Essentials"
      },
      "addons":[  
         {  
            "subscriptionId":"a0aa4060-2f14-4bed-93b4-78a93438b983",
            "id":"0bf32d80-926b-461a-aa09-24665d6692fa",
            "externalId":"/c330bfe0-c146-44ca-9321-91c4354b5b4b/subscriptions/f2cba469-1d2b-4e6e-b25c-ff5df357b7ad",
            "activationDate":"2017-02-07T00:00:00+02:00",
            "quantity":1,
            "unit":"Month",
            "isActive":true,
            "comments":"",
            "product":{  
               "id":"db7530fb-2012-4300-b9db-1d4d55d965d6",
               "code":"ExchangeAddon001",
               "name":"Exchange Addon 1"
            }
         }
      ]
   }
]

Get Active Addons By Subscription Id


This API call returns the active addons of a subscription with given subscription id.

API Call:

GET: https://<host_name>/api/subscriptions/{subscription_id}/addons/?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraint
subscriptionIdThe subscription Idguidrequired
pageThe number of the page to be displayed (default: 1)intoptional
sizeThe number of items per page (default: 25)intoptional

Call Example:

Call example to get the active addons for the subscription with subscriptionId=a0aa4060-2f14-4bed-93b4-78a93438b983.

GET: https://<host_name>/api/subscriptions/a0aa4060-2f14-4bed-93b4-78a93438b983/addons/

Response:

This API call will return 200 if addons were found, with a list of addons as well:

[  
   {  
      "subscriptionId":"a0aa4060-2f14-4bed-93b4-78a93438b983",
      "id":"0bf32d80-926b-461a-aa09-24665d6692fa",
      "externalId":"/c330bfe0-c146-44ca-9321-91c4354b5b4b/subscriptions/f2cba469-1d2b-4e6e-b25c-ff5df357b7ad",
      "activationDate":"2017-02-07T00:00:00+02:00",
      "quantity":1,
      "unit":"Month",
      "isActive":true,
      "comments":"",
      "product":{  
         "id":"db7530fb-2012-4300-b9db-1d4d55d965d6",
         "code":"ExchangeAddon001",
         "name":"Exchange Addon 1"
      }
   }
]

Product

Get Product By Product Name

This API call returns a product by name

API Call:

GET:https://<host_name>/api/products/<product_name>

Parameters:

ParameterDescriptionType
productNamethe name of the productstring

Response:

This API call will return 200 if the product was found, the product is returned as well.

Call Example:

GET:https://<host_name>/api/products/BSS1192 - Main Product


Orders

Get Order Details by Order Code

This API call returns the details of an order by the order code

API Call:

GET:https://<host_name>/api/orders/<order_code>

Parameters

ParameterDescriptionTypeConstraints
orderCodethe order codestringrequired

Call Example:

Call example to get the order with code 002304

GET: https://<host_name>/api/orders/002304

Response:

This API call will return the details of the order:

{
  "id": "3c9457d7-e4bb-494e-af8a-5ebdc695081e",
  "name": "Dama - 002304",
  "code": "002304",
  "status": "Υπεβληθη μεσω Storefront",
  "paymentMethod": "Cash",
  "orderDate": "2016-03-02T00:00:00+02:00",
  "deliveryDate": null,
  "totalPrice": 22.0000000000,
  "accountId": 147426,
  "accountName": "Dama",
  "billingAccountId": 147426,
  "billingAccountName": "Dama",
  "contactId": 0,
  "contactName": null,
  "shippingMethod": null,
  "pricelistId": 0,
  "pricelistName": null,
  "contractId": 0,
  "contractName": null,
  "campaignId": 0,
  "campaigntName": null,
  "createdDate": "2016-03-02T14:41:41.217+00:00",
  "lastUpdatedDate": "2016-03-02T14:41:42.177+00:00",
  "createdUserId": 5244,
  "lastUpdatedUserId": 5244,
  "responsibleUserId": 5244,
  "responsiblesUser": "Morocco Morocco",
  "salesUserId": 5244,
  "salesUser": "Morocco Morocco",
  "parentId": null,
  "isInvoiced": true,
  "discount": 0.0000000000,
  "discountType": "Percent"
}

 

Get Order Items by Order Code

This API call returns the items of an order by order code

API Call:

GET:https://<host_name>/api/orders/<order_code>/OrderItems

Parameters:

ParameterDescriptionTypeConstraints
orderCodethe order codestringrequired

Call Example:

GET:https://<host_name>/api/orders/002304/OrderItems

Response:

This API call will returns the items of the order with code 002304

 

[
  {
    "id": "8e54e9b8-0863-4842-abef-66fddb39c8f8",
    "orderId": "3c9457d7-e4bb-494e-af8a-5ebdc695081e",
    "productId": "5ce75335-636d-409a-93e6-508826837b23",
    "position": 1,
    "price": 10.0000000000,
    "discount": 0.0000000000,
    "discountType": "Percent",
    "finalPrice": 10.0000000000,
	"basePrice":10.0000000000,
    "unitId": "eb0ab5a1-9da0-4586-86bb-16b236b43cc8",
    "unitName": "Μηνας",
    "description": "Copy Of : TotalTrialTest",
    "quantity": 1,
    "unitOfMeasure": null,
    "pricelistId": 0,
    "pricelistName": null,
    "contractId": 0,
    "contractName": null,
    "tax": null,
    "promotionId": null,
    "promotionName": null,
    "promotionDiscount": 0.0,
    "promotionDiscountType": "Amount",
    "discountListId": 0,
    "createdUserId": 5244,
    "lastUpdatedUserId": 5244,
    "parentId": null,
    "leaseId": "92ce5347-2ec2-431e-8c8e-82aa0a82cde0",
    "relatedItemId": null,
    "itemType": "TRIAL",
    "billingOption": "OnSubscriptionStart",
    "isUserPrice": false,
    "isInvoiced": true,
    "comments": null
  },
  {
    "id": "048a89d2-fe27-416b-a646-17421915a4c0",
    "orderId": "3c9457d7-e4bb-494e-af8a-5ebdc695081e",
    "productId": "5ce75335-636d-409a-93e6-508826837b23",
    "position": 2,
    "price": 10.0000000000,
    "discount": 0.0,
    "discountType": "Percent",
    "finalPrice": 10.0000000000,
	"basePrice": 10.0000000000,
    "unitId": "6b1d68ba-b1f8-417a-84c8-1055ccd45d6b",
    "unitName": "SetupFee",
    "description": "Copy Of : TotalTrialTest",
    "quantity": 1,
    "unitOfMeasure": null,
    "pricelistId": 0,
    "pricelistName": null,
    "contractId": 0,
    "contractName": null,
    "tax": null,
    "promotionId": null,
    "promotionName": null,
    "promotionDiscount": 0.0,
    "promotionDiscountType": "Amount",
    "discountListId": 0,
    "createdUserId": 5244,
    "lastUpdatedUserId": 5244,
    "parentId": null,
    "leaseId": null,
    "relatedItemId": "8e54e9b8-0863-4842-abef-66fddb39c8f8",
    "itemType": "SETUP FEE",
    "billingOption": "OnSubscriptionStart",
    "isUserPrice": false,
    "isInvoiced": true,
    "comments": null
  }
]


System

Get Invoice Types

This API call returns the invoice types

API Call:

GET:https://<host_name>/api/system/invoiceTypes?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:

GET: https://<host_name>/api/system/invoiceTypes

Response:

[
    {
        "id": 8481,
        "name": "Credit",
        "type": "Credit Invoice",
        "active": true,
        "default": false
    },
    {
        "id": 8482,
        "name": "Debit",
        "type": "Debit Invoice",
        "active": true,
        "default": false
    }
]


Get Invoice Statuses

This API call returns the invoice statuses

API Call:

GET:https://<host_name>/api/system/invoiceStatuses?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:

GET: https://<host_name>/api/system/invoiceStatuses

Response:

[
    {
        "id": 12638,
        "name": "Paid",
        "type": "Paid",
        "active": true,
        "default": false
    },
    {
        "id": 12639,
        "name": "Cancelled",
        "type": "Canceled",
        "active": true,
        "default": false
    },
    {
        "id": 12640,
        "name": "Unpaid",
        "type": "Unpaid",
        "active": true,
        "default": false
    }
]


Get System Countries

This API call returns the system countries

API Call:

GET:https://<host_name>/api/system/countries?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:

GET: https://<host_name>/api/system/countries

Response:

[
 {
 "id": 1,
 "code": "AD",
 "name": "Andorra"
 },
 {
 "id": 2,
 "code": "AE",
 "name": "United Arab Emirates"
 },
 {
 "id": 3,
 "code": "AF",
 "name": "Afghanistan"
 },
 {
 "id": 4,
 "code": "AG",
 "name": "Antigua and Barbuda"
 },
 {
 "id": 5,
 "code": "AI",
 "name": "Anguilla"
 }...
]

Get System Country States

This API call returns the system country states

API Call:

GET:https://<host_name>/api/system/countryStates?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional


Call Example:

GET: https://<host_name>/api/system/countryStates

Response:

[
    {
        "id": 70,
        "countryId": 88,
        "code": "",
        "name": "Aetolia-Acarnania"
    },
    {
        "id": 71,
        "countryId": 88,
        "code": "",
        "name": "Larissa"
    },
    {
        "id": 72,
        "countryId": 88,
        "code": "",
        "name": "Ioannina"
    },
    {
        "id": 73,
        "countryId": 88,
        "code": "",
        "name": "Phthiotis"
    }
...
]


Organization

Get Organization Countries

This API call returns the available organization countries.

API Call:

GET:https://<host_name>/api/organization/countries?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional


Call Example:

GET: https://<host_name>/api/organization/countries

Response:

[
  {
    "active": true,
    "default": true,
    "position": 1,
    "id": 32,
    "code": "BS",
    "name": "Bahamas"
  },
  {
    "active": true,
    "default": false,
    "position": 3,
    "id": 76,
    "code": "GB",
    "name": "United Kingdom"
  },
  {
    "active": true,
    "default": false,
    "position": 2,
    "id": 88,
    "code": "GR",
    "name": "Greece"
  },
  {
    "active": true,
    "default": false,
    "position": 4,
    "id": 230,
    "code": "US",
    "name": "United States"
  }
]

Get Organization Country States

This API call returns the available organization country States.

API Call:

GET:https://<host_name>/api/organization/countryStates?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional


Call Example:

GET: https://<host_name>/api/organization/countryStates

Response:

[
 {
 "active": true,
 "position": 1,
 "id": 167755,
 "countryId": 0,
 "code": "",
 "name": "Achaea"
 },
 {
 "active": true,
 "position": 2,
 "id": 167756,
 "countryId": 0,
 "code": "",
 "name": "Aetolia-Acarnania"
 }...
]

Get Organization Taxes

This API call returns the available organization taxes.

API Call:

GET:https://<host_name>/api/organization/taxes?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:

Call Example:

GET: https://<host_name>/api/organization/taxes

Response:

[
    {
        "id": 13515,
        "name": "ForALL",
        "displayName": null,
        "active": true,
        "excludeEU": false
    },
    {
        "id": 13520,
        "name": "ForAll2",
        "displayName": null,
        "active": true,
        "excludeEU": false
    },
    {
        "id": 13522,
        "name": "Tax3",
        "displayName": null,
        "active": true,
        "excludeEU": false
    },
    {
        "id": 13523,
        "name": "Tax4",
        "displayName": null,
        "active": true,
        "excludeEU": false
    }
]


Get Organization Tax Rules


This API call returns the available organization tax rules for a given tax.


API Call:

GET:https://<host_name>/api/organization/taxes/<tax_id>/rules?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
taxIdthe id of the taxintegerrequired
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:


GET: https://<host_name>/api/organization/taxes/13523/rules


Response:


[
    {
        "id": 12245,
        "rate": 55.5555,
        "tax": {
            "id": 13523,
            "name": "Tax4",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [],
        "productTypes": []
    },
    {
        "id": 12246,
        "rate": 50,
        "tax": {
            "id": 13523,
            "name": "Tax4",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": null
            },
            {
                "country": {
                    "id": 230,
                    "code": "US",
                    "name": "United States"
                },
                "state": null
            }
        ],
        "productTypes": [
            {
                "productType": {
                    "id": "80b08a2a-920b-482a-bc00-a19396594559",
                    "name": "Cloud Databases"
                }
            },
            {
                "productType": {
                    "id": "38d5b02f-0ed4-4274-ac80-74a656e42a6b",
                    "name": "DNS"
                }
            }
        ]
    },
    {
        "id": 12247,
        "rate": 9,
        "tax": {
            "id": 13523,
            "name": "Tax4",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": {
                    "id": 167755,
                    "countryId": 88,
                    "code": "",
                    "name": "Achaea"
                }
            },
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": {
                    "id": 167762,
                    "countryId": 88,
                    "code": "",
                    "name": "Chalkidiki"
                }
            },
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": {
                    "id": 167763,
                    "countryId": 88,
                    "code": "",
                    "name": "Chania"
                }
            }
        ],
        "productTypes": []
    }
]

Get Organization Tax Rules By Country, State and/or Product Type

This API call returns the available organization tax rules filtered by country, state and/or product type.

API Call:

GET:https://<host_name>/api/organization/taxRules?country=<country_code>&state=<state_name>&productTypeId=<product_type_id>&page=<page_number>&size=<page_size>



Parameters:

At least one of the following parameters should be provided in the API call URL in order to get results.

ParameterDescriptionTypeConstraints
countryCodethe code of the countrystringoptional
stateNamethe name of the country statestringoptional
productTypeIdthe id of the product typestringoptional
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:

GET: https://<host_name>/api/organization/taxRules?country=gr

Response:

[
    {
        "id": 12237,
        "rate": 10,
        "tax": {
            "id": 13515,
            "name": "ForALL",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [],
        "productTypes": []
    },
    {
        "id": 12242,
        "rate": 5,
        "tax": {
            "id": 13520,
            "name": "ForAll2",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [],
        "productTypes": []
    },
    {
        "id": 12244,
        "rate": 20.555,
        "tax": {
            "id": 13522,
            "name": "Tax3",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": null
            }
        ],
        "productTypes": []
    },
    {
        "id": 12245,
        "rate": 55.5555,
        "tax": {
            "id": 13523,
            "name": "Tax4",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [],
        "productTypes": []
    },
    {
        "id": 12246,
        "rate": 50,
        "tax": {
            "id": 13523,
            "name": "Tax4",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": null
            },
            {
                "country": {
                    "id": 230,
                    "code": "US",
                    "name": "United States"
                },
                "state": null
            }
        ],
        "productTypes": [
            {
                "productType": {
                    "id": "80b08a2a-920b-482a-bc00-a19396594559",
                    "name": "Cloud Databases"
                }
            },
            {
                "productType": {
                    "id": "38d5b02f-0ed4-4274-ac80-74a656e42a6b",
                    "name": "DNS"
                }
            }
        ]
    },
    {
        "id": 12247,
        "rate": 9,
        "tax": {
            "id": 13523,
            "name": "Tax4",
            "displayName": null,
            "active": true,
            "excludeEU": false
        },
        "regions": [
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": {
                    "id": 167755,
                    "countryId": 88,
                    "code": "",
                    "name": "Achaea"
                }
            },
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": {
                    "id": 167762,
                    "countryId": 88,
                    "code": "",
                    "name": "Chalkidiki"
                }
            },
            {
                "country": {
                    "id": 88,
                    "code": "GR",
                    "name": "Greece"
                },
                "state": {
                    "id": 167763,
                    "countryId": 88,
                    "code": "",
                    "name": "Chania"
                }
            }
        ],
        "productTypes": []
    }
]

Get Organization Payment Methods

This API call returns the available organization payment methods.

API Call:

GET:https://<host_name>/api/organization/paymentMethods?page=<page_number>&size=<page_size>



Parameters:


ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional


Call Example:

GET: https://<host_name>/api/organization/paymentMethods

Response:

[
    {
        "id": "86adfdf1-8b5d-4ceb-aebb-a070d2073f2f",
        "name": "Cash",
        "position": 1,
        "type": "Check",
        "active": true,
        "default": false,
        "erpName": null,
        "payDays": 0,
        "gateway": null
    },
    {
        "id": "5f4043f5-b21c-424a-b4d3-ac848b6e4134",
        "name": "Credit Card",
        "position": 2,
        "type": "Credit Card",
        "active": true,
        "default": false,
        "erpName": null,
        "payDays": 0,
        "gateway": {
            "id": 9,
            "name": "Authorize.NET Hosted CIM"
        }
    },
    {
        "id": "21f9297d-9d1b-4f3e-beb7-7e9da33a45f6",
        "name": "Viva",
        "position": 3,
        "type": "Credit Card",
        "active": true,
        "default": false,
        "erpName": null,
        "payDays": 0,
        "gateway": {
            "id": 39,
            "name": "Viva"
        }
    },
    {
        "id": "d26da67b-1ead-4cc0-bcc2-95e9fef42fb0",
        "name": "Piraeus",
        "position": 4,
        "type": "Credit Card",
        "active": true,
        "default": false,
        "erpName": null,
        "payDays": 0,
        "gateway": {
            "id": 37,
            "name": "Piraeus Bank"
        }
    },
    {
        "id": "1b280b17-cf1b-4b18-be34-2440dd0685e1",
        "name": "Piraeus Tokenization",
        "position": 5,
        "type": "Credit Card",
        "active": true,
        "default": false,
        "erpName": null,
        "payDays": 0,
        "gateway": {
            "id": 38,
            "name": "Piraeus Bank with tokenization support"
        }
    },
    {
        "id": "25476d53-7510-44da-a6e5-19b56c98053c",
        "name": "Paypal",
        "position": 6,
        "type": "Credit Card",
        "active": true,
        "default": false,
        "erpName": null,
        "payDays": 0,
        "gateway": {
            "id": 24,
            "name": "PayPal Standard"
        }
    }
]

Pricelists

Get Pricelists

This API call returns the available organization pricelists.

API Call:

GET:https://<host_name>/api/pricelists?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:

GET: https://<host_name>/api/pricelists

Response:

[
    {
        "id": 5479,
        "name": "Blank",
        "active": true,
        "fromDate": "0001-01-01T00:00:00+00:00",
        "toDate": "0001-01-01T00:00:00+00:00",
        "currency": {
            "name": "Euro",
            "mnemonic": "EUR",
            "sign": "€"
        }
    },
    {
        "id": 5649,
        "name": "XAccountPL",
        "active": true,
        "fromDate": "0001-01-01T00:00:00+00:00",
        "toDate": "0001-01-01T00:00:00+00:00",
        "currency": {
            "name": "Euro",
            "mnemonic": "EUR",
            "sign": "€"
        }
    },
    {
        "id": 5650,
        "name": "YPriceGroupPL",
        "active": true,
        "fromDate": "0001-01-01T00:00:00+00:00",
        "toDate": "0001-01-01T00:00:00+00:00",
        "currency": {
            "name": "Euro",
            "mnemonic": "EUR",
            "sign": "€"
        }
    }
]


Get Pricelists Items

This API call returns the items for a given pricelist.

API Call:

GET:https://<host_name>/api/pricelists/<pricelist_id>/items?page=<page_number>&size=<page_size>

Parameters:

ParameterDescriptionTypeConstraints
pricelistIdthe id of the pricelistintegerrequired
page_numberThe number of the page to be displayed (default: 1)intoptional
page_sizeThe number of items per page (default: 25)intoptional

Call Example:

GET: https://<host_name>/api/pricelists/5650/items

Response:

[
    {
        "product": {
            "id": "b209b2d3-4a9c-4607-8f38-4fd324908445",
            "code": "123",
            "name": "Pro1TestSofEX702"
        },
        "pricingMethod": "Currency Amount",
        "roundingPolicy": "Rounding to integer",
        "roundingDecimals": 2,
        "amount": 5,
        "price": 5,
        "unit": {
            "id": "2252757d-2195-4164-a99d-5829d16b0eb5",
            "name": "Quarterly"
        }
    },
    {
        "product": {
            "id": "da715698-22ff-491b-b311-50e97ca5f902",
            "code": "123",
            "name": "Pro3TestSofEX702 (Monthly/Annually)"
        },
        "pricingMethod": "Currency Amount",
        "roundingPolicy": "None",
        "roundingDecimals": null,
        "amount": 5,
        "price": 5,
        "unit": {
            "id": "2252757d-2195-4164-a99d-5829d16b0eb5",
            "name": "Quarterly"
        }
    },
    {
        "product": {
            "id": "b209b2d3-4a9c-4607-8f38-4fd324908445",
            "code": "123",
            "name": "Pro1TestSofEX702"
        },
        "pricingMethod": "Percent of Sell Price",
        "roundingPolicy": "Remove decimals",
        "roundingDecimals": 0,
        "amount": 5,
        "price": 0.95,
        "unit": {
            "id": "cea9bb11-3eb9-4046-b3e3-5d6abf178361",
            "name": "Monthly"
        }
    },
    {
        "product": {
            "id": "da715698-22ff-491b-b311-50e97ca5f902",
            "code": "123",
            "name": "Pro3TestSofEX702 (Monthly/Annually)"
        },
        "pricingMethod": "Currency Amount",
        "roundingPolicy": "None",
        "roundingDecimals": null,
        "amount": 5,
        "price": 5,
        "unit": {
            "id": "cea9bb11-3eb9-4046-b3e3-5d6abf178361",
            "name": "Monthly"
        }
    },
    {
        "product": {
            "id": "b209b2d3-4a9c-4607-8f38-4fd324908445",
            "code": "123",
            "name": "Pro1TestSofEX702"
        },
        "pricingMethod": "Currency Amount",
        "roundingPolicy": "None",
        "roundingDecimals": null,
        "amount": 5,
        "price": 5,
        "unit": {
            "id": "3315ec8f-33d4-4366-961e-d8506bd6c156",
            "name": "Annually"
        }
    },
    {
        "product": {
            "id": "da715698-22ff-491b-b311-50e97ca5f902",
            "code": "123",
            "name": "Pro3TestSofEX702 (Monthly/Annually)"
        },
        "pricingMethod": "Currency Amount",
        "roundingPolicy": "None",
        "roundingDecimals": null,
        "amount": 5,
        "price": 5,
        "unit": {
            "id": "3315ec8f-33d4-4366-961e-d8506bd6c156",
            "name": "Annually"
        }
    },
    {
        "product": {
            "id": "b209b2d3-4a9c-4607-8f38-4fd324908445",
            "code": "123",
            "name": "Pro1TestSofEX702"
        },
        "pricingMethod": "Currency Amount",
        "roundingPolicy": "Rounding of decimal part",
        "roundingDecimals": 2,
        "amount": 5,
        "price": 5,
        "unit": {
            "id": "a6dba525-35d5-4418-b06b-f935d598b891",
            "name": "Semi-Annually"
        }
    },
    {
        "product": {
            "id": "da715698-22ff-491b-b311-50e97ca5f902",
            "code": "123",
            "name": "Pro3TestSofEX702 (Monthly/Annually)"
        },
        "pricingMethod": "Currency Amount",
        "roundingPolicy": "None",
        "roundingDecimals": null,
        "amount": 5,
        "price": 5,
        "unit": {
            "id": "a6dba525-35d5-4418-b06b-f935d598b891",
            "name": "Semi-Annually"
        }
    }
]


Error Codes Description

All error codes are shown with the following format:

{
   "Type": <error_code_name>,
   "Code": <error_code>,
   "DeveloperMessage": <developer_message>
}

Explanation:

Field
Description
TypeContains the error code name, i.g. NoInvoicesFound
CodeContains the error code with format EEEMMMCCC where EEE is the Status Code, the MMM is the module number and CCC is the code number. i.e. 404024002
DeveloperMessageA more detailed message for the developer.

Invoice Errors

Error
Error Code
Description
InvoiceNotFound404024001Invoice not found
NoInvoicesFound404024002No invoices found
InvoiceNotCancelled500024100Invoice not cancelled
InvoiceNotMarkedAsPaid500024101Invoice not marked as paid
NoInvoiceItemsFound404024102No invoice items found

Account Errors

Error
Error Code
Description
AccountNotFound404001001Account not found.
NoAccountsFound404001003No accounts found
AccountNotUpdated500001100Account not updated.
AccountNotCreated500001101Account not created.
InvoicesNotGenerated500001102Error generating the invoices
MoreThanOneAccountFound500001103More than one account for the given name were found when generating invoices
InvoicesNotFoundError404001104No invoices for generating found for the account
AccountExternalSystemValueNotFoundError404001107External id was not found

Payment Errors

Error
Error Code
Description
PaymentNotFound404025001Payment not found
NoPaymentsFound404025002No payments found
PaymentNotAdded500025100Payment could not be added
PaymentsNotImported500025101One or more payments were not imported successfully

Contact Errors

ErrorErrorCodeDescription
ContactNotCreated500013002The contact could not be created
ContactWithSameEmailNotCreated409013003contact with email <email> already exists!

Subscription Errors

ErrorErrorCodeDescription
LeaseNotCreated500023002The subscription could not be created
LeaseAddonNotAdded500023003The addon could not added to subscription
NoLeasesFoundError404023004No subscriptions found
NoLeaseUsageRecordsFound404023005No usage records found
NoAzureLeasesFound404023006No Azure subscriptions found
NoAddonsFound404023007No addons found

Product Errors

ErrorErrorCodeDescription
ProductNotFound404028001product with name 'ProductDontExist' was not found!

Order Errors

ErrorErrorCodeDescription
OrderNotFound404020001order with Code <order_code> was not found!
NoOrderItemsFound404020102No order items found

Other Errors

Error
Error Code
Description
NoDataFound500400Data was not found
NoCustomFieldsFound404005002No custom fields found
NoCountriesFound404031200No countries found
NoCountryStatesFound404031201No country states found

API Objects

Api methods return one or more json object as provided in details in the following paragraphs.

Object: Invoice

Represents an invoice object.

   {
      "id":"b9d349a0-cf3e-4784-8fad-20db443a31e0",
      "code":"000014",
      "type":"Debit",
      "stage":"Unpaid",
      "paymentMethod":"credit card",
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "billingAccountId":10,
      "billingAccountName":"Billing API - Test Account",
      "date":"2016-01-18T00:00:00+02:00",
      "dueDate":"2016-01-18T00:00:00+02:00",
      "createdDate":"2016-01-18T11:02:50.647+00:00",
      "paymentDate":"0001-01-01T00:00:00+00:00",
      "grossAmount":30.0000000000,
      "discountAmount":0.0000000000,
      "netAmount":30.0000000000,
      "totalAmount":30.0000000000
   }
idUnique identifier of the invoice
codeCode of the invoice
typeType of the invoice
stageStage of the invoice
paymentMethodPayment method of the invoice
accountIdAccount ID of the invoice
accountNameAccount name of the invoice
billingAccountIdBilling account ID of the invoice
billingAccountNameBilling account name of the invoice
dateDate of the invoice
dueDateDue date of the invoice
createdDateCreation date of the invoice
paymentDatePayment date of the invoice
grossAmountGross amount of the invoice
discountAmountDiscount amount of the invoice
netAmountNet amount of the invoice
totalAmountTotal amount of the invoice

Object: AccountBillingOptions

Represents the account billing options object.

{
   "id":10,
   "name":"Billing API - Test Account",
   "accountingNo":"10001001",
   "enableOrdering":true,
   "billToAccountId":0,
   "billToAccountName":null,
   "countryCode":"GR",
   "countryName":"Greece",
   "stateCode":"001",
   "stateName":"Chalkidiki",
   "currency":"Euro",
   "currencyCode":"978",
   "paymentMethod":"Bank Deposit",
   "taxAuthority":"Tax Authority 1",
   "tradingName":"Trading name 1",
   "businessActivity":"Business Activity 1",
   "registrationNumber":null,
   "autoInvoiceNotificationEnabled":false,
   "separateInvoicesEnabled":false,
   "enableReselling":false,
   "isTaxable":true,
   "isNetworkReseller":false,
   "prorateBillingEnabled":true,
   "prorateBillingDate":"FirstOrderDay",
   "partialChargesInvoicing":"OnOrderDay"
}
idUnique identifier of the account
nameName of the account
accountingNoAccounting number of the account
enableOrderingIf the account is customer
taxAuthorityThe tax authority of the account
billToAccountId
Billing account ID of the account
countryCodeThe country code of the account
countryNameThe country name of the account
stateCodeThe state code of the account
stateNameThe state name of the account
currencyThe currency name of the account
currencyCodeThe curremcy code of the account
tradingNameThe account trading name
paymentMethodPayment method of the account
taxAuthorityTax authority of the account
businessActivityThe job of the account
registrationNumberVAT number of the account
autoInvoiceNotificationEnabledFlag automatic invoice notification of the account
separateInvoicesEnabledMultiple invoices generation enabled
isTaxableFlag taxable of the account
enableResellingIf the account is light reseller
isNetworkResellerIf the account is normal reseller
prorrateBillingEnabledIf prorate billing is enabled
prorrateBillingDateProrate billing date, can be "FirstMonthDay", "LastMonthDay", "FirstOrderDay" or "2-30"
partialChargesInvoicingCan be "OnBillingDay" or "OnOrderDay" 

 

Object: AccountBalance

Represents the account balance object.

{
   "id":10,
   "balance":-60.480000000000004,
   "debitInvoicesTotal":84.52,
   "debitInvoicesCount":4,
   "creditInvoicesTotal":0.0,
   "creditInvoicesCount":0,
   "paymentsTotal":145.0,
   "paymentsCount":5,
   "refundsTotal":0.0,
   "refundsCount":0
}
idUnique identifier of the account
balanceBalance amount of the account (balance = invoice - payment + refund)
debitInvoicesTotalDebit invoices total amount of the account
debitInvoicesCountDebit invoices count of the account
crebitInvoicesTotalCredit invoices total amount of the account
crebitInvoicesCountCredit invoices count of the account
paymentsTotalPayments total amount of the account
paymentsCountPayments count of the account
refundsTotalRefunds total amount of the account
refundsCountRefunds count of the account

 

Object: Payment

Represents a payment object.

  {
      "id":"2332ce4b-5882-4495-ac75-35ab9c2a3d5a",
      "code":null,
      "accountId":10,
      "accountName":"Billing API - Test Account",
      "type":"Cash",
      "date":"2016-01-14T00:00:00+02:00",
      "amount":99.0000000000,
      "transactionFee":0.9900000000,
      "chequeNo":null,
      "chequePayTo":null,
      "chequeBank":null,
      "paymentGateway":null,
      "creditCardId":null,
      "transactionId":"tID",
      "status":"Completed",
      "transactionStatus":2,
      "transactionComments":null,
      "comments":"",
      "createdDate":"2016-01-14T15:45:14.04+00:00",
      "updatedDate":"2016-01-14T15:45:14.04+00:00"
   }
idUnique identifier of the payment
codeCode of the payment
accountIdAccount ID of the payment
accountNameAccount name of the payment
typeType of the payment (e.g. Cash)
dateDate of the payment
amountAmount of the payment
transactionFeeTransaction fee of the payment
chequeNoCheque number of the payment
chequePayToCheque pay to name of the payment
chequeBankCheque bank of the payment
paymentGatewayPayment gateway of the payment
creditCardIdCredit card id of the payment
transactionIdTransaction ID of the payment
statusThe status of the payment (canceled or l, pending or p and completed or c)
transactionStatusTransaction status
transactionCommentComment of the transaction
commentsComments of the payment
createdDateCreation date of the payment
updatedDateLast update of the payment

 

 

  • No labels

15 Comments

  1. Unknown User (p.sanchez)

    Stelios Draganidis Εδώ θα βάλω το documentation για το Billing API και μπορείς να το παρακολουθήσεις και να μου κάνεις παρατηρήσεις κ.λ.π.

  2. Unknown User (p.sanchez) Οι μέθοδοι του API κανονικά θα λειτουργεί μόνο για έναν οργανισμό.. τον οργανισμό αυτό θα μας τον δίνει έτοιμο το authorization μέσω OAuth 2 που θα υπάρχει κανονικά στο API. Δεν χρειάζεται επομένως προσδιορισμός στο API organizations/{organizationId} για την κλήση στην μεθόδους. Για παράδειγμα στην Get Payments By Account Name το url θα είναι 

    https://<host_name>/api/payments/accounts/{accountName}/?sort=<column_name>&order=<order_direction>
  3. Unknown User (p.sanchez)

    Stelios Draganidis Έχω τελειώσει με όλα τα get methods και έκανα και το cancel invoice, αν μπορείς δες λίγο το branch 3.0 - BillingAPI και το documentation και πες μου.

  4. Unknown User (p.sanchez) Stelios Draganidis Vicky Proikoglou Stelios Draganidis I moved it to our KB and it's public now. Any change you might do, you must do it in this page. It's also available in knowledge base first page cc Vasilios Zografos

    1. Unknown User (p.sanchez)

      Apostolos Karakaxas It has all the table of contents references broken.

  5. Unknown User (p.sanchez) it was a bug of the theme I'm using for this space. I changed the theme and now it's ok

  6. Unknown User (p.sanchez)

  7. Unknown User (p.sanchez)

    Apostolos Karakaxas Vicky Proikoglou Stelios Draganidis

    Μία ερώτηση που τη σκέφτηκα σήμερα: στις κλήσεις Add Payment και Import Payments, όπως το υλοποιήσαμε υποστηρίζει μόνο απλά payments και όχι μέσω πιστωτικής ή payment gateway. Η ερώτηση είναι αν χρειάζονται άλλοι τρόποι για τα payments, και αν ναι αν είναι απαραίτητο να συμπεριλαμβάνονται στη πρώτη έκδοση του API. Ευχαριστώ.

  8. Unknown User (p.sanchez) Vicky Proikoglou Apostolos Karakaxas Μα τι νόημα μέσω API να βάλεις payment από πιστωτική? Αν έχεις payment gateway ενεργοποιημένο δεν έχει νόημα να κάνεις import payments.. Απλά payments χρειάζεται αν υποστηρίξουμε μόνο

  9. Unknown User (p.sanchez)

    Apostolos Karakaxas

    ΟΚ Απόστολε, αυτό το έχουμε οπότε είμαστε εντάξει. Ευχαριστώ.

  10. Unknown User (p.sanchez)

    Stelios Draganidis Vicky Proikoglou 

    Έχω τελειώσει με τις αλλαγές που ανέφερε ο Stelios Draganidis και θα κάνω ένα review του documentation.

  11. Unknown User (p.sanchez) το μόνο πρόβλημα που βρήκα είναι το Phone στο account όπου αναφέρεται 2 φορές.

    Εδώ κλείνει η πρώτη έκδοση του Billing API η οποία θα γίνει και RELEASE με το επόμενο patch.

    Vicky Proikoglou Apostolos Karakaxas

     

    1. Unknown User (p.sanchez)

      Είναι μόνο στο documentation, στο API δεν έχει 2 φορές πεδίο Phone, οπότε είμαστε οκ, το διόρθωσα ήδη στο documentation.

      Vicky Proikoglou Apostolos Karakaxas

  12. Unknown User (p.sanchez)

    Vicky Proikoglou Stelios Draganidis Apostolos Karakaxas Έχω αλλάξει και το documentation

  13. Unknown User (p.sanchez)

    Vicky Proikoglou Apostolos Karakaxas Stelios Doulakis Έγινε ενημέρωση στο documentation