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

# Cancel Order

> If Order is in _Reviewing_ Status, then this will cancel the order and refund the credits for the order back to your account.  If the order can be successfully canceled, the status will be updated to _cancelled_.



## OpenAPI

````yaml put /orders/{orderId}/cancel
openapi: 3.1.0
info:
  title: thanks.io API
  description: >-
    Use the thanks.io API to send postcards, letters, notecards, windowless
    letters, and gift cards.
  contact:
    url: https://www.thanks.io
    email: support@thanks.io
  version: 1.0.0
servers:
  - url: https://api.thanks.io/api/v2
    description: The main API server for thanks.io
security:
  - bearerAuth: []
tags:
  - name: Recipients
  - name: Mailing Lists
  - name: Send Mailer
  - name: Orders
  - name: Message Templates
  - name: Image Templates
  - name: Handwriting Styles
  - name: Giftcards
  - name: Dynamic Images
    description: ''
  - name: Image Builder
  - name: Sub Accounts
externalDocs:
  description: Learn more about thanks.io
  url: https://docs.thanks.io
paths:
  /orders/{orderId}/cancel:
    put:
      tags:
        - Orders
      summary: Cancel Order
      description: >-
        If Order is in _Reviewing_ Status, then this will cancel the order and
        refund the credits for the order back to your account.  If the order can
        be successfully canceled, the status will be updated to _cancelled_.
      parameters:
        - name: orderId
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
                properties:
                  order:
                    $ref: '#/components/schemas/order'
              example:
                order:
                  id: 42708
                  user_id: 2
                  sub_account_id: null
                  type: postcard
                  message: >-
                    Hey %FIRST_NAME%!,


                    THANK YOU for allowing us the opportunity to HELP you with
                    your plan!
                  message_template_id: 116
                  image_template_id: 195091
                  style: 1
                  handwriting_color: '#000001'
                  font_size: auto
                  realism: 40
                  size: 4x6
                  addons:
                    standardmail: 'on'
                  front_image: >-
                    https://d2md0c8rpvzmz5.cloudfront.net/letter-backgrounds/bg0.png
                  back_image: ''
                  preview_images:
                    - >-
                      https://d2md0c8rpvzmz5.cloudfront.net/letter-backgrounds/bg0.png
                  thumbnail_images:
                    - >-
                      https://d2md0c8rpvzmz5.cloudfront.net/letter-backgrounds/bg0.png
                  high_quality_preview: ''
                  custom_background_url: null
                  additional_letter_pages: null
                  skip_creative_generation: 0
                  giftcard_brand: null
                  giftcard_image: null
                  giftcard_amount: null
                  qrcode_url: null
                  mailing_list_ids_used: '3047'
                  total_estimated_recipients: 1
                  authorization_total: 73
                  total_recipients: 1
                  grand_total: 73
                  status: fulfilled
                  method: drip
                  email_cc: null
                  total_scans: 0
                  unique_scans: 0
                  last_scan: null
                  return_name: null
                  return_address: null
                  return_address2: null
                  return_city: null
                  return_province: null
                  return_postal_code: null
                  display_addons: +Standard Mail
                  display_status: Fulfilled
                  display_trigger: Campaign
                  display_type: Postcard-4x6
                  giftcard_brand_longname: ''
components:
  schemas:
    order:
      type: object
      properties:
        id:
          type: integer
          example: 42708
        message:
          type: string
          example: >-
            Hey %FIRST_NAME%!,


            THANK YOU for allowing us the opportunity to HELP you with your
            plan!
        size:
          type: string
          description: Only valid for postcards
          example: 4x6
        sub_account_id:
          type:
            - integer
            - 'null'
          example: null
        type:
          type: string
          enum:
            - postcard
            - postcard6x11
            - letter
            - notecard
            - giftcard
            - windowlessletter
          example: postcard
        display_type:
          type: string
          example: Postcard-4x6
        style:
          type: integer
          description: Handwriting Style ID used for this order
          example: 1
        front_image:
          type: string
          example: https://d2md0c8rpvzmz5.cloudfront.net/letter-backgrounds/bg0.png
        high_quality_preview:
          type: string
          description: PDF of the high quality preview of the order
        authorization_total:
          type: integer
          example: 73
        grand_total:
          type: integer
          example: 73
        order_total:
          type: integer
          example: 73
        total_estimated_recipients:
          type: integer
          example: 1
        total_recipients:
          type: integer
          example: 1
        recipient_count:
          type: integer
          example: 1
        status:
          type: string
          example: Fulfilled
        method:
          type: string
          example: Campaign
        cancellable:
          type: boolean
          example: false
        total_scans:
          type: integer
          example: 0
        created_at:
          type: string
          format: date-time
          example: '2025-09-08T16:05:12.000000Z'
        updated_at:
          type: string
          format: date-time
          example: '2025-09-08T16:06:08.000000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your thanks.io API key

````