Customers

All API endpoints require an authentication header to be included with the request.  See API Authentication

Fetch Customers Collection

End-point

Method

Description

End-point

Method

Description

https://secure.gotobilling.com/api/customers

GET

Returns a collection of customers

Collection Filters

Parameters that can be included in the query string of the request when using the GET /api/customers endpoint.

Parameter

Type

Description

Parameter

Type

Description

id

int or Array Filter

OmniFund assigned Customer ID

customerRef

string

Merchant provided customer reference ID

firstName

string

Customer first name

lastName

string

Customer last name

company

string

Company name

email

string

Customer email address

Request

1 GET /api/customers?id[]=23143879&id[]=21879654

Response

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 { "@context": "/api/contexts/customers", "@id": "/api/customers", "@type": "hydra:Collection", "hydra:member": [ { "@id": "/api/customers/23143879", "@type": "customers", "id": 23143879, "customerRef": "sw-1234", "company": "Cloud City", "firstName": "Lando", "lastName": "Calrissian", "email": "test@email.com", "displayAs": "company", "address1": "123 main st", "address2": "", "city": "Somewhere", "state": "Co", "zip": "55555", "phone": "(800) 555-4578", }, { "@id": "/api/customers/21879654", "@type": "customers", "id": 21879654, "customerRef": "sw-1235", "company": "", "firstName": "Han", "lastName": "Solo", "email": "test@email.com", "displayAs": "contact", "address1": "123 main st", "address2": "", "city": "Somewhere", "state": "Co", "zip": "55555", "phone": "(800) 555-4578" } ], "hydra:totalItems": 2 }

Fetch Customer Resource

Return a single customer resource based on the ID provided

End-point

Method

Description

End-point

Method

Description

https://secure.gotobilling.com/api/customers/{id}

GET

Return a single customer resource based on the ID provide

Request

1 GET https://secure.gotobilling.com/api/customers/2613558

Response

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Content-Type application/ld+json; charset=utf-8 { "@context": "/api/contexts/customers", "@id": "/api/customers/2613558", "@type": "customers", "id": 2613558, "customerRef": "123456", "company": "123 Company", "firstName": "", "lastName": "", "email": "test@email.com", "displayAs": "contact", "address1": "123 main st", "address2": "", "city": "Somewhere", "state": "Co", "zip": "55555", "phone": "(800) 555-4578" }

Create Customer Resource

End-point

Method

Description

End-point

Method

Description

https://secure.gotobilling.com/api/customers

POST

Create a new customer resource

Parameters

Parameter

Type

Description

Parameter

Type

Description

customerRef

string

Required. Merchant provided customer reference ID.

firstName

string

Customer first name

lastName

string

Customer last name

company

string

Company name

email

string

Customer email address. Either customerRef or email is required.

displayAs

string

Valid options: contact, company

address1

string

Address line 1

address2

string

Address line 2

city

string

City

state

string (2)

Two-characater State abbreviation

zip

string

Zip code

phone

string

Phone number

Request

1 2 3 4 5 6 7 8 9 10 11 POST https://secure.gotobilling.com/api/customers Content-Type application/json { "customerRef": "test-1234", "type": "individual", "firstName": "Test", "lastName": "Account", "company": "Acme Widgets", "email": "test@email.com" }

Response

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Content-Type application/ld+json; charset=utf-8 { "@context": "/api/contexts/customers", "@id": "/api/customers/2970583", "@type": "customers", "id": 2970583, "customerRef": "test-1234", "company": "Acme Widgets", "firstName": "Test", "lastName": "Account", "email": "test@email.com", "displayAs": "contact", "address1": "", "address2": "", "city": "", "state": "", "zip": "", "phone": "" }