Setup

To use the OrderFulfillments API, install the @wix/ecom package using npm or Yarn:

Copy
1
npm install @wix/ecom

or

Copy
1
yarn add @wix/ecom

Then import { orderFulfillments } from @wix/ecom:

Copy
1
import { orderFulfillments } from '@wix/ecom'
Was this helpful?
Yes
No

bulkCreateFulfillments( )

Creates multiple fulfillments for one or more orders.

The bulkCreateFulfillments() function returns a Promise that resolves when the fulfillments are created.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function bulkCreateFulfillments(ordersWithFulfillments: Array<BulkCreateOrderWithFulfillments>): Promise<BulkCreateFulfillmentResponse>
Method Parameters
ordersWithFulfillmentsArray<BulkCreateOrderWithFulfillments>Required

List of order IDs and their associated fulfillments' info.

Returns
Return Type:Promise<BulkCreateFulfillmentResponse>
Was this helpful?
Yes
No

createFulfillment( )

Creates an order fulfillment.

The createFulfillment() function returns a Promise that resolves when the fulfillment is created.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function createFulfillment(orderId: string, fulfillment: Fulfillment): Promise<CreateFulfillmentResponse>
Method Parameters
orderIdstringRequired

Order ID.


fulfillmentFulfillmentRequired

Fulfillment info.

Returns
Return Type:Promise<CreateFulfillmentResponse>
Was this helpful?
Yes
No

deleteFulfillment( )

Deletes an existing order fulfillment.

The deleteFulfillment() function returns a Promise that resolves when the fulfillment is deleted.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function deleteFulfillment(identifiers: DeleteFulfillmentIdentifiers): Promise<DeleteFulfillmentResponse>
Method Parameters
identifiersDeleteFulfillmentIdentifiersRequired

Order and fulfillment IDs.

Returns
Return Type:Promise<DeleteFulfillmentResponse>
Was this helpful?
Yes
No

listFulfillmentsForMultipleOrders( )

Retrieves fulfillments associated with multiple specified orders.

The listFulfillmentsForMultipleOrders() function returns a Promise that resolves when the fulfillments are retrieved.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Read eCommerce - all read permissions
Read Orders
Read Stores - all read permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function listFulfillmentsForMultipleOrders(orderIds: Array<string>): Promise<ListFulfillmentsForMultipleOrdersResponse>
Method Parameters
orderIdsArray<string>Required

List of order IDs for which to retrieve fulfillments.

Returns
Return Type:Promise<ListFulfillmentsForMultipleOrdersResponse>
Was this helpful?
Yes
No

listFulfillmentsForSingleOrder( )

Retrieves fulfillments associated with a specified order.

The listFulfillmentsForSingleOrder() function returns a Promise that resolves when the fulfillments are retrieved.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Read eCommerce - all read permissions
Read Orders
Read Stores - all read permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function listFulfillmentsForSingleOrder(orderId: string): Promise<ListFulfillmentsForSingleOrderResponse>
Method Parameters
orderIdstringRequired

Order ID for which to retrieve fulfillments.

Returns
Return Type:Promise<ListFulfillmentsForSingleOrderResponse>
Was this helpful?
Yes
No

updateFulfillment( )

Updates a fulfillment's properties. To update a field's value, include the new value in the fulfillment field in the body params. To remove a field's value, pass null.

The updateFulfillment() function returns a Promise that resolves when the fulfillment is updated.

Note: Updating line item IDs or fulfilled quantities is not allowed. To update line item IDs or quantities, delete the fulfillment and create it again.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Stores - all permissions
Manage eCommerce - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function updateFulfillment(identifiers: UpdateFulfillmentIdentifiers, options: UpdateFulfillmentOptions): Promise<OrderWithFulfillments>
Method Parameters
identifiersUpdateFulfillmentIdentifiersRequired

Order and fulfillment IDs to be updated.


optionsUpdateFulfillmentOptions

Available options to use when updating a fulfillment.

Returns
Return Type:Promise<OrderWithFulfillments>
Was this helpful?
Yes
No