> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.pivotal.app/llms.txt.
> For full documentation content, see https://docs.pivotal.app/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.pivotal.app/_mcp/server.

# Retrieve a customer

GET https://my.pivotal.app/api/v1/customers/{id}

Fetch one customer by numeric `display_id` (shareable, appears in URLs) or canonical cuid `id`.

Reference: https://docs.pivotal.app/api/reference/pivotal-api/customers/get-customer

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: openapi
  version: 1.0.0
paths:
  /api/v1/customers/{id}:
    get:
      operationId: get-customer
      summary: Retrieve a customer
      description: >-
        Fetch one customer by numeric `display_id` (shareable, appears in URLs)
        or canonical cuid `id`.
      tags:
        - subpackage_customers
      parameters:
        - name: id
          in: path
          description: Numeric display_id or canonical cuid id.
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: |
            Send your key in the `Authorization` header. Keys start with
            `pivotal_` (production) or `pivotal_test_` (test mode, no side
            effects on integrations). Rotate keys from
            `/admin/api-keys` — old keys 401 instantly when revoked.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Customer not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
servers:
  - url: https://my.pivotal.app
components:
  schemas:
    CustomerObject:
      type: string
      enum:
        - customer
      title: CustomerObject
    Customer:
      type: object
      properties:
        object:
          $ref: '#/components/schemas/CustomerObject'
        id:
          type: string
        display_id:
          type: integer
        name:
          type: string
        slug:
          type:
            - string
            - 'null'
        domain:
          type:
            - string
            - 'null'
        status:
          type: string
        plan:
          type:
            - string
            - 'null'
        mrr:
          type:
            - integer
            - 'null'
          description: Monthly recurring revenue in cents.
        monthly_orders:
          type:
            - integer
            - 'null'
        hubspot_company_id:
          type:
            - string
            - 'null'
        hubspot_deal_id:
          type:
            - string
            - 'null'
        stripe_customer_id:
          type:
            - string
            - 'null'
        intercom_company_id:
          type:
            - string
            - 'null'
        slack_channel_id:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - display_id
        - name
        - slug
        - domain
        - status
        - plan
        - mrr
        - monthly_orders
        - hubspot_company_id
        - hubspot_deal_id
        - stripe_customer_id
        - intercom_company_id
        - slack_channel_id
        - created_at
        - updated_at
      title: Customer
    ErrorErrorType:
      type: string
      enum:
        - invalid_request_error
        - authentication_error
        - permission_error
        - rate_limit_error
        - not_found
        - conflict
        - internal_error
      title: ErrorErrorType
    ErrorError:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ErrorErrorType'
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - type
        - code
        - message
      title: ErrorError
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorError'
      required:
        - error
      title: Error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        Send your key in the `Authorization` header. Keys start with
        `pivotal_` (production) or `pivotal_test_` (test mode, no side
        effects on integrations). Rotate keys from
        `/admin/api-keys` — old keys 401 instantly when revoked.

```

## SDK Code Examples

```python
import requests

url = "https://my.pivotal.app/api/v1/customers/42"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://my.pivotal.app/api/v1/customers/42';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://my.pivotal.app/api/v1/customers/42"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://my.pivotal.app/api/v1/customers/42")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://my.pivotal.app/api/v1/customers/42")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://my.pivotal.app/api/v1/customers/42', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://my.pivotal.app/api/v1/customers/42");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://my.pivotal.app/api/v1/customers/42")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```