@teemill/orders 1.24.1 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -8
- package/api.ts +448 -135
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +444 -135
- package/dist/api.js +44 -32
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +444 -135
- package/dist/esm/api.js +43 -31
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/Address.md +9 -9
- package/docs/ApiError.md +3 -2
- package/docs/ConfirmOrderFulfillment.md +4 -3
- package/docs/ConfirmOrderFulfillmentWithShipment.md +3 -2
- package/docs/ConfirmOrderFulfillmentWithShippingMethod.md +3 -2
- package/docs/ConfirmOrderValidationError.md +2 -0
- package/docs/ContactInformation.md +2 -2
- package/docs/ContactInformation1.md +23 -0
- package/docs/CreateOrder.md +7 -7
- package/docs/CreateOrderItem.md +24 -0
- package/docs/CustomsInformation.md +4 -4
- package/docs/CustomsInformation1.md +5 -4
- package/docs/DeliveryEstimates.md +4 -3
- package/docs/Fulfiller.md +25 -0
- package/docs/FulfillerLocation.md +23 -0
- package/docs/Fulfillment.md +9 -8
- package/docs/FulfillmentItem.md +3 -3
- package/docs/Image.md +5 -5
- package/docs/Order.md +17 -16
- package/docs/OrderItem.md +10 -9
- package/docs/OrderTracking.md +4 -3
- package/docs/OrdersApi.md +31 -31
- package/docs/Origin.md +3 -2
- package/docs/PaymentAttempt.md +4 -5
- package/docs/PaymentMethod.md +2 -1
- package/docs/Price.md +3 -3
- package/docs/ProductUnavailableError.md +35 -0
- package/docs/RecipientCost.md +23 -0
- package/docs/Shipment.md +21 -0
- package/docs/ShippingMethod.md +8 -7
- package/docs/Status.md +1 -0
- package/docs/StockConflictError.md +34 -0
- package/docs/StockUnavailableError.md +35 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/docs/Fulfillment.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
# Fulfillment
|
|
2
2
|
|
|
3
|
+
A fulfillment group within an order. Each fulfillment represents a package that will be shipped separately, potentially from a different fulfiller.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**id** | **string** | Unique fulfillment
|
|
9
|
-
**status** | [**Status**](Status.md) |
|
|
10
|
-
**fulfiller** | [**
|
|
11
|
-
**items** | [**Array<FulfillmentItem>**](FulfillmentItem.md) |
|
|
9
|
+
**id** | **string** | Unique identifier for this fulfillment. | [optional] [default to undefined]
|
|
10
|
+
**status** | [**Status**](Status.md) | The current status of this fulfillment. | [optional] [default to undefined]
|
|
11
|
+
**fulfiller** | [**Fulfiller**](Fulfiller.md) | | [optional] [default to undefined]
|
|
12
|
+
**items** | [**Array<FulfillmentItem>**](FulfillmentItem.md) | The items included in this fulfillment package. | [optional] [default to undefined]
|
|
12
13
|
**tracking** | [**OrderTracking**](OrderTracking.md) | | [optional] [default to undefined]
|
|
13
|
-
**shippingMethod** | [**ShippingMethod**](ShippingMethod.md) |
|
|
14
|
-
**availableShippingMethods** | [**Array<ShippingMethod>**](ShippingMethod.md) | Shipping methods available for this fulfillment.
|
|
15
|
-
**packageWeight** | **number** |
|
|
16
|
-
**platformRef** | **string** |
|
|
14
|
+
**shippingMethod** | [**ShippingMethod**](ShippingMethod.md) | The shipping method currently assigned to this fulfillment. | [optional] [default to undefined]
|
|
15
|
+
**availableShippingMethods** | [**Array<ShippingMethod>**](ShippingMethod.md) | Shipping methods available for this fulfillment. Use one of these IDs when confirming the order. | [optional] [default to undefined]
|
|
16
|
+
**packageWeight** | **number** | The estimated weight of the package in grams. | [optional] [default to undefined]
|
|
17
|
+
**platformRef** | **string** | Reference to the source platform of this fulfillment. | [optional] [default to undefined]
|
|
17
18
|
|
|
18
19
|
## Example
|
|
19
20
|
|
package/docs/FulfillmentItem.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
Name | Type | Description | Notes
|
|
7
7
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**id** | **string** | Unique fulfillment item
|
|
9
|
-
**itemId** | **string** |
|
|
10
|
-
**quantity** | **number** |
|
|
8
|
+
**id** | **string** | Unique identifier for this fulfillment item. | [optional] [default to undefined]
|
|
9
|
+
**itemId** | **string** | The ID of the order item being fulfilled. | [optional] [default to undefined]
|
|
10
|
+
**quantity** | **number** | The number of units of this item included in the fulfillment. | [optional] [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
package/docs/Image.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Image
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A product image associated with an order item.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**id** | **string** | Unique
|
|
10
|
-
**src** | **string** |
|
|
11
|
-
**alt** | **string** |
|
|
12
|
-
**sortOrder** | **number** |
|
|
9
|
+
**id** | **string** | Unique identifier for this image. | [optional] [default to undefined]
|
|
10
|
+
**src** | **string** | The URL of the image. | [optional] [default to undefined]
|
|
11
|
+
**alt** | **string** | Alternative text describing the image content. | [optional] [default to undefined]
|
|
12
|
+
**sortOrder** | **number** | The display order of this image relative to other images for the same item. | [optional] [default to undefined]
|
|
13
13
|
|
|
14
14
|
## Example
|
|
15
15
|
|
package/docs/Order.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Order
|
|
2
2
|
|
|
3
|
+
Represents a print-on-demand order placed on a project. An order contains items, fulfillment details, pricing, and status tracking.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
@@ -7,26 +8,26 @@ Name | Type | Description | Notes
|
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
9
|
**id** | **string** | Unique object identifier | [optional] [default to undefined]
|
|
9
10
|
**ref** | **string** | A reference to the resource location | [optional] [default to undefined]
|
|
10
|
-
**status** | [**Status**](Status.md) |
|
|
11
|
+
**status** | [**Status**](Status.md) | The current status of the order. | [optional] [default to undefined]
|
|
11
12
|
**contactInformation** | [**ContactInformation**](ContactInformation.md) | | [default to undefined]
|
|
12
13
|
**paymentMethod** | [**PaymentMethod**](PaymentMethod.md) | | [optional] [default to undefined]
|
|
13
|
-
**shippingAddress** | [**Address**](Address.md) |
|
|
14
|
+
**shippingAddress** | [**Address**](Address.md) | The address the order will be shipped to. | [default to undefined]
|
|
14
15
|
**customsInformation** | [**CustomsInformation1**](CustomsInformation1.md) | | [optional] [default to undefined]
|
|
15
|
-
**createdAt** | **string** |
|
|
16
|
-
**updatedAt** | **string** |
|
|
17
|
-
**statusChangedAt** | **string** |
|
|
18
|
-
**merchantReference** | **string** |
|
|
19
|
-
**fulfillments** | [**Array<Fulfillment>**](Fulfillment.md) |
|
|
20
|
-
**items** | [**Array<OrderItem>**](OrderItem.md) |
|
|
21
|
-
**totalPrice** | [**Price**](Price.md) |
|
|
22
|
-
**taxPrice** | [**Price**](Price.md) |
|
|
23
|
-
**subtotalPrice** | [**Price**](Price.md) |
|
|
24
|
-
**discountPrice** | [**Price**](Price.md) |
|
|
25
|
-
**coupon** | [**Coupon**](Coupon.md) |
|
|
26
|
-
**shippingPrice** | [**Price**](Price.md) |
|
|
16
|
+
**createdAt** | **string** | When the order was created. | [optional] [default to undefined]
|
|
17
|
+
**updatedAt** | **string** | When the order was last updated. | [optional] [default to undefined]
|
|
18
|
+
**statusChangedAt** | **string** | When the order status last changed. | [optional] [default to undefined]
|
|
19
|
+
**merchantReference** | **string** | Your own reference for this order, such as an order number from your storefront. | [optional] [default to undefined]
|
|
20
|
+
**fulfillments** | [**Array<Fulfillment>**](Fulfillment.md) | The fulfillment groups for this order. Each fulfillment represents a package that will be shipped separately. | [optional] [readonly] [default to undefined]
|
|
21
|
+
**items** | [**Array<OrderItem>**](OrderItem.md) | The line items included in this order. | [default to undefined]
|
|
22
|
+
**totalPrice** | [**Price**](Price.md) | The total price of the order including tax and after discounts. | [optional] [default to undefined]
|
|
23
|
+
**taxPrice** | [**Price**](Price.md) | The total tax amount for the order. | [optional] [default to undefined]
|
|
24
|
+
**subtotalPrice** | [**Price**](Price.md) | The net items price excluding tax and before discounts. | [optional] [default to undefined]
|
|
25
|
+
**discountPrice** | [**Price**](Price.md) | The total discount amount applied to the order. | [optional] [default to undefined]
|
|
26
|
+
**coupon** | [**Coupon**](Coupon.md) | The coupon applied to the order, if any. | [optional] [default to undefined]
|
|
27
|
+
**shippingPrice** | [**Price**](Price.md) | The total shipping cost for the order. | [optional] [default to undefined]
|
|
27
28
|
**origin** | [**Origin**](Origin.md) | | [optional] [default to undefined]
|
|
28
|
-
**statusHistory** | [**Array<StatusHistoryItem>**](StatusHistoryItem.md) |
|
|
29
|
-
**paymentAttempts** | [**Array<PaymentAttempt>**](PaymentAttempt.md) |
|
|
29
|
+
**statusHistory** | [**Array<StatusHistoryItem>**](StatusHistoryItem.md) | A chronological list of status changes for this order. | [optional] [default to undefined]
|
|
30
|
+
**paymentAttempts** | [**Array<PaymentAttempt>**](PaymentAttempt.md) | A list of payment attempts made for this order. | [optional] [default to undefined]
|
|
30
31
|
|
|
31
32
|
## Example
|
|
32
33
|
|
package/docs/OrderItem.md
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
# OrderItem
|
|
2
2
|
|
|
3
|
+
A line item in an order, representing a specific product variant and quantity.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**id** | **string** | Unique
|
|
9
|
+
**id** | **string** | Unique identifier for this order item. | [optional] [readonly] [default to undefined]
|
|
9
10
|
**variantRef** | **string** | A reference to the variant being ordered | [default to undefined]
|
|
10
11
|
**_options** | [**Array<Option>**](Option.md) | Options associated to an order item\'s variant, such as color and size. | [optional] [default to undefined]
|
|
11
|
-
**quantity** | **number** |
|
|
12
|
-
**name** | **string** | The name of the product | [optional] [default to undefined]
|
|
13
|
-
**images** | [**Array<Image>**](Image.md) |
|
|
14
|
-
**totalPrice** | [**Price**](Price.md) |
|
|
15
|
-
**taxPrice** | [**Price**](Price.md) | This is an estimate until the order has been confirmed | [optional] [readonly] [default to undefined]
|
|
16
|
-
**subtotalPrice** | [**Price**](Price.md) |
|
|
17
|
-
**discountPrice** | [**Price**](Price.md) |
|
|
18
|
-
**recipientCost** | [**Price**](Price.md) | The price you charged the recipient for each item.
|
|
12
|
+
**quantity** | **number** | The number of units of this variant to order. | [default to undefined]
|
|
13
|
+
**name** | **string** | The display name of the product. | [optional] [readonly] [default to undefined]
|
|
14
|
+
**images** | [**Array<Image>**](Image.md) | Product images associated with this item. | [optional] [readonly] [default to undefined]
|
|
15
|
+
**totalPrice** | [**Price**](Price.md) | The total price for this line item including tax and after discounts. | [optional] [readonly] [default to undefined]
|
|
16
|
+
**taxPrice** | [**Price**](Price.md) | The tax amount for this line item. This is an estimate until the order has been confirmed. | [optional] [readonly] [default to undefined]
|
|
17
|
+
**subtotalPrice** | [**Price**](Price.md) | The net price for this line item, excluding tax and before discounts. | [optional] [readonly] [default to undefined]
|
|
18
|
+
**discountPrice** | [**Price**](Price.md) | The discount amount applied to this line item. | [optional] [readonly] [default to undefined]
|
|
19
|
+
**recipientCost** | [**Price**](Price.md) | The price you charged the recipient for each item. Highly recommended for international orders as it aids customs declarations. | [optional] [default to undefined]
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
package/docs/OrderTracking.md
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
# OrderTracking
|
|
2
2
|
|
|
3
|
+
Shipment tracking information. Available once the fulfillment has been dispatched.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**courier** | **string** |
|
|
9
|
-
**code** | **string** |
|
|
10
|
-
**url** | **string** |
|
|
9
|
+
**courier** | **string** | The name of the courier service. | [optional] [default to undefined]
|
|
10
|
+
**code** | **string** | The tracking code provided by the courier. | [optional] [default to undefined]
|
|
11
|
+
**url** | **string** | A URL to track the shipment on the courier\'s website. | [optional] [default to undefined]
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
package/docs/OrdersApi.md
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
const configuration = new Configuration();
|
|
30
30
|
const apiInstance = new OrdersApi(configuration);
|
|
31
31
|
|
|
32
|
-
let project: string; //
|
|
32
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
33
33
|
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
34
34
|
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
35
35
|
|
|
@@ -44,7 +44,7 @@ const { status, data } = await apiInstance.cancelOrder(
|
|
|
44
44
|
|
|
45
45
|
|Name | Type | Description | Notes|
|
|
46
46
|
|------------- | ------------- | ------------- | -------------|
|
|
47
|
-
| **project** | [**string**] |
|
|
47
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
48
48
|
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
49
49
|
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
50
50
|
|
|
@@ -92,9 +92,9 @@ import {
|
|
|
92
92
|
const configuration = new Configuration();
|
|
93
93
|
const apiInstance = new OrdersApi(configuration);
|
|
94
94
|
|
|
95
|
-
let project: string; //
|
|
95
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
96
96
|
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
97
|
-
let confirmOrderRequest: ConfirmOrderRequest; //
|
|
97
|
+
let confirmOrderRequest: ConfirmOrderRequest; //Confirm an order by specifying shipping methods for each fulfillment. This submits the order for payment processing and production. Orders should be confirmed promptly after creation — the longer an order remains unconfirmed, the greater the chance that stock availability changes. If stock is no longer available at the time of confirmation, the request will fail and you will need to create a new order.
|
|
98
98
|
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
99
99
|
|
|
100
100
|
const { status, data } = await apiInstance.confirmOrder(
|
|
@@ -109,8 +109,8 @@ const { status, data } = await apiInstance.confirmOrder(
|
|
|
109
109
|
|
|
110
110
|
|Name | Type | Description | Notes|
|
|
111
111
|
|------------- | ------------- | ------------- | -------------|
|
|
112
|
-
| **confirmOrderRequest** | **ConfirmOrderRequest**|
|
|
113
|
-
| **project** | [**string**] |
|
|
112
|
+
| **confirmOrderRequest** | **ConfirmOrderRequest**| Confirm an order by specifying shipping methods for each fulfillment. This submits the order for payment processing and production. Orders should be confirmed promptly after creation — the longer an order remains unconfirmed, the greater the chance that stock availability changes. If stock is no longer available at the time of confirmation, the request will fail and you will need to create a new order. | |
|
|
113
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
114
114
|
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
115
115
|
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
116
116
|
|
|
@@ -133,7 +133,7 @@ const { status, data } = await apiInstance.confirmOrder(
|
|
|
133
133
|
| Status code | Description | Response headers |
|
|
134
134
|
|-------------|-------------|------------------|
|
|
135
135
|
|**200** | Order schema | - |
|
|
136
|
-
|**400** | Failed validation | - |
|
|
136
|
+
|**400** | Failed validation for the confirm request. When the error relates to item fulfillment issues (e.g. stock or availability problems), the response includes an `errors` array with details on each affected item. | - |
|
|
137
137
|
|**401** | Not authorised to access this resource | - |
|
|
138
138
|
|**403** | Refuse to authorize | - |
|
|
139
139
|
|**404** | Resource not found | - |
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
const configuration = new Configuration();
|
|
159
159
|
const apiInstance = new OrdersApi(configuration);
|
|
160
160
|
|
|
161
|
-
let project: string; //
|
|
161
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
162
162
|
let createOrder: CreateOrder; //Create Order schema
|
|
163
163
|
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
164
164
|
|
|
@@ -174,7 +174,7 @@ const { status, data } = await apiInstance.createOrder(
|
|
|
174
174
|
|Name | Type | Description | Notes|
|
|
175
175
|
|------------- | ------------- | ------------- | -------------|
|
|
176
176
|
| **createOrder** | **CreateOrder**| Create Order schema | |
|
|
177
|
-
| **project** | [**string**] |
|
|
177
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
178
178
|
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
179
179
|
|
|
180
180
|
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
const configuration = new Configuration();
|
|
220
220
|
const apiInstance = new OrdersApi(configuration);
|
|
221
221
|
|
|
222
|
-
let project: string; //
|
|
222
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
223
223
|
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
224
224
|
|
|
225
225
|
const { status, data } = await apiInstance.downloadInvoice(
|
|
@@ -232,7 +232,7 @@ const { status, data } = await apiInstance.downloadInvoice(
|
|
|
232
232
|
|
|
233
233
|
|Name | Type | Description | Notes|
|
|
234
234
|
|------------- | ------------- | ------------- | -------------|
|
|
235
|
-
| **project** | [**string**] |
|
|
235
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
236
236
|
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
237
237
|
|
|
238
238
|
|
|
@@ -278,9 +278,9 @@ import {
|
|
|
278
278
|
const configuration = new Configuration();
|
|
279
279
|
const apiInstance = new OrdersApi(configuration);
|
|
280
280
|
|
|
281
|
-
let project: string; //
|
|
282
|
-
let start: string; //Start of date range to filter by when orders were placed (default to undefined)
|
|
283
|
-
let end: string; //End of date range (optional) (default to undefined)
|
|
281
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
282
|
+
let start: string; //Start of the date range to filter by when orders were placed. (default to undefined)
|
|
283
|
+
let end: string; //End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter. (optional) (default to undefined)
|
|
284
284
|
let search: string; //Search term to filter based on order reference, customer name and email (optional) (default to undefined)
|
|
285
285
|
|
|
286
286
|
const { status, data } = await apiInstance.exportOrders(
|
|
@@ -295,9 +295,9 @@ const { status, data } = await apiInstance.exportOrders(
|
|
|
295
295
|
|
|
296
296
|
|Name | Type | Description | Notes|
|
|
297
297
|
|------------- | ------------- | ------------- | -------------|
|
|
298
|
-
| **project** | [**string**] |
|
|
299
|
-
| **start** | [**string**] | Start of date range to filter by when orders were placed | defaults to undefined|
|
|
300
|
-
| **end** | [**string**] | End of date range | (optional) defaults to undefined|
|
|
298
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
299
|
+
| **start** | [**string**] | Start of the date range to filter by when orders were placed. | defaults to undefined|
|
|
300
|
+
| **end** | [**string**] | End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter. | (optional) defaults to undefined|
|
|
301
301
|
| **search** | [**string**] | Search term to filter based on order reference, customer name and email | (optional) defaults to undefined|
|
|
302
302
|
|
|
303
303
|
|
|
@@ -344,7 +344,7 @@ import {
|
|
|
344
344
|
const configuration = new Configuration();
|
|
345
345
|
const apiInstance = new OrdersApi(configuration);
|
|
346
346
|
|
|
347
|
-
let project: string; //
|
|
347
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
348
348
|
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
349
349
|
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
350
350
|
|
|
@@ -359,7 +359,7 @@ const { status, data } = await apiInstance.getOrder(
|
|
|
359
359
|
|
|
360
360
|
|Name | Type | Description | Notes|
|
|
361
361
|
|------------- | ------------- | ------------- | -------------|
|
|
362
|
-
| **project** | [**string**] |
|
|
362
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
363
363
|
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
364
364
|
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
365
365
|
|
|
@@ -406,15 +406,15 @@ import {
|
|
|
406
406
|
const configuration = new Configuration();
|
|
407
407
|
const apiInstance = new OrdersApi(configuration);
|
|
408
408
|
|
|
409
|
-
let project: string; //
|
|
409
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
410
410
|
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
411
411
|
let pageToken: number; //Page reference token (optional) (default to 1)
|
|
412
412
|
let pageSize: number; //Max page size. This is the maximum page size that will be returned, but it might be smaller. (optional) (default to 100)
|
|
413
413
|
let search: string; //Search term to filter based on order reference, customer name and email (optional) (default to undefined)
|
|
414
|
-
let ids: Array<string>; //
|
|
415
|
-
let statuses: Array<Status>; //Filter by
|
|
416
|
-
let start: string; //Start of date range (optional) (default to undefined)
|
|
417
|
-
let end: string; //End of date range (optional) (default to undefined)
|
|
414
|
+
let ids: Array<string>; //Filter to specific order IDs. Only orders matching these IDs will be returned. (optional) (default to undefined)
|
|
415
|
+
let statuses: Array<Status>; //Filter by order status. Only orders matching one of the given statuses will be returned. (optional) (default to undefined)
|
|
416
|
+
let start: string; //Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter. (optional) (default to undefined)
|
|
417
|
+
let end: string; //End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter. (optional) (default to undefined)
|
|
418
418
|
let dateFilterType: 'createdAt' | 'updatedAt' | 'statusChangedAt'; //Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query. (optional) (default to 'createdAt')
|
|
419
419
|
|
|
420
420
|
const { status, data } = await apiInstance.getOrders(
|
|
@@ -435,15 +435,15 @@ const { status, data } = await apiInstance.getOrders(
|
|
|
435
435
|
|
|
436
436
|
|Name | Type | Description | Notes|
|
|
437
437
|
|------------- | ------------- | ------------- | -------------|
|
|
438
|
-
| **project** | [**string**] |
|
|
438
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
439
439
|
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
440
440
|
| **pageToken** | [**number**] | Page reference token | (optional) defaults to 1|
|
|
441
441
|
| **pageSize** | [**number**] | Max page size. This is the maximum page size that will be returned, but it might be smaller. | (optional) defaults to 100|
|
|
442
442
|
| **search** | [**string**] | Search term to filter based on order reference, customer name and email | (optional) defaults to undefined|
|
|
443
|
-
| **ids** | **Array<string>** |
|
|
444
|
-
| **statuses** | **Array<Status>** | Filter by
|
|
445
|
-
| **start** | [**string**] | Start of date range | (optional) defaults to undefined|
|
|
446
|
-
| **end** | [**string**] | End of date range | (optional) defaults to undefined|
|
|
443
|
+
| **ids** | **Array<string>** | Filter to specific order IDs. Only orders matching these IDs will be returned. | (optional) defaults to undefined|
|
|
444
|
+
| **statuses** | **Array<Status>** | Filter by order status. Only orders matching one of the given statuses will be returned. | (optional) defaults to undefined|
|
|
445
|
+
| **start** | [**string**] | Start of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter. | (optional) defaults to undefined|
|
|
446
|
+
| **end** | [**string**] | End of date range filter. Which date field this applies to is controlled by the `dateFilterType` parameter. | (optional) defaults to undefined|
|
|
447
447
|
| **dateFilterType** | [**'createdAt' | 'updatedAt' | 'statusChangedAt'**]**Array<'createdAt' | 'updatedAt' | 'statusChangedAt'>** | Specifies the type of date range filter to apply. Determines which date field the `start` and `end` fields should query. | (optional) defaults to 'createdAt'|
|
|
448
448
|
|
|
449
449
|
|
|
@@ -488,7 +488,7 @@ import {
|
|
|
488
488
|
const configuration = new Configuration();
|
|
489
489
|
const apiInstance = new OrdersApi(configuration);
|
|
490
490
|
|
|
491
|
-
let project: string; //
|
|
491
|
+
let project: string; //The project identifier to scope the request to. (default to undefined)
|
|
492
492
|
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
493
493
|
let fields: string; //Specifies which fields to return, separated by commas (optional) (default to undefined)
|
|
494
494
|
|
|
@@ -503,7 +503,7 @@ const { status, data } = await apiInstance.retryPlatformPayment(
|
|
|
503
503
|
|
|
504
504
|
|Name | Type | Description | Notes|
|
|
505
505
|
|------------- | ------------- | ------------- | -------------|
|
|
506
|
-
| **project** | [**string**] |
|
|
506
|
+
| **project** | [**string**] | The project identifier to scope the request to. | defaults to undefined|
|
|
507
507
|
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
508
508
|
| **fields** | [**string**] | Specifies which fields to return, separated by commas | (optional) defaults to undefined|
|
|
509
509
|
|
package/docs/Origin.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# Origin
|
|
2
2
|
|
|
3
|
+
The marketing or acquisition source of the order, such as `facebook_cpc`, `google_cpc`, or `organic`.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**code** | **string** |
|
|
9
|
-
**isPaid** | **boolean** |
|
|
9
|
+
**code** | **string** | A short identifier for the acquisition source, such as `facebook_cpc`, `google_cpc`, `instagram_cpc`, or `organic`. | [optional] [default to undefined]
|
|
10
|
+
**isPaid** | **boolean** | Whether this origin represents paid advertising traffic. | [optional] [default to undefined]
|
|
10
11
|
|
|
11
12
|
## Example
|
|
12
13
|
|
package/docs/PaymentAttempt.md
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
# PaymentAttempt
|
|
2
2
|
|
|
3
|
-
List of payment attempts for this order
|
|
4
3
|
|
|
5
4
|
## Properties
|
|
6
5
|
|
|
7
6
|
Name | Type | Description | Notes
|
|
8
7
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**paymentProvider** | **string** |
|
|
10
|
-
**status** | **string** |
|
|
11
|
-
**transactionId** | **string** |
|
|
12
|
-
**message** | **string** |
|
|
8
|
+
**paymentProvider** | **string** | The payment provider used. | [optional] [default to undefined]
|
|
9
|
+
**status** | **string** | The outcome of the payment attempt. | [optional] [default to undefined]
|
|
10
|
+
**transactionId** | **string** | The transaction ID from the payment provider. | [optional] [default to undefined]
|
|
11
|
+
**message** | **string** | A human-readable message describing the payment result. | [optional] [default to undefined]
|
|
13
12
|
**createdAt** | **string** | ISO 8601 Timestamp | [optional] [default to undefined]
|
|
14
13
|
|
|
15
14
|
## Example
|
package/docs/PaymentMethod.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# PaymentMethod
|
|
2
2
|
|
|
3
|
+
The payment method used for this order.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**type** | **string** |
|
|
9
|
+
**type** | **string** | The type of payment method used. | [optional] [default to undefined]
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
package/docs/Price.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Price
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A monetary value with its currency.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
Name | Type | Description | Notes
|
|
8
8
|
------------ | ------------- | ------------- | -------------
|
|
9
|
-
**amount** | **string** |
|
|
10
|
-
**currencyCode** | **string** |
|
|
9
|
+
**amount** | **string** | The monetary amount as a decimal string. | [optional] [default to undefined]
|
|
10
|
+
**currencyCode** | **string** | ISO 4217 currency code. | [optional] [default to undefined]
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# ProductUnavailableError
|
|
2
|
+
|
|
3
|
+
The item cannot be fulfilled at all — either it is out of stock entirely, or the assigned fulfiller cannot produce it (e.g. missing machinery or variant not configured).
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**code** | **string** | | [default to undefined]
|
|
10
|
+
**message** | **string** | Human-readable description including the product name. | [default to undefined]
|
|
11
|
+
**productTitle** | **string** | Display name of the product. | [default to undefined]
|
|
12
|
+
**variantId** | **string** | Unique object identifier | [default to undefined]
|
|
13
|
+
**variantRef** | **string** | A reference to the variant being ordered | [default to undefined]
|
|
14
|
+
**requestedQuantity** | **number** | The quantity that was requested in the order. | [default to undefined]
|
|
15
|
+
**availableQuantity** | **number** | Always 0 for this error type. | [default to undefined]
|
|
16
|
+
**shortage** | **number** | The full requested quantity, representing the total unfulfillable amount. | [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { ProductUnavailableError } from '@teemill/orders';
|
|
22
|
+
|
|
23
|
+
const instance: ProductUnavailableError = {
|
|
24
|
+
code,
|
|
25
|
+
message,
|
|
26
|
+
productTitle,
|
|
27
|
+
variantId,
|
|
28
|
+
variantRef,
|
|
29
|
+
requestedQuantity,
|
|
30
|
+
availableQuantity,
|
|
31
|
+
shortage,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# RecipientCost
|
|
2
|
+
|
|
3
|
+
The price you charged the end customer for this item. Highly recommended for international orders as it is used for customs declarations.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**amount** | **string** | The monetary amount as a decimal string. | [default to undefined]
|
|
10
|
+
**currencyCode** | **string** | ISO 4217 currency code. | [default to undefined]
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { RecipientCost } from '@teemill/orders';
|
|
16
|
+
|
|
17
|
+
const instance: RecipientCost = {
|
|
18
|
+
amount,
|
|
19
|
+
currencyCode,
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/Shipment.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Shipment
|
|
2
|
+
|
|
3
|
+
Your own shipping label details.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**image** | **string** | A URL to the shipping label image or PDF. | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Shipment } from '@teemill/orders';
|
|
15
|
+
|
|
16
|
+
const instance: Shipment = {
|
|
17
|
+
image,
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/ShippingMethod.md
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
# ShippingMethod
|
|
2
2
|
|
|
3
|
+
A shipping option available for a fulfillment, including delivery estimates and pricing.
|
|
3
4
|
|
|
4
5
|
## Properties
|
|
5
6
|
|
|
6
7
|
Name | Type | Description | Notes
|
|
7
8
|
------------ | ------------- | ------------- | -------------
|
|
8
|
-
**id** | **string** | Unique
|
|
9
|
-
**name** | **string** |
|
|
10
|
-
**description** | **string** |
|
|
9
|
+
**id** | **string** | Unique identifier for this shipping method. Use this when confirming a fulfillment. | [optional] [default to undefined]
|
|
10
|
+
**name** | **string** | The display name of the shipping method. | [optional] [default to undefined]
|
|
11
|
+
**description** | **string** | A brief description of the shipping method\'s service level. | [optional] [default to undefined]
|
|
11
12
|
**deliveryEstimates** | [**DeliveryEstimates**](DeliveryEstimates.md) | | [optional] [default to undefined]
|
|
12
|
-
**totalPrice** | [**Price**](Price.md) |
|
|
13
|
-
**taxPrice** | [**Price**](Price.md) |
|
|
14
|
-
**subtotalPrice** | [**Price**](Price.md) |
|
|
15
|
-
**discountPrice** | [**Price**](Price.md) |
|
|
13
|
+
**totalPrice** | [**Price**](Price.md) | The total shipping cost including tax. | [optional] [default to undefined]
|
|
14
|
+
**taxPrice** | [**Price**](Price.md) | The tax portion of the shipping cost. | [optional] [default to undefined]
|
|
15
|
+
**subtotalPrice** | [**Price**](Price.md) | The net shipping cost, excluding tax and before discounts. | [optional] [default to undefined]
|
|
16
|
+
**discountPrice** | [**Price**](Price.md) | Any discount applied to the shipping cost. | [optional] [default to undefined]
|
|
16
17
|
|
|
17
18
|
## Example
|
|
18
19
|
|
package/docs/Status.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# Status
|
|
2
2
|
|
|
3
|
+
The lifecycle status of an order or fulfillment: - `new` — Order has been created but not yet confirmed or paid - `paid` — Payment has been received, awaiting fulfillment - `processing` — Order is being produced or packed - `complete` — Order has been shipped - `refunded` — Order has been refunded - `quote` — Order is a draft quote, not yet submitted - `moderation` — Order is held for review
|
|
3
4
|
|
|
4
5
|
## Enum
|
|
5
6
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# StockConflictError
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**code** | **string** | | [default to undefined]
|
|
9
|
+
**message** | **string** | Human-readable description including the product name. | [default to undefined]
|
|
10
|
+
**productTitle** | **string** | Display name of the product. | [default to undefined]
|
|
11
|
+
**variantId** | **string** | Unique object identifier | [default to undefined]
|
|
12
|
+
**variantRef** | **string** | A reference to the variant being ordered | [default to undefined]
|
|
13
|
+
**requestedQuantity** | **number** | The quantity that was requested in the order. | [default to undefined]
|
|
14
|
+
**availableQuantity** | **number** | Always 0 for this error type. | [default to undefined]
|
|
15
|
+
**shortage** | **number** | The full requested quantity, representing the total unfulfillable amount. | [default to undefined]
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { StockConflictError } from '@teemill/orders';
|
|
21
|
+
|
|
22
|
+
const instance: StockConflictError = {
|
|
23
|
+
code,
|
|
24
|
+
message,
|
|
25
|
+
productTitle,
|
|
26
|
+
variantId,
|
|
27
|
+
variantRef,
|
|
28
|
+
requestedQuantity,
|
|
29
|
+
availableQuantity,
|
|
30
|
+
shortage,
|
|
31
|
+
};
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# StockUnavailableError
|
|
2
|
+
|
|
3
|
+
The requested quantity exceeds available stock. The item can still be ordered in a smaller quantity.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**code** | **string** | | [default to undefined]
|
|
10
|
+
**message** | **string** | Human-readable description including the product name and available quantity. | [default to undefined]
|
|
11
|
+
**productTitle** | **string** | Display name of the product. | [default to undefined]
|
|
12
|
+
**variantId** | **string** | Unique object identifier | [default to undefined]
|
|
13
|
+
**variantRef** | **string** | A reference to the variant being ordered | [default to undefined]
|
|
14
|
+
**requestedQuantity** | **number** | The quantity that was requested in the order. | [default to undefined]
|
|
15
|
+
**availableQuantity** | **number** | The quantity currently available for fulfillment. | [default to undefined]
|
|
16
|
+
**shortage** | **number** | The difference between requested and available quantity (positive value indicating the deficit). | [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { StockUnavailableError } from '@teemill/orders';
|
|
22
|
+
|
|
23
|
+
const instance: StockUnavailableError = {
|
|
24
|
+
code,
|
|
25
|
+
message,
|
|
26
|
+
productTitle,
|
|
27
|
+
variantId,
|
|
28
|
+
variantRef,
|
|
29
|
+
requestedQuantity,
|
|
30
|
+
availableQuantity,
|
|
31
|
+
shortage,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.25.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|