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

# Set where a checkout is going

> Stores the destination on the checkout so fulfillment methods and tax can be quoted for it. Call this before `listCheckoutFulfillmentMethods`. Only `address_country` is required, so a destination can be set from a country alone and refined once the full address is known. Multi-destination split fulfillment is not supported — one destination applies to the whole checkout.



## OpenAPI

````yaml /api-reference/openapi.yaml post /api/commerce/checkouts/{id}/fulfillment/destination
openapi: 3.1.0
info:
  title: VaultGraph Portal API
  version: 0.1.1
  description: Server-to-server endpoints exposed by the VaultGraph portal (beta).
servers:
  - url: https://app.vaultgraph.com
    description: Production
security: []
tags:
  - name: Shops
    description: Shop management endpoints.
  - name: Commerce
    description: >-
      Deployment-scoped commerce endpoints (catalog, checkout, order).
      Authenticated with a deployment (`dk_`) API key. Internal plumbing between
      the hosted MCP server and the merchant adapter — merchants integrate via
      the MCP, not these REST routes.
paths:
  /api/commerce/checkouts/{id}/fulfillment/destination:
    post:
      tags:
        - Commerce
      summary: Set where a checkout is going
      description: >-
        Stores the destination on the checkout so fulfillment methods and tax
        can be quoted for it. Call this before `listCheckoutFulfillmentMethods`.
        Only `address_country` is required, so a destination can be set from a
        country alone and refined once the full address is known.
        Multi-destination split fulfillment is not supported — one destination
        applies to the whole checkout.
      operationId: setCheckoutFulfillmentDestination
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - destination
              properties:
                destination:
                  type: object
                  required:
                    - address_country
                  properties:
                    first_name:
                      type: string
                    last_name:
                      type: string
                    full_name:
                      type: string
                    phone_number:
                      type: string
                    street_address:
                      type: string
                    extended_address:
                      type: string
                    address_locality:
                      type: string
                    address_region:
                      type: string
                    postal_code:
                      type: string
                    address_country:
                      type: string
                      description: >-
                        ISO 3166-1 alpha-2 country code, uppercase (e.g. 'GB',
                        'US').
                    instructions:
                      type: string
      responses:
        '200':
          description: Updated checkout
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CheckoutResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CheckoutResponse:
      type: object
      required:
        - id
        - currency
        - status
        - line_items
        - links
        - totals
        - ucp
      properties:
        id:
          type: string
        currency:
          type: string
        status:
          type: string
          enum:
            - canceled
            - complete_in_progress
            - completed
            - incomplete
            - ready_for_complete
            - requires_escalation
        line_items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/LineItem'
              - type: object
                properties:
                  item:
                    $ref: '#/components/schemas/Item'
                  totals:
                    type: array
                    items:
                      $ref: '#/components/schemas/Total'
                  property_specs:
                    type: array
                    description: >-
                      What this line can still be customized to, recomputed
                      against the choices already on it. Supersedes the
                      product's property_specs for this line. Absent when the
                      product's declaration already covers it.
                    items:
                      $ref: '#/components/schemas/PropertySpec'
        totals:
          type: array
          items:
            $ref: '#/components/schemas/Total'
        buyer:
          $ref: '#/components/schemas/Buyer'
        context:
          $ref: '#/components/schemas/ShopperContext'
        fulfillment:
          $ref: '#/components/schemas/CheckoutFulfillment'
        messages:
          type: array
          description: >-
            Store-to-shopper notes about this cart — what is still missing
            before it can be completed, and any warning or information the store
            wants the agent to relay. Advisory: they do not block
            `completeCheckout`, which is governed by `status`.
          items:
            $ref: '#/components/schemas/CheckoutMessage'
        order:
          type: object
          description: >-
            The order this checkout became. Present once `completeCheckout` has
            succeeded.
          required:
            - id
            - permalink_url
          properties:
            id:
              type: string
            permalink_url:
              type: string
        continue_url:
          type: string
          description: >-
            A URL where the shopper can open this exact cart in a browser,
            already populated. Absent when the store keeps checkout inside the
            conversation.
        expires_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp after which the cart is no longer valid.
        links:
          type: array
          items:
            $ref: '#/components/schemas/CheckoutLink'
        ucp:
          $ref: '#/components/schemas/UcpEnvelope'
    LineItem:
      type: object
      required:
        - item
        - quantity
      properties:
        id:
          type: string
        item:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              description: References an Item.id.
        quantity:
          type: integer
          minimum: 1
        parent_id:
          type: string
        properties:
          type: array
          description: >-
            Merchant-defined custom fields, each a { name, value } pair (e.g. an
            engraving or gift message). Echoed on the order; lines of the same
            item with different properties stay separate.
          items:
            $ref: '#/components/schemas/LineItemProperty'
    Item:
      type: object
      required:
        - id
        - title
        - price
      properties:
        id:
          type: string
        title:
          type: string
        price:
          type: integer
          description: Integer minor units.
        image_url:
          type: string
    Total:
      type: object
      required:
        - type
        - amount
      description: >-
        One row of a money breakdown; at most one row per type. `total` is the
        authoritative amount the shopper is charged and the other rows are the
        breakdown that explains it. `items_discount` is the share of `discount`
        coming from per-line promotions.
      properties:
        type:
          type: string
          enum:
            - subtotal
            - discount
            - items_discount
            - fulfillment
            - tax
            - fee
            - total
        amount:
          type: integer
        display_text:
          type: string
    PropertySpec:
      type: object
      required:
        - name
        - required
      properties:
        name:
          type: string
          description: Exact key to send back as a line property name.
        required:
          type: boolean
        values:
          type: array
          description: Allowed values. Absent for free text.
          items:
            type: object
            required:
              - value
            properties:
              value:
                type: string
                description: Exact string to send back as the property value.
              price_delta:
                type: integer
                description: >-
                  What picking this value adds to the line's unit price, integer
                  minor units, negative for a cheaper option. Indicative: the
                  checkout totals are the amount charged.
              description:
                type: string
                description: >-
                  Anything about this choice no other field carries — added lead
                  time, a heavier parcel, a care requirement. Optional.
        description:
          type: string
          description: What the property is, so the agent can ask for it. Optional.
    Buyer:
      type: object
      description: >-
        The person checking out. `email` is required before a checkout can be
        completed. Send a name as `full_name`, as `first_name` + `last_name`, or
        as both.
      properties:
        email:
          type: string
        first_name:
          type: string
        full_name:
          type: string
        last_name:
          type: string
        phone_number:
          type: string
    ShopperContext:
      type: object
      description: >-
        Where the shopper is. Drives currency, per-market availability, and a
        tax estimate before a full address exists.
      properties:
        address_country:
          type: string
          description: ISO 3166-1 alpha-2 country code, uppercase (e.g. 'GB', 'US').
        address_region:
          type: string
        postal_code:
          type: string
        currency:
          type: string
        language:
          type: string
          description: BCP 47 language tag, e.g. 'de-DE'.
    CheckoutFulfillment:
      type: object
      properties:
        available_methods:
          type: array
          items:
            type: object
            properties:
              description:
                type: string
              fulfillable_on:
                anyOf:
                  - enum:
                      - 'null'
                    nullable: true
                  - type: string
              line_item_ids:
                type: array
                items:
                  type: string
              type:
                type: string
                enum:
                  - pickup
                  - shipping
            required:
              - line_item_ids
              - type
            additionalProperties: false
        methods:
          type: array
          items:
            type: object
            properties:
              destinations:
                type: array
                items:
                  type: object
                  properties:
                    address_country:
                      type: string
                    address_locality:
                      type: string
                    address_region:
                      type: string
                    extended_address:
                      type: string
                    first_name:
                      type: string
                    last_name:
                      type: string
                    phone_number:
                      type: string
                    postal_code:
                      type: string
                    street_address:
                      type: string
                    id:
                      type: string
                    address:
                      type: object
                      properties:
                        address_country:
                          type: string
                        address_locality:
                          type: string
                        address_region:
                          type: string
                        extended_address:
                          type: string
                        first_name:
                          type: string
                        last_name:
                          type: string
                        phone_number:
                          type: string
                        postal_code:
                          type: string
                        street_address:
                          type: string
                      additionalProperties: false
                    name:
                      type: string
                  required:
                    - id
                  additionalProperties: false
              groups:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    line_item_ids:
                      type: array
                      items:
                        type: string
                    options:
                      type: array
                      items:
                        type: object
                        properties:
                          carrier:
                            type: string
                          description:
                            type: string
                          earliest_fulfillment_time:
                            type: string
                            format: date-time
                          id:
                            type: string
                          latest_fulfillment_time:
                            type: string
                            format: date-time
                          title:
                            type: string
                          totals:
                            type: array
                            items:
                              type: object
                              properties:
                                amount:
                                  type: integer
                                display_text:
                                  type: string
                                type:
                                  type: string
                              required:
                                - amount
                                - type
                              additionalProperties: false
                        required:
                          - id
                          - title
                          - totals
                        additionalProperties: false
                    selected_option_id:
                      anyOf:
                        - enum:
                            - 'null'
                          nullable: true
                        - type: string
                  required:
                    - id
                    - line_item_ids
                  additionalProperties: false
              id:
                type: string
              line_item_ids:
                type: array
                items:
                  type: string
              selected_destination_id:
                anyOf:
                  - enum:
                      - 'null'
                    nullable: true
                  - type: string
              type:
                type: string
                enum:
                  - pickup
                  - shipping
            required:
              - id
              - line_item_ids
              - type
            additionalProperties: false
      additionalProperties: false
    CheckoutMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - error
            - warning
            - info
        content:
          type: string
        code:
          type: string
        path:
          type: string
      required:
        - type
        - content
      additionalProperties: false
    CheckoutLink:
      type: object
      properties:
        title:
          type: string
        type:
          type: string
        url:
          type: string
      required:
        - type
        - url
      additionalProperties: false
    UcpEnvelope:
      type: object
      properties:
        capabilities:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                config:
                  type: object
                  additionalProperties: {}
                extends:
                  type: string
                name:
                  type: string
                schema:
                  type: string
                spec:
                  type: string
                version:
                  type: string
              required:
                - name
                - version
              additionalProperties: false
        version:
          type: string
      required:
        - capabilities
        - version
      additionalProperties: false
    LineItemProperty:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
        value:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````