> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cocartapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Full Address Details

> Retrieve complete address details for a selected suggestion from address search

<Warning>
  This endpoint is currently shown as a preview of what's currently in development and is subject to change.
</Warning>


## OpenAPI

````yaml api-reference/pre-release/openapi-spec-preview.yaml get /address/details
openapi: 3.0.3
info:
  title: CoCart Preview API
  description: >
    CoCart Preview provides enhanced REST API endpoints for WooCommerce headless
    e-commerce solutions.

    This API extends CoCart with additional functionality for checkout, customer
    account management, and order handling.


    ## Authentication


    The API supports multiple authentication methods:

    - **Cart Key**: For guest customers, pass the cart key via `Cart-Key` header
    or `cart_key` parameter

    - **Basic Auth**: For registered customers using username/password

    - **JWT**: For registered customers using JWT tokens (requires JWT plugin)

    - **Session**: For logged-in WordPress users


    ## Base URL


    All API endpoints are prefixed with `/wp-json/cocart/preview/`


    ## Response Format


    All responses follow the CoCart standard format with consistent error
    handling and data structure.
  termsOfService: http://cocartapi.com/terms-of-conditions-polar/
  contact:
    email: support@cocartapi.com
  license:
    name: GNU General Public License v3.0
    url: http://www.gnu.org/licenses/gpl-3.0.html
  version: 0.0.1
servers:
  - url: '{protocol}://{host}/wp-json/cocart/preview'
    description: API Preview
    variables:
      protocol:
        enum:
          - http
          - https
        default: https
      host:
        default: example-store.com
        description: Your store domain
security: []
tags:
  - name: Checkout
    description: Complete checkout process including payment and order creation
  - name: My Account
    description: Customer account information and profile management
  - name: My Orders
    description: Customer order history and details
  - name: My Downloads
    description: Customer digital downloads
  - name: My Subscriptions
    description: Customer subscription management
externalDocs:
  description: Find out more about CoCart API
  url: https://docs.cocartapi.com
paths:
  /address/details:
    get:
      tags:
        - Checkout
      summary: Get full address details
      description: >-
        Retrieve complete address details for a selected suggestion from address
        search
      operationId: getAddressDetails
      parameters:
        - name: address_id
          in: query
          description: Address ID from search results
          required: true
          schema:
            type: string
        - name: provider
          in: query
          description: Provider ID from search response
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Address details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddressDetailsResponse'
              examples:
                addressDetails:
                  $ref: '#/components/examples/AddressDetailsExample'
        '400':
          description: Bad request - missing address_id parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Address not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error - no provider available or invalid address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddressDetailsResponse:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/AddressDetail'
        provider:
          $ref: '#/components/schemas/AddressProvider'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code identifier
        message:
          type: string
          description: Human-readable error message
        data:
          type: object
          description: Additional error data
          properties:
            status:
              type: integer
              description: HTTP status code
    AddressDetail:
      type: object
      properties:
        address_1:
          type: string
          description: Address line 1
        address_2:
          type: string
          description: Address line 2
        city:
          type: string
          description: City name
        state:
          type: string
          description: State or county code
        postcode:
          type: string
          description: Postal code
        country:
          type: string
          description: ISO 3166-1 alpha-2 country code
    AddressProvider:
      type: object
      properties:
        id:
          type: string
          description: Provider identifier
        name:
          type: string
          description: Provider display name
  examples:
    AddressDetailsExample:
      value:
        address:
          address_1: 123 Main Street
          address_2: ''
          city: Anytown
          state: CA
          postcode: '12345'
          country: US
        provider:
          id: google
          name: Google Places

````