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

# Resend order webhooks

> Replay the latest webhook event for one or more orders via the Junction API.

<Note>
  At least one of `order_ids` or `start_at` is required. When using `start_at`, `end_at` defaults to the current time and the window cannot exceed 60 days.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.sandbox.junction.com/v3/order/resend_events \
    --header 'x-vital-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
      "order_ids": ["0ee312e2-6773-4a21-a6e1-506882cd98ed"]
    }'
  ```

  ```python Python theme={null}
  from junction import Junction
  from junction.environment import JunctionEnvironment

  client = Junction(
      api_key="YOUR_API_KEY",
      environment=JunctionEnvironment.SANDBOX,
  )

  data = client.order.resend_events(
      order_ids=["0ee312e2-6773-4a21-a6e1-506882cd98ed"],
  )
  ```

  ```typescript TypeScript theme={null}
  import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";

  const client = new JunctionClient({
      apiKey: "YOUR_API_KEY",
      environment: JunctionEnvironment.Sandbox,
  });

  const data = await client.order.resendEvents({
      orderIds: ["0ee312e2-6773-4a21-a6e1-506882cd98ed"],
  });
  ```

  ```java Java theme={null}
  import com.junction.api.Junction;
  import com.junction.api.core.Environment;
  import com.junction.api.resources.order.requests.ResendWebhookBody;
  import java.util.List;

  Junction client = Junction.builder()
      .apiKey("YOUR_API_KEY")
      .environment(Environment.SANDBOX)
      .build();

  var data = client.order().resendEvents(
      ResendWebhookBody.builder()
          .orderIds(List.of("0ee312e2-6773-4a21-a6e1-506882cd98ed"))
          .build()
  );
  ```

  ```go Go theme={null}
  import (
      "context"

      junction "github.com/junction-api/junction-go"
      "github.com/junction-api/junction-go/client"
      "github.com/junction-api/junction-go/option"
  )

  c := client.NewClient(
      option.WithApiKey("YOUR_API_KEY"),
      option.WithBaseURL(junction.Environments.Sandbox),
  )

  response, err := c.Order.ResendEvents(context.TODO(), &junction.ResendWebhookBody{
      OrderIds: []string{"0ee312e2-6773-4a21-a6e1-506882cd98ed"},
  })
  if err != nil {
      return err
  }
  fmt.Printf("Received data %s\n", response)
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "order_ids": ["0ee312e2-6773-4a21-a6e1-506882cd98ed"]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml POST /v3/order/resend_events
openapi: 3.1.0
info:
  title: Junction API
  description: https://docs.junction.com/
  version: 0.4.519
servers:
  - url: https://api.us.junction.com
    x-fern-server-name: Production
  - url: https://api.eu.junction.com
    x-fern-server-name: ProductionEU
  - url: https://api.sandbox.us.junction.com
    x-fern-server-name: Sandbox
  - url: https://api.sandbox.eu.junction.com
    x-fern-server-name: SandboxEU
security:
  - apiKeyAuth: []
paths:
  /v3/order/resend_events:
    post:
      tags:
        - order
      summary: Resend Order Webhook
      description: Replay a webhook for a given set of orders
      operationId: resend_order_webhook_v3_order_resend_events_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResendWebhookBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResendWebhookResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ResendWebhookBody:
      properties:
        order_ids:
          anyOf:
            - items:
                type: string
                format: uuid
              type: array
            - type: 'null'
          title: Order Ids
        start_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start At
        end_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End At
      type: object
      title: ResendWebhookBody
    ResendWebhookResponse:
      properties:
        order_ids:
          items:
            type: string
            format: uuid
          type: array
          title: Order Ids
      type: object
      required:
        - order_ids
      title: ResendWebhookResponse
    HTTPValidationError:
      properties:
        detail:
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-vital-api-key
      description: Vital Team API Key

````