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

# Check postal code

> Check whether a location can deliver to a country and postal code, without a full address. Use it where you only have a postal code, such as a checkout before the address is entered, or a coverage lookup.

Treat it as a pre-check: a cheap filter that rules a postal code in or out before an address exists. A `deliverable: true` here means the postal code area is served, not that a specific address in it is. `POST /orders/check/{locationId}` stays the source of truth for an exact answer.



## OpenAPI

````yaml /api-reference/openapi.json post /orders/check/postal-code/{locationId}
openapi: 3.1.0
info:
  title: Sparqle API
  version: 1.0.0
  description: >-
    Create deliveries, fetch shipping labels, and track orders with Sparqle.


    This specification is a hand-authored starting point derived from the API
    source. Replace or merge it with the spec exported from your previous docs
    as you refine the reference.
servers:
  - url: https://staging-v2.sparqle.tech
    description: Test
  - url: https://v2.sparqle.com
    description: Live
security:
  - apiKey: []
paths:
  /orders/check/postal-code/{locationId}:
    post:
      tags:
        - Coverage
      summary: Check postal code
      description: >-
        Check whether a location can deliver to a country and postal code,
        without a full address. Use it where you only have a postal code, such
        as a checkout before the address is entered, or a coverage lookup.


        Treat it as a pre-check: a cheap filter that rules a postal code in or
        out before an address exists. A `deliverable: true` here means the
        postal code area is served, not that a specific address in it is. `POST
        /orders/check/{locationId}` stays the source of truth for an exact
        answer.
      operationId: checkOrderPostalCode
      parameters:
        - name: locationId
          in: path
          required: true
          description: >-
            The location whose coverage you want to check. The same identifier
            you pass to the check endpoint.
          schema:
            type: string
          example: ABC123
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckPostalCode'
      responses:
        '200':
          description: Validation result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckPostalCodeResult'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    CheckPostalCode:
      type: object
      required:
        - postalCode
        - countryCode
      properties:
        postalCode:
          type: string
          description: >-
            Postal code to check. Case and whitespace are ignored, so `1018 PN`,
            `1018pn` and `1018PN` are treated as the same code.
          example: 1018PN
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 country code the postal code belongs to.
          example: NL
        dimensions:
          type: object
          description: Collo dimensions in mm. Must satisfy length >= width >= height.
          properties:
            length:
              type: number
              example: 200
            width:
              type: number
              example: 75
            height:
              type: number
              example: 50
        weight:
          type: number
          description: Weight in grams.
          example: 1500
        signature:
          type: boolean
          description: Delivery requires a signature.
          example: false
        notAtNeighbour:
          type: boolean
          description: Do not deliver to a neighbour.
          example: false
    CheckPostalCodeResult:
      type: object
      required:
        - deliverable
      properties:
        deliverable:
          type: boolean
          description: Whether the postal code area can be served for this location.
          example: true
        reason:
          type: string
          description: >-
            Why the postal code is not deliverable. Only present when
            deliverable is false.
          example: OUT_OF_AREA
        missingCapabilities:
          type: object
          description: >-
            Requested capabilities no carrier could satisfy. Only present when
            deliverable is false.
          properties:
            signature:
              type: boolean
              example: true
            notAtNeighbour:
              type: boolean
              example: true
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          example: 400
        message:
          type: array
          items:
            type: string
          example:
            - deliveryName should not be empty
        error:
          type: string
          example: Bad Request
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: api-key

````