Customers

Customer Record - GET: /customers/{code}

An example of a customer record is shown below. This is the record that is returned on request of a single record and an array of these records is returned when requesting lists. Greyed fields are fields not readily displayed on Pay Advantage screens, but still useful and necessary information such as identifiers and calculated fields.

{
    "Code": "ABC123",
    "ExternalID": "Your ID",
    "IsConsumer": true,
    "DateJoined": null,
    "Name": "Some Person",
    "FirstName": "Some",
    "LastName": "Person",
    "CustomRef": "MYOB052632",
    "Email": "someperson@email.com.au",
    "BillerCode": null,
    "BPAYRef": null,
    "DateUpdated": null,
    "DateCreated": "2013-09-13T14:10:31.247",
    "CreatedBy": {
        "FirstName": "Your",
        "LastName": "User",
        "UserName": "youruser@email.com"
    },
    "IsActive": true
}

 

 

Lists of Customers - GET: /customers

Customers are sorted by name (ascending) by default. The list is paged and will always return the first page of records unless paging parameters are added as described previously. An example of the response is shown below

{
  "Records": 
  [
    {
        "Code": "ABC123",
        "ExternalID": "Your ID",
        "IsConsumer": true,
        "DateJoined": null,
        "Name": "Some Person",
        "FirstName": "Some",
        "LastName": "Person",
        "CustomRef": "MYOB052632",
        "Email": "someperson@email.com.au",
        "BillerCode": null,
        "BPAYRef": null,
        "DateUpdated": null,
        "DateCreated": "2013-09-13T14:10:31.247",
        "CreatedBy": {
            "FirstName": "Your",
            "LastName": "User",
            "UserName": "youruser@email.com"
        },
        "IsActive": true
    },
    {…}
  ],
  “Meta”: { "page": 0, "recs_per_page": 100, "total_recs": 500 }
}

 

Creating a Customer - POST: /customers

To create a new Customer you simply need to post to the address above. There are two types of customer - Consumer and Business. The mandatory fields are shown below for each type. Editable fields can be identified by reviewing the Customer Data Type section.

Minimum fields to create a Consumer
{ “IsConsumer”:true, “FirstName”:”Jack” }

Minimum fields to create a Business
{ “IsConsumer”:false,
"Name":”All Supplies”, }

 

 

Updating a Customer - POST: /customers/{code}

To update a Customer you need to post to the address above and include the identifier for the Customer in “{code}”. You only need to provide Customer fields that are being updated. The example below is updating the email address for customer with ID of ABCD123.

POST: /customers/ABCD123
{
  “Email”:”bob@live.com”
}

 

 

Have more questions? Submit a request

Comments