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

# Create resend order

Creates a resend order — bundles one or more received return inventory items into an outbound shipment to a customer address. Triggers asynchronous label generation; the label URL is delivered via webhook.

## Prerequisites

* The target inventory items exist in your account. The `returnInventoryId` values come from the `newInventoryCreated` webhook event — cache them on your side as parcels are logged.
* All inventories in a single resend must be in the **same warehouse**.
* Each inventory's current `handlingStatusCode` must be eligible to advance to `rsd` (resend) per the handling state machine — typically items in `ohd` (on-hold) status.
* None of the items' line items can have pending VAS requests.
* Each inventory must be physically in stock (not in-transit, not under another active workflow).
* Have your destination address ready.

## Required fields

* **`resendShipment`** — full shipment payload (destination address, contact, dimensions, weight, service type). Country codes are **ISO3**.
  * `warehouseId` is **required** and must match the warehouse of the items in `returnInventoryIdList` (all items in a single resend share one warehouse). Omitting it fails validation.
  * `shipmentServiceType` inside the payload is a **shipment service type** (not a *return* service type) — fetch valid codes from [Get available shipment service types for warehouse](/api-reference/shipmentservicetype/get-available-shipment-service-types-for-warehouse). Passing a return-service-type code here will fail validation.
* **`returnInventoryIdList`** — non-empty `List<long>`. Maximum size is `ResendConfig.groupResendMaxRmaCount` (typically a single-digit cap; check via support if you need to bundle many items).

## Optional fields

* **`description`** — free-text description for the resend order (max 255 characters). Persisted against the order and returned by [Get resend order details](/api-reference/resend/get-resend-order-details).
* **`remarks`** — merchant remarks/notes for the resend order (max 5000 characters). Persisted against the order and returned by [Get resend order details](/api-reference/resend/get-resend-order-details).

<Note>These map to the **Description** and **Remarks** fields on the portal's Create Resend form. Both are optional — omit them to leave the order without a description or remarks.</Note>

## Side effects

* Each inventory's `handlingCode` is set to `rsd` and the matching status is applied.
* The shipment is dispatched by the warehouse once the label is ready.

## Label generation: auto vs manual service types

Whether a resend generates its shipping label automatically depends on the shipment service type you pass in `resendShipment.shipmentServiceType`. Each shipment service type carries an `isEnableAutoCreateLabel` flag — fetch it from [Get available shipment service types for warehouse](/api-reference/shipmentservicetype/get-available-shipment-service-types-for-warehouse) and read `isEnableAutoCreateLabel` for the code you intend to use.

### Auto-label (`isEnableAutoCreateLabel: true`)

The label is generated asynchronously after creation. The resend status flow is:

`queued` → `label-success` → `completed` (or `queued` → `failed` if label generation fails)

The resend can be cancelled via [Cancel resend order](/api-reference/resend/cancel-resend-order) only while it is in `label-success`, and only before the cut-off. It **cannot** be cancelled while `queued`, because the label is still being generated.

### Manual-label (`isEnableAutoCreateLabel: false`)

No label is auto-generated; the warehouse processes the resend. The resend status flow is:

`pending` → `in-progress` → `completed`

The resend can be cancelled via [Cancel resend order](/api-reference/resend/cancel-resend-order) while it is in `pending`, and only before the cut-off.

### Cancellation cut-off

Every resend has a cancellation cut-off of **08:00 UTC on working days**, set when the resend is created. You can cancel up to that cut-off, provided the resend is in its cancellable status (`label-success` for auto-label, `pending` for manual-label). Once the cut-off passes, the resend can no longer be cancelled through the API.

<Note>If the cut-off has already passed and you still need to cancel a resend, please contact our customer support team for assistance. Cancellation is not guaranteed once the cut-off has passed — the package may already have been shipped out.</Note>

## Related

* [Get resend order details](/api-reference/resend/get-resend-order-details) — only when a webhook event references a resend you haven't cached.
* [Cancel resend order](/api-reference/resend/cancel-resend-order) — abort before the warehouse dispatches.
* [Get all resend statuses](/api-reference/resendstatus/get-all-resend-statuses) — code-to-label mappings.
* [Webhooks](/webhooks) —  resend-status-update event deliver lifecycle changes to your endpoint.


## OpenAPI

````yaml post /api/Resend/createResend
openapi: 3.1.0
info:
  title: Return Helper API
  description: API documentation for Return Helper — covering User and Public endpoints.
  version: 1.0.0
