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

# Moves Shipment back to pending state

> Moves Shipment back to pending state



## OpenAPI

````yaml /api-reference/platform.yaml patch /api/v2/platform/shipments/{id}/pend
openapi: 3.0.3
info:
  title: Platform API
  contact:
    name: Vendo Connect Inc.
    url: https://getvendo.com
    email: sales@getvendo.com
  description: Spree Platform API
  version: v2
servers:
  - url: http://{defaultHost}
    variables:
      defaultHost:
        default: localhost:3000
security: []
tags:
  - name: Addresses
  - name: Adjustments
  - name: Classifications
  - name: Countries
  - name: CMS Pages
  - name: CMS Sections
  - name: Digital Assets
  - name: Digital Links
  - name: Line Items
  - name: Menus
  - name: Menu Items
  - name: Option Types
  - name: Option Values
  - name: Orders
  - name: Payments
  - name: Payment Methods
  - name: Products
  - name: Promotions
  - name: Promotion Actions
  - name: Promotion Categories
  - name: Promotion Rules
  - name: Roles
  - name: Shipments
  - name: Shipping Categories
  - name: Shipping Methods
  - name: States
  - name: Stock Items
  - name: Stock Locations
  - name: Store Credit Categories
  - name: Store Credit Types
  - name: Store Credits
  - name: Tax Categories
  - name: Tax Rates
  - name: Taxons
  - name: Taxonomies
  - name: Users
  - name: Variants
  - name: Vendors
  - name: Webhook Events
  - name: Webhook Subscribers
  - name: Wishlists
  - name: Wished Items
  - name: Zones
paths:
  /api/v2/platform/shipments/{id}/pend:
    patch:
      tags:
        - Shipments
      summary: Moves Shipment back to pending state
      description: Moves Shipment back to pending state
      operationId: pend-shipment
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: include
          in: query
          description: >-
            Select which associated resources you would like to fetch, see: <a
            href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
          example: line_items,variants,product
          schema:
            type: string
      responses:
        '200':
          description: Record updated
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    data:
                      id: '75'
                      type: shipment
                      attributes:
                        tracking: U10000
                        number: H29346097126
                        cost: '100.0'
                        shipped_at: null
                        state: pending
                        created_at: '2022-11-08T19:35:20.604Z'
                        updated_at: '2022-11-08T19:35:20.853Z'
                        adjustment_total: '0.0'
                        additional_tax_total: '0.0'
                        promo_total: '0.0'
                        included_tax_total: '0.0'
                        pre_tax_amount: '0.0'
                        taxable_adjustment_total: '0.0'
                        non_taxable_adjustment_total: '0.0'
                        public_metadata: {}
                        private_metadata: {}
                        display_discounted_cost: $100.00
                        display_item_cost: $10.00
                        display_amount: $100.00
                        display_final_price: $100.00
                        display_cost: $100.00
                        tracking_url: null
                      relationships:
                        order:
                          data:
                            id: '104'
                            type: order
                        address:
                          data: null
                        stock_location:
                          data:
                            id: '154'
                            type: stock_location
                        adjustments:
                          data: []
                        inventory_units:
                          data:
                            - id: '72'
                              type: inventory_unit
                        shipping_rates:
                          data:
                            - id: '144'
                              type: shipping_rate
                        state_changes:
                          data:
                            - id: '30'
                              type: state_change
                        selected_shipping_rate:
                          data:
                            id: '144'
                            type: shipping_rate
              schema:
                $ref: '#/components/schemas/resource'
        '401':
          description: Authentication Failed
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The access token is invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Record not found
          content:
            application/vnd.api+json:
              examples:
                Example:
                  value:
                    error: The resource you were looking for could not be found.
              schema:
                $ref: '#/components/schemas/error'
      security:
        - bearer_auth: []
components:
  schemas:
    resource:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/resource_properties'
      required:
        - data
      x-internal: false
    error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      x-internal: false
    resource_properties:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        attributes:
          type: object
        relationships:
          type: object
      required:
        - id
        - type
        - attributes
      x-internal: false
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````