# Create Fulfillment Update Request — Everstox

> Creates a new fulfillment update request for a specific fulfillment. The fulfillment must be in in_fulfillment state. Use this to modify items, quantities, prices, addresses, or priority on an active fulfillment. fulfillment_items must…

- Key: `everstox-create-fulfillment-update-request`
- Type: Action (Write)
- Version: 0.0.2
- App: Everstox (`everstox`) — https://pipedream.com/apps/everstox.md
- This page (HTML): https://pipedream.com/apps/everstox/actions/create-fulfillment-update-request
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs

## Description

Creates a new fulfillment update request for a specific fulfillment. The fulfillment must be in `in_fulfillment` state. Use this to modify items, quantities, prices, addresses, or priority on an active fulfillment. `fulfillment_items` must include at least one item with a valid SKU; `price_set` quantities must sum to the item quantity. Address fields `first_name`/`last_name` or `company` are conditionally required (at least one set must be present). [See the documentation](https://api.everstox.com/api/v1/ui/#/Fulfillment-updates/district_core.api.shops.fulfillments.fulfillments.Fulfillments.create_fulfillment_update_request)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `fulfillmentId` | `string` | Yes | The UUID of the fulfillment to update, for example 550e8400-e29b-41d4-a716-446655440000. Obtain this from the fulfillment object you want to modify. Must be in in_fulfillment state. |
| `fulfillmentItems` | `string` | No | JSON array of fulfillment items to update. Must contain at least one item. Omit id when adding a new item; include it when updating an existing one. Each item requires a product.sku and a price_set with at least one entry. Example: [{"id": "550e8400-e29b-41d4-a716-446655440000", "quantity": 2, "product": {"sku": "PROD-001"}, "price_set": [{"quantity": 2, "currency": "EUR", "price_net_after_discount": "19.99", "tax_amount": "3.80", "tax_rate": "0.19"}]}] |
| `shippingAddress` | `string` | No | JSON object with the complete shipping address. Required fields: country_code (ISO 2-letter, e.g. "DE"), country (full country name, e.g. "Germany"), city, zip, address_1, and at least one of first_name/last_name or company. Optional: address_2, title, phone, province_code, address_type (private or business). Example: {"first_name": "John", "last_name": "Doe", "country_code": "DE", "country": "Germany", "city": "Berlin", "zip": "10115", "address_1": "Musterstra\u00dfe 1", "address_type": "private"} |
| `billingAddress` | `string` | No | JSON object with the complete billing address. Required fields: country_code (ISO 2-letter, e.g. "DE"), country (full country name, e.g. "Germany"), city, zip, address_1, and at least one of first_name/last_name or company. Optional: address_2, title, phone, VAT_number, address_type (private or business). Example: {"first_name": "John", "last_name": "Doe", "country_code": "DE", "country": "Germany", "city": "Berlin", "zip": "10115", "address_1": "Musterstra\u00dfe 1", "address_type": "private"} |
| `fulfillmentPriority` | `integer` | No | Priority level for the fulfillment. Must be between 1 (highest) and 99 (lowest). |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "everstox",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "everstox-create-fulfillment-update-request",
  arguments: {
    fulfillmentId: "Fulfillment ID",
    fulfillmentItems: "Fulfillment Items",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "everstox-create-fulfillment-update-request",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    everstox: { authProvisionId: "apn_xxxxxxx" },
    fulfillmentId: "Fulfillment ID",
    fulfillmentItems: "Fulfillment Items",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "everstox-create-fulfillment-update-request",
    "configured_props": {
      "everstox": { "authProvisionId": "apn_xxxxxxx" },
      "fulfillmentId": "Fulfillment ID",
      "fulfillmentItems": "Fulfillment Items"
    }
  }'
```

---

- App: https://pipedream.com/apps/everstox.md · All apps: https://pipedream.com/apps
