(Quick Reference) Service: Show a customer

Description: Returns the requested customer in json format when successful. Returns a json response, describing the failure condition when unsuccessful.

URL:

https://BASE_URL/api/VERSION/customers/{id}

URL with external_id:

https://BASE_URL/api/VERSION/customers/reference/{id}

Method: GET

Parameters:

NameDescriptionTypeRequiredExample values
idThe ID of the desired customerLong/Stringyes123

Success Output

Success case: response.status=200
{
	"id": 256,
	"reference": "NC-3",
	"reference2": null,
	"name": "Marie's Jewelry",
	"categoryReference": "jewelry",
	"customerCategory": {
		"id": 2,
		"reference": "jewelry",
		"name": "Jewelry and accessories",
		"href": "/api/v1.0/customerCategories/2"
	},
	"isSubCustomer": false,
	"parentCustomer": null,
	"billWithParent": true,
	"customerSegmentationReference": "seg_a",
	"customerSegmentation": {
		"id": 1,
		"reference": "seg_a",
		"name": "Segmentation A",
		"href": "/api/v1.0/customerSegmentations/1"
	},
	"pocTenus": null,
	"email": null,
	"logo": "BASE_URL/entity1-1450169988465/photoCustomer/1471338230737_logo_color_272x92dp.png",
	"phone": null,
	"mobile": null,
	"fax": null,
	"comment": null,
	"barcode": null,
	"isSameAddress": true,
	"billingCountry": "FR",
	"billingCity": "Nice",
	"billingPostalCode": null,
	"billingAddress": null,
	"billingLat": null,
	"billingLng": null,
	"country": null,
	"city": null,
	"postalCode": null,
	"address": null,
	"latitude": null,
	"longitude": null,
	"isCredit": null,
	"creditLimit": 5000,
	"balance": null,
	"maxChequePeriod": null,
	"maxChequeValue": null,
	"appliedCashBackOutput": null,
	"returnDiscount": null,
	"invoicesPerRoute": null,
	"isActive": true,
	"onHold": false,
	"onHoldReason": null,
	"paymentTerm": null,
	"createdBy": {
		"userId": 2,
		"reference": "emp-002",
		"href": "/api/v1.0/users/2"
	},
	"dueDateConfigNumber": 7,
	"dueDateConfigType": "daysAfterInvoiceDate",
	"paymentTypes": [{
			"id": 7,
			"reference": "cash",
			"name": "cash",
			"href": "/api/v1.0/paymentTypes/7"
		},
		{
			"id": 8,
			"reference": "cheque",
			"name": "cheque",
			"href": "/api/v1.0/paymentTypes/8"
		}
	],
	"website": null,
	"taxNumber": null,
	"companyRegistrationNumber": null,
	"contacts": [],
	"currency": "EUR",
	"customerRisk": null,
	"customerRiskColor": null,
	"organization": "entity1",
	"dateCreated": "2015-12-17T23:00:00Z",
	"lastUpdated": "2016-08-16T09:02:13Z"
}

To get resized images, add prefix small_ or medium_ to the link url before the image's name, for example:
<BASE_URL>/entity1-1450169988465/photoCustomer/small_471338230737_logo_color_272x92dp.png

Failure Output

Failure case:response.status = 400

{
  "error": "invalid_param_type",
  "error_description": "The type of parameter id you provided is not valid for this request."
}

Failure case:response.status = 404

{
  "error": "not_found",
  "error_description": "The customer with the id 2559 doesn't exist."
}