/api/v1/customers/{customer}
Requires authentication
Deprecated
v1
Send a bearer token in the Authorization header.
A newer version of this operation is available: GET /api/v2/customers/{customer}.
Full URL: https://api.acme.example/api/v1/customers/{customer}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| customer | integer | yes | The customer id. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| include | string, one of orders, addresses | no | Embed a related collection in the response. |
Responses
200 The customer.
| Field | Type | Description |
|---|---|---|
| id | integer | |
| string<email> | ||
| name | string | |
| status | string, one of active, invited, archived | |
| created_at | string<date-time> |
404 No customer with that id.
Example request
curl -X GET 'https://api.acme.example/api/v1/customers/1' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Accept: application/json'
const response = await fetch('https://api.acme.example/api/v1/customers/1', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'Accept': 'application/json'
}
});
const data = await response.json();
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'Authorization' => 'Bearer YOUR_TOKEN',
'Accept' => 'application/json',
])->get('https://api.acme.example/api/v1/customers/1');
$data = $response->json();
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://api.acme.example/api/v1/customers/1', [
'headers' => [
'Authorization' => 'Bearer YOUR_TOKEN',
'Accept' => 'application/json',
],
]);
$data = json_decode((string) $response->getBody(), true);