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

# Get a contact

GET https://app.lucanto.eu/api/v1/accounts/{account_id}/contacts/{id}

Reference: https://docs.lucanto.eu/api-reference/api-reference/contacts/get-contact

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: lucanto
  version: 1.0.0
paths:
  /accounts/{account_id}/contacts/{id}:
    get:
      operationId: get-contact
      summary: Get a contact
      tags:
        - subpackage_contacts
      parameters:
        - name: account_id
          in: path
          description: Workspace (account) ID. The numeric ID shown in your URLs.
          required: true
          schema:
            type: integer
            format: int64
        - name: id
          in: path
          description: Contact ID
          required: true
          schema:
            type: integer
            format: int64
        - name: Authorization
          in: header
          description: |
            Devise JWT issued via POST /api/v1/auth/sign_in. Used by mobile
            and SPA clients. Revoked tokens are tracked in `api_jwt_denylists`.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Contact'
        '401':
          description: Missing or invalid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: |
            Workspace has no active subscription. Visit the upgrade URL to
            subscribe.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContactRequestPaymentRequiredError'
        '403':
          description: |
            Authenticated, but the token's scope or the user's role does not
            permit this action. Returned by the two-layer scope enforcement
            (token scope cap AND CanCanCan role).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: |
            Resource does not exist, or exists but is not visible to the
            authenticated principal (cross-account isolation returns 404,
            not 403, to avoid leaking existence).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded. Retry after the window resets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
servers:
  - url: https://app.lucanto.eu/api/v1
components:
  schemas:
    Contact:
      type: object
      properties:
        id:
          type: integer
          format: int64
          description: Contact ID (workspace-scoped)
        name:
          type:
            - string
            - 'null'
          description: Display name of the contact (model allows nil; typically present)
        rate:
          type:
            - string
            - 'null'
          format: decimal
          description: |
            Default hourly/unit rate applied on quotes/invoices for this
            contact. Returned as a string to preserve decimal precision
            (Stripe-style). On write, accepts either a number or a
            stringified number.
        due_days:
          type:
            - integer
            - 'null'
          description: Default payment terms in days. Applied to issued documents.
        invoice_account_id:
          type: integer
          format: int64
          description: |
            ID of the linked **InvoiceAccount** (the shared legal-entity
            registry) that holds the contact's legal name, registration
            ID, VAT ID, and addresses.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - created_at
        - updated_at
      title: Contact
    Error:
      type: object
      properties:
        error:
          type: string
          description: |
            Machine-readable error code. Stable across releases — clients
            should branch on this rather than the human-readable message.
        message:
          type: string
          description: |
            Human-readable error description, localized to
            `Accept-Language`. Subject to wording changes between
            releases.
        request_id:
          type: string
          description: |
            Server-side request identifier. Same value as the
            `X-Request-Id` response header. Quote this in support
            tickets so we can pull the matching server log line.
        docs_url:
          type: string
          format: uri
          description: |
            URL of the per-error-code documentation page. Useful for
            SDK error subclasses to deep-link from a stack trace
            to the docs explaining the cause + remediation.
      required:
        - error
        - message
        - request_id
        - docs_url
      title: Error
    GetContactRequestPaymentRequiredError:
      type: object
      properties:
        error:
          type: string
          description: |
            Machine-readable error code. Stable across releases — clients
            should branch on this rather than the human-readable message.
        message:
          type: string
          description: |
            Human-readable error description, localized to
            `Accept-Language`. Subject to wording changes between
            releases.
        request_id:
          type: string
          description: |
            Server-side request identifier. Same value as the
            `X-Request-Id` response header. Quote this in support
            tickets so we can pull the matching server log line.
        docs_url:
          type: string
          format: uri
          description: |
            URL of the per-error-code documentation page. Useful for
            SDK error subclasses to deep-link from a stack trace
            to the docs explaining the cause + remediation.
        upgrade_url:
          type: string
          format: uri
          description: URL to the billing/plans page
      required:
        - error
        - message
        - request_id
        - docs_url
      title: GetContactRequestPaymentRequiredError
  securitySchemes:
    JwtBearer:
      type: http
      scheme: bearer
      description: |
        Devise JWT issued via POST /api/v1/auth/sign_in. Used by mobile
        and SPA clients. Revoked tokens are tracked in `api_jwt_denylists`.
    ApiKeyBearer:
      type: http
      scheme: bearer
      description: >
        Lucanto API key. Three prefixes:


        - `lct_pat_<random><checksum>` — personal access token (owner: User)

        - `lct_live_<random><checksum>` — workspace token, live data

        - `lct_test_<random><checksum>` — workspace token, sandbox account
        (Phase 3)


        Issue keys at `/settings/api_keys` (personal) or

        `/:account_id/settings/api_keys` (workspace). Plaintext token is

        shown once and never again.

```

## SDK Code Examples

```python
import requests

url = "https://app.lucanto.eu/api/v1/accounts/42/contacts/1"

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

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

print(response.json())
```

```javascript
const url = 'https://app.lucanto.eu/api/v1/accounts/42/contacts/1';
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://app.lucanto.eu/api/v1/accounts/42/contacts/1"

	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://app.lucanto.eu/api/v1/accounts/42/contacts/1")

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://app.lucanto.eu/api/v1/accounts/42/contacts/1")
  .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://app.lucanto.eu/api/v1/accounts/42/contacts/1', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://app.lucanto.eu/api/v1/accounts/42/contacts/1");
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://app.lucanto.eu/api/v1/accounts/42/contacts/1")! 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()
```