Billiecart API

<back to all web services

GetCustomerRequest

Requires Authentication
Requires the role:manager
The following routes are available for this service:
GET/customers/{Id}
namespace Application.Interfaces.Resources

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type BankAccount() = 
        member val BsbNumber:String = null with get,set
        member val AccountNumber:String = null with get,set

    [<AllowNullLiteral>]
    type Customer() = 
        member val Id:String = null with get,set
        member val FirstName:String = null with get,set
        member val LastName:String = null with get,set
        member val DateOfBirth:DateTime = new DateTime() with get,set
        member val DriversLicenceNo:String = null with get,set
        member val Email:String = null with get,set
        member val Phone:String = null with get,set
        member val PreferredContactMethod:String = null with get,set
        member val AddressLine1:String = null with get,set
        member val AddressLine2:String = null with get,set
        member val Suburb:String = null with get,set
        member val StateTerritory:String = null with get,set
        member val Postcode:String = null with get,set
        member val BankAccount:BankAccount = null with get,set
        member val UserAccountId:String = null with get,set

    [<AllowNullLiteral>]
    type GetCustomerResponse() = 
        member val ResponseStatus:ResponseStatus = null with get,set
        member val Customer:Customer = null with get,set

    [<AllowNullLiteral>]
    type GetCustomerRequest() = 
        inherit GetOperationTenanted<GetCustomerResponse>()
        member val Id:String = null with get,set

    [<AllowNullLiteral>]
    type GetOperationTenanted<'TResponse>() = 
        inherit GetOperationUnTenanted<TResponse>()
        member val OrganisationId:String = null with get,set

    [<AllowNullLiteral>]
    type GetOperationUnTenanted<'TResponse>() = 
        interface IGet
        member val Embed:String = null with get,set

F# GetCustomerRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /customers/{Id} HTTP/1.1 
Host: staging-api.billiecart.com.au 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	responseStatus: 
	{
		errorCode: String,
		message: String,
		stackTrace: String,
		errors: 
		[
			{
				errorCode: String,
				fieldName: String,
				message: String,
				meta: 
				{
					String: String
				}
			}
		],
		meta: 
		{
			String: String
		}
	},
	customer: 
	{
		id: String,
		firstName: String,
		lastName: String,
		driversLicenceNo: String,
		email: String,
		phone: String,
		preferredContactMethod: String,
		addressLine1: String,
		addressLine2: String,
		suburb: String,
		stateTerritory: String,
		postcode: String,
		bankAccount: 
		{
			bsbNumber: String,
			accountNumber: String
		},
		userAccountId: String
	}
}