Developer Guide

Customer Contacts

Returns a list off all customer contacts linked to this customerID which is linked to the logged in account

URL

GET https://api.billagain.com/v1/customers/{customerID}/contacts

URL PARAMETERS (3 Fields)

Parameter Format Description
customerID req Numeric Unique customer identifier
page Numeric Current page number
page_size Numeric Amount of items on requested page

OUTPUT PARAMETERS (8 Fields)

Parameter Format Description
customerID Numeric Unique customer identifier
customerContactID Numeric Unique customer contact identifier
Name Alpha Numeric Contact name
LastName Alpha Numeric Contact lastName
Username Alpha Numeric Contact username
Cell Alpha Numeric Contact cell number
Email Alpha Numeric Contact email address
isActive Boolean An indicator to indicate if contact is active

EXAMPLES

JSON Output

HTTP CODE: 200 OK
[
  {
    "customerID": 304,
    "customerContactID": 95,
    "Name": "John",
    "LastName": "Smith",
    "Email": "JSmith@hotmail.com",
    "Cell": "0767933760",
    "Username": "JSmith",
    "isActive": true
  },
  {
    "customerID": 304,
    "customerContactID": 97,
    "Name": "John",
    "LastName": "Deo",
    "Email": "JDeo@hotmail.com",
    "Cell": "0853867485",
    "Username": "JDeo",
    "isActive": true
  }
]

Returns a list off all customer contacts linked to the logged in account

URL

GET https://api.billagain.com/v1/customercontacts

URL PARAMETERS (2 Fields)

Parameter Format Description
page Numeric Current page number
page_size Numeric Amount of items on requested page

OUTPUT PARAMETERS (8 Fields)

Parameter Format Description
customerID Numeric Unique customer identifier
customerContactID Numeric Unique customer contact identifier
Name Alpha Numeric Contact Name
LastName Alpha Numeric Contact lastName
Username Alpha Numeric Contact username
Cell Alpha Numeric Contact cell number
Email Alpha Numeric Contact email address
isActive Boolean An indicator to indicate if contact is active

EXAMPLES

JSON Output

HTTP CODE: 200 OK
[
  {
    "customerID": 302,
    "customerContactID": 93,
    "Name": "Joe",
    "LastName": "bloggs",
    "Email": "JBloggs@hotmail.com",
    "Cell": "0762934760",
    "Username": "JBlogggs",
    "isActive": true
  },
  {
    "customerID": 304,
    "customerContactID": 95,
    "Name": "John",
    "LastName": "Smith",
    "Email": "JSmith@hotmail.com",
    "Cell": "0767933760",
    "Username": "JSmith",
    "isActive": true
  }
]

Returns a specific customer note

URL

GET https://api.billagain.com/v1/customercontacts/{customerContactID}

URL PARAMETERS (1 Field)

Parameter Format Description
customerContactID req Numeric Unique customer contact identifier

OUTPUT PARAMETERS (8 Fields)

Parameter Format Description
customerID Numeric Unique customer identifier
customerContactID Numeric Unique customer contact identifier
Name Alpha Numeric Contact name
LastName Alpha Numeric Contact lastName
Username Alpha Numeric Contact username
Cell Alpha Numeric Contact cell number
Email Alpha Numeric Contact email address
isActive Boolean An indicator to indicate if contact is active

EXAMPLES

JSON Output

HTTP CODE: 200 OK
{
  "customerID": 304,
  "customerContactID": 95,
  "Name": "gh",
  "LastName": "fgh",
  "Email": "fgh@sdafsdf.vom",
  "Cell": "014",
  "Username": "fgh",
  "isActive": true
}

Adds a customer contact to the customer which is linked to your account. The Contact will be emailed there Username and password.

URL

POST https://api.billagain.com/v1/customercontacts

INPUT PARAMETERS (8 Fields)

Parameter Format Description
customerID req Numeric Unique customer identifier
Name req Alpha Numeric Contact name
LastName req Alpha Numeric Contact lastName
Username Alpha Numeric Contact username for Customer portal. If isActive and left blank Username will be Auto generated.
Password Alpha Numeric Contact password for Customer portal. If isActive and left blank Password will be Auto generated. Must contain 6 characters that contains atleast one letter and one number.
Cell Alpha Numeric Contact cell number
Email req Alpha Numeric Contact email address
isActive Boolean An indicator to indicate if contact is active

OUTPUT PARAMETERS (8 Fields)

Parameter Format Description
customerID Numeric Unique customer identifier
customerContactID Numeric Unique customer contact identifier
Name Alpha Numeric Contact name
LastName Alpha Numeric Contact lastName
Username Alpha Numeric Contact username Customer portal
Cell Alpha Numeric Contact cell number
Email Alpha Numeric Contact email address
isActive Boolean An indicator to indicate if contact is active

EXAMPLES

JSON Input

{
  "customerID": 304,
  "Name": "John",
  "LastName": "Deo",
  "Email": "JDeo@hotmail.com",
  "Cell": "0853867485",
  "Username": "JDeo",
  "Password" : "Pa$$word123",
  "isActive": true
}

JSON Output

HTTP CODE: 201 Created
{
  "customerID": 304,
  "customerContactID": 97,
  "Name": "John",
  "LastName": "Deo",
  "Email": "JDeo@hotmail.com",
  "Cell": "0853867485",
  "Username": "JDeo",
  "isActive": true
}

Edits a customer's contact linked to your account. The Contact will be emailed there Username and password if they have been changed.

URL

PUT https://api.billagain.com/v1/customercontacts/{customerContactID}

URL PARAMETERS (1 Field)

Parameter Format Description
customerContactID req Numeric Unique customer contact identifier

INPUT PARAMETERS (9 Fields)

Parameter Format Description
customerID req Numeric Unique customer identifier
Name req Alpha Numeric Contact name
LastName req Alpha Numeric Contact lastName
Username Alpha Numeric Contact username for Customer portal. If isActive and left blank Username will be Auto generated.
Password Alpha Numeric Contact password for Customer portal. If isActive and isChangePassword is set then if left blank Password will be Auto generated. Must contain 6 characters that contains atleast one letter and one number.
Cell Alpha Numeric Contact cell number
Email req Alpha Numeric Contact email address
isActive Boolean An indicator to indicate if contact is active
changePassword Boolean Indicate if contact password has been changed

EXAMPLES

JSON Input

 {
    "Name": "John",
    "LastName": "Deo",
    "Email": "JDeo@Gmail.com",
    "Cell": "0853394485",
    "Username": "JDeo_659",
    "Password": "",
    "isActive": true,
    "changePassword": true
  }

JSON Output

HTTP CODE: 204 No Content

Delete a customer contact from your account

URL

DELETE https://api.billagain.com/v1/customercontacts/{customerContactID}

URL PARAMETERS (1 Field)

Parameter Format Description
customerContactID req Numeric Unique customer contact identifier

EXAMPLES

JSON Output

HTTP CODE: 204 No Content