# Create Or Update Integration Shipment — Sendcloud

> Create or update an integration shipment. See the documentation

- Key: `sendcloud-create-update-integration-shipment`
- Type: Action (Write)
- Version: 0.0.3
- App: Sendcloud (`sendcloud`) — https://pipedream.com/apps/sendcloud.md
- This page (HTML): https://pipedream.com/apps/sendcloud/actions/create-update-integration-shipment
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/sendcloud/actions/create-update-integration-shipment/create-update-integration-shipment.mjs

## Description

Create or update an integration shipment. [See the documentation](https://api.sendcloud.dev/docs/sendcloud-public-api/branches/v2/integrations/operations/create-a-integration-shipment)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `integrationId` | `string` | Yes | The ID of the integration Options are loaded from the connected account. |
| `address` | `string` | Yes | The address of the shipment. |
| `address2` | `string` | Yes | A secondary address of the shipment. |
| `companyName` | `string` | Yes | The company name of the shipment. |
| `createdAt` | `string` | Yes | Timestamp when the shipment was created in the shop system. Example: 2022-05-07T15:08:12.152000Z |
| `currency` | `string` | Yes | ISO 4217 currency code |
| `customsInvoiceNr` | `string` | Yes | Commercial invoice number |
| `customsShipmentType` | `string` | Yes | The type of shipment for customs purposes. |
| `email` | `string` | Yes | The email of the recipient. |
| `externalOrderId` | `string` | Yes | External order ID assigned by the shop system |
| `externalShipmentId` | `string` | Yes | External shipment ID assigned by the shop system |
| `houseNumber` | `string` | Yes | House number of the recipient |
| `name` | `string` | Yes | Name of the recipient |
| `orderNumber` | `string` | Yes | Unique order number generated manually or by the shop system |
| `orderStatusId` | `string` | Yes | Custom internal shop status ID |
| `orderStatusMessage` | `string` | Yes | User-defined human readable status |
| `parcelItems` | `string[]` | Yes | Array of JSON objects describing each item in the parcel. Each item must include the following fields: description (string, required): Description of the product. Example: Bag hs_code (string): Harmonized System Code (<= 12 chars). Example: 01013000 origin_country (string \| null): ISO 3166-1 alpha-2 country code where the product was produced. Example: NL product_id (string): Internal product ID. Example: 1458734634 properties (object): Key-value pairs with additional product properties (e.g., { "color": "Black" }) quantity (integer, required): Number of units (>= 1). Example: 2 sku (string): Internal stock keeping unit. Example: WW-DR-GR-XS-001 value (string, required): Price per item as a decimal string. Example: 19.99 weight (string \| null): Weight per item as a decimal string. Example: 0.5 mid_code (string \| null): Manufacturer's Identification code. Example: NLOZR92MEL material_content (string \| null): Description of materials. Example: 100% Cotton intended_use (string \| null): Intended use of the contents. Example: Personal use Example item JSON: { "description": "Bag", "hs_code": "01013000", "origin_country": "NL", "product_id": "1458734634", "properties": { "color": "Black" }, "quantity": 2, "sku": "WW-DR-GR-XS-001", "value": "19.99", "weight": "0.5", "mid_code": "NLOZR92MEL", "material_content": "100% Cotton", "intended_use": "Personal use" } Provide each array element as a JSON object string in the UI, or programmatically as an array of objects. |
| `paymentStatusId` | `string` | Yes | Custom internal payment status ID |
| `paymentStatusMessage` | `string` | Yes | User-defined payment status |
| `postalCode` | `string` | Yes | Zip code of the recipient |
| `shippingMethodCheckoutName` | `string` | Yes | Human readable shipping method name |
| `telephone` | `string` | Yes | The telephone number of the recipient. |
| `toPostNumber` | `string` | Yes | The post number of the recipient. |
| `country` | `string` | Yes | Country of the recipient |
| `toServicePoint` | `integer` | Yes | The service point ID of the recipient. Options are loaded from the connected account. |
| `toState` | `string` | Yes | The state of the recipient. |
| `updatedAt` | `string` | Yes | Timestamp when the shipment was updated in the shop system. Example: 2022-05-07T15:08:12.152000Z |
| `city` | `string` | No | The city of the shipment. |
| `shippingMethod` | `string` | Yes | The unique identifier of the shipping method Options are loaded from the connected account. |
| `totalOrderValue` | `string` | No | Total price of the order (decimal string) |
| `weight` | `string` | No | Total weight of the order (decimal string) |
| `checkoutPayload` | `object` | No | Object capturing checkout selections made by the end-consumer. Required keys: sender_address_id (integer): The sender address ID associated with the order. shipping_product (object): The shipping product chosen at checkout. Must include: code (string) name (string) selected_functionalities (array): Functionalities selected for this product. delivery_method_type (string): One of "standard_delivery", "nominated_day_delivery", or "same_day_delivery". delivery_method_data (object): delivery_date (string, date-time): Delivery date required by the end-consumer. formatted_delivery_date (string): Human-readable date (e.g., "February 21, 2012"). parcel_handover_date (string, date-time): Date the parcel must be handed to the carrier. Example: { "sender_address_id": 12345, "shipping_product": { "code": "pd-pickup", "name": "Pickup Point", "selected_functionalities": ["signature", "age_check"] }, "delivery_method_type": "nominated_day_delivery", "delivery_method_data": { "delivery_date": "2025-02-20T09:00:00Z", "formatted_delivery_date": "February 20, 2025", "parcel_handover_date": "2025-02-19T18:00:00Z" } } |
| `width` | `string` | No | Volumetric width (decimal string) |
| `height` | `string` | No | Volumetric height (decimal string) |
| `length` | `string` | No | Volumetric length (decimal string) |
| `customDetails` | `object` | No | Optional object to provide order-level costs and tax numbers. discount_granted (object): Discount granted on the total order value (string \| null): Decimal amount (e.g., "3.99"), pattern: [\d]+(.[\d]+)? currency (string \| null): ISO 4217 code (e.g., "EUR") insurance_costs (object): Amount the order is insured for value (string \| null): Decimal amount (e.g., "3.99"), pattern: [\d]+(.[\d]+)? currency (string \| null): ISO 4217 code (e.g., "EUR") freight_costs (object): Shipping cost of the order value (string \| null): Decimal amount (e.g., "3.99"), pattern: [\d]+(.[\d]+)? currency (string \| null): ISO 4217 code (e.g., "EUR") other_costs (object): Any other costs (e.g., wrapping costs) value (string \| null): Decimal amount (e.g., "3.99"), pattern: [\d]+(.[\d]+)? currency (string \| null): ISO 4217 code (e.g., "EUR") tax_numbers (object \| null): Tax info about sender, receiver, and importer of records sender (array of Tax Number): Each has { name (string\|null), country_code (string\|null), value (string\|null) } receiver (array of Tax Number): Same structure as sender importer_of_records (array of Tax Number): Same structure as sender Example: { "discount_granted": { "value": "3.99", "currency": "EUR" }, "insurance_costs": { "value": "2.50", "currency": "EUR" }, "freight_costs": { "value": "5.00", "currency": "EUR" }, "other_costs": { "value": null, "currency": null }, "tax_numbers": { "sender": [{ "name": "VAT", "country_code": "NL", "value": "NL987654321B02" }], "receiver": [], "importer_of_records": [] } } |

## 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": "sendcloud",
      },
    },
  },
)

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: "sendcloud-create-update-integration-shipment",
  arguments: {
    integrationId: "Integration ID",
    address: "Address",
  },
})
```

**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: "sendcloud-create-update-integration-shipment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    sendcloud: { authProvisionId: "apn_xxxxxxx" },
    integrationId: "Integration ID",
    address: "Address",
  },
})

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": "sendcloud-create-update-integration-shipment",
    "configured_props": {
      "sendcloud": { "authProvisionId": "apn_xxxxxxx" },
      "integrationId": "Integration ID",
      "address": "Address"
    }
  }'
```

---

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