servers:
  - url: https://api.returnshelper.com/uat/user
    description: Sandbox — User API
  - url: https://api.returnshelper.com/uat/public
    description: Sandbox — Public API
  - url: https://api.returnhelpercentre.com/v1/user
    description: Production — User API
  - url: https://api.returnhelpercentre.com/v1/public
    description: Production — Public API
  - url: https://api.returnhelperchina.com/user
    description: Production — User API (China)
security:
  - ApiKey: []
    ApiToken: []
paths:
  /api/Resend/createResend:
    post:
      tags:
        - Resend
      summary: Create resend order
      operationId: ReturnUserApi_CreateResend
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResendRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResendResponse'
        '401':
          description: >-
            Authentication failed. Returned when the `x-rr-apikey` or
            `x-rr-apitoken` header is missing or invalid. The body uses the
            standard `ApiResponse` envelope with `meta.error.message` describing
            the auth failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
      security:
        - ApiKey: []
          ApiToken: []
      servers:
        - url: https://api.returnshelper.com/uat/user
          description: Sandbox — User API
components:
  schemas:
    CreateResendRequest:
      type: object
      properties:
        returnInventoryIdList:
          type: array
          items:
            type: integer
            format: int64
          description: List of return inventory IDs for resend
        resendShipment:
          $ref: '#/components/schemas/CreateResendShipmentPayload'
          description: Destination shipment address for the resend
        description:
          type: string
          maxLength: 255
          description: >-
            Optional free-text description for the resend order. Stored against
            the order and returned by Get resend order details.
        remarks:
          type: string
          maxLength: 5000
          description: >-
            Optional merchant remarks/notes for the resend order. Stored against
            the order and returned by Get resend order details.
      required:
        - returnInventoryIdList
        - resendShipment
    CreateResendResponse:
      type: object
      properties:
        resendId:
          type: integer
          format: int64
          description: Created resend identifier
    ApiResponse:
      type: object
      description: >-
        Universal response envelope. Successful responses include the business
        payload as additional top-level fields alongside `correlationId` and
        `meta`. Failed responses (auth errors, validation errors) only populate
        `correlationId` and `meta`, with `meta.errorCode` and `meta.error`
        describing the failure.
      properties:
        correlationId:
          type:
            - string
            - 'null'
          description: >-
            Unique correlation ID for tracing the request through Return Helper
            systems.
        meta:
          $ref: '#/components/schemas/ApiResponseMeta'
    CreateResendShipmentPayload:
      type: object
      properties:
        warehouseId:
          type: integer
          description: >-
            Identifier of the warehouse fulfilling the resend. Must match the
            warehouse of the items referenced in `returnInventoryIdList` — all
            items in a single resend belong to one warehouse.
        shipmentCountryCode:
          type: string
          description: ISO3 destination country code (e.g. GBR, USA)
        shipmentServiceType:
          type: string
          description: Shipment service type code
        shipmentName:
          type: string
          description: Recipient name
        shipmentPhone:
          type: string
          description: Recipient phone number
        shipmentFax:
          type: string
          description: Recipient fax number (optional)
        shipmentEmail:
          type: string
          description: Recipient email address (optional)
        shipmentStreet1:
          type: string
          description: Address line 1
        shipmentStreet2:
          type: string
          description: Address line 2
        shipmentStreet3:
          type: string
          description: Address line 3 (optional)
        shipmentState:
          type: string
          description: State / province
        shipmentCity:
          type: string
          description: City
        shipmentPostalCode:
          type: string
          description: Postal code
      required:
        - warehouseId
        - shipmentCountryCode
        - shipmentName
        - shipmentPhone
        - shipmentStreet1
        - shipmentStreet2
        - shipmentCity
        - shipmentPostalCode
        - shipmentState
    ApiResponseMeta:
      type: object
      description: >-
        Application-level metadata for every API response. Inspect `status` and
        `errorCode` to detect soft-error responses (validation failures arrive
        as HTTP 200 with `meta.status: 400`).
      properties:
        status:
          type: integer
          description: >-
            Application-level status code. For successful operations this
            mirrors the HTTP status (e.g. 200). For validation failures it
            reports the logical status (e.g. 400) even though the wire HTTP
            status is 200.
        data:
          type: object
          additionalProperties:
            type: string
          description: Reserved free-form metadata key/value pairs. Usually empty.
        errorCode:
          type:
            - string
            - 'null'
          description: >-
            Machine-readable error code (e.g. `VALIDATION_FAILED`). Non-null
            only when the operation failed.
        error:
          type: object
          additionalProperties: true
          description: >-
            Field-level or message-level error detail keyed by request property
            name. Empty object on success.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-rr-apikey
      description: Your API key
    ApiToken:
      type: apiKey
      in: header
      name: x-rr-apitoken
      description: Your API token — keep this private

````