Search.../
  1. Home
  2. Getting Started
  3. Overview
Generate a test token to explore our APIs

Create Fulfillment

Creates a fulfillment (a subset of an order, with line items that are being shipped together) based on the body parameters passed with the request. If the site owner has requested it, calling this request will trigger an email to the customer (based on the Wix store settings)

Authorization

This endpoint requires an authorization header - pass the access token from the OAuth installation flow.

Permissions

This endpoint requires the Manage Orders permission scope.

POST

https://www.wixapis.com/stores/v2/orders/{orderId}/fulfillments

Path Params

NAME
TYPE
DESCRIPTION
orderId
Required

string

Order ID (to which the fulfillment will be related)

Body Params

NAME
TYPE
DESCRIPTION
fulfillment
Required

object

Fulfillment to be created

Response Object

NAME
TYPE
DESCRIPTION
id

string

Fulfillment ID

order

object

Updated order data

Status/Error Codes

The response will include an HTTP status code.

Was this helpful?

Request

curl

Copy Code
1curl 'https://www.wixapis.com/stores/v2/orders/fedb19f5-bd4c-4bfc-b2d1-212538319611/fulfillments' \
2--data-binary '{
3 "fulfillment": {
4 "lineItems": [
5 {
6 "index": 1,
7 "quantity": 1
8 }
9 ],
10 "trackingInfo": {
11 "shippingProvider": "fedex",
12 "trackingNumber": "1234",
13 "trackingLink": "https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=1234"
14 }
15 }
16 }' \
17-H 'Content-Type: application/json' \
18-H 'Authorization: <AUTH>'

Response

json

1
2{
3 "id": "0175f0e8-f877-40a9-b980-0d336c64c726",
4 "order": {
5 "id": "fedb19f5-bd4c-4bfc-b2d1-212538319611",
6 "number": 10096,
7 "dateCreated": "2020-03-18T16:47:59.222Z",
8 "buyerInfo": {
9 "id": "e9a69747-6816-42fb-87bf-4cd60a408b4e",
10 "type": "CONTACT",
11 "identityType": "CONTACT",
12 "firstName": "John",
13 "lastName": "Smith",
14 "phone": "+972 555234555",
15 "email": "Ivanushka@example.com"
16 },
17 "currency": "USD",
18 "weightUnit": "LB",
19 "totals": {
20 "subtotal": "10",
21 "shipping": "3",
22 "tax": "3",
23 "discount": "1",
24 "total": "15",
25 "weight": "30",
26 "quantity": 2
27 },
28 "billingInfo": {
29 "paymentMethod": "PayPal",
30 "externalTransactionId": "tx_1806",
31 "paymentProviderTransactionId": "tx_1806",
32 "address": {
33 "fullName": {
34 "firstName": "John",
35 "lastName": "Smith"
36 },
37 "country": "US",
38 "city": "New York",
39 "zipCode": "92544",
40 "phone": "+972 555234555",
41 "email": "Ivanushka@example.com"
42 },
43 "paidDate": "2020-03-18T16:47:59.244Z"
44 },
45 "shippingInfo": {
46 "deliveryOption": "Express",
47 "estimatedDeliveryTime": "Today",
48 "shipmentDetails": {
49 "address": {
50 "fullName": {
51 "firstName": "John",
52 "lastName": "Smith"
53 },
54 "country": "US",
55 "city": "New York",
56 "zipCode": "92544",
57 "phone": "+972 555234555",
58 "email": "Ivanushka@example.com"
59 },
60 "trackingInfo": {
61 "trackingNumber": "1234",
62 "shippingProvider": "FEDEX",
63 "trackingLink": "https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=1234"
64 },
65 "discount": "0",
66 "tax": "1",
67 "priceData": {
68 "taxIncludedInPrice": false,
69 "price": "3"
70 }
71 }
72 },
73 "read": false,
74 "archived": false,
75 "paymentStatus": "PAID",
76 "fulfillmentStatus": "PARTIALLY_FULFILLED",
77 "lineItems": [ {
78 "index": 1,
79 "quantity": 2,
80 "price": "5",
81 "name": "my product",
82 "productId": "a1f9d337-f831-4529-31e6-67db8fd4e1aa",
83 "totalPrice": "10",
84 "lineItemType": "PHYSICAL",
85 "options": [],
86 "customTextFields": [],
87 "weight": "15",
88 "sku": "12345678",
89 "discount": "1",
90 "tax": "1",
91 "taxIncludedInPrice": false,
92 "priceData": {
93 "taxIncludedInPrice": false,
94 "price": "5",
95 "totalPrice": "10"
96 }
97 }],
98 "activities": [
99 {
100 "type": "ORDER_PLACED",
101 "timestamp": "2020-03-18T16:47:59.222Z"
102 },
103 {
104 "type": "ORDER_PAID",
105 "timestamp": "2020-03-18T16:47:59.244Z"
106 },
107 {
108 "type": "TRACKING_NUMBER_ADDED",
109 "timestamp": "2020-03-18T16:55:59.178Z"
110 }
111 ],
112 "fulfillments": [ {
113 "id": "0175f0e8-f877-40a9-b980-0d336c64c726",
114 "dateCreated": "2020-03-18T16:55:59.178Z",
115 "lineItems": [ {
116 "index": 1,
117 "quantity": 1
118 }],
119 "trackingInfo": {
120 "trackingNumber": "1234",
121 "shippingProvider": "fedex",
122 "trackingLink": "https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=1234"
123 }
124 }],
125 "discount": {"value": "1"},
126 "buyerLanguage": "en",
127 "channelInfo": {"type": "WEB"},
128 "enteredBy": {
129 "id": "e85274cf-047a-4989-baff-dac5e0c3971d",
130 "identityType": "USER"
131 },
132 "lastUpdated": "2020-03-18T16:55:59.178Z"
133 }
134}