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

# Shipday API reference

> API reference for the Shipday plugin in Corsair: every `shipday.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Carriers

### create

`carriers.create`

Add a new carrier (driver) to the Shipday company

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.carriers.create({ name: 'Test Driver', email: 'driver@example.com', phoneNumber: '+14155550100' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `email` | `string` | Yes | — |
| `phoneNumber` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `carrierId` | `number \| null` | No | — |
| `email` | `string \| null` | No | — |
| `password` | `string \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### delete

`carriers.delete`

Remove a driver from the company

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.shipday.api.carriers.delete({ carrierId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `carrierId` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `response` | `string \| null` | No | — |

***

### list

`carriers.list`

Retrieve all carriers (drivers) configured in the company

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.carriers.list({});
```

**Input:** *empty object*

Shipday returns carrier coordinates under `carrrierLocationLat` and `carrrierLocationLng` (triple `r`).

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   personalId?: string | number | null,
>   name?: string | null,
>   codeName?: string | null,
>   phoneNumber?: string | null,
>   companyId?: number | null,
>   areaId?: number | null,
>   isOnShift?: boolean | null,
>   email?: string | null,
>   carrierPhoto?: string | null,
>   isActive?: boolean | null,
>   carrrierLocationLat?: number | null,
>   carrrierLocationLng?: number | null
> }[]
> ```

***

## On Demand

### assign

`onDemand.assign`

Assign an order to a specific 3rd-party on-demand delivery service provider

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.onDemand.assign({ name: 'DoorDash', orderId: 1234, estimateReference: '1', podType: 'PHOTO' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `orderId` | `number` | Yes | — |
| `tip` | `number` | No | — |
| `estimateReference` | `string` | No | — |
| `contactlessDelivery` | `boolean` | No | — |
| `podType` | `PHOTO \| SIGNATURE \| PIN \| NONE` | No | — |
| `podTypes` | `(PHOTO \| SIGNATURE \| PIN \| NONE)[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `orderId` | `number \| null` | No | — |
| `companyId` | `number \| null` | No | — |
| `adminId` | `number \| null` | No | — |
| `thirdPartyName` | `string \| null` | No | — |
| `referenceId` | `string \| null` | No | — |
| `referenceTag` | `string \| null` | No | — |
| `thirdPartyFee` | `number \| null` | No | — |
| `shipdayCharge` | `number \| null` | No | — |
| `totalBillableAmount` | `number \| null` | No | — |
| `charged` | `boolean \| null` | No | — |
| `timestamp` | `string \| null` | No | — |
| `insertedAt` | `number \| null` | No | — |
| `data` | `string \| null` | No | — |
| `trackingUrl` | `string \| null` | No | — |
| `driverName` | `string \| null` | No | — |
| `driverPhone` | `string \| null` | No | — |
| `driverLat` | `number \| null` | No | — |
| `driverLng` | `number \| null` | No | — |
| `driverImageUrl` | `string \| null` | No | — |
| `driverVehicleDescription` | `string \| null` | No | — |
| `tip` | `number \| null` | No | — |
| `processingFee` | `number \| null` | No | — |
| `status` | `string \| null` | No | — |
| `billable` | `boolean \| null` | No | — |

***

### availability

`onDemand.availability`

Check availability and delivery fee estimates from 3rd-party on-demand delivery providers

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.onDemand.availability({ pickupAddress: '1 Wall St, New York, NY 10005, USA', deliveryAddress: '1000 5th Ave, New York, NY 10028, USA' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pickupAddress` | `string` | Yes | — |
| `deliveryAddress` | `string` | Yes | — |
| `deliveryTime` | `string` | No | — |
| `pickUpTime` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   fee?: number | null,
>   pickupTime?: string | null,
>   deliveryTime?: string | null,
>   pickupDuration?: number | null,
>   deliveryDuration?: number | null,
>   error?: boolean | null,
>   errorCode?: string | null,
>   errorMessage?: string | null,
>   errorDescription?: string | null,
>   isProd?: boolean | null,
>   isInternal?: boolean | null,
>   probableAssignment?: boolean | null,
>   minBillableFee?: number | null,
>   regulatoryFee?: number | null
> }[]
> ```

***

### cancel

`onDemand.cancel`

Cancel a third-party delivery assignment

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.onDemand.cancel({ orderId: 6355523 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |

***

### estimate

`onDemand.estimate`

Get an on-demand delivery fee estimate for an order

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.onDemand.estimate({ orderId: 6355523 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |

Returns one row per delivery service. A service that can't take the order comes back as a row with `error: true` and a `failureCode` such as `TPD_OUTSIDE_SERVICE_AREA`.

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   fee?: number | null,
>   pickupTime?: string | null,
>   deliveryTime?: string | null,
>   pickupDuration?: number | null,
>   deliveryDuration?: number | null,
>   error?: boolean | null,
>   errorCode?: string | null,
>   errorMessage?: string | null,
>   errorDescription?: string | null,
>   isProd?: boolean | null,
>   isInternal?: boolean | null,
>   probableAssignment?: boolean | null,
>   minBillableFee?: number | null,
>   regulatoryFee?: number | null
> }[]
> ```

***

### getDetails

`onDemand.getDetails`

Retrieve the on-demand delivery details for an order

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.onDemand.getDetails({ orderId: 6355523 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |

Returns `null` when the order has no third-party delivery (Shipday answers 200 with an empty body).

**Output:** `unknown`

***

### listServices

`onDemand.listServices`

List on-demand delivery services

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.onDemand.listServices({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   prod?: boolean | null,
>   name?: string | null,
>   status?: boolean | null
> }[]
> ```

***

## Orders

### assign

`orders.assign`

Assign a delivery order to a driver

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.orders.assign({ orderId: 6355523, carrierId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |
| `carrierId` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `response` | `string \| null` | No | — |

***

### create

`orders.create`

Insert a new delivery order in Shipday

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.orders.create({ orderNumber: '99qT5A', customerName: 'John Mason', customerAddress: '556 Crestlake Dr, San Francisco, CA 94132, USA', customerPhoneNumber: '+14152392212', restaurantName: 'Popeyes Louisiana Kitchen', restaurantAddress: '890 Geneva Ave, San Francisco, CA 94112, United States' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderNumber` | `string` | Yes | — |
| `customerName` | `string` | Yes | — |
| `customerAddress` | `string` | Yes | — |
| `customerEmail` | `string` | No | — |
| `customerPhoneNumber` | `string` | Yes | — |
| `restaurantName` | `string` | Yes | — |
| `restaurantAddress` | `string` | Yes | — |
| `restaurantPhoneNumber` | `string` | No | — |
| `expectedDeliveryDate` | `string` | No | — |
| `expectedPickupTime` | `string` | No | — |
| `expectedDeliveryTime` | `string` | No | — |
| `deliveryWindowInMinutes` | `number` | No | — |
| `pickupLatitude` | `number` | No | — |
| `pickupLongitude` | `number` | No | — |
| `deliveryLatitude` | `number` | No | — |
| `deliveryLongitude` | `number` | No | — |
| `orderItem` | `object[]` | No | — |
| `tips` | `number` | No | — |
| `tax` | `number` | No | — |
| `discountAmount` | `number` | No | — |
| `deliveryFee` | `number` | No | — |
| `totalOrderCost` | `number` | No | — |
| `pickupInstruction` | `string` | No | — |
| `deliveryInstruction` | `string` | No | — |
| `orderSource` | `string` | No | — |
| `additionalId` | `string` | No | — |
| `clientRestaurantId` | `number` | No | — |
| `paymentMethod` | `cash \| credit_card` | No | — |
| `creditCardType` | `VISA \| MASTER_CARD \| AMEX \| OTHER \| visa \| master_card \| other` | No | — |
| `creditCardId` | `number` | No | — |
| `pickup` | `object` | No | — |
| `dropoff` | `object` | No | — |
| `isCatering` | `boolean` | No | — |

> [accordion] orderItem full type
>
> ```ts theme={null}
> {
>   name: string,
>   quantity: number,
>   unitPrice: number,
>   addOns?: string[] | null,
>   detail?: string
> }[]
> ```

> [accordion] pickup full type
>
> ```ts theme={null}
> {
>   address?: {
>     unit?: string,
>     street?: string,
>     city?: string,
>     state?: string,
>     zip?: string,
>     country?: string
>   }
> }
> ```

> [accordion] dropoff full type
>
> ```ts theme={null}
> {
>   address?: {
>     unit?: string,
>     street?: string,
>     city?: string,
>     state?: string,
>     zip?: string,
>     country?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `response` | `string \| null` | No | — |
| `orderId` | `number \| null` | No | — |

***

### delete

`orders.delete`

Permanently delete a delivery order

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.shipday.api.orders.delete({ orderId: 6355523 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean` | Yes | — |

***

### get

`orders.get`

Retrieve delivery orders matching a merchant order number

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.orders.get({ orderNumber: 'TEST-01' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderNumber` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   orderId?: number | null,
>   orderNumber?: string | null,
>   companyId?: number | null,
>   areaId?: number | null,
>   customer?: {
>     name?: string | null,
>     address?: string | null,
>     phoneNumber?: string | null,
>     emailAddress?: string | null,
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   restaurant?: {
>     id?: number | null,
>     name?: string | null,
>     address?: string | null,
>     phoneNumber?: string | null,
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   assignedCarrier?: {
>     id?: number | null,
>     personalId?: number | string | null,
>     name?: string | null,
>     codeName?: string | null,
>     phoneNumber?: string | null,
>     companyId?: number | null,
>     areaId?: number | null,
>     isOnShift?: boolean | null,
>     email?: string | null,
>     carrierPhoto?: string | null,
>     isActive?: boolean | null
>   } | null,
>   distance?: number | null,
>   activityLog?: {
>     placementTime?: string | null,
>     expectedPickupTime?: string | null,
>     expectedDeliveryDate?: string | null,
>     expectedDeliveryTime?: string | null,
>     assignedTime?: string | null,
>     startTime?: string | null,
>     pickedUpTime?: string | null,
>     arrivedTime?: string | null,
>     deliveryTime?: string | null
>   } | null,
>   costing?: {
>     totalCost?: number | null,
>     deliveryFee?: number | null,
>     tip?: number | null,
>     discountAmount?: number | null,
>     tax?: number | null,
>     cashTip?: number | null
>   } | null,
>   paymentMethod?: string | null,
>   orderItems?: {
>     name?: string | null,
>     quantity?: number | null,
>     unitPrice?: number | null,
>     addOns?: string[] | null,
>     detail?: string | null
>   }[] | null,
>   assignedCarrierId?: number | null,
>   orderStatus?: {
>     incomplete?: boolean | null,
>     accepted?: boolean | null,
>     orderState?: string | null
>   } | null,
>   trackingLink?: string | null,
>   feedback?: string | number | null,
>   schedule?: boolean | null,
>   parentId?: number | null,
>   etaTime?: string | null,
>   pickupInstruction?: string | null,
>   deliveryInstruction?: string | null,
>   deliveryWindowInMinutes?: number | null,
>   proofOfDelivery?: {
>     signaturePath?: string | null,
>     latitude?: number | null,
>     longitude?: number | null,
>     imageUrls?: string[] | null
>   } | null
> }[]
> ```

***

### list

`orders.list`

Retrieve all active delivery orders that are not delivered, failed, or incomplete

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.orders.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   orderId?: number | null,
>   orderNumber?: string | null,
>   companyId?: number | null,
>   areaId?: number | null,
>   customer?: {
>     name?: string | null,
>     address?: string | null,
>     phoneNumber?: string | null,
>     emailAddress?: string | null,
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   restaurant?: {
>     id?: number | null,
>     name?: string | null,
>     address?: string | null,
>     phoneNumber?: string | null,
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   assignedCarrier?: {
>     id?: number | null,
>     personalId?: number | string | null,
>     name?: string | null,
>     codeName?: string | null,
>     phoneNumber?: string | null,
>     companyId?: number | null,
>     areaId?: number | null,
>     isOnShift?: boolean | null,
>     email?: string | null,
>     carrierPhoto?: string | null,
>     isActive?: boolean | null
>   } | null,
>   distance?: number | null,
>   activityLog?: {
>     placementTime?: string | null,
>     expectedPickupTime?: string | null,
>     expectedDeliveryDate?: string | null,
>     expectedDeliveryTime?: string | null,
>     assignedTime?: string | null,
>     startTime?: string | null,
>     pickedUpTime?: string | null,
>     arrivedTime?: string | null,
>     deliveryTime?: string | null
>   } | null,
>   costing?: {
>     totalCost?: number | null,
>     deliveryFee?: number | null,
>     tip?: number | null,
>     discountAmount?: number | null,
>     tax?: number | null,
>     cashTip?: number | null
>   } | null,
>   paymentMethod?: string | null,
>   orderItems?: {
>     name?: string | null,
>     quantity?: number | null,
>     unitPrice?: number | null,
>     addOns?: string[] | null,
>     detail?: string | null
>   }[] | null,
>   assignedCarrierId?: number | null,
>   orderStatus?: {
>     incomplete?: boolean | null,
>     accepted?: boolean | null,
>     orderState?: string | null
>   } | null,
>   trackingLink?: string | null,
>   feedback?: string | number | null,
>   schedule?: boolean | null,
>   parentId?: number | null,
>   etaTime?: string | null,
>   pickupInstruction?: string | null,
>   deliveryInstruction?: string | null,
>   deliveryWindowInMinutes?: number | null,
>   proofOfDelivery?: {
>     signaturePath?: string | null,
>     latitude?: number | null,
>     longitude?: number | null,
>     imageUrls?: string[] | null
>   } | null
> }[]
> ```

***

### progress

`orders.progress`

Retrieve real-time delivery progress and ETA by tracking ID (rate-limited to 3 req/min per trackingId)

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.orders.progress({ trackingId: 'bHZu1221w', isStaticDataRequired: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `trackingId` | `string` | Yes | — |
| `isStaticDataRequired` | `boolean` | No | Defaults to false. |

Requires a Shipday premium plan and is limited to 3 requests per minute per `trackingId`. When `isStaticDataRequired` is `false`, `fixedData` is returned as `null`.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `fixedData` | `object \| null` | No | — |
| `dynamicData` | `object \| null` | No | — |

> [accordion] fixedData full type
>
> ```ts theme={null}
> {
>   order?: {
>     orderNumber?: string | null
>   } | null,
>   customer?: {
>     name?: string | null,
>     address?: string | null,
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   restaurant?: {
>     name?: string | null,
>     address?: string | null,
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   carrier?: {
>     id?: number | null,
>     name?: string | null,
>     phoneNumber?: string | null,
>     imagePath?: string | null
>   } | null,
>   isExpired?: boolean | null
> } | null
> ```

> [accordion] dynamicData full type
>
> ```ts theme={null}
> {
>   orderStatus?: {
>     startTime?: string | null,
>     pickedTime?: string | null,
>     arrivedTime?: string | null,
>     deliveryTime?: string | null,
>     failedDeliveryTime?: string | null,
>     status?: string | null
>   } | null,
>   carrierLocation?: {
>     latitude?: number | null,
>     longitude?: number | null
>   } | null,
>   estimatedTimeInMinutes?: string | null,
>   detailEta?: {
>     estimatedTimeInMinutes?: number | null,
>     pickUpTime?: number | null,
>     travelDistance?: number | null,
>     travelDistanceTime?: number | null,
>     deliveryTime?: number | null,
>     orderPosition?: number | null,
>     startedOrder?: number | null,
>     calprog?: string | null
>   } | null
> } | null
> ```

***

### query

`orders.query`

Query delivery orders by placement time, status, and row range

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.orders.query({ startCursor: 1, endCursor: 25 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `startTime` | `string` | No | — |
| `endTime` | `string` | No | — |
| `orderStatus` | `string` | No | — |
| `startCursor` | `number` | No | First row to return, inclusive. Defaults to 1. |
| `endCursor` | `number` | No | Last row to return, inclusive. Defaults to 100. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   orderId?: number | null,
>   orderNumber?: string | null,
>   companyId?: number | null,
>   orderItem?: string | null,
>   accepted?: boolean | null,
>   placementTime?: string | null,
>   requestedPickupTime?: string | null,
>   requestedDeliveryTime?: string | null,
>   deliveryWindowInMinutes?: number | null,
>   assignedTime?: string | null,
>   startTime?: string | null,
>   pickedupTime?: string | null,
>   arrivedTime?: string | null,
>   deliveryTime?: string | null,
>   failedDeliveryTime?: string | null,
>   deliveryNote?: string | null,
>   deliveryInstruction?: string | null,
>   dispatcherNote?: string | null,
>   paymentMethod?: string | null,
>   orderSource?: string | null,
>   additionalId?: string | null,
>   incomplete?: boolean | null,
>   orderTotal?: number | null,
>   deliveryFee?: number | null,
>   tip?: number | null,
>   discount?: number | null,
>   tax?: number | null,
>   driverPayment?: number | null,
>   distance?: number | null,
>   carrier?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     status?: string | null,
>     vehiclePlateNumber?: string | null,
>     vehicleDescription?: string | null,
>     note?: string | null,
>     imageUrl?: string | null,
>     partner?: string | null
>   } | null,
>   pickup?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     address?: string | null,
>     formattedAddress?: string | null,
>     lat?: number | null,
>     lng?: number | null
>   } | null,
>   delivery?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     address?: string | null,
>     formattedAddress?: string | null,
>     lat?: number | null,
>     lng?: number | null
>   } | null,
>   status?: string | null
> }[]
> ```

***

### setReadyToPickup

`orders.setReadyToPickup`

Set whether a delivery order is ready for pickup

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.orders.setReadyToPickup({ orderId: 6355523, readyToPickup: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |
| `readyToPickup` | `boolean` | Yes | — |

**Output:** *empty object*

***

### setStatus

`orders.setStatus`

Change a delivery order status

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.orders.setStatus({ orderId: 6355523, status: 'READY_TO_DELIVER' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |
| `status` | `STARTED \| PICKED_UP \| READY_TO_DELIVER \| ALREADY_DELIVERED \| INCOMPLETE \| FAILED_DELIVERY` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `response` | `string \| null` | No | — |
| `orderId` | `number \| null` | No | — |

***

### unassign

`orders.unassign`

Unassign a delivery order from its currently assigned driver

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.orders.unassign({ orderId: 6355523 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `response` | `string \| null` | No | — |

***

### update

`orders.update`

Edit an existing delivery order by order ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.orders.update({ orderId: 6355523, orderNo: '99', customerName: 'John Mason', customerAddress: '556 Crestlake Dr, San Francisco, CA 94132, USA', customerEmail: 'john@example.com', customerPhoneNumber: '+14152392212', restaurantName: 'Popeyes Louisiana Kitchen', restaurantAddress: '890 Geneva Ave, San Francisco, CA 94112, United States' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |
| `orderNo` | `string` | Yes | — |
| `customerName` | `string` | Yes | — |
| `customerAddress` | `string` | Yes | — |
| `customerEmail` | `string` | Yes | — |
| `customerPhoneNumber` | `string` | Yes | — |
| `restaurantName` | `string` | Yes | — |
| `restaurantAddress` | `string` | Yes | — |
| `restaurantPhoneNumber` | `string` | No | — |
| `expectedDeliveryDate` | `string` | No | — |
| `expectedPickupTime` | `string` | No | — |
| `expectedDeliveryTime` | `string` | No | — |
| `deliveryWindowInMinutes` | `number` | No | — |
| `pickupLatitude` | `number` | No | — |
| `pickupLongitude` | `number` | No | — |
| `deliveryLatitude` | `number` | No | — |
| `deliveryLongitude` | `number` | No | — |
| `orderItems` | `object[]` | No | — |
| `tip` | `number` | No | — |
| `tax` | `number` | No | — |
| `discountAmount` | `number` | No | — |
| `deliveryFee` | `number` | No | — |
| `totalCost` | `string \| number` | No | — |
| `deliveryInstruction` | `string` | No | — |
| `orderSource` | `string` | No | — |
| `additionalId` | `string` | No | — |
| `clientRestaurantId` | `number` | No | — |
| `paymentMethod` | `cash \| credit_card` | No | — |
| `creditCardType` | `VISA \| MASTER_CARD \| AMEX \| OTHER \| visa \| master_card \| other` | No | — |
| `creditCardId` | `number` | No | — |
| `pickup` | `object` | No | — |
| `dropoff` | `object` | No | — |

Uses `orderNo`, `orderItems`, `tip`, and `totalCost` (matching Shipday's `/order/edit/{orderId}` schema), and requires `customerEmail`.

> [accordion] orderItems full type
>
> ```ts theme={null}
> {
>   name: string,
>   quantity: number,
>   unitPrice: number,
>   addOns?: string[] | null,
>   detail?: string
> }[]
> ```

> [accordion] pickup full type
>
> ```ts theme={null}
> {
>   address?: {
>     unit?: string,
>     street?: string,
>     city?: string,
>     state?: string,
>     zip?: string,
>     country?: string
>   }
> }
> ```

> [accordion] dropoff full type
>
> ```ts theme={null}
> {
>   address?: {
>     unit?: string,
>     street?: string,
>     city?: string,
>     state?: string,
>     zip?: string,
>     country?: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `response` | `string \| null` | No | — |

***

## Partners

### listMemberOrders

`partners.listMemberOrders`

List completed orders for a Shipday partner member company

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.partners.listMemberOrders({ companyId: 100 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `companyId` | `number \| string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   orderId?: number | null,
>   orderNumber?: string | null,
>   companyId?: number | null,
>   orderItem?: string | null,
>   accepted?: boolean | null,
>   placementTime?: string | null,
>   requestedPickupTime?: string | null,
>   requestedDeliveryTime?: string | null,
>   deliveryWindowInMinutes?: number | null,
>   assignedTime?: string | null,
>   startTime?: string | null,
>   pickedupTime?: string | null,
>   arrivedTime?: string | null,
>   deliveryTime?: string | null,
>   failedDeliveryTime?: string | null,
>   deliveryNote?: string | null,
>   deliveryInstruction?: string | null,
>   dispatcherNote?: string | null,
>   paymentMethod?: string | null,
>   orderSource?: string | null,
>   additionalId?: string | null,
>   incomplete?: boolean | null,
>   orderTotal?: number | null,
>   deliveryFee?: number | null,
>   tip?: number | null,
>   discount?: number | null,
>   tax?: number | null,
>   driverPayment?: number | null,
>   distance?: number | null,
>   carrier?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     status?: string | null,
>     vehiclePlateNumber?: string | null,
>     vehicleDescription?: string | null,
>     note?: string | null,
>     imageUrl?: string | null,
>     partner?: string | null
>   } | null,
>   pickup?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     address?: string | null,
>     formattedAddress?: string | null,
>     lat?: number | null,
>     lng?: number | null
>   } | null,
>   delivery?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     address?: string | null,
>     formattedAddress?: string | null,
>     lat?: number | null,
>     lng?: number | null
>   } | null,
>   status?: string | null
> }[]
> ```

***

### listMembers

`partners.listMembers`

List the companies registered under a Shipday partner account

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.partners.listMembers({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   dispatcherId?: number | null,
>   dispatcherName?: string | null,
>   companyId?: number | null,
>   companyName?: string | null,
>   companyAddress?: string | null,
>   phone?: string | null,
>   email?: string | null
> }[]
> ```

***

### queryOrders

`partners.queryOrders`

Query orders for one or more partner member companies

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.partners.queryOrders({ companyId: '100, 101', startCursor: 1, endCursor: 25 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `startTime` | `string` | No | — |
| `endTime` | `string` | No | — |
| `orderStatus` | `string` | No | — |
| `startCursor` | `number` | No | First row to return, inclusive. Defaults to 1. |
| `endCursor` | `number` | No | Last row to return, inclusive. Defaults to 100. |
| `companyId` | `number \| string \| string` | Yes | — |
| `carrierId` | `number \| string \| string` | No | — |
| `pickupId` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   orderId?: number | null,
>   orderNumber?: string | null,
>   companyId?: number | null,
>   orderItem?: string | null,
>   accepted?: boolean | null,
>   placementTime?: string | null,
>   requestedPickupTime?: string | null,
>   requestedDeliveryTime?: string | null,
>   deliveryWindowInMinutes?: number | null,
>   assignedTime?: string | null,
>   startTime?: string | null,
>   pickedupTime?: string | null,
>   arrivedTime?: string | null,
>   deliveryTime?: string | null,
>   failedDeliveryTime?: string | null,
>   deliveryNote?: string | null,
>   deliveryInstruction?: string | null,
>   dispatcherNote?: string | null,
>   paymentMethod?: string | null,
>   orderSource?: string | null,
>   additionalId?: string | null,
>   incomplete?: boolean | null,
>   orderTotal?: number | null,
>   deliveryFee?: number | null,
>   tip?: number | null,
>   discount?: number | null,
>   tax?: number | null,
>   driverPayment?: number | null,
>   distance?: number | null,
>   carrier?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     status?: string | null,
>     vehiclePlateNumber?: string | null,
>     vehicleDescription?: string | null,
>     note?: string | null,
>     imageUrl?: string | null,
>     partner?: string | null
>   } | null,
>   pickup?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     address?: string | null,
>     formattedAddress?: string | null,
>     lat?: number | null,
>     lng?: number | null
>   } | null,
>   delivery?: {
>     id?: number | null,
>     name?: string | null,
>     phone?: string | null,
>     email?: string | null,
>     address?: string | null,
>     formattedAddress?: string | null,
>     lat?: number | null,
>     lng?: number | null
>   } | null,
>   status?: string | null
> }[]
> ```

***

## Pickup Orders

### create

`pickupOrders.create`

Insert a new pickup (takeout) order in Shipday

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.pickupOrders.create({ orderNumber: '99qT5A', restaurant: { name: 'Popeyes Louisiana Kitchen', address: '890 Geneva Ave, San Francisco, CA 94112, United States' }, customer: { name: 'John Mason', phone: '+14152392212' } });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderNumber` | `string` | Yes | — |
| `additionalId` | `string` | No | — |
| `restaurant` | `object` | Yes | — |
| `customer` | `object` | Yes | — |
| `tips` | `number` | No | — |
| `tax` | `number` | No | — |
| `discountAmount` | `number` | No | — |
| `totalOrderCost` | `number` | No | — |
| `orderItem` | `object[]` | No | — |
| `paymentMethod` | `CARD \| CASH \| ONLINE` | No | — |
| `pickupInstruction` | `string` | No | — |
| `expectedPickupDate` | `string` | No | — |
| `expectedPickupTime` | `string` | No | — |
| `orderSource` | `string` | No | — |

Accounts without the pickup feature get HTTP 400 with `Pickup order feature is not available.`

> [accordion] restaurant full type
>
> ```ts theme={null}
> {
>   name: string,
>   address: string,
>   phone?: string
> }
> ```

> [accordion] customer full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone: string,
>   email?: string
> }
> ```

> [accordion] orderItem full type
>
> ```ts theme={null}
> {
>   name: string,
>   quantity: number,
>   unitPrice: number,
>   addOns?: string[] | null,
>   detail?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `orderId` | `number \| null` | No | — |
| `message` | `string \| null` | No | — |

***

### delete

`pickupOrders.delete`

Permanently delete a pickup (takeout) order by order ID

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.shipday.api.pickupOrders.delete({ orderId: 643528 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |

Returns HTTP 204 No Content on success and permanently deletes the pickup order.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean` | Yes | — |

***

### get

`pickupOrders.get`

Retrieve pickup (takeout) order details by order ID

**Risk:** `read`

```ts theme={null}
await corsair.shipday.api.pickupOrders.get({ orderId: 643528 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| null` | No | — |
| `orderNumber` | `string \| null` | No | — |
| `additionalId` | `string \| null` | No | — |
| `companyId` | `number \| null` | No | — |
| `restaurant` | `object \| null` | No | — |
| `customer` | `object \| null` | No | — |
| `tips` | `number \| null` | No | — |
| `tax` | `number \| null` | No | — |
| `discountAmount` | `number \| null` | No | — |
| `totalOrderCost` | `number \| null` | No | — |
| `orderItem` | `object[] \| null` | No | — |
| `paymentMethod` | `string \| null` | No | — |
| `pickupInstruction` | `string \| null` | No | — |
| `expectedPickupDate` | `string \| null` | No | — |
| `expectedPickupTime` | `string \| null` | No | — |
| `orderSource` | `string \| null` | No | — |
| `status` | `string \| null` | No | — |

> [accordion] restaurant full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   address?: string | null,
>   phone?: string | null,
>   latitude?: number | null,
>   longitude?: number | null
> } | null
> ```

> [accordion] customer full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   phone?: string | null,
>   email?: string | null
> } | null
> ```

> [accordion] orderItem full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   quantity?: number | null,
>   unitPrice?: number | null,
>   addOns?: string[] | null,
>   detail?: string | null
> }[] | null
> ```

***

### update

`pickupOrders.update`

Edit an existing pickup (takeout) order by order ID

**Risk:** `destructive`

```ts theme={null}
await corsair.shipday.api.pickupOrders.update({ orderId: 643528, orderNumber: '99qT5A', restaurant: { name: 'Popeyes Louisiana Kitchen', address: '890 Geneva Ave, San Francisco, CA 94112, United States' }, customer: { name: 'John Mason', phone: '+14152392212' }, status: 'READY' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `orderId` | `number \| string` | Yes | — |
| `orderNumber` | `string` | Yes | — |
| `additionalId` | `string` | No | — |
| `restaurant` | `object` | Yes | — |
| `customer` | `object` | Yes | — |
| `tips` | `number` | No | — |
| `tax` | `number` | No | — |
| `discountAmount` | `number` | No | — |
| `totalOrderCost` | `number` | No | — |
| `orderItem` | `object[]` | No | — |
| `paymentMethod` | `CARD \| CASH \| ONLINE` | No | — |
| `pickupInstruction` | `string` | No | — |
| `expectedPickupDate` | `string` | No | — |
| `expectedPickupTime` | `string` | No | — |
| `orderSource` | `string` | No | — |
| `companyId` | `number` | No | — |
| `status` | `IN_PROGRESS \| READY \| DONE \| CANCEL` | No | — |

> [accordion] restaurant full type
>
> ```ts theme={null}
> {
>   name: string,
>   address: string,
>   phone?: string,
>   latitude?: number,
>   longitude?: number
> }
> ```

> [accordion] customer full type
>
> ```ts theme={null}
> {
>   name: string,
>   phone: string,
>   email?: string
> }
> ```

> [accordion] orderItem full type
>
> ```ts theme={null}
> {
>   name: string,
>   quantity: number,
>   unitPrice: number,
>   addOns?: string[] | null,
>   detail?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `boolean \| null` | No | — |
| `orderId` | `number \| null` | No | — |
| `message` | `string \| null` | No | — |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.